Author Topic: How can I get henchmen to play their "bored" voice?  (Read 394 times)

Legacy_Grymlorde

  • Sr. Member
  • ****
  • Posts: 362
  • Karma: +0/-0
How can I get henchmen to play their "bored" voice?
« on: March 07, 2014, 06:13:24 am »


               

There are some voicesets that include a "bored" speech that isn't heard in game as far as I know. What I'd like to do is have henchmen say the "bored" speech when they are bored. You can tell when they are bored or idle because that's when the model plays the stretch & yawn animation -- so clearly the engine is recognizing the event, just not playing the sound.


 


I've looked through the Omnibus as well as the Lexicon and can't find anything on this. Any ideas?



               
               

               
            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
How can I get henchmen to play their "bored" voice?
« Reply #1 on: March 07, 2014, 11:45:23 am »


               Did you try giving the following action to the henchman?

PlayVoiceChat(VOICE_CHAT_BORED);
               
               

               
            

Legacy_Grymlorde

  • Sr. Member
  • ****
  • Posts: 362
  • Karma: +0/-0
How can I get henchmen to play their "bored" voice?
« Reply #2 on: March 08, 2014, 07:49:43 pm »


               


Did you try giving the following action to the henchman?


PlayVoiceChat(VOICE_CHAT_BORED);




 


No, not yet. How do I capture the event when the henchmen is bored or idle?


               
               

               
            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
How can I get henchmen to play their "bored" voice?
« Reply #3 on: March 08, 2014, 11:22:52 pm »


               You'd need to drill down into the henchman heartbeat event script to find the definitive answer, but I would't be surprised if the bored animation is generated randomly by PlayImmobileAmbientAnimations() rather than an explicit call that can be intercepted.

If so, you might disable that behaviour by commenting out

SetSpawnInCondition (NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS);

on spawn, adding "act bored" code on heartbeat that explicitly plays both the animation and the voicechat.

EDIT : now I'm back at my desk, I can see that the bored animation is indeed played by PlayImmobileAmbientAnimations() in x0_i0_anims, but, short of recompiling all Bioware scripts that contain or inherit it, my advice remains the same! x0_d1_g1_bored does both the animation and the chat, but you'd need to change the first line to make it a henchman rather than a PC.
               
               

               


                     Modifié par Proleric, 09 mars 2014 - 10:52 .
                     
                  


            

Legacy_Grymlorde

  • Sr. Member
  • ****
  • Posts: 362
  • Karma: +0/-0
How can I get henchmen to play their "bored" voice?
« Reply #4 on: March 11, 2014, 03:44:08 pm »


               


You'd need to drill down into the henchman heartbeat event script to find the definitive answer, but I would't be surprised if the bored animation is generated randomly by PlayImmobileAmbientAnimations() rather than an explicit call that can be intercepted.


If so, you might disable that behaviour by commenting out


SetSpawnInCondition (NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS);


on spawn, adding "act bored" code on heartbeat that explicitly plays both the animation and the voicechat.


EDIT : now I'm back at my desk, I can see that the bored animation is indeed played by PlayImmobileAmbientAnimations() in x0_i0_anims, but, short of recompiling all Bioware scripts that contain or inherit it, my advice remains the same! x0_d1_g1_bored does both the animation and the chat, but you'd need to change the first line to make it a henchman rather than a PC.




 


Thanks Proleric! I'll give it a shot.


               
               

               
            

Legacy_Grymlorde

  • Sr. Member
  • ****
  • Posts: 362
  • Karma: +0/-0
How can I get henchmen to play their "bored" voice?
« Reply #5 on: March 12, 2014, 08:21:21 pm »


               

Now I can't get the henchmen to shut up. . . '<img'>


 


Here's what I did:


 


In the spawn script I changed the SpawnInCondition to NW_FLAG_HEARTBEAT_EVENT


 


In the user defined script I wrote


 


if (nEvent == 1001)


{


     DelayCommond(60.0f, ExecuteScript("hen_bored", OBJECT_SELF));


}


 


Hen_Bored is:


