Jump to content

Misc stuff from Outstanding Bugs thread


Recommended Posts

Rod of Smiting had a mis-targeted effect; also moved it from a global effect to a melee ability effect.

 

// rod of smiting golem damage
COPY_EXISTING ~rods04.itm~ ~override~
 READ_LONG   0x64 "abil_off"
 READ_SHORT  0x68 "abil_num"
 READ_LONG   0x6a "fx_off"
 READ_SHORT  0x70 "fx_num"
 SET "delta" = 0
 FOR (index2 = 0; index2 < fx_num; index2 = index2 + 1) BEGIN
   READ_SHORT ("%fx_off%" +        (0x30 * "%index2%")) "opcode"
   READ_ASCII ("%fx_off%" + 0x14 + (0x30 * "%index2%")) "eff_file"
   PATCH_IF (("%opcode%" = 177) AND ("%eff_file%" STRING_COMPARE_CASE "smitgol1" = 0)) BEGIN
     READ_ASCII   ("%fx_off%" + (0x30 * "%index2%")) "clone_fx" (0x30) // reads effect
     DELETE_BYTES ("%fx_off%" + (0x30 * "%index2%")) 0x30 // deletes it
     SET "fx_num" = "%fx_num%" - 1
     WRITE_SHORT 0x70 "%fx_num%" // adjusts global fx number
     SET "index" = "%fx_num%" // kills loop
     SET "delta" = "%delta%" - 1
   END
 END
 FOR (index = 0; index < abil_num; index = index + 1) BEGIN // looks for melee ability header
   READ_BYTE   ("%abil_off%" +        ("%index%" * 0x38)) "type"
   READ_SHORT  ("%abil_off%" + 0x20 + ("%index%" * 0x38)) "abil_fx_idx"
   SET "abil_fx_idx" = ("%abil_fx_idx%" + "%delta%")
   WRITE_SHORT  ("%abil_off%" + 0x20 + ("%index%" * 0x38)) "%abil_fx_idx%"
   PATCH_IF ("%type%" = 1) BEGIN // melee ability check
     READ_SHORT  ("%abil_off%" + 0x1e + ("%index%" * 0x38)) "abil_fx_num"
     WRITE_SHORT ("%abil_off%" + 0x1e + ("%index%" * 0x38)) ("%abil_fx_num%" +  1)
     INSERT_BYTES            ("%fx_off%" +        ("%abil_fx_idx%" * 0x30)) 0x30 // new effect
       WRITE_EVALUATED_ASCII ("%fx_off%" +        ("%abil_fx_idx%" * 0x30)) "%clone_fx%" // writes in cloned effect
       WRITE_BYTE            ("%fx_off%" + 0x02 + ("%abil_fx_idx%" * 0x30)) 2    // target: preset target
       WRITE_BYTE            ("%fx_off%" + 0x0d + ("%abil_fx_idx%" * 0x30)) 0    // no dispel/bypass
     SET "delta" = ("%delta%" + 1)
   END
 END
 BUT_ONLY_IF_IT_CHANGES

 

Staff of the Ram +6 didn't have its listed 1d4 piercing melee damage. (Like it needs to be more powerful anyway.)

 

// staff of the ram +6 issing listed 1d4 pierce damage
COPY_EXISTING ~staf22.itm~ ~override~
 READ_LONG   0x64 "abil_off"
 READ_SHORT  0x68 "abil_num"
 READ_LONG   0x6a "fx_off"
 SET "delta" = 0
 FOR (index = 0; index < abil_num; index = index + 1) BEGIN // looks for melee ability header
   READ_BYTE   ("%abil_off%" +        ("%index%" * 0x38)) "type"
   READ_SHORT  ("%abil_off%" + 0x20 + ("%index%" * 0x38)) "abil_fx_idx"
   SET "abil_fx_idx" = ("%abil_fx_idx%" + "%delta%")
   WRITE_SHORT  ("%abil_off%" + 0x20 + ("%index%" * 0x38)) "%abil_fx_idx%"
   PATCH_IF ("%type%" = 1) BEGIN // melee ability check
     READ_SHORT  ("%abil_off%" + 0x1e + ("%index%" * 0x38)) "abil_fx_num"
     WRITE_SHORT ("%abil_off%" + 0x1e + ("%index%" * 0x38)) ("%abil_fx_num%" +  1)
     INSERT_BYTES            ("%fx_off%" +        ("%abil_fx_idx%" * 0x30)) 0x30 // new effect
       WRITE_SHORT           ("%fx_off%" +        ("%abil_fx_idx%" * 0x30)) 12   // opcode: damage
       WRITE_BYTE            ("%fx_off%" + 0x02 + ("%abil_fx_idx%" * 0x30)) 2    // target: preset target
       WRITE_SHORT           ("%fx_off%" + 0x0a + ("%abil_fx_idx%" * 0x30)) 16   // piercing damage
       WRITE_BYTE            ("%fx_off%" + 0x0c + ("%abil_fx_idx%" * 0x30)) 1    // instant/perm
       WRITE_BYTE            ("%fx_off%" + 0x12 + ("%abil_fx_idx%" * 0x30)) 100  // probability
       WRITE_LONG            ("%fx_off%" + 0x1c + ("%abil_fx_idx%" * 0x30)) 1    // num dice
       WRITE_LONG            ("%fx_off%" + 0x20 + ("%abil_fx_idx%" * 0x30)) 4    // dice size
     SET "delta" = ("%delta%" + 1)
   END
 END
 BUT_ONLY_IF_IT_CHANGES

 

