Jump to content

Eirik's tp2


EiriktheScald

Recommended Posts

Oops, somethings not right!

 

Compiling 2 dialogue files ...

 

[eirik/dialogs/eseirikj.d] PARSE ERROR at line 10 column 1-6

Near Text: WEIGHT

syntax error

 

[eirik/dialogs/eseirikj.d] ERROR at line 10 column 1-6

Near Text: WEIGHT

Parsing.Parse_error

ERROR: parsing [eirik/dialogs/eseirikj.d]: Parsing.Parse_error

ERROR: compiling [eirik/dialogs/eseirikj.d]!

Stopping installation because of error.

Link to comment

Would you mind posting the actual contents of the file? Cmorgan's looks ok, so it might have gotten messed up in transcription. That's usually a missed END or a missing ~.

 

And Kulyok's bit can stay, but you should post what you have to see if it matches up.

Link to comment

Alright, here's the D file,

 

/*Eirik's Interjections go here. This file appends ESEIRIKJ. 
* CONTENTS:
* Tarnesh's spellbook
*/

BEGIN ~ESEIRIKJ~

/* Tarnesh's spellbook */
CHAIN  //we are working outside of regular dialogue
WEIGHT #-2  //when this compiles we want it high in the order
IF ~Global("ESTarneshScroll","GLOBAL",2)~ //the starting condition set above,
THEN  ~ESEIRIKJ~  ESTarneshComment //then add the state "ESTarneshComment"
~Well, what have we here?~ //This is a neutral kickoff line that can go to either Imoen or PC
== ~ESEirikJ~ IF ~InParty("imoen") InMyArea("imoen") !StateCheck("imoen",CD_STATE_NOTVALID)~ THEN @2000 //only shows up if Immy is around
== ~_IMOEN2~ IF ~InParty("imoen") InMyArea("imoen") !StateCheck("imoen",CD_STATE_NOTVALID)~  THEN  @2001 //only shows up if Immy is around
== ~ESEirikJ~ IF ~InParty("imoen") InMyArea("imoen") !StateCheck("imoen",CD_STATE_NOTVALID)~ THEN  @2002 //only shows up if Immy is around
== ~_IMOEN2~ IF ~InParty("imoen") InMyArea("imoen") !StateCheck("imoen",CD_STATE_NOTVALID)~ THEN  @2003 //only shows up if Immy is around
== ~ESEirikJ~  @2004 //shows up all the time
END
++ @2005 DO ~SetGlobal("ESTarneshScroll","GLOBAL",3)  ActionOverride([PC],GiveItem("SCRLTAR","ESEIRIK"))~ EXTERN ~ESEIRIKJ~ escommentscroll1  //give it here, boy
++ @2006 DO ~SetGlobal("ESTarneshScroll","GLOBAL",3)~ EXIT //no way, dude
++ @2007 DO ~SetGlobal("ESTarneshScroll","GLOBAL",3)~ EXTERN ~ESEIRIKJ~ escommentscroll1 //not sure

CHAIN
IF ~~ THEN ~ESEIRIKJ~ escommentscroll1 //answer
SAY @2008
EXIT

 

And the baf,

 

/* Tarnesh's spellbook */
IF
Global("ESTarneshScroll","GLOBAL",0) //never happened before.
PartyHasItem("SCRLTAR")//yep, got scroll.
Dead("tarnesh") //he's toast.
InParty(Myself) //Yup, Eirik's here.
!StateCheck(Myself,CD_STATE_NOTVALID) //yep, Eirik can talk soon.
THEN
RESPONSE #100
	SetGlobal("ESTarneshScroll","GLOBAL",1) //ok, ball is rolling.
	RealSetGlobalTimer("ESCommentBookTime","GLOBAL",60) //60 RT seconds from now
END

IF
RealGlobalTimerExpired("ESCommentBookTime","GLOBAL") //it's time
Global("ESTarneshScroll","GLOBAL",1) //ok, we know,
InParty(Myself) //Eirik's here
InMyArea(Player1) //CHARNAME's here, not at the bar ordering
!StateCheck(Myself,CD_STATE_NOTVALID) //Eirik's alive n'kicking
!StateCheck(Player1,CD_STATE_NOTVALID) //CHARNAME's alive n'kicking
THEN
RESPONSE #100
	SetGlobal("ESTarneshScroll","GLOBAL",2)//ok, now it is time to talk
	StartDialogueNoSet(Player1) //pull up a chair, CHARNAME
END

Link to comment

My bad... typo. CHAIN IF WEIGHT # ~condition~ THEN ~banterfile~ statename

 

CHAIN IF WEIGHT #-2 ~Global("something","GLOBAL",2)~ THEN ~_MINSCJ~ X#MinscViatre1

 

Plus, get rid of all my "//silly commentary here" so you can read your stuff!

 

Kulyok's blocks are basically the same setup, but you don't need them here:

 

 

