Difference between revisions of "Talking Creatures?"

13,875 bytes added ,  15:18, 14 August 2009
m
Robot: Automated text replacement (-(?s)(.*)\[\[Category: *Questions.*?\]\](.*) +{{Discussion}}\n\1\2)
imported>TheImperialDragon
(Neither scripts worked)
imported>CSbot
m (Robot: Automated text replacement (-(?s)(.*)\[\[Category: *Questions.*?\]\](.*) +{{Discussion}}\n\1\2))
 
(35 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{Discussion}}
== Question ==
== Question ==


Line 8: Line 9:


:::It may depend on the kind of creature you are using.  Dremoras and Vampires are not considered creatures, but as NPCs, so that could be an option to use one of them instead.  Or, maybe you could try an [[OnActivate]] script for the creature to talk to the player (using [[StartConversation]]) when the player "Activates" the creature.  Perhaps this will work?  The only problem I can think of for this (If this would even work) is how to get the voice in sync with the creature's mouth.  This whole thing probably won't work, but maybe it's worth a try?--[[User:TheImperialDragon|TheImperialDragon]] 18:11, 28 May 2006 (EDT)
:::It may depend on the kind of creature you are using.  Dremoras and Vampires are not considered creatures, but as NPCs, so that could be an option to use one of them instead.  Or, maybe you could try an [[OnActivate]] script for the creature to talk to the player (using [[StartConversation]]) when the player "Activates" the creature.  Perhaps this will work?  The only problem I can think of for this (If this would even work) is how to get the voice in sync with the creature's mouth.  This whole thing probably won't work, but maybe it's worth a try?--[[User:TheImperialDragon|TheImperialDragon]] 18:11, 28 May 2006 (EDT)
::::Nice idea!! Try scripting the invisible NPC,to follow it! Right Inside Its Mesh!
::::Though I think that would only be for ones added with it :X - AWEKZ 00:38, 2 October 2008
:::::See below for the answer to this concept. And you can't place an NPC inside the creatures mesh because the collision won't allow it...
:::::--[[User:ShadowDancer|ShadowDancer]] 23:20, 3 October 2008 (EDT)


::::Well, chances are that no one's going to be able to read this creature's lips, so... depending on the creature, maybe there's a growl or roar animation that you could use? --[[User:DragoonWraith|DragoonWraith]] 19:19, 28 May 2006 (EDT)
::::Well, chances are that no one's going to be able to read this creature's lips, so... depending on the creature, maybe there's a growl or roar animation that you could use? --[[User:DragoonWraith|DragoonWraith]] 19:19, 28 May 2006 (EDT)
Line 65: Line 73:
::::::::[[User:DragoonWraith|<font face="Oblivion,Daedric" size=3>D</font>ragoon <font face="Oblivion,Daedric" size=3>W</font>raith]] [[User_talk:DragoonWraith|<font face="Oblivion,Daedric" size=2>TALK</font>]] 22:50, 29 May 2006 (EDT): I don't know enough about the details involved to say.
::::::::[[User:DragoonWraith|<font face="Oblivion,Daedric" size=3>D</font>ragoon <font face="Oblivion,Daedric" size=3>W</font>raith]] [[User_talk:DragoonWraith|<font face="Oblivion,Daedric" size=2>TALK</font>]] 22:50, 29 May 2006 (EDT): I don't know enough about the details involved to say.


:::::::::Maybe the orc face (with extreme slider adjustments) looks enough like the goblin that I could use a small orc for the goblins who need to speak. Iw ould have to make the skin textures yellowish brown though. The face nifs have all those animation nodes like armour so I think making a new goblin facegen nif would be hard. Does anyone know how to make them? [[User:Sykotik|sykotik]] 12:08, 30 May 2006 (EDT)
:::::::::Maybe the orc face (with extreme slider adjustments) looks enough like the goblin that I could use a small orc for the goblins who need to speak. I would have to make the skin textures yellowish brown though. The face nifs have all those animation nodes like armour so I think making a new goblin facegen nif would be hard. Does anyone know how to make them? [[User:Sykotik|sykotik]] 12:08, 30 May 2006 (EDT)