Lesser clay golems had no backstab protection. Went lazy aand gave them the normal clay golem weapons (which provide protection) in their ring slots.

 

// lesser clay golems not immune to backstab
COPY_EXISTING ~igolfle1.cre~ ~override~
             ~igolfle2.cre~ ~override~
             ~igolfle3.cre~ ~override~
             ~igolfle4.cre~ ~override~
 ADD_CRE_ITEM ~golcla~ #0 #0 #0 ~NONE~ ~LRING RRING AMULET~
 BUT_ONLY_IF_IT_CHANGES

 

If you kill the paladins went entering Windspear Hills Garren appears, asks that you follow him to his cabin, and then teleports you right outside. If you just go straight to Firkraag's dungeon, he appears again to inform you of the kidnapping of his son/daughter. After defeating Firkraag, you can ring up both copies (the one now outside the dungeon and the one back in the cabin) for XP. I extend Garren's script to EscapeArea() after speaking with you at the entrance of the dungeon.

 

// double Garren Windspears
EXTEND_TOP ~garren.bcs~ ~bg2fixpack/baf/garren.baf~

 

garren.baf:

 

IF
 AreaCheck("ar1200")
 Global("GarTrig","GLOBAL",1)
 Global("Kidnap","GLOBAL",3)
THEN
RESPONSE #100
 EscapeArea()
END

 

The party can exploit Tolgerias for multiple Rings of the Ram. First, I change Tolgerias' dialogue to use GiveItem instead of GiveItemCreate--if the party pickpockets him for a ring, they won't get another by turning over Valygar's body. (I also give the ring a charge so it won't be turned over empty.) I also extend the scripts of tolger.cre and tolger2.cre so that tolger2.cre will destroy his ring if the party acquired it from tolger.cre.

 

// multiple ring of the ram exploit fixes
EXTEND_TOP ~tolger.bcs~ ~bg2fixpack/baf/tolger.baf~

// ring of the ram should have a charge
COPY_EXISTING ~tolger.cre~  ~override~
             ~tolger2.cre~ ~override~
 READ_LONG 0x2bc "itm_off"
 READ_LONG 0x2c0 "itm_num"
 FOR (index = 0; index < itm_num; index = index + 1) BEGIN
   READ_ASCII ("%itm_off%" + (0x14 * "%index%")) "item"
   PATCH_IF ("%item%" STRING_COMPARE_CASE "ring33" = 0) BEGIN
     WRITE_SHORT ("%itm_off%" + 0x0a + (0x14 * "%index%")) 1
   END
 END
 BUT_ONLY_IF_IT_CHANGES

 

Dialogue changes added to soa-dlg.d:

 

// multi-ring of the ram exploit
REPLACE_ACTION_TEXT ~tolger~ ~GiveItemCreate("ring33",LastTalkedToBy,1,0,0)~ ~GiveItem("ring33",LastTalkedToBy)~

 

tolger.baf (used by both tolger.cre and tolger2.cre):

 

IF
 !HasItem("ring33",Myself)
 Global("CDRing33Gone","GLOBAL",0)
THEN
RESPONSE #100
 SetGlobal("CDRing33Gone","GLOBAL",1)
END

IF
 HasItem("ring33",Myself)
 Global("CDRing33Gone","GLOBAL",1)
THEN 
RESPONSE #100
 DestroyItem("ring33")
END  

 

Few other minor fixes: fixed strings for flail +2 (damage incorrect), generic mace (weight incorrect) and the priest version of symbol fear (listed duration incorrect). I've moved these into the core fixes, though I've also updated their expanded descriptions in the GTU.

 

