Jump to content

Initial comments on the bug list


devSin

Recommended Posts

Oh, right, I promised code of some sort.

 

// ferric runs away since he uses Yoshimo's script
COPY_EXISTING ~deshar.cre~ ~override~
 WRITE_ASCII 0x258 ~thief14t~ #8
 BUT_ONLY_IF_IT_CHANGES

// enables container in shade lord dungeon
COPY_EXISTING ~ar1401.bcs~ ~override~
 DECOMPILE_BCS_TO_BAF
 REPLACE_TEXTUALLY ~TriggerActivation("Tran1400",FALSE)~
   ~TriggerActivation("Tran1400",FALSE)
    ContainerEnable("CONTAINER2",0)
    ActionOverride("shaava01",DestroySelf())~
 COMPILE_BAF_TO_BCS
 BUT_ONLY_IF_IT_CHANGES

// enables container in shade lord dungeon
COPY_EXISTING ~ar2000.bcs~ ~override~
 DECOMPILE_BCS_TO_BAF
 REPLACE_TEXTUALLY ~Global("JeniaSpawn","AR2000",0)~
   ~Global("JeniaSpawn","AR2000",0)
    Global("loganjob2","GLOBAL",2)~
 COMPILE_BAF_TO_BCS
 BUT_ONLY_IF_IT_CHANGES

