Use "ENDOFBG1" variable for SoD detection ingame
jastey
Member Posts: 2,782
in BG:EE Mods
When transitioning from end of BG1 to SoD campaign, the variable Global("ENDOFBG1","GLOBAL",2) will be set via bdsodtrn.bcs.
So far, I thought I could use this variable to detect ingame whether the game is in SoD or still in BG1.
But, this variable is only set during the transition. Meaning, it is not set if a new SoD game is started.
(Leaving the discussion out of here why the value "2" was used here whereas BGT was using "2" for BGII for years - )
What do you do to detect whether your NPC / mod is in SoD or still in BG1?
Do you see any problems arising if my mod sets Global("ENDOFBG1","GLOBAL",2) at the beginning of Korlasz's tomb for a new SoD game (in BG:EE, not EET) or should I use a different variable altogether?
So far, I thought I could use this variable to detect ingame whether the game is in SoD or still in BG1.
But, this variable is only set during the transition. Meaning, it is not set if a new SoD game is started.
(Leaving the discussion out of here why the value "2" was used here whereas BGT was using "2" for BGII for years - )
What do you do to detect whether your NPC / mod is in SoD or still in BG1?
Do you see any problems arising if my mod sets Global("ENDOFBG1","GLOBAL",2) at the beginning of Korlasz's tomb for a new SoD game (in BG:EE, not EET) or should I use a different variable altogether?
0
Comments
Chapter check doesn't work, since SoD prolog still counts as chapter 7. And as you mentioned "ENDOFBG1" isn't set in all cases. However, "BD_PLOT" is used to track the progress of SoD. It should not be set in BG1 at all. For EET you'll probably have to add another check to account for transition into BG2 campaign.
I am using these check variables with OUTER_SPRINT definitions anyway since I am providing for BGT, BG:EE(SoD) and EET, with EET using the "ENDOGBG1" variable in a disctinct way, so BGII checks in EET are covered independent of whether I use this variable for SoD-standalone.
Thank you!