Jump to content

Eric Van Straaten's Harbinger


CamDawg

Recommended Posts

Eric Van Straaten, the paladin who assists you in Chapter 6 v Bodhi, has Harbinger. Problem is that it casts fireball on 5% of hits and drives away allies. BD changed his weapon to misc83 and then included a version of Harbinger as misc83 that did not cast fireball. Undocumented in BD's change was that Eric was coded as a LN paladin with 9s in all stats; BD changes him to LG with 15 str, 16 wis, 12 con and 18 chr.

 

I've added c6eric and c6eric3 to the Oversight patching list for LG alignment. Instead of adding misc83 to their inventories, I change sw2h07 references to cdsw2h07; cdsw2h07 is a copy of Harbinger with the fireball probability set to 0.

 

// added paladiny stats to c6eric; replaces harbinger with party-friendly version
COPY_EXISTING ~c6eric.cre~  ~override~
             ~c6eric3.cre~ ~override~
 WRITE_BYTE 0x238 15 // str
 WRITE_BYTE 0x23b 16 // wis
 WRITE_BYTE 0x23d 12 // con
 WRITE_BYTE 0x23e 18 // chr
 READ_LONG  0x2bc "itm_off"
 READ_LONG  0x2c0 "itm_num"
 WHILE ("%itm_num%" > 0) BEGIN
   SET "itm_num" = ("%itm_num%" - 1)
   READ_ASCII ("%itm_off%" + (0x14 * "%itm_num%")) "item"
   PATCH_IF ("%item%" STRING_COMPARE_CASE "sw2h07" = 0) BEGIN
     WRITE_ASCII ("%itm_off%" + (0x14 * "%itm_num%")) "cdsw2h07"
   END
 END
 BUT_ONLY_IF_IT_CHANGES

// adds party-friendly harbinger for c6eric and c6eric3
COPY_EXISTING ~sw2h07.itm~ ~override/cdsw2h07.itm~
 READ_LONG  0x64 "abil_off"
 READ_SHORT 0x68 "abil_num"
 READ_LONG  0x6a "fx_off"
 WHILE ("%abil_num%" > 0) BEGIN
   SET "abil_num" = ("%abil_num%" - 1)
   READ_BYTE ("%abil_off%" + (0x38 * "%abil_num%")) "melee"
   PATCH_IF ("%melee%" = 1) BEGIN
     READ_SHORT ("%abil_off%" + 0x1E + (0x38 * "%abil_num%")) "fx_num"
     READ_SHORT ("%abil_off%" + 0x20 + (0x38 * "%abil_num%")) "fx_idx"
     WHILE ("%fx_num%" > 0) BEGIN
       SET "fx_num" = ("%fx_num%" - 1)
       READ_SHORT ("%fx_off%" +        (0x30 * ("%fx_idx%" + "%fx_num%"))) "opcode"
       READ_ASCII ("%fx_off%" + 0x14 + (0x30 * ("%fx_idx%" + "%fx_num%"))) "resource"
       PATCH_IF ((("%opcode%" = 146) AND ("spwi304" STRING_COMPARE_CASE "%resource%" = 0)) OR // cast fireball
                 (("%opcode%" = 174) AND ("misc_17b" STRING_COMPARE_CASE "%resource%" = 0))) BEGIN // play sound
         WRITE_BYTE ("%fx_off%" + 0x12 + (0x30 * ("%fx_idx%" + "%fx_num%"))) 0 // sets probability to 0
       END
     END
   END
 END

Link to comment

Archived

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

×
×
  • Create New...