[[User:DragoonWraith|<font face="Oblivion,Daedric" size=3>D</font>ragoon <font face="Oblivion,Daedric" size=3>W</font>raith]] [[User_talk:DragoonWraith|<font face="Oblivion,Daedric" size=2>TALK</font>]] 12:19, 30 May 2006 (EDT): First off, hauling this back to the left margin, eleven indents is just silly. Secondly, I don't think we can, yet. Actually, considering that FaceGen is involved, it's conceivable that we wouldn't be able to even with the official exporter.
[[User:DragoonWraith|<font face="Oblivion,Daedric" size=3>D</font>ragoon <font face="Oblivion,Daedric" size=3>W</font>raith]] [[User_talk:DragoonWraith|<font face="Oblivion,Daedric" size=2>TALK</font>]] 12:19, 30 May 2006 (EDT): First off, hauling this back to the left margin, eleven indents is just silly. Secondly, I don't think we can, yet. Actually, considering that FaceGen is involved, it's conceivable that we wouldn't be able to even with the official exporter.
Line 211: Line 219:
:Erm...  Neither quite worked...
:Erm...  Neither quite worked...


:Both had similar results, it's just that the goblin didn't look at anybody.  In your script, the NPC ended up outside the goblin again, and the game zoomed in on thin air, by which I mean the invisible NPC, which is what I was trying to describe above.  First, we'll need to find an alternative to [[Look]].
:Both had similar results, it's just that the goblin didn't look at anybody.  In your script, the NPC ended up outside the goblin again, and the game zoomed in on thin air, by which I mean the invisible NPC, which is what I was trying to describe above.  First, we'll need to find an alternative to [[Look]], and a way to have the goblin move with the NPC.
[[Category:Questions]]
 
::[[User:DragoonWraith|<font face="Oblivion,Daedric" size=3>D</font>ragoon <font face="Oblivion,Daedric" size=3>W</font>raith]] [[User_talk:DragoonWraith|<font face="Oblivion,Daedric" size=2>TALK</font>]] 20:09, 5 June 2006 (EDT): OK, questions about MoveTo and MoveToMarker, and their use for this purpose: Why do you need to use MoveToMarker in your script? Wouldn't Talker.MoveTo GoblinPassive serve the same cause? On the flip side, if not, would use MoveToMarker improve my script?
 
:I don't know the difference between them, except that MoveToMarker is probably meant for X Markers (implied by the name of the function) and that MoveTo seems to indicate any general object.  I'll try and research the difference if there is any.  Yes, MoveTo would probably do for all intents and purposes of this script.
 
:On the other hand, now that I think about it, MoveToMarker may be vector oriented, and MoveTo might not be.  I'll have a look at the different instances in the game and see what the difference is. [[User:TheImperialDragon|TheImperialDragon]] 20:28, 5 June 2006 (EDT)
 
 
:Well, I couldn't find any immediate difference between the two, however, they do both work.
 
 
:As for the Talking Creatures.  I can think of only one way to get this so far.  Have the goblin accessible from only one direction, if he's attacked, set his fight to 90 or whatever, put a Return command at the top of the script, and disable the NPC.  There could be a reset after maybe 3 days, and that's basically it. [[User:TheImperialDragon|TheImperialDragon]] 22:42, 7 June 2006 (EDT)
 
[[Omzy]] To put the npc inside the goblin why not do it all OnActivate? Just use the (PlaceAtMe actorName) function since the calling actor is the goblin itself. Use GetPos x, y, and z. Then use the actorName.MoveTo x-5, y, z (5 units behind goblin) for fine tuning. If all of this is done OnActivate it would not only save the memory of having the npc and goblin traveling together during every frame but also keep the goblin from being stuck at an xmarker. Just Kill, Disable, and DeleteFullActorCopy (as [[User:MaXiMiUS|MaXiMiUS]] pointed out) after the event is finished. To get the goblin to face the PC get the PC's degree rotation values and set the goblin up 180 degrees the opposite of the player heading right before the conversation with the npc is initiated. This should make them face one another.
 