void main()


{


     PlayVoiceChat(VOICE_CHAT_BORED, OBJECT_SELF);


     AssignCommand(OBJECT_SELF, PlayAnimation(ANIMATION_FIREFORGET_PAUSE_BORED));


}


 


While the initial boredom complaint happens after 60 seconds, it then fires every hearbeat thereafter. And what's weird (or hillarious) is that if the master runs away from the annoying henchman, the henchman follows hims (as he's supposed to) but stops every heartbeat to complain of boredom. In the fact the henchman's ennui is so overwhelming that after each monster he kills, he announces to the world that he's bored before proceeding to kill the next goblin!


 


How can get this poor guy to stop complaining every heartbeat?



               
               

               
            

Legacy_Grymlorde

  • Sr. Member
  • ****
  • Posts: 362
  • Karma: +0/-0
How can I get henchmen to play their "bored" voice?
« Reply #6 on: March 12, 2014, 09:32:40 pm »


               

Fixed it!


 


I changed Hen_Bored to:


 


void main()


{


     int nResult;


     nResult = d4();


     If (nResult==4)


     {


          PlayVoiceChat(VOICE_CHAT_BORED, OBJECT_SELF);


          AssignCommand(OBJECT_SELF, PlayAnimation(ANIMATION_FIREFORGET_PAUSE_BORED));


     }


}


 


 


Now I'm debating having the variable based on wisdom, e.g. d4 for Low Wisdom, d6 for Average Wisdom, etc. I haven't decided if I'll go that far but it does what I need for now.


 


Unless there is a better way. . .?


 


Cheers!



               
               

               
            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
How can I get henchmen to play their "bored" voice?
« Reply #7 on: March 12, 2014, 11:41:53 pm »


               That's it, in essence.


I'm not sure why you wait 60 seconds? Maybe better to speak immediately, as who knows what might happen in the interim?


I use a system which queues companion interjections, interrupting the player on heartbeat, but only when idle (this to prevent important discussions being cancelled by combat etc). That might be over-complicated, though.


You might look at the frequency in PlayImmobileAmbientAnimations() if you find the interruption happens too often, once the novelty has worn off.
               
               

               
            

Legacy_Grymlorde

  • Sr. Member
  • ****
  • Posts: 362
  • Karma: +0/-0
How can I get henchmen to play their "bored" voice?
« Reply #8 on: March 13, 2014, 03:42:42 pm »


               


That's it, in essence.


I'm not sure why you wait 60 seconds? Maybe better to speak immediately, as who knows what might happen in the interim?


I use a system which queues companion interjections, interrupting the player on heartbeat, but only when idle (this to prevent important discussions being cancelled by combat etc). That might be over-complicated, though.


You might look at the frequency in PlayImmobileAmbientAnimations() if you find the interruption happens too often, once the novelty has worn off.




 


I removed the wait 60 seconds, just forgot to mention that.


 


I'd love to see your companion interjection queuing system as my intent all along has been to detect when the party was idle.


               
               

               
            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
How can I get henchmen to play their "bored" voice?
« Reply #9 on: March 14, 2014, 07:47:22 am »


               These are my scripts for single player - a bit scruffy, as they've evolved considerably.

Firstly, to store something the companion needs to say (perhaps in a few days time):


   Spoiler
   


At the end of the henchman heartbeat script:

   Spoiler
   


The "force talk" routine (which re-queues the message if it can't be delivered for some reason):

   Spoiler
   


There are many situations in which this is useful. Example 1: when a bunch of monsters have been defeated, I want the companion to move the plot along in conversation, but that can't happen immediately, because the player is "too excited to talk", so I queue the message. Example 2: three days later, the companion remembers something important.


This is what I do, but, of course, there may be far better ways.
               
               

               
            

Legacy__Guile

  • Hero Member
  • *****
  • Posts: 1308
  • Karma: +0/-0
How can I get henchmen to play their "bored" voice?
« Reply #10 on: March 15, 2014, 09:12:12 am »


               

Put them in an empty module?   '<img'>