Jump to content

Doubled rewards if mods add interjections using different I_C_Tx


Recommended Posts

I think this is a principle thing we need to solve in the community by defining a standard for interjections or a very good install order. EDIT: here is the general discussion.

@Glam Vrock you use for all your interjections I_C_T2, probably to spare passback lines.

Problem arises if your NPCPack is installed after another mod NPC that adds interjections using I_C_T with a passback line, as the transactions (reward, journal entry) is then doubled: the first NPC mod moves it until after the new dialogue state of the "passback line". But your I_C_T2 moves the transactions into the transaction where your NPC's reaction is called, leading to the quest NPC handing out the reward doubled. An example:

After giving Tiber the body of his dead brother in Cloakwood, Littlun has an interjection. So has Breagar. If Breagar is installed before your NPC pack, the situation goes like this:

-Breagar adds the interjection and a new dialogue state for Tiber with the reward.

-Littlun adds the interjection and copies the rewards into the transaction to her interjection.

-So in the game, the player first gets the reward before Littlun says her line, and then after Tiber reacts to Breagar's line a second time.

In code, this looks like this:

Tiber state 4, Littlun interjects with giving out the reward directly:

IF ~  PartyHasItem("MISC90")
~ THEN BEGIN 4 // from: 
  SAY #10283 /* ~Chelak! Oh, Chelak. How will I ever tell my mother? I was so stupid! I should have stopped this stupid idea. Such a waste... such a waste. You can keep the damn sword—it's been more of a curse than anything else. I thank you for bringing my brother's body. There was little you could have done.~ */
(... other transactions removed)
  IF ~Global("GV#LITTInterjectTIBER1","GLOBAL",0)
InParty("GV#LITT")
InMyArea("GV#LITT")
!StateCheck("GV#LITT",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("GV#LITTInterjectTIBER1","GLOBAL",1)
AddexperienceParty(800)
ApplySpellRES("OHMISC90",Myself)
TakePartyItem("MISC90")
EraseJournalEntry(27486)
EscapeArea()
~ EXTERN ~GV#LITTJ~ 72
END

From Littlun's dialogue, Breagar's interjection is called and leads to a last line from Tiber where the rewad is handed over again:

IF ~~ THEN BEGIN 7 // from: 
  SAY #75188 /* ~Ja, und danke nochmal!~ */
  IF ~~ THEN DO ~AddexperienceParty(800)
ApplySpellRES("OHMISC90",Myself)
TakePartyItem("MISC90")
EraseJournalEntry(27486)
EscapeArea()
~ SOLVED_JOURNAL #27487 /* ~Spiders in the Cloakwood
For recovering Chelak's corpse from Centeol's lair, Tiber gave us the sword known as Spider's Bane.~ */ EXIT
END

My first conclusion from this is:

A. I_C_T and I_C_T2 should not be used together for different interjections into the same dialogue state unless

B. the interjection using I_C_T2 is installed first. (then it works as intended, I checked).

But: I_C_T2 really only works properly if the dialogue states it interjects to has only one transaction with the same actions and not several. Since you cannot know whether another mod did not add other transactions, it would be safer in general if you'd switch to using I_C_T (with passback lines) in your mods.

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...