:For most of what you're saying, we already tried.
 
:To go into more depth, the PlaceAtMe is a good idea, but unless the game is told to do this every frame, the NPC ends up WAY outside the goblin, due to collision issues.  Furthermore, the script is already OnActivate, or at least the dialogue part.  The PlaceAtMe every frame should be able to do the trick to have the goblin travel.
 
:Good thinking on the rotate angle thing though, I'll give it a try.  With this bit of information, I think we may come to the conclusion of this nightmare of a long answer yet.
 
:Instead of StartConversation, I'll use SayTo, as StartConversation has the NPC approach the player before actually initiating dialogue. [[User:TheImperialDragon|The Imperial Dragon]] 15:23, 8 June 2006 (EDT)
 
 
:Just tested, first two tries didn't work too well.  I'll try again, but change a few things, just to see if this'll work. [[User:TheImperialDragon|The Imperial Dragon]] 15:57, 8 June 2006 (EDT)
 
 
Here's my script.  It works for the most part, but the Angle Set thing isn't working.  Somehow, I think it's something really obvious...  I put a ; in front of those parts.
 
<pre>
scn TalkingCreature
 
short Hurt
short Order
float PCAngle
 
Begin OnMurder
set Hurt to 1
End
 
Begin Gamemode
If Hurt == 1
Return
endif
If GetInSameCell player == 0
Return
elseif GetInSameCell player == 1
Talker.SetActorAlpha 0.0
; set PCAngle to ( GetAngle Z player )
; If PCAngle >= 180
; Set PCAngle to ( PCAngle - 180 )
; elseif PCAngle < 180
; Set PCAngle to ( PCAngle + 180 )
; endif
if Order == 1
GoblinPassive.MoveToMarker Talkertalkshere
Talker.MoveToMarker Talkertalkshere
; GoblinPassive.SetAngle Z, PCAngle
endif
If Order == 2
Talkertalkshere.MoveToMarker Notalking
set Order to 0
endif
endif
End
 
Begin OnHit
set Hurt to 1
End
 
Begin OnActivate
; GoblinPassive.SetAngle Z, PCAngle
Talkertalkshere.MoveTo GoblinPassive
set Order to 1
If Order == 1
; set Order to 2 - *do this in dialogue instead*
GoblinPassive.MoveToMarker Talkertalkshere
Talker.MoveToMarker Talkertalkshere
Talker.StartConversation player GREETING
endif
End
</pre>
 
I don't know, perhaps it is something wrong I did with the variable?  If it is, can someone fix it? [[User:TheImperialDragon|The Imperial Dragon]] 17:09, 8 June 2006 (EDT)
 
[[Omzy]]  Since this script is attached to the creature, GetAngle Z Player will return the angle of the creature. Player.GetAngle Z returns the heading of the player. Hopefully that will fix it. If not...back to the drawin' board!
 
:Thanks, I'll give this a try. [[User:TheImperialDragon|The Imperial Dragon]] 21:56, 8 June 2006 (EDT)
 
 
::[[User:ShadowDancer|ShadowDancer]] 22:34, 9 July 2006 (EDT): Did this ever get solved?  If not I'll take a swing at it.
 
:::Sure, absolutely, feel free to make suggestions and ideas. [[User:TheImperialDragon|The Imperial Dragon]] 22:46, 9 July 2006 (EDT)
 
::::[[User:ShadowDancer|ShadowDancer]] 23:02, 9 July 2006 (EDT): K, I will take a crack at it over the next couple of days.  I am getting pretty good at the whole manipulating the Player thing as far as the direction he is facing, including his viewing angle so hopefully that will be pretty simple for me.  I will give it a quick try when I get home tonight and see what I can come up with.
 