// fixes breaking bridge in UE quest
COPY_EXISTING ~riftg01.bcs~ ~override~
 DECOMPILE_BCS_TO_BAF
 REPLACE_TEXTUALLY ~!Dead(~ ~Dead(~
 REPLACE_TEXTUALLY ~!Exists(~ ~OR(2) !Exists(~
 COMPILE_BAF_TO_BCS
 BUT_ONLY_IF_IT_CHANGES
 
// Wave halberd should work against salamanders
COPY_EXISTING ~plysala.cre~ ~override~
 WRITE_BYTE 0x273 187 // elemental_fire
 BUT_ONLY_IF_IT_CHANGES

// club of detonation's 3 fire damage only occurring 20% of the time, instead of always
COPY_EXISTING ~blun26.itm~ ~override~
 READ_LONG   0x64 "abil_off"
 READ_SHORT  0x68 "abil_num"
 READ_LONG   0x6a "fx_off"
 WHILE ("%abil_num%" > 0) BEGIN // looks for magical ability header
   SET "abil_num" = ("%abil_num%" - 1)
   READ_BYTE   ("%abil_off%" +        ("%abil_num%" * 0x38)) "type"
   PATCH_IF ("%type%" = 1) BEGIN // melee ability check
     READ_SHORT  ("%abil_off%" + 0x1e + ("%abil_num%" * 0x38)) "abil_fx_num"
     READ_SHORT  ("%abil_off%" + 0x20 + ("%abil_num%" * 0x38)) "abil_fx_idx"
     WHILE ("%abil_fx_num%" > 0) BEGIN // searches through fx for THAC0 bonus
       SET "abil_fx_num" = ("%abil_fx_num%" - 1)
       READ_SHORT ("%fx_off%" +        (("%abil_fx_idx%" + "%abil_fx_num%") * 0x30)) "opcode"
       READ_LONG  ("%fx_off%" + 0x04 + (("%abil_fx_idx%" + "%abil_fx_num%") * 0x30)) "damage"
       PATCH_IF (("%opcode%" = 12) AND ("%damage%" = 3)) BEGIN // changes it from regular to missile THAC0 bonus
         WRITE_BYTE ("%fx_off%" + 0x12 + (("%abil_fx_idx%" + "%abil_fx_num%") * 0x30)) 100 // probability
       END
     END
   END
 END
 BUT_ONLY_IF_IT_CHANGES

// catti shold not attack mages randomly
COPY_EXISTING ~C6CATTI.CRE~ ~OVERRIDE~
 WRITE_LONG 0x0250 0 // delete MAGESLY.BCS
 WRITE_LONG 0x0254 0
 BUT_ONLY_IF_IT_CHANGES

// stops Terrece from initiating dialogue from outside
COPY_EXISTING ~terrece.bcs~ ~override~
 DECOMPILE_BCS_TO_BAF
 REPLACE_TEXTUALLY ~Global("TerreceSpawn","GLOBAL",2)~ ~Global("TerreceSpawn","GLOBAL",2) InMyArea([PC])~
 COMPILE_BAF_TO_BCS
 BUT_ONLY_IF_IT_CHANGES

// stops Terrece from initiating dialogue from outside
COPY_EXISTING ~ar0406.bcs~ ~override~
 DECOMPILE_BCS_TO_BAF
 REPLACE_TEXTUALLY ~Global("WorkingForBodhi","GLOBAL",1)~ ~Global("WorkingForBodhi","GLOBAL",1) Exists("Yoshimo")~
 COMPILE_BAF_TO_BCS
 BUT_ONLY_IF_IT_CHANGES

// int drain string from mind flayers showing up 300 seconds after occurring
COPY_EXISTING ~mindflay.itm~ ~override~
 READ_LONG   0x64 "abil_off"
 READ_SHORT  0x68 "abil_num"
 READ_LONG   0x6a "fx_off"
 WHILE ("%abil_num%" > 0) BEGIN // looks for melee ability header
   SET "abil_num" = ("%abil_num%" - 1)
   READ_BYTE   ("%abil_off%" +        ("%abil_num%" * 0x38)) "type"
   PATCH_IF ("%type%" = 1) BEGIN // melee ability check
     READ_SHORT  ("%abil_off%" + 0x1e + ("%abil_num%" * 0x38)) "abil_fx_num"
     READ_SHORT  ("%abil_off%" + 0x20 + ("%abil_num%" * 0x38)) "abil_fx_idx"
     WHILE ("%abil_fx_num%" > 0) BEGIN // searches through fx for THAC0 bonus
       SET "abil_fx_num" = ("%abil_fx_num%" - 1)
       READ_SHORT ("%fx_off%" +        (("%abil_fx_idx%" + "%abil_fx_num%") * 0x30)) "opcode"
       PATCH_IF ("%opcode%" = 139) BEGIN // look for display string
         WRITE_BYTE ("%fx_off%" + 0x0c + (("%abil_fx_idx%" + "%abil_fx_num%") * 0x30)) 1 // instant/permanent
         WRITE_LONG ("%fx_off%" + 0x0e + (("%abil_fx_idx%" + "%abil_fx_num%") * 0x30)) 0 // no duration
       END
     END
   END
 END
 BUT_ONLY_IF_IT_CHANGES

// jerrod's mace has incorrect eff assignments
COPY_EXISTING ~wamace.itm~ ~override~
 READ_LONG   0x6a "fx_off"
 READ_SHORT  0x70 "fx_num"
 WHILE ("%fx_num%" > 0) BEGIN // looking through effects
   SET "fx_num" = ("%fx_num%" - 1)
   READ_SHORT   ("%fx_off%" +        ("%fx_num%" * 0x30)) "opcode"
   READ_ASCII   ("%fx_off%" + 0x14 + ("%fx_num%" * 0x30)) "eff"
   PATCH_IF (("%opcode%" = 177) AND ("%eff%" STRING_COMPARE_CASE "wamacea" = 0)) BEGIN // use eff
     WRITE_ASCII   ("%fx_off%" + 0x14 + ("%fx_num%" * 0x30)) ~damacea~ #8
   END ELSE
   PATCH_IF (("%opcode%" = 177) AND ("%eff%" STRING_COMPARE_CASE "wamaceb" = 0)) BEGIN // use eff
     WRITE_ASCII   ("%fx_off%" + 0x14 + ("%fx_num%" * 0x30)) ~damaceb~ #8
   END
 END
 BUT_ONLY_IF_IT_CHANGES

// darts are allowing strength bonuses and doing slashing damage
COPY_EXISTING ~dart01.itm~ ~override~
 READ_LONG   0x64 "abil_off"
 READ_SHORT  0x68 "abil_num"
 WHILE ("%abil_num%" > 0) BEGIN // looks for ranged ability header
   SET "abil_num" = ("%abil_num%" - 1)
   READ_BYTE   ("%abil_off%" +        ("%abil_num%" * 0x38)) "type"
   PATCH_IF ("%type%" = 2) BEGIN // ranged ability check
     WRITE_SHORT ("%abil_off%" + 0x0c + ("%abil_num%" * 0x38)) 4 // missile damage type
     WRITE_BYTE  ("%abil_off%" + 0x26 + ("%abil_num%" * 0x38)) 0 // disallow strength bonus
   END
 END
 BUT_ONLY_IF_IT_CHANGES

// darts of stunning, wounding missing enchantment level
COPY_EXISTING ~dart03.itm~ ~override~
 WRITE_LONG   0x60 1
 BUT_ONLY_IF_IT_CHANGES

// other gladiators should do something when Hendak does
COPY_EXISTING ~glad2782.bcs~ ~override~
 DECOMPILE_BCS_TO_BAF
 REPLACE_TEXTUALLY ~Dead("Hendak")~ 
 ~OR(2)
  Dead("Hendak")
  Allegiance("Hendak",255)~
 COMPILE_BAF_TO_BCS
 BUT_ONLY_IF_IT_CHANGES
EXTEND_BOTTOM ~glad2782.bcs~ ~bg2fixpack/baf/glad2782.baf~

// Cernd goes hostile if Grove poisoned
EXTEND_BOTTOM ~cernd.bcs~ ~bg2fixpack/baf/cernd.baf~

// removes duplicate Sir Donalus
COPY_EXISTING ~HELMPR.CRE~ ~OVERRIDE~
 SAY 0x08 #17221
 SAY 0x0c #17221
 BUT_ONLY_IF_IT_CHANGES

// prevents Tamoko from running away and making PP challenge unfinishable
COPY_EXISTING ~gpkensai.bcs~ ~override/cdtamoko.bcs~
 DECOMPILE_BCS_TO_BAF
 REPLACE_TEXTUALLY ~!HasItem("POTN55",Myself)~ ~False()~
 COMPILE_BAF_TO_BCS
 BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~chtaz01.cre~ ~override~
 WRITE_ASCII 0x268 ~cdtamoko~ #8
 BUT_ONLY_IF_IT_CHANGES

// Jenia souldn't spawn until Hero of Trademeet
COPY_EXISTING ~glad2782.bcs~ ~override~
 DECOMPILE_BCS_TO_BAF
 REPLACE_TEXTUALLY ~Global("JeniaSpawn","AR2000",0)~ ~Global("JeniaSpawn","AR2000",0) Global("loganjob2","GLOBAL",2)~
 COMPILE_BAF_TO_BCS
 BUT_ONLY_IF_IT_CHANGES

// Ketlaar Argrim and his bodyguards go away from the Council building if he's imprisoned
EXTEND_BOTTOM ~ar1002.bcs~ ~bg2fixpack/baf/ar1002.baf~

// fix Arcana Archive store name
ACTION_IF FILE_EXISTS_IN_GAME ~saradush.mve~ THEN BEGIN // ToB-only stuff check
 COPY_EXISTING ~25SPELL.STO~ ~OVERRIDE~
   SAY 0x0c #70882 // Arcana Archives
   BUT_ONLY_IF_IT_CHANGES

 COPY_EXISTING ~25SPELL2.STO~ ~OVERRIDE~
   SAY 0x0c #73982 // Arcana Archives
   BUT_ONLY_IF_IT_CHANGES
END

 

Dialogue:

 

// umar hills boys don't always take all three swords
REPLACE_ACTION_TEXT ~uhkid01~ ~TakePartyItemNum("MISC97",3)~ ~TakePartyItem("MISC97")~
REPLACE_ACTION_TEXT ~uhkid01~ ~TakePartyItem("SW1H01",3)~ ~TakePartyItemNum("SW1H01",3)~

// Jaheira can stutter if blinded while finding Khalid's body
REPLACE_TRIGGER_TEXT ~jaheiraj~ ~See("DeadKhalid")~ ~Range("DeadKhalid",20)~

REPLACE_ACTION_TEXT ~wish~ ~GivePartyGold(2000)~ ~GiveGoldForce(2000)~

// Elhan gives out 74500 XP twice
REPLACE_ACTION_TEXT ~c6elhan2~ ~AddXPObject(Player[1-6],74500)~ ~~
ADD_TRANS_ACTION c6elhan2
BEGIN 80 END
BEGIN END
~AddXPObject(Player1,74500)
AddXPObject(Player2,74500)
AddXPObject(Player3,74500)
AddXPObject(Player4,74500)
AddXPObject(Player5,74500)
AddXPObject(Player6,74500)~

 

glad2872.baf

 

IF
Global("HendakReleased","AR0406",2)
!Dead("Hendak")
THEN
RESPONSE #100
  EscapeArea() // try doing it the nice way first
END

IF
GlobalGT("HendakReleased","AR0406",2)
Dead("Lehtinan")
!Dead("Hendak")
THEN
RESPONSE #100
  DestroySelf() // otherwise, just die already
END

 

cernd.baf

 

IF
 !InParty(Myself)
 Global("GrovePoisoned","GLOBAL",1)
THEN
 RESPONSE #100
   Enemy()
END

 

ar1002.baf

 

IF
 OR(2)
   Dead("MGKET01")
   Global("ARGRIMIMPRISON","GLOBAL",1)
 Global("ARGRIMGONE","AR1002",0)
THEN
 RESPONSE #100
   SetGlobal("ARGRIMGONE","AR1002",1)
   ActionOverride("ARGRIM",DestroySelf())
   ActionOverride("MGKETBG1",DestroySelf())
   ActionOverride("MGKETBG2",DestroySelf())
END

Link to comment

One more addition--the hell selfish spells are indeed flagged as divination.

 

// hell selfish penalties should be schoolless
COPY_EXISTING ~spin765.spl~ ~override~ // hell_lose xp
             ~spin766.spl~ ~override~ // hell_lose_dex
             ~spin767.spl~ ~override~ // hell_lose_hp
             ~spin768.spl~ ~override~ // hell_dispell [sic]
             ~spin769.spl~ ~override~ // hell_hold
             ~spin770.spl~ ~override~ // hell_explode
             ~spin771.spl~ ~override~ // hell_damage_half
 WRITE_SHORT 0x25 0 // no primary type
 WRITE_SHORT 0x27 0 // no secondary type
 BUT_ONLY_IF_IT_CHANGES

Link to comment
Unseeing Eye bridge guardian fixed; OR(2) !Exists Dead is the magic combo. If it exists, it needs to be dead
Not really. After a corpsable creature dies, the !Exist() trigger will always be false and the Dead() trigger will always return true. So, no matter what happens, at least two of the blocks will always be true (meaning you can summon the bridge riddler at any time, even while in combat). I honestly can't figure out if they were trying to make it so that you couldn't do the "unlimited items and XP" exploit, or if they were just trying to make sure that you weren't currently fighting one of the educators. Finally, I decided to just make a token effort to prevent the creature from appearing if the party is in combat:
<<<<<<<< RIFTG01.BAF
IF
 Clicked([0])
 Range(LastTrigger,20)
 Global("BRIDGEOPEN","AR0204",0)
 Global("SPAWNGUARDIAN","AR0204",0)
 CombatCounter(0) // people don't like CC(), but what else can you do?
THEN
 RESPONSE #100
   SetGlobal("SPAWNGUARDIAN","AR0204",1)
   CreateCreature("RIFTG01",[3385.2619],0)
END

IF
 Clicked([0])
 !Range(LastTrigger,20)
THEN
 RESPONSE #100
   DisplayString(Myself,14702)
END

IF
 True()
THEN
 RESPONSE #100
   Wait(1)
END
>>>>>>>>

Link to comment

OK, I'm contemplating giving the rift creatures a special death script:

IF
 Die()
THEN
 RESPONSE #100
   CreateVisualEffectObject("SPDISPMA",Myself) // or some suitable vfx
   DestroySelf()
END

and then replacing the CombatCounter(0) with !Exists("RIFTC0[123]").

Link to comment

Random unrelated fix not worth its own thread:

 

STRING_SET 6940 ~Boo does not understand. It is not as though the scoundrel will be missed, but where has Edwin gone and who is this woman that wears his clothes?~

 

I'd also propose:

 

STRING_SET 15461 ~I am not impressed by fighting slaves. But I would CRUSH any true opponent who dared to face me!~

 

Since "I is" isn't really Minsc and seems more likely to be a typo (probably changed from "Boo is...").

Link to comment
Not really. After a corpsable creature dies, the !Exist() trigger will always be false and the Dead() trigger will always return true. So, no matter what happens, at least two of the blocks will always be true (meaning you can summon the bridge riddler at any time, even while in combat).

Ah, there we go. The problem is the triplication of the blocks. We could eliminate two of them and just use one block with the original conditions:

 

IF
 Clicked([ANYONE])
 Range(LastTrigger,20)
 Global("BridgeOpen","AR0204",0)
 Global("SpawnGuardian","AR0204",0)
 OR(2)
   !Exists("Riftcr01")
   Dead("Riftcr01")
 OR(2)
   !Exists("Riftcr02")
   Dead("Riftcr02")
 OR(2)
   !Exists("Riftcr03")
   Dead("Riftcr03")
THEN
 RESPONSE #100
   SetGlobal("SpawnGuardian","AR0204",1)
   CreateCreature("Riftg01",[3385.2619],0) // Guardian
END

If any of the 'punishment' monsters are present and alive, the guardian will not appear.

 

The string updates are included.

Link to comment

I had the same idea, but this does little to change the actual behavior. After you've killed the first RIFTCR01, that OR(2) will *always* be true (even if there's another RIFTCR01 being fought). The same goes for RIFTCR02 and RIFTCR03 (remember, you can fight each of these CREs an arbitrary number of times). After the creature is dead, the !Exists() trigger will always be false (unless you wait for the corpse to decay and disappear), and the Dead() trigger will always be true (no matter what).

 

Additionaly complexity ensues when you realize that the other two OR()s will always be true, regardless of which educator you're currently battling. So, the above will only block the bridge guardian from appearing if you're fighting one of them for the first time. This is nearly identical to the 3-block version, excepting that it will work correctly for each initial spawn of the educators.

Link to comment

Ah, right. I'm not terribly excited about either DestroySelf() or making them uncorpse-able--IMO creatures that drop items seem like they should stick around. I'd rather use CombatCounter, though I know it can be a bit flaky.

Link to comment

Archived

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

×
×
  • Create New...