Jump to content

Question to EET_NPC_TRANSITION: SoD-only NPC


Recommended Posts

Hello @K4thos, if I want to use the EET_NPC_TRANSITION for an SoD-only NPC, how would I do it correctly? The NPC is only available after the PC left the Ducal Palace, and should not be available in BGII.

What I use so far:

ACTION_IF GAME_IS ~eet~ BEGIN
  INCLUDE ~EET/other/EET_functions.tph~
  LAF ~EET_NPC_TRANSITION~ 
    INT_VAR
      type = 1 //Biff is only available in BG:EE/SoD
    STR_VAR
      dv = "xxBiff" 
      override_BG1 = "xxBiffs" //OVERRIDE script in BG:EE (actually a BG:EE script doesn't exist, so we just put in the SoD one)
      override_SoD = "xxBiffs" //OVERRIDE script in SoD
      traFile = "%MOD_FOLDER%/tra/%LANGUAGE%/dialog.tra" //path to the text line for the ToB Fate Spirit summoning
      string = "@0" /* ~Bring me Biff the Understudy.~ */
      stringPosDV = "Baeloth" //Name after which Biff's should be put into the order of reply options at the fate spirit summoning dialogue. 
/* From the "Modder's Notes for Baldur's Gate: Enhanced Edition Trilogy (EET)":
    stringPosDV = "" //set the DV of NPC right below your response (used for sorting FATESP responses alphabetically)
      //Aerie, Ajantis, Alora, Anomen, Baeloth, Branwen, Cernd, Coran, Corwin, Dorn, Dynaheir, Edwin, Eldoth, Faldorn, Garrick,
      //Glint, HaerDalis, Hexxat, Imoen2, Jaheira, Jan, Kagain, Keldorn, Khalid, Kivan, Korgan, MKhiin, Mazzy, Minsc, Montaron,
      //Nalia, Neera, Quayle, Rasaad, Safana, SharTeel, Skie, Tiax, Valygar, Viconia, Voghiln, Wilson, Xan, Xzar, Yeslick, Yoshimo
      //variable not set (default) = NPC name appended at the end of summoning list */
  END
END

This leads me to a second, related question. Because the function places the following scriptblock into the NPC's override script:

IF
	!InPartyAllowDead(Myself)
	GlobalGT("CHAPTER","GLOBAL",7)
	Global("K#PartySoD","LOCALS",0)
THEN
	RESPONSE #100
		DestroySelf()
END

As far as I can see, the NPC would have to be in the group in bd0103 (Ducal Palace at beginning of SoD) so this local variable would be set to 1:

Spoiler

IF
	Global("K#PartySoD","BD0103",0)
	InPartyAllowDead(Player2)
	!Name("None",Player2)
THEN
	RESPONSE #100
		ActionOverride(Player2,SetGlobal("K#PartySoD","LOCALS",1))
		SetGlobal("K#PartySoD","BD0103",1)
		Continue()
END

IF
	Global("K#PartySoD","BD0103",0)
	InPartyAllowDead(Player3)
	!Name("None",Player3)
THEN
	RESPONSE #100
		ActionOverride(Player3,SetGlobal("K#PartySoD","LOCALS",1))
		SetGlobal("K#PartySoD","BD0103",1)
		Continue()
END

IF
	Global("K#PartySoD","BD0103",0)
	InPartyAllowDead(Player4)
	!Name("None",Player4)
THEN
	RESPONSE #100
		ActionOverride(Player4,SetGlobal("K#PartySoD","LOCALS",1))
		SetGlobal("K#PartySoD","BD0103",1)
		Continue()
END

IF
	Global("K#PartySoD","BD0103",0)
	InPartyAllowDead(Player5)
	!Name("None",Player5)
THEN
	RESPONSE #100
		ActionOverride(Player5,SetGlobal("K#PartySoD","LOCALS",1))
		SetGlobal("K#PartySoD","BD0103",1)
		Continue()
END

IF
	Global("K#PartySoD","BD0103",0)
	InPartyAllowDead(Player6)
	!Name("None",Player6)
THEN
	RESPONSE #100
		ActionOverride(Player6,SetGlobal("K#PartySoD","LOCALS",1))
		SetGlobal("K#PartySoD","BD0103",1)
		Continue()
END

 

Doesn't this mean that any SoD-only NPC would DestroySelf() instantly in SoD, as well as any NPC that wasn't in the party after the first SoD dungeon? What about NPCs that might be left standing at the end of BG1 (or in Korlasz's crypt) but should still be present at the beginning of SoD (in BG city or later) per NPC design?

With the experience from my last questions concerning this function (ahem) I am sure the mistake is on my side and I'm missing something.

Link to comment

I am pretty sure the problem lies with my using the function, as the script block in question looks very much like a "for BG:EE NPC without SoD content" feature. I did not see how to set the function's parameters for an SoD-only (or "SoD also") NPC, though, in the Modder's Notes.

 

EDIT: Wait, I think I get now what it is for: The NPC that was spawned in BG:EE should be no longer present if the SoD campaign started. But since he should not self destruct if he was carried over from BG:EE, this script block gets deactivated if they are present in Korlaz's crypt.

I still miss how this would not interfere with a pure SoD NPC or a BG:EE+SoD NPC that is allowed to be present in SoD albeit not in party during the transition.

Link to comment

I finally got it:

-If the NPC has SoD content and uses the same script for BG1 and SoD, do not specify the BG1 script ( STR_VAR override_BG1 = ""). This will prevent the DestroySelf() in Chapter 7.

-If the NPC has no SoD content, specify the BG1 script to make sure the NPC will be gone from chapter 7.

-If your NPC has different scripts for BG1 and SoD, specify the BG1 script IF you want your NPC to be gone in SoD in case they were not recruited in BG1.

 

I hope this makes sense. Maybe adding a short description to the Modder's Notes would be helpful, unless I'm the only one who was too dense to see this clearly right away.

Link to comment

sorry for late reply, I've been extremly busy the past few days.
 

Quote

 

I finally got it:

-If the NPC has SoD content and uses the same script for BG1 and SoD, do not specify the BG1 script ( STR_VAR override_BG1 = ""). This will prevent the DestroySelf() in Chapter 7.

-If the NPC has no SoD content, specify the BG1 script to make sure the NPC will be gone from chapter 7.

-If your NPC has different scripts for BG1 and SoD, specify the BG1 script IF you want your NPC to be gone in SoD in case they were not recruited in BG1.

I hope this makes sense. Maybe adding a short description to the Modder's Notes would be helpful, unless I'm the only one who was too dense to see this clearly right away.

Glad you've found the solution, I will probably add some additional INT_VAR which will decide if DestroySelf should be used (yes by default, since it works as expected for NPCs that follows Beamdog style handling of NPCs with BG1+SoD content).

Edited by K4thos
Link to comment

As long as it is clear not to put the SoD script into the BG 1 parameter the function works perfectly.

Knowing what I do now it is totally clear that's a bad idea considering it adds the DestroySelf after BG:EE, but I needed a moment to get there, so maybe a small note would be nice.

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...