u!minor1.d - The RandomNum() calls need to be die,roll (e.g., 7,n)REPLACE_STATE_TRIGGER LAHL 1 ~Global("Kaishas1","GLOBAL",1) RandomNum(1,7) !Dead("karoug")~
REPLACE_STATE_TRIGGER LAHL 2 ~Global("Kaishas1","GLOBAL",1) RandomNum(2,7) !Dead("karoug")~
REPLACE_STATE_TRIGGER LAHL 3 ~Global("Kaishas1","GLOBAL",1) RandomNum(3,7) !Dead("karoug")~
REPLACE_STATE_TRIGGER LAHL 4 ~Global("Kaishas1","GLOBAL",1) RandomNum(4,7) !Dead("karoug")~
REPLACE_STATE_TRIGGER LAHL 5 ~Global("Kaishas1","GLOBAL",1) RandomNum(5,7) !Dead("karoug")~
REPLACE_STATE_TRIGGER LAHL 6 ~Global("Kaishas1","GLOBAL",1) RandomNum(6,7) !Dead("karoug")~
REPLACE_STATE_TRIGGER LAHL 7 ~Global("Kaishas1","GLOBAL",1) RandomNum(7,7) !Dead("karoug")~
u!totscminor.d - WeiDU has a hack to fix these, but the ActionOverride() calls are missing the closing parenthesis. You may also want to chop off the trailing Enemy() in State 4.REPLACE KIERES
IF ~~ THEN BEGIN 3
SAY #22049
IF ~~ THEN DO ~Enemy()
ActionOverride("leaggu1",Enemy())
ActionOverride("leaggu1",AttackReevaluate(LastTalkedToBy("kieres"),8)
ActionOverride("leaggu2",Enemy())
ActionOverride("leaggu2",AttackReevaluate(LastTalkedToBy("kieres"),8)
ActionOverride("leaggu3",Enemy())
ActionOverride("leaggu3",AttackReevaluate(LastTalkedToBy("kieres"),8)
ActionOverride("leaggu4",Enemy())
ActionOverride("leaggu4",AttackReevaluate(LastTalkedToBy("kieres"),8)
ActionOverride("leaggu5",Enemy())
ActionOverride("leaggu5",AttackReevaluate(LastTalkedToBy("kieres"),8)
ActionOverride("leaggu6",Enemy())
ActionOverride("leaggu6",AttackReevaluate(LastTalkedToBy("kieres"),8)
ActionOverride("leaggu7",Enemy())
ActionOverride("leaggu7",AttackReevaluate(LastTalkedToBy("kieres"),8)
~ JOURNAL #23519 EXIT
END
IF ~~ THEN BEGIN 4
SAY #22050
IF ~~ THEN DO ~Enemy()
ActionOverride("leaggu1",Enemy())
ActionOverride("leaggu1",AttackReevaluate(LastTalkedToBy("kieres"),8)
ActionOverride("leaggu2",Enemy())
ActionOverride("leaggu2",AttackReevaluate(LastTalkedToBy("kieres"),8)
ActionOverride("leaggu3",Enemy())
ActionOverride("leaggu3",AttackReevaluate(LastTalkedToBy("kieres"),8)
ActionOverride("leaggu4",Enemy())
ActionOverride("leaggu4",AttackReevaluate(LastTalkedToBy("kieres"),8)
ActionOverride("leaggu5",Enemy())
ActionOverride("leaggu5",AttackReevaluate(LastTalkedToBy("kieres"),8)
ActionOverride("leaggu6",Enemy())
ActionOverride("leaggu6",AttackReevaluate(LastTalkedToBy("kieres"),8)
ActionOverride("leaggu7",Enemy())
ActionOverride("leaggu7",AttackReevaluate(LastTalkedToBy("kieres"),8)Enemy()~ JOURNAL #23519 EXIT
END
END
ubedie.d - I like the work you did here. You may want to change !GlobalTimerExpired in Waiting to GlobalTimerNotExpired (!GlobalTimerExpired() will also return true if the timer hasn't even been set). The way the dialogue is structured, though, it won't make any difference.IF ~Global("GaveUBEdiePotion","GLOBAL",1)
!GlobalTimerExpired("UBEdie","GLOBAL")~ THEN BEGIN Waiting
SAY #15175 /* ~Please be quiet. I'm trying to study.~ */
IF ~~ THEN DO ~~ EXIT
END
ubkivan.baf - Should this have a Global("UBKivanTazokDead","GLOBAL",0) check?IF
InParty(Myself)
Dead("Tazok")
THEN
RESPONSE #100
SetGlobal("UBKivanTazokDead","GLOBAL",1)
ActionOverride("Kivan",Dialogue([PC]))
END
setup-bg1ub.tp2 - I don't think these guys are used, but should this be RANDFLY?COPY_EXISTING BIRD_INE.CRE OVERRIDE
BIRD_INN.CRE OVERRIDE
BIRD_INS.CRE OVERRIDE
BIRD_INW.CRE OVERRIDE
WRITE_ASCII 0x258 ~RANDWALK~
BUT_ONLY_IF_IT_CHANGES
setup-bg1ub.tp2 - Some of the item patching code in creature corrections is still using absolute offsets (around L. 1158). You can replace the code for dead2, deadfuck, drelik, jamie, lothan, and sakul with the following (ugly) code. I've already tested the patch with default TotSC; everything works as expected, and this should make these patches compatible with FotD and any other BG1 mod that may touch any of these files.COPY_EXISTING DEAD2.CRE OVERRIDE // Amnish Soldier (various)
DEADFUCK.CRE OVERRIDE // Amnish Soldier (AR5403, Nashkel Mines)
DRELIK.CRE OVERRIDE // Drelik (AR0010, Baldur's Gate)
JAMIE.CRE OVERRIDE // Jamie (AR4805, Nashkel manor)
LOTHAN.CRE OVERRIDE // Lothander (various, Baldur's Gate)
SAKUL.CRE OVERRIDE // Sakul (AR5506, Catacombs)
PATCH_IF (SOURCE_SIZE > 0x2d3) BEGIN
READ_LONG 0x2bc itemOff
FOR (READ_LONG 0x2c0 numItem; numItem; numItem -= 0x1) BEGIN
READ_ASCII itemOff resRef
PATCH_IF !("%resRef%" STRING_COMPARE_CASE "SWIH04") BEGIN // Fixes a typo (SWIH04 does not exist)
WRITE_ASCII itemOff "SW1H04" #8 // Long Sword
END ELSE PATCH_IF !("%resRef%" STRING_COMPARE_CASE "SCRL1J") BEGIN // Fixes a typo (SCRL1J does not exist)
PATCH_IF !("%SOURCE_RES%" STRING_COMPARE_CASE "SAKUL") BEGIN
WRITE_ASCII itemOff "SCRL1I" #8 // Hold Person
END ELSE WRITE_ASCII itemOff "SCRL1L" #8 // Monster Summoning I
END ELSE PATCH_IF !("%resRef%" STRING_COMPARE_CASE "B00T01") BEGIN // Fixes a typo (B00T01 does not exist)
WRITE_ASCII itemOff "BOOT01" #8 // Boots of Speed
END
itemOff += 0x14
END
END
BUT_ONLY_IF_IT_CHANGES
setup-bg1ub.tp2 - The morale break field is a single byte and should use WRITE_BYTE (WRITE_SHORT is just overwriting the racial enemy, though, so it doesn't make much difference). Additionally, 3 is pretty low for the break for an innocent; you may want to just flip the current values of 6 and 8 (which does occur for some innocents by default; would be WRITE_BYTE 0x23f 0x8 and WRITE_BYTE 0x240 0x6), but it's not a big deal.COPY_EXISTING WILTON.CRE OVERRIDE
ADD_CRE_ITEM ~CLCK01~ #1 #0 #0 ~NONE~ ~INV1 INV2~ // Adds Cloak of Protection +1
WRITE_ASCII 0x2cc ~UBWILTON~ // Assigns edited dialog file
WRITE_ASCII 0x280 ~Wilton~ // Assigns death variable
WRITE_SHORT 0x240 0x03 // Fix his morale setting
BUT_ONLY_IF_IT_CHANGES
A couple of the ARE patches are still using absolute offsets, but it'll take more than a couple seconds to go over them. I can do it later, if you want. Everything else appears to be fine on first glance.