Jump to content

Eirik's tp2


EiriktheScald

Recommended Posts

Let's see if I understand this

 

/* .2da patching */
APPEND ~interdia.2da~ ~EsEirik					EsEirikB~ 
 UNLESS ~EsEirik~

APPEND ~pdialog.2da~ ~EsEirik					EsEirikP			 EsEirikJ~ 
 UNLESS ~EsEirik~

 

EsEirik = eseirik.d /*dialog file*/

 

EsEirikB = eseirikb.d /*banter file*/

 

EsEirikJ = eseirikj.d /*interject file*/

 

EsEirikP = (What's this one?)

 

What does everyone prefer to do with their scripts? all-in-one baf? or, a separate baf for dialog, interjections, banters, etc.

Link to comment

Eseirikp would be the rejoining after kickout dialogue file.

 

You really don't have much say in how many .baf files to use. .d files get compiled into .dlg files (although they use scripting triggers and actions, they're not scripts and are structured differently). .baf files are compiled into .bcs files (scripts).

Link to comment

I'm thinking of the example berelinde gave with Imoen, i.e.

 

Nope. Only 1 dialog at a time.

 

Put this in Eirik's BAF:

 

IF

InParty(Myself)

PartyHasItem("_SCRLTAR")

Global("ESTarneshScroll","GLOBAL",0)

THEN

RESPONSE #100

SetGlobal("ESTarneshScroll","GLOBAL",1)

RealSetGlobalTimer("ESScrollTimer","GLOBAL",15)

END

 

IF

InParty(Myself)

Global("ESTarneshScroll","GLOBAL",1)

RealGlobalTimerExpired("ESScrollTimer","GLOBAL")

CombatCounter(0)

!See([ENEMY])

THEN

RESPONSE #100

SetGlobal("ESTarneshScroll","GLOBAL",2)

StartDialogNoSet(Player1)

END

 

Then you can use

 

IF ~Global("ESTarneshScroll","GLOBAL",2)~ THEN BEGIN

 

as the first line of his dialog. That gives the player 15 seconds to read the scroll. Trust me, that's plenty of time. But make sure you advance the global to 3 or you're going to get this every time the player goes to PID Eirik.

 

The script would go in eseirik.baf and the trigger would go in eseirikb.d, I guess. Can you suggest a tutorial? I'm totally confused.

Link to comment
hmm... I still don't know what EsEirikP is attached to. I have the others correct, right? cmorgan used 'EsEirikB' for banter; I noticed some call it 'BESEIRIK'. This is arbitrary?
BioWare named their banter dialogues "B<NPC name>" (e.g., BJAHEIR, BAERIE, BJAN). All the others were "<NPC name>[A J P]."

 

What are .2da?
Plain-text 2D array (table).

 

The script would go in eseirik.baf and the trigger would go in eseirikb.d, I guess.
Your J dialogue (B dialogue is reserved for Interact() and hard-coded banter-timer conversations).
Link to comment

ESEirikP is your post-dialogue file.

 

If the player hits the "reform party" button, Eirik is going to need to say something, isn't he? If nothing else, he's going to have to leave the party, and rejoin.

 

It's your call whether you want to send Eirik ahead to wait at an inn. I'm just going to post Gavin's P file, because it's easier than explaining every step.

BEGIN ~B!GAVINP~

APPEND ~B!GAVINP~ //don't know if this is necessary, but the models I used had it, so Gavin's does, too
/* Gavin Dismissed - happy enough */
IF ~Global("GavinJoined","GLOBAL",1) !HappinessLT("B!GAVIN",0)~ THEN BEGIN GavinLeaveGroup
SAY ~Shall I go, then?~
++ ~No, Gavin. Please stay.~ + BGavinPleaseStay
++ ~Yes, Gavin, you should go.~ DO ~SetGlobal("GavinJoined","GLOBAL",0)~+ GavinLeaveGroup1
END