STRING_SET  6709 @140 // weight of reular mace
STRING_SET 14320 @141 // symbol fear descript (1 round per 3 levels, not 2 rounds)
STRING_SET 36460 @139 // flail +2 damage

 

@139 = ~The flail is a sturdy wooden handle attached to an iron rod, a wooden rod with spikes, or a spiked iron ball. Between the handle and its implement is either a hinge or chain link.  This particular flail has been magically enhanced.

STATISTICS:

THACO:  +2 bonus
Damage:  1D6 + 3
Damage type:  crushing
Weight: 12
Speed Factor: 5
Proficiency Type: Flail/Morningstar
Type:  1-handed
Requires: 13 Strength
Not Usable By:
Druid
Mage 
Thief~
@140 = ~The mace is a direct descendant of the basic club, being nothing more than a wooden shaft with a stone or iron head mounted on the end.  The head design varies; some being spiked, others flanged, and still others have pyramidal knobs.

STATISTICS:

Damage:  1D6 + 1
Damage type:  crushing
Weight: 10
Speed Factor: 7
Proficiency Type: Mace
Type:  1-handed
Requires: 10 Strength
Not Usable By:
Druid
Mage
Thief~
@141 = ~Symbol, Fear
(Conjuration,Summoning) 
Level: 7
Sphere: Guardian
Range: 30 yards
Duration: Special
Casting Time: 1 round 
Area of Effect: 30' radius
Saving Throw: Neg.

Symbol, Fear is a powerful enchantment that allows the priest to inscribe a symbol on the ground or any other surface.  The symbol will remain there until someone comes too close, at which point  it will explode, causing all those within the area to make a save vs. spells at -4 or  be effected by fear for 2 rounds + 1 round for every 3 levels of the caster.~

 

Finally, Scarlet Ninja-to is supposed to by usable only by monks. Added flags to restrict it from half-orc, F/M/T, chaotic, and neutral (in lawful-chaotic axis) in the unusability patch section.

Link to comment
Finally, Scarlet Ninja-to is supposed to by usable only by monks. Added flags to restrict it from half-orc, F/M/T, chaotic, and neutral (in lawful-chaotic axis) in the unusability patch section.

 

I hope you kept the item usability documentation up-to-date...

Link to comment

I will, when I get around to posting all of this. :down:

 

More misc fixes:

 

// confusion (mage) missing -2 save penalty
COPY_EXISTING ~spwi401.spl~ ~override~
 READ_LONG  0x64 "abil_off"
 READ_SHORT 0x68 "abil_num"
 READ_LONG  0x6a "fx_off"
 FOR (index = 0; index < abil_num; index = index + 1) BEGIN // fix existing effects
   READ_SHORT  ("%abil_off%" + 0x1e + (0x28 * "%index%")) "abil_fx_num"
   READ_SHORT  ("%abil_off%" + 0x20 + (0x28 * "%index%")) "abil_fx_idx"
   FOR (index2 = 0; index2 < abil_fx_num; index2 = index2 + 1) BEGIN
     READ_LONG  ("%fx_off%" + 0x24 + (0x30 * ("%abil_fx_idx%" + "%index2%"))) "saves"
     PATCH_IF ("%saves%" != 0) BEGIN // if save allowed
       WRITE_LONG ("%fx_off%" + 0x28 + (0x30 * ("%abil_fx_idx%" + "%index2%"))) 0xfffffffe // should be a -2 penalty
     END
   END
 END
 BUT_ONLY_IF_IT_CHANGES
 
// delayed blast fireball should do 15d6 damage, not 14d6 + 15
COPY_EXISTING ~spwi712.spl~ ~override~
 READ_LONG  0x64 "abil_off"
 READ_SHORT 0x68 "abil_num"
 READ_LONG  0x6a "fx_off"
 FOR (index = 0; index < abil_num; index = index + 1) BEGIN // fix existing effects
   READ_SHORT  ("%abil_off%" + 0x1e + (0x28 * "%index%")) "abil_fx_num"
   READ_SHORT  ("%abil_off%" + 0x20 + (0x28 * "%index%")) "abil_fx_idx"
   FOR (index2 = 0; index2 < abil_fx_num; index2 = index2 + 1) BEGIN
     READ_SHORT ("%fx_off%" +        (0x30 * ("%abil_fx_idx%" + "%index2%"))) "opcode"
     PATCH_IF ("%opcode%" = 12) BEGIN // no-save damage
       READ_LONG  ("%fx_off%" + 0x24 + (0x30 * ("%abil_fx_idx%" + "%index2%"))) "saves"
       WRITE_LONG  ("%fx_off%" + 0x04 + (0x30 * ("%abil_fx_idx%" + "%index2%"))) 0 // fixed damage
       PATCH_IF ("%saves%" = 0) BEGIN
         WRITE_LONG  ("%fx_off%" + 0x1c + (0x30 * ("%abil_fx_idx%" + "%index2%"))) 8 // number of dice, no save
       END ELSE BEGIN
         WRITE_LONG  ("%fx_off%" + 0x1c + (0x30 * ("%abil_fx_idx%" + "%index2%"))) 7 // number of dice, save
       END
     END
   END
 END
 BUT_ONLY_IF_IT_CHANGES
 
