temnix Posted May 25, 2020 Share Posted May 25, 2020 I would like to have a trigger in one NPC's conversation that registers whether I have talked to, that is, met, another NPC, in another area. I have tried it in the form of "TriggerOverride("scriptname",NumTimesTalkedTo(0))" for the negative condition and "TriggerOverride("scriptname",NumTimesTalkedToGT(0))" for positive, side by side in the same dialog. But neither appears, even though I made a point of assigning a script name to that NPC. So, is there a way to reflect an encounter? Besides putting a global in every branch of the NPC's conversation. Quote Link to comment
Grammarsalad Posted May 26, 2020 Share Posted May 26, 2020 Why not just set a global value when you talk to the NPC and then check for it in the dialog or script of the second npc? Also see: https://gibberlings3.github.io/iesdp/appendices/variables.htm Quote Link to comment
temnix Posted May 27, 2020 Author Share Posted May 27, 2020 I could set a global, but how would I do that for an existing dialogue? Rewrite every reply line's actions? The check in point is about meeting Volo - whether the party has spoken to him. The game is actually pretty loose with such things, information from Volo is labeled under "Rumor from Volo," even though he doesn't introduce himself. So I went about it this way also and just put the global in OnCreation() of the tavern's script. If they have been there, it can be assumed they talked to him. But I would like a real way to take account of an encounter. The TriggerOverride(NumTimes... works, by the way, but only if the NPC is in the same area as the speaker. Quote Link to comment
jastey Posted May 28, 2020 Share Posted May 28, 2020 You can set a variable in Volo's dialogue via ADD_TRANS_ACTION for example. Or patch his override script that it sets a global variable if NumTimesTalkedToGT(0). Quote Link to comment
Ardanis Posted May 29, 2020 Share Posted May 29, 2020 TriggerOverride() doesn't work on objects not present in the active area. Worse, it doesn't return false either in such cases. And *worse yet*, it will even break OR() trigger if you put it in there as workaround, unless it goes the last in the entire condition section. From SoD's BDJAHEIR.D, this is how I managed to check that Jaheira is not inside of any Flaming Fist camps, without having to put dummy ff_camp region into each and every area: IF ~IsValidForPartyDialog("khalid") OR(2) !Range("ff_camp",999) !TriggerOverride("ff_camp",IsOverMe("jaheira"))~ Changing the order of triggers would break it. Better play it safe and just add SetGlobal() to the dialog. Or, as Jastey says, patch the script to set the var. Quote Link to comment
temnix Posted May 30, 2020 Author Share Posted May 30, 2020 How about a general patch? All dialogues get ADD_TRANS_ACTION setting a global, say, "MET%deathvar%" to 1. I see no harm in that. Anyway, that's just idle musing. Thanks for the answers. Quote Link to comment
Jarno Mikkola Posted May 30, 2020 Share Posted May 30, 2020 5 hours ago, temnix said: How about a general patch? All dialogues get ADD_TRANS_ACTION setting a global, say, "MET%deathvar%" to 1. I see no harm in that. Anyway, that's just idle musing. Thanks for the answers. Well, this is likely going to be really bad in the old non-EE engine, but otherwise you could work well. Quote Link to comment
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.