Jump to content

Very weird ignoring of conditions in dialogue


Recommended Posts

5 hours ago, xkkmEl said:

You do use UpdateCurrentInstanceGlobal ?  And you did put the globalvar in the quest's "Text Display Globals"?

I hate globalvars.  I use quest properties and GetVMQuestVariable wherever I can.

Sorry if I have this wrong, but AFAIK, updating via updatecurrentinstantglobal is relevant for the <alias=globalvariabe> stuff that is in dialogue. The global variable checks via conditions are looking at the GV themselves. Thus far in the development in my mod they have worked that way.

Link to comment
Share on other sites

Being a globalvar hater, I'm not the best reference.

You are definitely right about the text replacement (though the syntax is <global=gv>), and about accessing globalvars from scripts.  I am less sure about conditions within the scope of an owning quest.  This uncertainty is what fuels my hate of globals.

Where I have successfully used globals with changing values in dialogues, I have calls to updateCurrentInstanceGlobal.  I have not tried removing them, but I added them in the face of failures similar to yours, though I do not know if I also changed other things at the same time.  The other thing I may have changed at the same time is putting the script in the left-hand pane instead of the right.

Link to comment
Share on other sites

6 hours ago, xkkmEl said:

Being a globalvar hater, I'm not the best reference.

You are definitely right about the text replacement (though the syntax is <global=gv>), and about accessing globalvars from scripts.  I am less sure about conditions within the scope of an owning quest.  This uncertainty is what fuels my hate of globals.

Where I have successfully used globals with changing values in dialogues, I have calls to updateCurrentInstanceGlobal.  I have not tried removing them, but I added them in the face of failures similar to yours, though I do not know if I also changed other things at the same time.  The other thing I may have changed at the same time is putting the script in the left-hand pane instead of the right.

Thanks for your input here. I tried using the property/getvmquestvariable method, but saw no difference, probably because the structure itself was the same re: flow.

I tried making a new globalvar that I could willy nilly change via console. Worked totally normally. So there's nothing wrong with the dialogue and conditions at all. As indicated by probably everyone in the thread, it does seem like there's something about the flow and the loading of the dialogue that doesn't pick up the mid-dialogue globvar change.

Scripts are in left pane.

I'll try updating via updatecurrentinstanceglobal but think it's a long shot. That's how desperate I am atm 😕

Link to comment
Share on other sites

Updatecurrentinstanceglobal didn't update the readiness of that dialogue to prepare the conditions to look for an update of the globvar.

However, the workaround, as discussed above, does seem to work. I simply added a 
Dialogue (2)
Between
Dialogue (1) = the one with the fragment that runs the function that updates the globalvar, and
Dialogue(3) = the dialogue where the npc reacts in the appropriate way based on conditions relying on looking at the globalvar.

The bummer is that the Dialogue(2) interlude being invisibly linking through doesn't seem to work. So the player will awkwardly have to click at whatever I put in there. Flow doesn't feel comfy as vanilla, so I consider this a tideover until I can get to a real solution.

Link to comment
Share on other sites

The thing is that I have it working fine without this intermediate topicinfo.

Here's an example of a dialogue that shows a configuration option stored in a global variable being updated.  The followup topic list's 1st item is that very same topic info (it loops back on itself).  In game it always works... It always show the correct current content for the globals, updates correctly on a single click.  The condition is correctly evaluated...  I don't understand what it is that makes it work... I tried and failed to reproduce that same pattern elsewhere, just as you are having trouble.

Spoiler

Screenshot2024-05-04053057.thumb.gif.0636e343d1eafc30617bb22ee6eb07f0.gif

 

Link to comment
Share on other sites

19 hours ago, xkkmEl said:

The thing is that I have it working fine without this intermediate topicinfo.

Here's an example of a dialogue that shows a configuration option stored in a global variable being updated.  The followup topic list's 1st item is that very same topic info (it loops back on itself).  In game it always works... It always show the correct current content for the globals, updates correctly on a single click.  The condition is correctly evaluated...  I don't understand what it is that makes it work... I tried and failed to reproduce that same pattern elsewhere, just as you are having trouble.

  Reveal hidden contents

Screenshot2024-05-04053057.thumb.gif.0636e343d1eafc30617bb22ee6eb07f0.gif

 

I wouldn't spend so much time sorting this out except it's the heart of my mod. The pertinent dialogue is iterated across multiple npcs and will be frequently engaged with (at least in concept) by the player.

Buffeted by your comment about it being possible, I did a little more testing to see how your case might look different from my case. Mine looks like:

[normal dialogue] => [invisible dialogue form that runs the function] => [npc response either saying 'here's your stuff' or 'sorry, not familiar with that' etc. set by condition]

What I changed was to generate the .wav files for the middle / invisible dialogue + lip file --essentially a 1 second silent clip. It never shows up obviously. But I can confirm things did NOT function normally before I did this. I made the edit and then things functioned normally and perfectly. Because the dialogue never shows up, I didn't think it was necessary to generated fake clips, but from what I can see it does alter the flow sufficient for the conditions of the next dialogue to grab the new values.

Thank to everyone in the thread that gave me clues about how to think about this--especially you, xkkm !

 

  • Like 1
Link to comment
Share on other sites

  • Recently Browsing   0 members

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