Jump to content

Scripting dialogue from topics?


Asterra

Recommended Posts

Seems like you can get NPCs to say things via a script with Say and SayTo. But let's say you want to mimic the game's behavior a little more closely.

 

Scenario: You make an NPC flee for his life. Okay, he's fleeing. But when NPCs do this in the game naturally, they often say something from the "Flee" topic. "Whoa!" "I'm outta here!"

 

Yes, if I spent enough time poking around in the Flee topic tree, I could find all the pertinent bits of dialogue, and if I were really diligent, I could even theoretically parse lists of those refs against the dozen or so fleeing actors to see if there's a match so they'll be able to actually say them.

 

But I think you can see how this isn't a very good idea.

 

What to do? Is there a function or method for making this possible without having to jump through so many hoops?

Edited by Asterra
Link to comment
Share on other sites

I may be misunderstanding the question, but you would like your custom NPC to naturally throw up items from the 'Flee' topic yeah?

This will occur naturally when the custom NPC has any one of the 'xxxDEFAULT' Voice Types - as the VoiceType deals with much to do on who can call from 'Flee' or any of the unique reactive topics, such as 'PLAYERDESTROYOBJECT' etc. Most other voice types will not throw these up, nor will unique voice types without work.

With unique voice types, or NPCs that you want to offer custom dialogue with - the only real way I know is to edit and create new entries under those reactive topics, just like you'd do with a GREETING. Setting the GetIsID to whom you need, and entering custom dialogue under any new quest. Anything you then add will be said by those actors in those situations without scripting a thing. One could technically duplicate infoId's under the same topic and set the appropriate actor conditions but that's far too much time for what it's worth.

Replicating this behaviour is the easiest when an NPC packing a unique voicetype calls a custom infoID entry under the appropriate pre-existing topic.

Sorry if I have misunderstood lol

Link to comment
Share on other sites

I may be misunderstanding the question, but you would like your custom NPC to naturally throw up items from the 'Flee' topic yeah?

 

Not really. For the most part, they're vanilla NPCs.

 

This will occur naturally when the custom NPC has any one of the 'xxxDEFAULT' Voice Types

 

The difficulty I am having is that this behavior does not occur by default if the fleeing reaction has been induced either by a custom package or a scripted function. They just run for it. No voices. Such bits of dialogue are initiated as a "Reaction to player actions", like the flag entry for packages. But since applying a custom package and/or giving an actor a scripted nudge does not meet the game's criteria for "player actions", they say nothing.

 

What would be handy is some means of reproducing a "player action", preferably one which would tap into the same dialogue found in the "Flee" topic, similar to how friendly fire borrows dialogue from the "Hit" topic.

Edited by Asterra
Link to comment
Share on other sites

Oh I see what you mean! Yeah, unfortunately I never truly figured out how to do such either. I had the same difficulties when I created a custom fleeing scene - I ended up having to jury rig the route of those fleeing NPCs with plain old primitives that triggered a 'say' script of a custom line when they passed through. It shallowly passed as natural, but it's hardly modular, doesn't mimic game behaviour like we want, and has too many points of failure.

Sorry I couldn't be of more help!

Edited by DylanHollis
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...