:::Great!  I can also give you a link to my work so far if you are interested. [[User:TheImperialDragon|The Imperial Dragon]] 23:23, 9 July 2006 (EDT)
 
::::[[User:ShadowDancer|ShadowDancer]] 00:09, 10 July 2006 (EDT): That would be great.  It will keep me from totally re-inventing the wheel as it were.
 
 
:::http://rapidshare.de/files/25420002/Talking.esp.html is where you'll find it...  I think I named the cell... AAA? [[User:TheImperialDragon|The Imperial Dragon]] 00:35, 10 July 2006 (EDT)
 
[[User:Yarharhar|Yarharhar]] 22:00, 09 July, 2006: I've stumbled upon another method.  Basically, you make an npc wear a 'creature' costume and use their animations.  I'll detail it more later, but here is the basic procedure:
*Put the dialog you want on the npc of your choice.
*Choose the creature type you want this NPC to be, and copy its skeleton.nif .
*Rename this skeleton something like skeletonNPC.nif
*In nifskope, add the 'important' ninodes to this skeleton from the human skeleton.  These would be ninodes like Quiver, Camera, Sideweapon, etc.  Basically anything that isn't part of the regular skeleton.
*In the construction set, make clothing for each of the creature's mesh parts (like eyes, body, claws, whatever it has)
*Then, under the NPC, choose the new skeleton file you made for it.  Since it is in the creature directory, that character will now use the creature's animation.
*Also, make sure the only clothing that npc has on it is the 'creature' clothing you've made for it. 
*You now have a talking creature
 
[[User: Sickleyield|Sickleyield]] 5 November 2006:
 
I can't get this to work.
 
