Jump to content

idle dialogue conditions not updating


Recommended Posts

So I have run into a weird problem with dialogue conditions.

 

I have a refcollectionalias holding some NPCs, and I want them to speak random lines from a set of Idle Topic Infos. I created the dialogue, I made it conditional on GetIsAliasRef for that refcollection alias, and it worked exactly as desired. So far so good...

 

But this makes the NPCs in that refcollectionalias say those lines all the time. I need them to only say the lines after certain events occur. So I added a HasKeyword condition to the dialogue, and made the script add the keyword to the NPCs when certain things happen. The problem is, when my script puts that keyword on the NPCs, they don't start speaking the lines. I have verified that the script works, the NPCs do have that keyword, etc.

 

More puzzling, if I save my game and load it again, the NPCs start speaking the line. It's as if the condition function results are cached somehow, and are not re-checked until the game is reloaded.

 

Am I missing something obvious here? I've tried various other ways to do the condition - using a faction instead of a keyword, using a linked ref, etc. Nothing seems to work. But in every case, once I save and reload, the condition is re-evaluated and the lines start working.

Link to comment
Share on other sites

I dont have a solution but empathise as I have hit exactly the same issues with dynamic dialogue conditioning on dynamic actor cohorts delivering unpredictable results.

 

I use all sorts of stuff like GlobalVariables, Faction memberships, Bleedoutstate, Keywords, ActorValues on dynamic RefCollection populations and its generally OK.

 

But sometimes Story Manager ignores any dynamic changes until a save and reload, as if it has stopped evaluating dialog conditions and is working with a static snapshot.

 

I have yet to find anyone that can intelligently describe how Story Manager actually works and its operating limits (past monkey-see-monkey-do Youtube button pushing).

Link to comment
Share on other sites

What you are both describing sounds like a memory management thing.

("caching" and "static snapshot" are my indicators here).

 

I'm not up to scripting here yet, but is it possible to "shock" it into re-evaluating, change up form id's, or somehow force them to re-evaluate their place in the universe?

Curious if it would work dynamically if you change locations (and back).

As sometimes I've had to do to "stimulate results" as a player. :rolleyes:

Link to comment
Share on other sites

Story Manager is a core platform component that runs the condition system.

 

Its a black box with one known scripted input command (SendStoryEvent) and a bunch of event ouputs.

 

As Bethesda are unlikely to release the dev specs it needs someone to invest the time with a VC decompiler and debugger to understand how it works.

 

And then there would still be no additional script interfaces without developing something with F4SE DLL injection.

Link to comment
Share on other sites

I dont have a solution but empathise as I have hit exactly the same issues with dynamic dialogue conditioning on dynamic actor cohorts delivering unpredictable results.

Thanks, at least I know I'm in good company.

 

The closest to a working result I was able to achieve was by putting the actors into a second refcollectionalias when I want them to speak the lines, and conditioning the lines on that (and only that). That seems to work most of the time, but again sometimes it fails.

 

What a headache. I'm thinking of giving up and adding code to the refcollectionalias to simulate idle dialogue via random timer. It's more work and less efficient, but at least I know I can make it work reliably.

Link to comment
Share on other sites

I'm not up to scripting here yet, but is it possible to "shock" it into re-evaluating, change up form id's, or somehow force them to re-evaluate their place in the universe?

 

This sounds right intuitively, and there are other systems in the engine that sometimes need "shocking", like the idle animation system.

 

I suspect it was done that way for efficiency's sake, so the game isn't really re-evaluating conditions on an actor unless it has to. Would be nice if any of this were documented :(

Link to comment
Share on other sites

Thanks for the link SKK50, I think i finally understood something... :huh:

 

Here's my theory, take it with a grain of salt, I'm just eeking my way into this.

 

The refcollection exists before the trigger event and is "always/already True".

(It's an object oriented logic thing).

That's why they always did it initially without conditions.
Then when conditions are added they exist already (as True) waiting on a condition that changes nothing (eg. sets them to true),

They aren't checking their state (again, because they already exist as True) so trigger never "shocks them".

As a result it can only work once the conditional is True AND they are (re)loaded.

 

TL:DR refcollection needs to be set as False/Off, and made True/On by trigger event or created by it.

(However you code that) :unsure:

Link to comment
Share on other sites

  • Recently Browsing   0 members

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