Need some help with interjections in BG2EE dialogs
Wizer13
Member Posts: 65
Hi, I looked at various ways to code interjections, but I do not seem to understand the gist of it. Using Notepad++ and weidu highlighters, it underlines the "==" when I reference to which dialog, then parsing errors, etc.
Here's the situation: Buliard (PPBBul) - My prefix is PP on Blackwyrm forum- will interject one line in Morda's dialog (PPMorda).
Here's what I wrote:
IF ~~ THEN BEGIN Relics
SAY ~Ugwaerel can access it because of her pinky. It's a relic of Vec...(Buliard tries to shut her down, but came too late).~
INTERJECT_COPY_TRANS PPBul.d @171 PPChain1
== PPBul
IF ~!StateCheck("PPMord",CD_STATE_NOTVALID)~ THEN
~(He spits) Nobody can have those unless they are initiated! So don't even think about it!~
END
That would help me a lot to understand the rest. Thank you for your time!
Here's the situation: Buliard (PPBBul) - My prefix is PP on Blackwyrm forum- will interject one line in Morda's dialog (PPMorda).
Here's what I wrote:
IF ~~ THEN BEGIN Relics
SAY ~Ugwaerel can access it because of her pinky. It's a relic of Vec...(Buliard tries to shut her down, but came too late).~
INTERJECT_COPY_TRANS PPBul.d @171 PPChain1
== PPBul
IF ~!StateCheck("PPMord",CD_STATE_NOTVALID)~ THEN
~(He spits) Nobody can have those unless they are initiated! So don't even think about it!~
END
That would help me a lot to understand the rest. Thank you for your time!
0
Comments
If the Morda text already exists you need to
INTERJECT_COPY_TRANS Morda 11 PPChain1 //Where Morda is that dialog name and 11 is the state you target.
I tried the line of code, exchanging some infos- It's the opposite, It's a line of PPBul.d (Buliard) I try to interject in PPMord.d(Morda):
INTERJECT_COPY_TRANS PPBul.d @178 PPChain1//== Buliard : (He spits) Nobody can have those unless they are initiated! So don't even think about it!
But somehow, it tells me Parsing error.
I also tried to use CHAIN, with similar results. Here's one I tried. If I could see my errors, that would Help me A LOT to understand the rest. I don't understand why it underlines == and my identifiers (PPJus and PPDevo), like is is parsing errors or something.
CHAIN
IF ~SetGlobal("DEV_TEST","LOCALS",0)
Global("PPDevoExists","ARCC14",1)
See("PC")
!StateCheck("PC",STATE_SLEEPING)~ THEN PPDevo Testimonychain
~Thank you, your Highness! I did saw those miscreants! I've asjked humbly if they served our Great Lord Vecna, to which they replied: " You'll burn in the Nine Hells for adoring a false god!". They then proceeded to tear my holy symbol from my neckand spit on it!~
DO ~SetGlobal("DEV_TEST","LOCALS",1)~
== PPJus
~Oh!!! The outrage! What did you do, next? Please, be precise.~
== PPDevo
~(He begins to cry) I admit, tho my shame, I couldn't stop this sacrilege! Those heretics were too powerful to overcom, even for my bodyguards!~
== PPJus
~Members of the jury, please note the violence the accused used on a humble priest of our Mighty Lord. Do continue. What happened, next?~
== PPDevo
~I ran away. I had to warn the authorities of the danger they faced! My guards sacrificed themselves valliantly to cover my retreat...~
== PPJus
~Their names shall be recorded in the Halls of Honor.~
== PPDevo
~I demand Justice! To the pyre with those faithless!!!~
== PPJus
~Justice shall be done, today, rest assured. Thank you for your courage, brother.~
== PPDevo
~(As he quits, the devout smiles wickedly back at you, sealing your doom.)~
EXIT
Thanks for your time!
the other one
INTERJECT_COPY_TRANS PPMord 178 PPChain1 // If PPmord is the dialog you target and state 178 is where you want to interject - PPChain1 is your interjection but also a name of the Global that will be set once the interjection was performed (you will have a Global("PPChain1","Global",1).
==PPBull IF~InParty("PPBull") ~THEN~ (He spits) Nobody can have those unless they are initiated! So don't even think about it!~
END
@PaulaMigrate The space doesn't change anything, I always put a space in because I thhink it's better to read.
PPBul isn't in the party, so will it work if I just place a
!StateCheck("PPBull",CD_STATE_NOTVALID) as a condition?
In an interjection, I have to reference the line from which dialog? The one where it will came from, or the line where I want it to happen? Sorry if I appear clueless, but that's bugging me.
Paula, you said : INTERJECT_COPY_TRANS PPMord 178 PPChain1
So if in my dialog that line appears at line 96 in PPMord, I should write:
INTERJECT_COPY_TRANS PPMord 96 PPChain1
Or, do I reference the line from PPBul:
INTERJECT_COPY_TRANS PPBul @178 PPChain1
Afterwards, I add a DO Global("PPChain1","Global",1) To make sure it just appears one time.
Thank you both for your time!
INTERJECT_COPY_TRANS ~the dlg your character is supposed to interject into~ ~the dialogue state~ ~your interjection variable~
== ~your characters dlg~ IF ~conditions, e.g. the mentioned CD_STATE_NOTVALID and Detect~ THEN ~blabla~ DO ~actions your character performs~
EXIT
Yes. No. The "PPChain1" in your example above *is* the interjection variable. Have a look into the weidu readme to see how I_C_T looks if it is compiled.
In PPMord.dlg, I typed this:
IF ~~ THEN BEGIN Relics
SAY ~Ugwaerel can access it because of her pinky. It's a relic of Vec...(Buliard tries to shut her down, but came too late).~
INTERJECT_COPY_TRANS ~PPMord~ ~96~ ~Relics~
== ~PPBul~ IF ~!StateCheck("PPBull",CD_STATE_NOTVALID) Detect("PPBul")~ THEN ~(He spits) Nobody can have those unless they are initiated! So don't even think about it!~
EXIT
IF ~CheckStatGT("PC",15,CHR)~ THEN REPLY ~Of course. But then, Iuz as already won... Desperate times; desperate mesures.~ GOTO Damn
IF ~~ THEN REPLY ~Initiate us, then. I'm ready to join Vecna's cause~ GOTO Ug
IF ~~ THEN REPLY ~If you know a way to get those, tell me now. No time to waste!~ GOTO Secret
IF ~Global("QUEST_COMP","GLOBAL",1)~ THEN REPLY ~I've heard the Maleficarum Compendium can open the way. Would that be and adequate option?~ GOTO Arch
IF ~CheckStatGT("PC",15,INT)~ THEN REPLY ~Isn't the Maleficarum Compendium able to open the way? It is an artefact of the cult.~ GOTO Arch
END
In my PPBul.dlg, I typed this:
INTERJECT_COPY_TRANS ~PPMord~ ~96~ ~Relics~
== ~PPBul~ IF ~!StateCheck("PPBul",CD_STATE_NOTVALID) Detect("PPBul")~ THEN ~(He spits) Nobody can have those unless they are initiated! So don't even think about it!~
END
When I compile, it gives me this:
ERROR locating resource for 'CHAIN3'
Resource [PPMORD.DLG] not found in KEY file:
[./chitin.key]
ERROR: preprocessing APPEND_EARLY [PPNPC/Dialog/PPBul.d]: Failure("resource [PPMORD.DLG] not found for 'CHAIN3'")
Stopping installation because of error.
ERROR Installing [PPNPC Tutorial for BGEE], rolling back to previous state
Will uninstall 1 files for [SETUP-PPNPC.TP2] component 0.
Uninstalled 1 files for [SETUP-PPNPC.TP2] component 0.
ERROR: Failure("resource [PPMORD.DLG] not found for 'CHAIN3'")
PLEASE email the file SETUP-PPNPC.DEBUG to Wizer13
Using Language [American English]
Surely something I don't understand.
(I_C_T into your own dialogue state inside the same .d-file does work, just not putting it inside the dialogue state iteself.)
In PPMord.dlg, I typed this:
Provided both dialogues exist, i.e. somewhere you have BEGIN PPMord and BEGIN PPBul
CHAIN
IF ~~ THEN BEGIN PPMord Relics
~Ugwaerel can access it because of her pinky. It's a relic of Vec...(Buliard tries to shut her down, but came too late).~
== ~PPBul~ IF ~!StateCheck("PPBull",CD_STATE_NOTVALID) Detect("PPBul")~ THEN ~(He spits) Nobody can have those unless they are initiated! So don't even think about it!~
END
IF ~CheckStatGT("PC",15,CHR)~ THEN REPLY ~Of course. But then, Iuz as already won... Desperate times; desperate mesures.~ GOTO Damn
IF ~~ THEN REPLY ~Initiate us, then. I'm ready to join Vecna's cause~ GOTO Ug
IF ~~ THEN REPLY ~If you know a way to get those, tell me now. No time to waste!~ GOTO Secret
IF ~Global("QUEST_COMP","GLOBAL",1)~ THEN REPLY ~I've heard the Maleficarum Compendium can open the way. Would that be and adequate option?~ GOTO Arch
IF ~CheckStatGT("PC",15,INT)~ THEN REPLY ~Isn't the Maleficarum Compendium able to open the way? It is an artefact of the cult.~ GOTO Arch
There is no need whatsoever for an interjection here.
When is an INTERJECT or CHAIN useful?
If you want to insert your lines into an existing dialogue (e.g. a vanilla game talk) you use I_C_T, to preserve the original dialogue and all its triggers. Your line only fires, if your NPC is present, otherwise the talk triggers just as well without it.