//He isn't going to hang around if he's unhappy with the group
/* Gavin Dismissed - unhappy */
IF ~Global("GavinJoined","GLOBAL",1) !HappinessLT("B!GAVIN",0)~ THEN BEGIN BGavinLeaveGroupUnhappy
SAY ~Perhaps it is for the best. It seems I have not been a positive influence on you. I hope someone else succeeds where I have failed.~
IF ~~ THEN DO ~SetGlobal("GavinJoined","GLOBAL",0) ChangeAIScript("",DEFAULT) EscapeArea()~ EXIT
END

//players change their minds
/* Please Stay */
IF ~~ THEN BEGIN BGavinPleaseStay
SAY ~My pleasure.~
IF ~~ THEN DO ~SetGlobal("B!GavinJoined","GLOBAL",1) JoinParty()~ EXIT
END

/* Farewell */
IF ~~ THEN BEGIN BGavinFarewell
SAY ~Farewell. May the gods be kind to you.~
IF ~~ THEN DO ~SetGlobal("B!GavinJoined","GLOBAL",0) ChangeAIScript("",DEFAULT) EscapeArea()~ EXIT
END

//Gavin Rejoin - this goes here, too
IF ~Global("GavinJoined","GLOBAL",0) !Global("B!GavinBassilusQuestAlone","GLOBAL",1) !Global("B!GavinMutaminQuestAlone","GLOBAL",1) !Global("B!GavinBodyThiefQuestAlone","GLOBAL",1)~ THEN BEGIN BGavinComeBack
SAY ~Shall we continue?~
++ ~Yes. Good to have you back.~ DO ~SetGlobal("GavinJoined","GLOBAL",1)
JoinParty()~ EXIT
++ ~Not right now~ EXIT
END