// power word: blind should last 6 rounds, not 10
COPY_EXISTING ~spwi815.spl~ ~override~
 READ_LONG  0x64 "abil_off"
 READ_SHORT 0x68 "abil_num"
 READ_LONG  0x6a "fx_off"
 FOR (index = 0; index < abil_num; index = index + 1) BEGIN // fix existing effects
   READ_SHORT  ("%abil_off%" + 0x1e + (0x28 * "%index%")) "abil_fx_num"
   READ_SHORT  ("%abil_off%" + 0x20 + (0x28 * "%index%")) "abil_fx_idx"
   FOR (index2 = 0; index2 < abil_fx_num; index2 = index2 + 1) BEGIN
     READ_LONG ("%fx_off%" + 0x0e + (0x30 * ("%abil_fx_idx%" + "%index2%"))) "duration"
     PATCH_IF ("%duration%" = 60) BEGIN // 10 rounds
       WRITE_LONG  ("%fx_off%" + 0x0e + (0x30 * ("%abil_fx_idx%" + "%index2%"))) 36 // 6 rounds
     END
   END
 END
 BUT_ONLY_IF_IT_CHANGES
 
// spell descripts mention these should bypass MR, but they're not
COPY_EXISTING ~spin945.spl~ ~override~ // spellstrike (cutscene)
             ~spin948.spl~ ~override~ // lower resistance (cutscene)
             ~spin949.spl~ ~override~ // ruby ray of reversal (cutscene)
             ~spwi419.spl~ ~override~ // secret word
             ~spwi514.spl~ ~override~ // lower resistance
             ~spwi608.spl~ ~override~ // pierce magic
             ~spwi704.spl~ ~override~ // ruby ray of reversal (mage)
             ~spwi705.spl~ ~override~ // khelben's warding whip
             ~spwi805.spl~ ~override~ // pierce shield
             ~spwi903.spl~ ~override~ // spellstrike (mage)
 READ_LONG  0x64 "abil_off"
 READ_SHORT 0x68 "abil_num"
 READ_LONG  0x6a "fx_off"
 FOR (index = 0; index < abil_num; index = index + 1) BEGIN // fix existing effects
   READ_SHORT  ("%abil_off%" + 0x1e + (0x28 * "%index%")) "abil_fx_num"
   READ_SHORT  ("%abil_off%" + 0x20 + (0x28 * "%index%")) "abil_fx_idx"
   FOR (index2 = 0; index2 < abil_fx_num; index2 = index2 + 1) BEGIN
     READ_BYTE ("%fx_off%" + 0x0d + (0x30 * ("%abil_fx_idx%" + "%index2%"))) "bypass"
     PATCH_IF ("%bypass%" = 2) BEGIN                                               // no dispel/no bypass
       WRITE_BYTE  ("%fx_off%" + 0x0d + (0x30 * ("%abil_fx_idx%" + "%index2%"))) 0 // no dispel/bypass
     END ELSE
     PATCH_IF ("%bypass%" = 1) BEGIN                                               // dispel/no bypass
       WRITE_BYTE  ("%fx_off%" + 0x0d + (0x30 * ("%abil_fx_idx%" + "%index2%"))) 3 // dispel/bypass
     END
   END
 END
 BUT_ONLY_IF_IT_CHANGES

 

Like the troll double XP bug, the lesser clay golems in Chateau Irenicus were transforming without bothering to check if they were already dead.

 

// lesser clay golems in CI can be killed twice
COPY_EXISTING ~igolfle1.bcs~ ~override~
             ~igolfle1.bcs~ ~override~
 DECOMPILE_BCS_TO_BAF
   REPLACE_TEXTUALLY ~Global("Ellsime","AR0602",1)~ ~Global("Ellsime","AR0602",1) !StateCheck(Myself,STATE_REALLY_DEAD)~
 COMPILE_BAF_TO_BCS
 BUT_ONLY_IF_IT_CHANGES

Link to comment

Archived

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

×
×
  • Create New...