Jump to content

BG1NPC v16, SCS, and SCSII: Killing Tazok


cmorgan

Recommended Posts

DavidW, Miloch, and I have received some funny reports of things skipping dialog and/or script commands in the final fight with Sarevok and his Posse on installs where all of these conditions apply:

  1. bg1npc is installed
  2. scs and/or scsII is installed
  3. the player has had Kivan in the party in the bandit camp
  4. the party has successfully killed Tazok.

 

DavidW will modify the triggering of SCS final encounters and see what's up with SCSII scripting (for those with BGT installs), but the difficulty boils down to an action BG1NPC introduces, not possible in the vanilla game - killing Tazok, which sets the global SPRITE_IS_DEADTAZOK.

 

Folks have the manual fix scattered across several forums, but we can prevent the harm coming in the first place if we modify this ourselves. So, first off, we already have a Kivan-set variable for Tazok's death:

in Kivan's script,

/* Tazok Dead in Bandit Camp */
IF %BGT_VAR%
AreaCheck("%BanditCamp%")
Dead("tazok")
Global("P#KivanTazok3","GLOBAL",0)
InParty(Myself)
!StateCheck(Myself,CD_STATE_NOTVALID)
InMyArea(Player1)
!StateCheck(Player1,CD_STATE_NOTVALID)
THEN
RESPONSE #100
SetGlobal("X#TazokDead","GLOBAL",1)
SetGlobal("P#KivanTazok3","GLOBAL",1)
SetGlobalTimer("X#TazokDead","GLOBAL",450)
END[/size]

 

so (X#TazokDead = 1) = Dead("tazok") for the purposes of any final dialog.

 

We can reset the death variable for Tazok at the last second, so to speak, by adding to the Undercity script - that means we don't have to mess with any .bcs or dialog triggering on Dead("tazok) or !Dead("tazok") except anything thrown onto the final encounter. Everything before that point will be untouched. If someone CLUAConsoles directly into the Temple without visiting the Undercity, we can't help them - resetting the SPRITE_IS_DEAD during a battle with Tazok is a really silly thing to do :thumbsup:

 

in bg1npc.tp2,

EXTEND_BOTTOM ~%Undercity_BCS%.bcs~ ~bg1npc/core/baf/x#tazokarea.baf~
  EVALUATE_BUFFER
[/size]

 

added to bg1npc-v17\bg1npc\lib\g3_tutu_cpmvars.tpa

	OUTER_SPRINT "Undercity_BCS" "_AR0123"

 

added to bg1npc-v17\bg1npc\lib\g3_bgt_cpmvars.tpa

	OUTER_SPRINT "Undercity_BCS" "AR7223"

 

in file bg1npc/core/baf/x#tazokarea.baf

IF %BGT_VAR%
Global("X#TazokResurrected","GLOBAL",0)
Dead("tazok")
THEN RESPONSE #100
SetGlobal("SPRITE_IS_DEADTAZOK","GLOBAL",0)
SetGlobal("X#TazokResurrected","GLOBAL",1)
Continue()
END
[/size]

 

which should revive Tazok from the dead in terms of the game engine seeing him.

 

We have x#kiint_new.baf that berelinde built while sorting out all those I_C_T[1,2,3]'s and working out the ending sequence:

IF %BGT_VAR%
 InParty(Myself)
 !StateCheck(Myself,CD_STATE_NOTVALID)
 Global("X#KivanSarevokTazok","GLOBAL",1)
 Global("X#TazokDead","GLOBAL",1)
 See("tazok")
 Global("X#KivanFinalFightDead","GLOBAL",0)
THEN
 RESPONSE #100
SetGlobal("X#KivanFinalFightDead","GLOBAL",1)
END

IF %BGT_VAR%
 InParty(Myself)
 !StateCheck(Myself,CD_STATE_NOTVALID)
 See("tazok")
 Global("X#KivanFinalFightDead","GLOBAL",1)
THEN
 RESPONSE #100
  StartDialogueNoSet(Myself)
END

IF %BGT_VAR%
 InParty(Myself)
 !StateCheck(Myself,CD_STATE_NOTVALID)
 Global("X#KivanSarevokTazok","GLOBAL",1)
 Global("X#TazokDead","GLOBAL",0)
 See("tazok")
 Global("X#KivanFinalFightLiving","GLOBAL",0)
THEN
 RESPONSE #100
SetGlobal("X#KivanFinalFightLiving","GLOBAL",1)
END

IF %BGT_VAR%
 InParty(Myself)
 !StateCheck(Myself,CD_STATE_NOTVALID)
 See("tazok")
 Global("X#KivanFinalFightLiving","GLOBAL",1)
THEN
 RESPONSE #100
  StartDialogueNoSet(Myself)
END

 

abd berelinde's related file,

 

/* Comment out lines 2 through 99 in x#kiint.d */

BEGIN ~%tutu_var%TAZOK2~

 

ADD_TRANS_ACTION %tutu_var%SAREVO BEGIN 15 16 18 19 20 21 END BEGIN END

~SetGlobal("X#KivanSarevokTazok","GLOBAL",1)~

 

CHAIN IF WEIGHT #-1 ~Global("X#KivanFinalFightDead","GLOBAL",1)~ THEN ~%KIVAN_JOINED%~ X#KivanTazokDead

@0

DO ~SetGlobal("X#KivanFinalFightDead","GLOBAL",2)~

== ~%tutu_var%TAZOK2~ @1

== ~%KIVAN_JOINED%~ @2

EXIT

 

CHAIN IF WEIGHT #-1 ~Global("X#KivanFinalFightLiving","GLOBAL",1)~ THEN ~%KIVAN_JOINED%~ X#KivanTazokLiving

@3

DO ~SetGlobal("X#KivanFinalFightLiving","GLOBAL",2)~

== ~%tutu_var%TAZOK2~ @4

== ~%KIVAN_JOINED%~ @5

EXIT

[/code]

 

so I am a happy dude - berelinde already fixed this by separating out the bg1npc interjections for the two possibilities and linking them directly to the original variable. No need for further tinkering!

 

reapierd, prerelease v17, 11/27/2008.

 

Happy Thanksgiving - I will try to playtest tomorrow on Tiax's quest and Branwen/Zeke (looks fixed, but a v16 report indicated Zeke still can get the scroll dialog when Jaheora has taken it and swatted him with it. It shouldn't be possible, as we recoded this, but just to make sure...)

Link to comment

Archived

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

×
×
  • Create New...