//this is the wait at an inn part, or in Gavin's case, wait at the temple
IF ~~ THEN BEGIN GavinLeaveGroup1
SAY ~I am sorry to leave you, but I must respect your judgement. Should our paths cross again one day, I would be happy to lend my hammer and my faith to your cause.~
IF ~False()~ THEN DO ~SetGlobal("GavinJoined","GLOBAL",0) ChangeAIScript("",DEFAULT) EscapeArea()~ EXIT
IF ~!AreaCheck("FW5100") /* Not a dangerous area */
!AreaCheck("FW5101")
!AreaCheck("FW5102")
!AreaCheck("FW5103")
!AreaCheck("FW5401")
!AreaCheck("FW5402")
!AreaCheck("FW5403")
!AreaCheck("FW5404")
!AreaCheck("FW5405")
!AreaCheck("FW1900")
!AreaCheck("FW1901")
!AreaCheck("FW1903")
!AreaCheck("FW3900")
!AreaCheck("FW3901")
!AreaCheck("FW4500")
!AreaCheck("FW5201")
!AreaCheck("FW3500")
!AreaCheck("FW1603")
!AreaCheck("FW4501")
!AreaCheck("FW3601")
!AreaCheck("FW1401")
!AreaCheck("FW2101")
!AreaCheck("FW1801")
!AreaCheck("FW1802")
!AreaCheck("FW1803")
!AreaCheck("FW1804")
!AreaCheck("FW2615")
!AreaCheck("FW2619")
!AreaCheck("FW5506")
!AreaCheck("FW0500")
!AreaCheck("FW0501")
!AreaCheck("FW0502")
!AreaCheck("FW0503")
!AreaCheck("FW0504")
!AreaCheck("FW0505")
!AreaCheck("FW0506")
!AreaCheck("FW0507")
!AreaCheck("FW0508")
!AreaCheck("FW0509")
!AreaCheck("FW0510")
!AreaCheck("FW0511")
!AreaCheck("FW0512")
!AreaCheck("FW0513")
!AreaCheck("FW0514")
!AreaCheck("FW0515")
!AreaCheck("FW0516")
!AreaCheck("FW1002")
!AreaCheck("FW1003")
!AreaCheck("FW1008")
!AreaCheck("FW1009")
!AreaCheck("FW1500")
!AreaCheck("FW2000")
!AreaCheck("FW2012")
!AreaCheck("FW1501")
!AreaCheck("FW1502")
!AreaCheck("FW1503")
!AreaCheck("FW1504")
!AreaCheck("FW1505")
!AreaCheck("FW0400")
!AreaCheck("FW0606")
!AreaCheck("FW0607")
!AreaCheck("FW0608")
!AreaCheck("FW1113")
!AreaCheck("FW1114")
!AreaCheck("FW1201")
!AreaCheck("FW1202")
!AreaCheck("FW1207")
!AreaCheck("FW0721")
!AreaCheck("FW0611")
!AreaCheck("FW0621")
!AreaCheck("FW0123")
!AreaCheck("FW0125")
!AreaCheck("FW0126")
!AreaCheck("FW0137")
!AreaCheck("FW0138")
!AreaCheck("FW0139")
!AreaCheck("FW0140")
!AreaCheck("FW0141")
!AreaCheck("FW0142")
!AreaCheck("FW0146")
!AreaCheck("FW0161")
!AreaCheck("FW0224")
!AreaCheck("FW0225")
!AreaCheck("FW0226")
~ THEN REPLY ~I do not want to part ways with you forever, Gavin, but our paths have to separate right now. Just wait here for me. I shall return when I need your help again.~ GOTO BGavinWaitSomewhereSafe
IF ~OR(84)
AreaCheck("FW5100") /* dangerous area */
AreaCheck("FW5101")
AreaCheck("FW5102")
AreaCheck("FW5103")
AreaCheck("FW5401")
AreaCheck("FW5402")
AreaCheck("FW5403")
AreaCheck("FW5404")
AreaCheck("FW5405")
AreaCheck("FW1900")
AreaCheck("FW1901")
AreaCheck("FW1903")
AreaCheck("FW3900")
AreaCheck("FW3901")
AreaCheck("FW4500")
AreaCheck("FW5201")
AreaCheck("FW3500")
AreaCheck("FW1603")
AreaCheck("FW4501")
AreaCheck("FW3601")
AreaCheck("FW1401")
AreaCheck("FW2101")
AreaCheck("FW1801")
AreaCheck("FW1802")
AreaCheck("FW1803")
AreaCheck("FW1804")
AreaCheck("FW2615")
AreaCheck("FW2619")
AreaCheck("FW5506")
AreaCheck("FW0500")
AreaCheck("FW0501")
AreaCheck("FW0502")
AreaCheck("FW0503")
AreaCheck("FW0504")
AreaCheck("FW0505")
AreaCheck("FW0506")
AreaCheck("FW0507")
AreaCheck("FW0508")
AreaCheck("FW0509")
AreaCheck("FW0510")
AreaCheck("FW0511")
AreaCheck("FW0512")
AreaCheck("FW0513")
AreaCheck("FW0514")
AreaCheck("FW0515")
AreaCheck("FW0516")
AreaCheck("FW1002")
AreaCheck("FW1003")
AreaCheck("FW1008")
AreaCheck("FW1009")
AreaCheck("FW1500")
AreaCheck("FW2000")
AreaCheck("FW2012")
AreaCheck("FW1501")
AreaCheck("FW1502")
AreaCheck("FW1503")
AreaCheck("FW1504")
AreaCheck("FW1505")
AreaCheck("FW0400")
AreaCheck("FW0606")
AreaCheck("FW0607")
AreaCheck("FW0608")
AreaCheck("FW1113")
AreaCheck("FW1114")
AreaCheck("FW1201")
AreaCheck("FW1202")
AreaCheck("FW1207")
AreaCheck("FW0721")
AreaCheck("FW0611")
AreaCheck("FW0621")
AreaCheck("FW0123")
AreaCheck("FW0125")
AreaCheck("FW0126")
AreaCheck("FW0137")
AreaCheck("FW0138")
AreaCheck("FW0139")
AreaCheck("FW0140")
AreaCheck("FW0141")
AreaCheck("FW0142")
AreaCheck("FW0146")
AreaCheck("FW0161")
AreaCheck("FW0224")
AreaCheck("FW0225")
AreaCheck("FW0226")
~ THEN REPLY ~I do not want to part ways with you forever, Gavin, but our paths have to separate right now. Just wait here for me. I shall return when I need your help again.~ GOTO BGavinWaitSomewhereDangerous
IF ~Global("B!GavinDrawbridge","GLOBAL",1)~ THEN REPLY ~I do not want to part ways with you forever, Gavin, but our paths have to separate right now. Can we meet somewhere within the city of Baldur's Gate?~ GOTO BGavinWaitBaldursGate
IF ~~ THEN REPLY ~I do not want to part ways with you forever, Gavin, but our paths have to separate right now. Can we meet somewhere along the Sword Coast?~ GOTO BGavinWaitTemple
IF ~~ THEN REPLY ~Farewell, then.~ GOTO BGavinFarewell
IF ~~ THEN REPLY ~On second thought, Gavin, I want you to stay with the group.~ GOTO BGavinPleaseStay
END

