If an NPC dies in BGEE do they appear in SOD?
Dharius
Member Posts: 664
Both Rasaad and Neera died in my current BGEE run and were ejected from my party without resurrection...
...can I expect to see them in SOD anyway?
...can I expect to see them in SOD anyway?
0
Comments
The big unknown to me would be if they are actually in your party at the end.
Rasaad's first appearance in Iron Throne Building (bd0111.bcs):
Global("BD_SPAWN_RASAAD","BD0111",0) // Iron Throne Floor, First Floor
BeenInParty("RASAAD") // Rasaad
THEN
RESPONSE #100
MoveGlobal("BD0111","RASAAD",[928.466]) // Rasaad
ApplySpellRES("bdresurr","RASAAD") // No such index
SmallWait(1)
ActionOverride("RASAAD",Face(SSE))
ApplySpellRES("bdrejuve","RASAAD") // No such index
ChangeEnemyAlly("RASAAD",NEUTRAL) // Rasaad
ChangeSpecifics("RASAAD",ALLIES) // Rasaad
ActionOverride("RASAAD",SetGlobal("bd_joined","locals",0))
ActionOverride("RASAAD",SetGlobal("bd_retreat","locals",0))
ActionOverride("RASAAD",SaveObjectLocation("LOCALS","bd_default_loc",Myself))
ActionOverride("RASAAD",ChangeAIScript("bdrasaad",OVERRIDE))
ActionOverride("RASAAD",ChangeAIScript("DEFAULT",CLASS))
ActionOverride("RASAAD",ChangeAIScript("",RACE))
ActionOverride("RASAAD",ChangeAIScript("",GENERAL))
ActionOverride("RASAAD",ChangeAIScript("",DEFAULT))
ActionOverride("RASAAD",SetDialog("bdrasaad"))
SetGlobal("BD_SPAWN_RASAAD","BD0111",1) // Iron Throne Floor, First Floor
Continue()
END
IF
Global("BD_SPAWN_RASAAD","bd0111",0) // Iron Throne Floor, First Floor
!BeenInParty("RASAAD") // Rasaad
THEN
RESPONSE #100
CreateCreature("rasaad7",[928.466],SEE) // Rasaad
ActionOverride("rasaad",MakeGlobalOverride())
SetGlobal("SPRITE_IS_DEADRASAAD","GLOBAL",0)
ChangeSpecifics("RASAAD",ALLIES) // Rasaad
ActionOverride("RASAAD",ChangeAIScript("bdrasaad",OVERRIDE))
ActionOverride("RASAAD",ChangeAIScript("DEFAULT",CLASS))
ActionOverride("RASAAD",ChangeAIScript("",RACE))
ActionOverride("RASAAD",ChangeAIScript("",GENERAL))
ActionOverride("RASAAD",ChangeAIScript("",DEFAULT))
SetGlobal("BD_SPAWN_RASAAD","bd0111",1) // Iron Throne Floor, First Floor
Continue()
END
Neera in Bridgefort intereor (bd2100.bcs):
Global("BD_NEERA","BD2100",0) // Bridgefort Interior
BeenInParty("neera") // Neera
THEN
RESPONSE #100
MoveGlobal("BD2100","neera",[1715.1185]) // Neera
ApplySpellRES("bdresurr","neera") // No such index
SmallWait(1)
ActionOverride("neera",Face(NW))
ApplySpellRES("bdrejuve","neera") // No such index
ChangeEnemyAlly("neera",NEUTRAL) // Neera
ChangeSpecifics("neera",ALLIES) // Neera
ActionOverride("neera",SetGlobal("bd_joined","locals",0))
ActionOverride("neera",SetGlobal("bd_retreat","locals",0))
ActionOverride("neera",SaveObjectLocation("LOCALS","bd_default_loc",Myself))
ActionOverride("neera",ChangeAIScript("bdneera",OVERRIDE))
ActionOverride("neera",ChangeAIScript("bdfort",CLASS))
ActionOverride("neera",ChangeAIScript("bdshout",RACE))
ActionOverride("neera",ChangeAIScript("bdmage01",GENERAL))
ActionOverride("neera",ChangeAIScript("",DEFAULT))
ActionOverride("neera",SetDialog("bdneera"))
SetGlobal("BD_NEERA","BD2100",1) // Bridgefort Interior
Continue()
END
IF
Global("BD_NEERA","BD2100",0) // Bridgefort Interior
!BeenInParty("neera") // Neera
THEN
RESPONSE #100
CreateCreature("neera7",[1715.1185],NW) // Neera
SetGlobal("SPRITE_IS_DEADNEERA","GLOBAL",0)
ActionOverride("neera",MakeGlobalOverride())
ChangeSpecifics("neera",ALLIES) // Neera
ActionOverride("neera",ChangeAIScript("bdneera",OVERRIDE))
ActionOverride("neera",ChangeAIScript("bdfort",CLASS))
ActionOverride("neera",ChangeAIScript("bdshout",RACE))
ActionOverride("neera",ChangeAIScript("bdmage01",GENERAL))
ActionOverride("neera",ChangeAIScript("",DEFAULT))
SetGlobal("BD_NEERA","BD2100",1) // Bridgefort Interior
Continue()
END
There are two possibilities for each NPC.
- If they've ever been in the party, bring them over. Also cast a spell on them for a full heal and resurrection (if needed).
- If they never joined the party at all, create the SoD version which starts with 64K XP and level-appropriate equipment.
As far as I understand, visiting the NPCs Minsc, Dynaheir, Safana in their first area of appearance (Three Old Kegs / Elfsong Tavern) will revive them according to the above scripts.
However, the script of the area in front of the Palace upon leaving for the crusade (bd0101.bcs) checks for a variable "BD_npcname_DIED_IN_BG" that was set before (via bdbaldur.bcs, probably in bd0103.bcs) if the NPC in question was in party in BG1. This means that they will not appear in front of the palace in this case.
The camps' scripts however check whether the NPCs are "dead". This means, that if they were and you did not go to them in BG before leaving for the crusade, they will not get revived and they will not be there.
I'm still a bit confused whether this is an oversight or whether I misunderstood the scripts. EDIT: I elaborated on this also here in the EE Fixpack forum.
Example Safana. This is the script block in bdbaldur.bcs that sets the "BD_SAFANA_DIED_IN_BG" variable. It will not be executed in Korlasz' Tomb, but it should be after the transition to the palace room:
Global("sprite_is_deadsafana","GLOBAL",1)
StateCheck("safana",STATE_REALLY_DEAD) // Safana
!InPartyAllowDead("safana") // Safana
!AreaCheck("bd0120") // Tomb Safehouse, First Floor
!AreaCheck("bd0130") // Tomb Safehouse, Second Floor
Global("BD_SAFANA_DIED_IN_BG","GLOBAL",0)
THEN
RESPONSE #100
SetGlobal("BD_SAFANA_DIED_IN_BG","GLOBAL",1)
END
The scripts for her resurrection without any checks whether she was dead in Elfsong Tavern I posted above.
This is the script in bd0101, palace exterior before leaving for the crusade. Here her spawning gets prevented if the "BD_SAFANA_DIED_IN_BG" variable is not zero and she was in party in BG:
Global("bd_safana_spawn","bd0101",0) // Ducal Palace, Leaving BG
OR(2)
InPartyAllowDead("safana") // Safana
Global("BD_SAFANA_DIED_IN_BG","GLOBAL",0) //<- I believe this to be a bug, should be "1", but it has no consequence
THEN
RESPONSE #100
SetGlobal("bd_safana_spawn","bd0101",1) // Ducal Palace, Leaving BG
Continue()
END
IF
Global("BD_SAFANA_DIED_IN_BG","GLOBAL",0)
Global("bd_safana_spawn","bd0101",0) // Ducal Palace, Leaving BG
BeenInParty("safana") // Safana
!InPartyAllowDead("safana") // Safana
THEN
RESPONSE #100
SetGlobal("bd_safana_spawn","bd0101",1) // Ducal Palace, Leaving BG
MoveGlobal("BD0101","SAFANA",[904.645]) // Safana
ApplySpellRES("bdresurr","SAFANA") // No such index
SmallWait(1)
ActionOverride("SAFANA",Face(W))
ApplySpellRES("bdrejuve","SAFANA") // No such index
ChangeEnemyAlly("SAFANA",NEUTRAL) // Safana
ChangeSpecifics("SAFANA",ALLIES) // Safana
ActionOverride("SAFANA",SetGlobal("bd_joined","locals",0))
ActionOverride("SAFANA",SetGlobal("bd_retreat","locals",0))
ActionOverride("SAFANA",SaveObjectLocation("LOCALS","bd_default_loc",Myself))
ActionOverride("SAFANA",ChangeAIScript("BDSAFANA",OVERRIDE))
ActionOverride("SAFANA",ChangeAIScript("",CLASS))
ActionOverride("SAFANA",ChangeAIScript("BDSHOUT",RACE))
ActionOverride("SAFANA",ChangeAIScript("BDTHIE01",GENERAL))
ActionOverride("SAFANA",ChangeAIScript("",DEFAULT))
ActionOverride("SAFANA",SetDialog("BDSAFANA"))
Continue()
END
IF
Global("bd_safana_spawn","bd0101",0) // Ducal Palace, Leaving BG
!BeenInParty("safana") // Safana
!InPartyAllowDead("safana") // Safana
THEN
RESPONSE #100
SetGlobal("bd_safana_spawn","bd0101",1) // Ducal Palace, Leaving BG
SetGlobal("SPRITE_IS_DEADSAFANA","GLOBAL",0)
CreateCreature("safana7",[904.645],W) // Safana
ActionOverride("safana",MakeGlobalOverride())
ChangeSpecifics("SAFANA",ALLIES) // Safana
ActionOverride("SAFANA",ChangeAIScript("BDSAFANA",OVERRIDE))
ActionOverride("SAFANA",ChangeAIScript("",CLASS))
ActionOverride("SAFANA",ChangeAIScript("BDSHOUT",RACE))
ActionOverride("SAFANA",ChangeAIScript("BDTHIE01",GENERAL))
ActionOverride("SAFANA",ChangeAIScript("",DEFAULT))
Continue()
END
This is the moving to the first camp in bd1000. The script blocks check whether she is dead with the normal "!Dead()" checks:
Global("bd_move_safana","bd1000",0) // Coast Way Crossing
!Dead("safana") // Safana
!InPartyAllowDead("safana") // Safana
THEN
RESPONSE #100
SetGlobal("bd_move_safana","bd1000",1) // Coast Way Crossing
MoveGlobal("bd1000","SAFANA",[280.3480]) // Safana
ActionOverride("SAFANA",Face(SW))
ApplySpellRES("bdrejuve","SAFANA") // No such index
ChangeEnemyAlly("SAFANA",NEUTRAL) // Safana
ChangeSpecifics("SAFANA",ALLIES) // Safana
ActionOverride("SAFANA",SetGlobal("bd_joined","locals",0))
ActionOverride("SAFANA",SetGlobal("bd_retreat","locals",0))
ActionOverride("SAFANA",SaveObjectLocation("LOCALS","bd_default_loc",Myself))
ActionOverride("SAFANA",ChangeAIScript("BDSAFANA",OVERRIDE))
ActionOverride("SAFANA",ChangeAIScript("bdasc3",CLASS))
ActionOverride("SAFANA",ChangeAIScript("BDSHOUT",RACE))
ActionOverride("SAFANA",ChangeAIScript("BDTHIE01",GENERAL))
ActionOverride("SAFANA",ChangeAIScript("",DEFAULT))
ActionOverride("SAFANA",SetDialog("BDSAFANA"))
Continue()
END
Also there is this possibility: met Dorn just before Nashkel Mines but killed him without letting him into the party at all..does he appear in SoD (imprisoned near Bridgefort) as a result of this? Or does this definition fall under "died in BG"?
It might just be me but I'm not sure that the logic around whether an npc is revived or not in SoD is very coherent at the moment? Do the nature of the checks depend on the npc in question and/or location of the check?
If Dorn has never been in the party at all, the game doesn't check whether he died or not. It just creates a new copy of him - in his 64K XP SoD version.