*I made my NPC Tegeneria a new race (so there wouldn't be default dialogue, just a copy of the Breton).
 
*I gave the NPC Tegeneria the spiderdaedra skeleton, which was called skeleton.nif and located in data\meshes\creatures\spiderdaedra. 
 
*I copied all possible nodes over in NifSkope, but NifSkope does not allow copying of the sideweapon (says something like can't find node when I choose copy; never saw THAT before).
 
*I made clothing from the spider daedra's body and claws.  The CS refuses to recognize the hair mesh as a nif.
 
*I equipped the clothing onto Tegeneria, who had no other clothes.
 
*I placed Tegeneria in a cell.
 
*The Construction Set crashed at once.  Happened repeatedly.  I cannot place the NPC in a cell without this happening.
 
Is it possible this method only works with bipedal creatures?
 
 
:[[User:ShadowDancer|ShadowDancer]] 07:31, 10 July 2006 (EDT): And if you don't want to play with the nifskope (which I would say is actually probably the better route to go as far as mechanics in the game go since even the script I polished up (thanks for giving me the staring point [[User:TheImperialDragon|The Imperial Dragon]]) is still a bit rough with regards to zooming in on the goblin's face and anytime he picks an idle where he is waving his arms around wildly.  I am sure you could do an interrupt package on him to do away with the flailing, but it zooms into his face and I haven't figured out a way to fix that.  Anyways, here is the script sans nifskope:
 
<pre>
ScriptName TalkingCreature
 
Short DoOnce
Short Hurt
Short Order
Float PCAngleRef
Float GoblinAngleRef
Float Timer
Ref GuyRef
 
Begin OnMurder
  Set Hurt to 1
End
 
Begin GameMode
 
  If Hurt == 1
      Return
  End If
 
  If GoblinPassive.GetDistance Player > 300 && DoOnce == 1
      Set Order to 0
      Set DoOnce to 0
      If GuyRef.Destroyed == 0
        GuyRef.Disable
        GuyRef.DeleteFullActorCopy
      EndIf
  EndIf
 
  If GoblinPassive.Get Distance Player <= 300 && DoOnce == 0
      Set Order to 1
  EndIf
 
  If Order == 1 && DoOnce == 0
      Set DoOnce to 1
      GoblinPassive.MoveToMarker TalkerTalksHere
  EndIf
 
  If Order == 1 && DoOnce == 1
      Set GoblinAngleRef to GoblinPassive.GetHeadingAngle Player
      Set GoblinAngleRef to GoblinAngleRef / 2
      Set PCAngleRef to Player.GetHeadingAngle GoblinPassive
      Set PCAngleRef to PCAngleRef / 2
      Set Timer to 0
      Set Order to 2
  EndIf
 
  If Order == 2 && Timer < 2
      GoblinPassive.Rotate Z, GoblinAngleRef
      Player.Rotate Z, PCAngleRef
      Set Timer to Timer + GetSecondsPassed
  EndIf
 
  If Order == 2 && Timer >= 2
      GoblinPassive.Rotate Z, 0
      Player.Rotate Z, 0
      Set Order to 3
  EndIf
 
  If Order == 3 && GoblinPassive.Get Distance Player < 110
      Set Order to 4
      Set GuyRef to GoblinPassive.PlaceAtMe TalkingGuy, 1, 60, 1
      GuyRef.SetActorAlpha 0.0
      GuyRef.StartConversation Player GREETING
  EndIf
 
End
 
Begin OnHit
  Set Hurt to 1
End
 
Begin OnActivate
  If Order == 4 && GuyRef.GetDestroyed == 0
      GuyRef.Disable
      GuyRef.DeleteFullActorCopy
  EndIf
  Set Order to 1
End
</pre>
 
:However this does nicely at getting him to talk.  At very least, it was an interesting exercise in scripting.  BTW [[User:TheImperialDragon|The Imperial Dragon]], I re-did your cell a little bit in order to test it out properly.  I added 3 512x512 floortiles to the outside of the towers, switched the markers to the opposite places, added a mages portal, and removed the tower door for testing purposes.  Just wanted to let you know how I set up the cell for this script.
 
 
::[[User:ShadowDancer|ShadowDancer]] 11:16, 10 July 2006 (EDT): I forgot to mention that this works both ways for initializing the conversation.  The NPC can initialize the conversation if the character is within a certain range, or the Player can initialize the conversation by clicking on the NPC even though there is not a symbol showing dialogue on the NPC.  And this script can be changed by altering the Order and DoOnce variables at the beginning of the [[GameMode]] block before anything else initializes to keep the NPC from initiating the conversation.
 
 
:Interesting... That was quick!  I congratulate you on this accomplishment! :)  To be honest, I almost gave up on it as I wasn't sure if this'd work alright with everyone in mind, but it is amazing how fast you figured it out!  So thanks, and I think anyone who'll use this will want to thank you too.  Great Work! [[User:TheImperialDragon|The Imperial Dragon]] 12:36, 10 July 2006 (EDT)
 
 
::[[User:ShadowDancer|ShadowDancer]] 13:30, 10 July 2006 (EDT): Thanks. :) Actually, I have only been playing with the construction set for a couple of weeks now truthfully.  But I think the reason I am such a quick study is that I am used to programming languages and this is a lot like a few of them that I have used over the years, albeit with fewer functions available.  Actually, it reminds me a lot of the things that we did on the old TRS-80s when they first came out with basic (scary days).  I have always been very quick with programming languages though, especially when I just dive in and do things - thats always been how I learned the programming languages best.  It seems that this is no different.
 
::I just wish I could have figured out a way to keep the Goblin from being so close to the viewpoint of the player.  It should also be noted that the displacement of the "GuyRef" will need to be adjusted for smaller actors so that he doesn't decide to come around the actor in order to talk to someone.  If the "GuyRef" is moved closer to the Goblin, it pushes the Goblin forward towards the character which can cause a misalignment between the three characters and thats already touchy enough with the turning and approaching.  Its something that will need to be played with by the user depending on the size of the actor that you are trying to make talk.
 
 
You can also create a talking creature look-a-like by creating a set of clothing for an NPC that looks like a creature. The talking trolls in the Leviticus Mod are done like that.
Anonymous user