IF ~~ THEN BEGIN BGavinWaitSomewhereDangerous
SAY ~You're actually asking me to wait here? Are you mad?~
IF ~~ THEN REPLY ~Farewell, then.~ GOTO BGavinFarewell
IF ~~ THEN REPLY ~On second thought, I want you to stay with the group.~ GOTO BGavinPleaseStay
IF ~OR(59)
AreaCheck("FW5100")
AreaCheck("FW5101")
AreaCheck("FW5102")
AreaCheck("FW5103")
AreaCheck("FW5401")
AreaCheck("FW5402")
AreaCheck("FW5403")
AreaCheck("FW5404")
AreaCheck("FW5405")
AreaCheck("FW1900")
AreaCheck("FW1901")
AreaCheck("FW1903")
AreaCheck("FW3900")
AreaCheck("FW3901")
AreaCheck("FW4500")
AreaCheck("FW5201")
AreaCheck("FW3500")
AreaCheck("FW1603")
AreaCheck("FW4501")
AreaCheck("FW3601")
AreaCheck("FW1401")
AreaCheck("FW2101")
AreaCheck("FW1801")
AreaCheck("FW1802")
AreaCheck("FW1803")
AreaCheck("FW1804")
AreaCheck("FW2615")
AreaCheck("FW2619")
AreaCheck("FW5506")
AreaCheck("FW0500")
AreaCheck("FW0501")
AreaCheck("FW0502")
AreaCheck("FW0503")
AreaCheck("FW0504")
AreaCheck("FW0505")
AreaCheck("FW0506")
AreaCheck("FW0507")
AreaCheck("FW0508")
AreaCheck("FW0509")
AreaCheck("FW0510")
AreaCheck("FW0511")
AreaCheck("FW0512")
AreaCheck("FW0513")
AreaCheck("FW0514")
AreaCheck("FW0515")
AreaCheck("FW0516")
AreaCheck("FW1002")
AreaCheck("FW1003")
AreaCheck("FW1008")
AreaCheck("FW1009")
AreaCheck("FW1500")
AreaCheck("FW2000")
AreaCheck("FW2012")
AreaCheck("FW1501")
AreaCheck("FW1502")
AreaCheck("FW1503")
AreaCheck("FW1504")
AreaCheck("FW1505")
AreaCheck("FW0400")
~ THEN REPLY ~You can get out of here, Gavin. I have faith in your survival skills. Once you're out, go to the safe haven of your choice, and I'll meet you there.~ GOTO BGavinSafeHavenTemple
 IF ~OR(25)
AreaCheck("FW0606")
AreaCheck("FW0607")
AreaCheck("FW0608")
AreaCheck("FW1113")
AreaCheck("FW1114")
AreaCheck("FW1201")
AreaCheck("FW1202")
AreaCheck("FW1207")
AreaCheck("FW0721")
AreaCheck("FW0611")
AreaCheck("FW0621")
AreaCheck("FW0123")
AreaCheck("FW0125")
AreaCheck("FW0126")
AreaCheck("FW0137")
AreaCheck("FW0138")
AreaCheck("FW0139")
AreaCheck("FW0140")
AreaCheck("FW0141")
AreaCheck("FW0142")
AreaCheck("FW0146")
AreaCheck("FW0161")
AreaCheck("FW0224")
AreaCheck("FW0225")
AreaCheck("FW0226")
~ THEN REPLY ~You can get out of here, Gavin. I have faith in your survival skills. Once you're out, go to the safe haven of your choice and I'll meet you there.~ GOTO BGavinSafeHavenBaldursGate
END

