Jump to content

Making a creature "talk"


scarycave

Recommended Posts

I started this experiment a few weeks ago after working with some creatures in FO3 Geck.

I'm pretty much trying to get a creature to talk like a normal npc, I find that having to pop-up a message box ruins the immersion flow of the game - at least for a living thing - if someone makes a robot or golem companion that would actually make sense (and you should do that right now - there are no automatons in oblivion. :()

 

Anyways - it works like this:

The player activates the creature

The creature runs an onactivate block - calling over his "spokesperson" (enabling him, and moveto self)

The speaker runs his ambush package and talks to the player with a large radius.

(Basically to hide that he/she/it can't walk when the speaker is inside the host like a talkative little parasite in a messed up disney movie that I should definitely write - it could be about tape-worms. I'm sure kids love tape-worms - singing tape worms.)

 

This seems to work - and I'd love to make a mod for the Dark Brotherhoods door or some other things with the world-space LordGuido has been helping me with. What doesn't work is the "visuals", the game always zooms in on the speaker, and since he's set to jump to the creatures center (I don't know how to track the head) the view will clip through thanks to the zoom.

 

I searched online and found an eerily similar discussion on the construction wiki, which means this has been suggested before but never finished to my knowledge (It totally works guys, just need to fix the zoom).

 

I'd really appreciate any help on how to accomplish this and people like me who love making creature followers won't have to use the message box system anymore.

 

Here's an image from the experiment to help you see what I'm rambling on about:

http://oblivion.nexusmods.com/images/4503927-1361547953.jpg

 

 

Link to comment
Share on other sites

  • Replies 47
  • Created
  • Last Reply

Top Posters In This Topic

It sounds like you just need to adjust the MoveTo command with some additional coordinates. That particular line would look like this:

 

NPCRef.MoveTo DogRef 0, 36, -52

 

That coordinate setup will (hopefully) put the NPC's face right where the dog's face is. Other creatures will require different offsets for this to work with them. The easiest way I know of to find the appropriate offset is to:

 

1. Place a version of the "talking" creature in a blank cell.

2. Manually set the creature's coordinates to 0 (all three axis positions).

3. Place a race appropriate NPC in the cell and move it around until its face is positioned in the same spot as the creature's face.

4. Double click in the NPC and record the coordinates (X should be 0, while Y and Z should have positive and negative values respectively).

 

^That's how I obtained the above coordinates. it should be noted that I used a male Breton NPC to obtain them. The coordinates will be different for races with different heights.

Link to comment
Share on other sites

The coordinates seem to work for the position, though I had to make the -52 a positive number because it resulted in the npc getting stuck in the floor.

When I put the Npc on top it doesn't seem to bother the creatures movement. The zoom is still a bit of a problem, if there was a command that could disable/enable that would help a lot. Like a way to just have the conversation start from where your facing, rather than going in for a close up.

Link to comment
Share on other sites

I stumbled across something by accident during a playtest that may help you. Using <player.SetRestrained 1> prevents the camera from moving laterally, not just in game but also during dialogue. So if you are facing 90 degrees away from the speaker, the camera will zoom in directly ahead of you, not towards to the speaker. Chances are, you will not even see them.

So in your OnActivate block, just force the creature to turn towards the player, restrain the player and have your speaker move in. This should roughly emulate a creature talking.

Link to comment
Share on other sites

It seems to work like you said, the problem is still with that zoom effect...Since creatures can be activated on any part of their body, the zoom will just go off to where the player is facing. The game has to have some sort of coding where it checks how close to an npcs face it has to be - if I could just find away to disable it...

Link to comment
Share on other sites

That game setting is controlled in Oblivion.ini with 'fDlgFocus' found in the [interface] section. I have mine set at 'fDlgFocus=5.9500' (the default value is 'fDlgFocus=2.1000'). The problem for you is not everyone will have the same setting, though admittedly not many will know about the setting so they will be at default.

Link to comment
Share on other sites

I see. So I'm guessing its not something that can be controlled by script then...I'd rather not mess with peoples ini files - I try to keep my mods from affecting the game settings and taking up too much space. I was playing with the Menumode block, and I can snap the Npc to the dog on it - so he can have the npc over him while walking, then when the message starts - it jumps to the center, so far there's a single glitch where the dog will spaz out depending on how close he is to a wall (The npc bounces like a ping-pong ball - shaking the dog), of course if I can get the npc to jump to the front of the dog instead it just might work...of course there's still the chance he'll end up in the wall or in the player...

 

Well, no one said this would be easy - or else we would have had it by now.

Still I wonder...if the games activate function can tell npcs from containers and creatures - is their a way to have the game treat creature activation like an npc?

Link to comment
Share on other sites

You can change the ini via script. Most mods that include slow motion work this way. Still, you could probably just use a and to make them face directly at the creature, then a combination of and to make the player look around head height. The exact combination would probably require a little trigonometry to make it perfect and dynamic for different sizes of character and approach angles, or you could just teleport the player a short distance to a specific point, so that the player will always activate the creature from a specific angle every time.

 

I don't think you could force the game, or even trick it, into thinking that the creature is an NPC. Usually, its much easier to trick the player. Maybe you could look into mods that make the player's default race a creature. This guy has made several. The only other thing I can think of doing is if you made the creature you wanted to speak to a mount. When you activate a mount, you will naturally speak to the rider. So if the rider is your speaker, then set the rider's alpha to 0 to ensure fully reliable invisibility, and his scale to 0.001 to ensure he doesn't light up too much when detect life is active.

Edited by WarRatsG
Link to comment
Share on other sites

I looked through a playable-wolf mod, and I'm not too sure about this...

I kind of want to limit the amount of resources - though I haven't gotten a proper look at the mod it was built from.

I think it might help if I get the OBSE working again, since Steam, it just hasn't been working.

Link to comment
Share on other sites

I tried it - I couldn't get it to work, so I tried to delete it after having it joined with my mod, now the mod is ruined, gotta start over again....

I really should have backed-up the coding too....

I think it would be best to keep it simple - for my sake.

Edited by scarycave
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...