(hold on, I'll be right back...)

Link to comment

nope -- change the lines

/* Tarnesh's spellbook */
CHAIN  //we are working outside of regular dialogue
WEIGHT #-2  //when this compiles we want it high in the order
IF ~Global("ESTarneshScroll","GLOBAL",2)~ //the starting condition set above,
THEN  ~ESEIRIKJ~  ESTarneshComment //then add the state "ESTarneshComment"

to read

/* Tarnesh's spellbook */
CHAIN  IF WEIGHT #-2  ~Global("ESTarneshScroll","GLOBAL",2)~ THEN  ~ESEIRIKJ~  ESTarneshComment

 

I reversed the position of the IF.

 

This is Kulyok's code stuff for single blocks (not Romances, etc) stripped out of the BG1 NPC workroom (since you are alwaays getting hijacked, we'd better return with gifts!!!)

 

/* Dynaheir Firewine - this block makes the talk available */
IF
Global("X#DYINT1","GLOBAL",0)
AreaCheck("FW4500")
!See([ENEMY])
CombatCounter(0)
InParty(Myself)
!StateCheck(Player1,CD_STATE_NOTVALID)
!StateCheck(Myself,CD_STATE_NOTVALID)
THEN
RESPONSE #100
SetGlobal("X#DYINT1","GLOBAL",1)
END

/* Dynaheir Firewine Trigger - this block makes the talk actually happen */
IF
AreaCheck("FW4500")
Global("X#DYINT1","GLOBAL",1) 
InParty(Myself)
See(Player1)
!StateCheck(Player1,CD_STATE_NOTVALID) 
!StateCheck(Myself,CD_STATE_NOTVALID)
CombatCounter(0)
!See([ENEMY])
THEN
RESPONSE #100
StartDialogueNoSet(Player1)
END

in the related D:

/* Dynaheir Firewine - fires and closes variables */
IF WEIGHT #-2 ~Global("X#DYINT1","GLOBAL",1)~ THEN BEGIN DYINT1
SAY @78
++ @79 DO ~SetGlobal("X#DYINT1","GLOBAL",2)~ + DYINT1.1
++ @80 DO ~SetGlobal("X#DYINT1","GLOBAL",2)~ + DYINT1.2
++ @81 DO ~SetGlobal("X#DYINT1","GLOBAL",2)~ + DYINT1.3
END

 

She swears by it. I am more conservative, and worry waaay too much, so I like the idea where this is followed up by an "emergency brake" block:

IF
!AreaCheck("FW4500") // we have moved out of the original area
Global("X#DYINT1","GLOBAL",1) 
THEN
RESPONSE #100
SetGlobal("X#DYINT1","GLOBAL",1) 
END

that way if something in another person's mod is not as tightly coded, or something stops the dialogue from firing, if the talk is site specific we simply skip that talk. It does mean that a player cannot "catch up" on the talk by force-talking.

 

Last note: the See(Player1) is a more restrictive form of InMyArea(Player1). It will fail if Player1 is invisible, out of range, etc. There are soild opinions on the silliness/not-silly at-all-ness of invisible party members or theives hiding in shadows striking up a conversation; if you think hthat's ok, use InMyArea. If you think that's silly, quote some Monty Python and use See!

Link to comment
Sorry, but you can't nest IF/THEN statemens. But, you can include a check for BNP, put the stuff that would pertain to it in separate files, and only install it if BNP is detected. Here's the check for BNP, that you'd put in your tp2:

 

ACTION_IF FILE_EXISTS_IN_GAME ~override/X#BG1NPCCore.G3~ THEN BEGIN
/* Installs BG1 NPC Cross-Mod files */
COMPILE ~MyMod/DLG/CrossMod.d~
EXTEND_BOTTOM ~ESEIRIK.bcs~ ~MyMod/BAF/CrossMod.baf~ //because ESEIRIK.baf has already been compiled
END ELSE BEGIN
/* Installs alternate files */
COMPILE ~MyMod/DLG/Alternate.d~
EXTEND_BOTTOM ~ESEIRIK.bcs~ ~MyMod/BAF/Alternate.baf~
END

 

Has something changed with the latest BGNPC release? I don't have ~override/X#BG1NPCCore.G3~

Link to comment

No, that's been in the tp2 forever. It's just a mostly empty text file with that name copied into the override as a marker that BNP is installed. You'll find it near the top of the tp2, one of the first lines. It's got a comment identifying it.

 

 

Oh, for goodness sake! What are you doing with a six-month old alpha?

 

Don't mind me. I change my installation about every week.

Link to comment
No, that's been in the tp2 forever. It's just a mostly empty text file with that name copied into the override as a marker that BNP is installed. You'll find it near the top of the tp2, one of the first lines. It's got a comment identifying it.

 

It's not in the tp2 file for v11, I just checked.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...