IF ~~ THEN BEGIN BGavinWaitSomewhereSafe
SAY ~Very well.~
IF ~~ THEN DO ~SetGlobal("GavinJoined","GLOBAL",0) ChangeAIScript("",DEFAULT)~ EXIT
END

IF ~~ THEN BEGIN BGavinWaitBaldursGate
SAY ~I think I will go to the Elfsong, then. If I'm in luck, maybe Jolun will be in town.~
IF ~~ THEN DO ~SetGlobal("GavinJoined","GLOBAL",0) ChangeAIScript("",DEFAULT) EscapeAreaMove("FW0705",595,495,0)~ EXIT
END

/* Very important!!!! Using EscapeAreaMove() prevents the kick-out dialogue. Remember this if you need to have your NPC leave the area.

IF ~~ THEN BEGIN BGavinSafeHavenBaldursGate
SAY ~If you say so... I'll make for the Elfsong, then. If I'm in luck, maybe Jolun will be in town.~
IF ~~ THEN DO ~SetGlobal("GavinJoined","GLOBAL",0) ChangeAIScript("",DEFAULT) EscapeAreaMove("FW0705",595,495,0)~ EXIT
END

IF ~~ THEN BEGIN BGavinWaitTemple
SAY ~I think I will go to the Song of the Morning Temple, then, where we met.~
IF ~~ THEN DO ~SetGlobal("GavinJoined","GLOBAL",0) ChangeAIScript("",DEFAULT) EscapeAreaMove("FW3400",728,1474,0)~ EXIT
END

IF ~~ THEN BEGIN BGavinSafeHavenTemple
SAY ~If you say so... I'll make for the Song of the Morning Temple, then, where we met.~
IF ~~ THEN DO ~SetGlobal("GavinJoined","GLOBAL",0) ChangeAIScript("",DEFAULT) EscapeAreaMove("FW3400",728,1474,0)~ EXIT
END


END

 

As for which naming conventions you use, that's up to you. The engine doesn't care, as long as you designate which is which. That's accomplished using this table in the tp2:

 

//2da appending for dialogues
APPEND ~pdialog.2da~
~B!GAVIN B!GAVINP B!GAVINJ B!GAVIND~
UNLESS ~B!GAVIN~ /* appends pdialog.2da unless the table contains B!GAVIN */

APPEND ~interdia.2da~
~B!GAVIN BB!GAVIN~
UNLESS ~B!GAVIN~ /* appends interdia.2da unless the table contains B!GAVIN */

Link to comment

Please note this well: you will only get to the P-file if the player actually clicks the "reform party" button. If the NPC leaves as part of scripted activity, the J-file will still be in effect. This is what messed up part of Gavin's quest.

 

I would prefer you to learn from my mistakes, as opposed to having to learn them all on your own.

Link to comment

Always call SetLeavePartyDialogFile() when scripting LeaveParty().

 

Oh boy, now I'm really confused. I thought J was for interjections. What file do I put banters in?
Your B dialogue. The J dialogue is the character's actual dialogue (the file assigned while they're in the party). Whenever a call is made to StartDialogueNoSet() (or an EXTERN interjection from another dialogue file), the J dialogue is used.

 

When calls to Interact() are made or when the hard-coded banter timer expires, the game automatically loads the character's B dialogue and fires a conversation (if any valid states in the dialogue are found).

Link to comment

Please don't confuse Interact() with Interject. They're different.

 

Interact() places a call on your banter file, usually MyNPCB or BMyNPC, modder's choice. Interject is a scripting command that inserts a mod NPC state after a given BioWare NPC state.

 

Interjections go in the Joined party dialogue, the J file.

Link to comment

No, it would go in the J, because it's an interjection. It's going to be triggered by having an item in inventory.

 

CHAIN is just another way of writing states. It allows multiple speakers without using EXTERN and it allows you to use actions wherever you please, pretty much, with the understanding that these actions won't actually happen until the chain is done. This is too complicated to explain at 9pm on a worknight.

Link to comment

Archived

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

×
×
  • Create New...