Jump to content

Maces of Disruption fixes


Recommended Posts

The Mace of Disruption is missing its -4 save on its Undead Slay effect. The Improved Mace of Disruption dies not suppress "X Level Drained" messages amd also uses generic mace icons. I've changed the IMoD BAMs to match the regular MoD. Except for the BAMs, this is a BD recode and included in alpha v3.

 

// mace of disruption missing save penalty
COPY_EXISTING ~blun12.itm~ ~override~
 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%" + 0x1e + (0x38 * "%abil_num%")) "fx_idx"
     WHILE ("%fx_num%" > 0) BEGIN
       SET "fx_num" = ("%fx_num%" - 1)
       READ_ASCII ("%fx_off%" + 0x14 + (("%fx_idx%" + "%fx_num%") * 0x30)) "eff"
       PATCH_IF ("die" STRING_COMPARE_CASE "%eff%" = 0) BEGIN
         WRITE_LONG ("%fx_off%" + 0x24 + (("%fx_idx%" + "%fx_num%") * 0x30)) 4           //save vs. death/poison
         WRITE_LONG ("%fx_off%" + 0x28 + (("%fx_idx%" + "%fx_num%") * 0x30)) 0xfffffffc  //save bonus of -4
       END
     END
   END
 END
 BUT_ONLY_IF_IT_CHANGES

// disables "level drained" strings from showing when wielding IMod; also
// changes the icon from generic mace to MoD's one
COPY_EXISTING ~blun25.itm~ ~override~
 WRITE_ASCII 0x3a ~iblun12~ #8 // use MoD BAM
 WRITE_ASCII 0x44 ~gblun06~ #8 // use MoD BAM
 WRITE_ASCII 0x58 ~cblun12~ #8 // use MoD BAM
 READ_LONG   0x64 "abil_off"
 READ_SHORT  0x68 "abil_num"
 READ_LONG   0x6a "fx_off"
 READ_SHORT  0x70 "fx_num"
 WRITE_SHORT 0x70 ("%fx_num%" + 5)
 INSERT_BYTES  ("%fx_off%" +     ) 0x30
   WRITE_LONG  ("%fx_off%" + 0x04) 41495   // strref
 INSERT_BYTES  ("%fx_off%" +     ) 0x30
   WRITE_LONG  ("%fx_off%" + 0x04) 40968   // strref
 INSERT_BYTES  ("%fx_off%" +     ) 0x30
   WRITE_LONG  ("%fx_off%" + 0x04) 40969   // strref
 INSERT_BYTES  ("%fx_off%" +     ) 0x30
   WRITE_LONG  ("%fx_off%" + 0x04) 40979   // strref
 INSERT_BYTES  ("%fx_off%" +     ) 0x30
   WRITE_LONG  ("%fx_off%" + 0x04) 41616   // strref
 SET "loops" = 5
 WHILE ("%loops%" > 5) BEGIN
   SET "loops" = ("%loops%" - 1)
   WRITE_SHORT ("%fx_off%" +        ("%loops%" * 0x30)) 142 // display icon
   WRITE_BYTE  ("%fx_off%" + 0x02 + ("%loops%" * 0x30)) 1   // target self
   WRITE_BYTE  ("%fx_off%" + 0x0c + ("%loops%" * 0x30)) 2   // instant/while equipped
   WRITE_BYTE  ("%fx_off%" + 0x0d + ("%loops%" * 0x30)) 2   // no dispel/not bypass
   WRITE_BYTE  ("%fx_off%" + 0x12 + ("%loops%" * 0x30)) 100 // probability 1
 END
 WHILE ("%abil_num%" > 0) BEGIN // if abilities are present, need to adjust their effects index
   SET "abil_num" = ("%abil_num%" - 1)
   READ_SHORT  ("%abil_off%" +        ("%abil_num%" * 0x38)) "type"
   READ_SHORT  ("%abil_off%" + 0x20 + ("%abil_num%" * 0x38)) "abil_fx_idx"
   WRITE_SHORT ("%abil_off%" + 0x20 + ("%abil_num%" * 0x38)) ("%abil_fx_idx%" + 5)
   PATCH_IF ("%type%" = 1) BEGIN // melee ability check
     WRITE_ASCII (0x04 + "%abil_off%" + ("%abil_num%" * 0x38)) ~iblun12~ #8 // use MoD BAM
   END
 END
 BUT_ONLY_IF_IT_CHANGES

Link to comment

The -4 save is part of the EFF. I had tested this somewhat thoroughly, and it appears to work properly as-is. Look around for my BLUN25 change to see what I finally determined needed to be fixed. On one of the maces, you'll need to rearrange the EFF files (MESDIE needs to occur before DIE).

 

Note that the EFF fields are all incorrectly labeled in NI (ah, the beauty of generic file formats), but you should be able to see where the save is defined.

Link to comment

Alright, took a look. You're correct in that the slay effect already has the -4 penalty in the EFF so we don't need any changes there (and hence none at all for MoD).

 

With IMoD I'm having trouble following one of your changes. I follow the icon changes, the EFF re-ordering, and the new string suppression and colorglow effects, but not the change of EFF file for the damage--it appears to be the same EFF for bonus undead damage as MoD but with a mysterious parameter incremented by one.

Link to comment

Ah, back in my genius days...

 

If you look at the EFF in NI, the SaveType field is dice size, the SaveBonus field is the number of dice, and the parameter is the damage bonus (for the Damage vs. Type effect). So the original MACEDISR adds 1d6+2 damage to the Mace of Disruption +1 (for a total of 2d6 + 4, assuming the engine works right). The upgraded Mace of Disruption does 1d6 + 3 damage, however, so the original effect would bring the total vs. undead to 2d6 + 5 (whereas the description states 2d6 + 4). The MACEDISU I create adds a 1d6 + 1 bonus, so the damage against undead is the stated 2d6 + 4. It's the same thing for AZUREDGE, IIRC.

 

Rather than spam the board with a new thread, some recent issues to consider or ignore:

- Salamanders really are unkillable (IIRC, this used to work fine in SoA), because they all have RING95 now (God only knows why; that ring is usually reserved for undead), which, among other things, gives them immunity to slay. I just add a RemoveItem EFF (a la CFTROLL), but it requires two hits to kill them (one to destroy the item, the second to slay). A KillTarget EFF would probably work better.

- The asylum crush trap really does kill people it isn't supposed to (usually mages). My final conclusion was that the LastTrigger check is picking up something other than the last object that triggered the trap (LastTrigger is set by a number of triggers; I think they're the SVTRIOBJ triggers, but they don't all work with LastTrigger very well). Simply removing the two extraneous blocks fixes this (I've never seen the trap fail, so they aren't doing anything worthwhile). Which leads to the recommendation of never using LastTrigger outside of a block that sets LastTrigger.

- AMUL23 and AMUL24 have separate, unused graphics. They don't look too shitty in-game (some of the unused ones, like HAMM05, are intolerable).

- All of the short bow +1 graphics were wrong (I neglected to update the description image to CBOW06).

- InMyArea() only wants specific object references (things like InMyArea([PC]) don't seem to really work). I think this affects all of one script in the game. EDIT: this is not true. The problem was that Random*() actions are persistent, so any ActionListEmpty() triggers will fail if a creature is RandomWalking/Turning.

- MoveToObject() only seems to work with specific object references where the object in question isn't framed prior to the action (so, something like See([PC]) ... MoveToObject([PC]) works fine, but !Range([PC],20) ... MoveToObject([PC]) does nothing). A couple scripts may be affected by this (BioWare seems to have been pretty careful here).

- If you change the class of summoned creatures (so they cast spells at the appropriate level, instead of at level 1), make sure to update their weapons (so they have appropriate icons and don't show up as "Skull" in the toolbar). It's also a good idea to fill out their weapon slots so they can't be disarmed (although it can be amusing to see a Deva whack on some bad guy with it's fists).

- HARP_V6 has the wrong number of tracks listed (it's 5, but should be 6). I think the last track is just SPC1, so it won't make much difference. BioWare's dedication to the aural experience continues to amaze...

- For the Glaicas fix, make sure to ActionOverride("kpglai01",ApplySpell()), just to be safe. Directly casting a spell from an area object tends not to work (just about everything in that block needs to be ActionOverride()d, IIRC).

- One of the triggers in AR1301 checks for LOCALS, causing it to fail immediately (triggers don't get, and can't check LOCALS). IIRC, the last sentence in the DisplayString makes no sense at all. I'm sure SimDing0 can come up with something.

- The Wand of the Heavens tries to use both the old and new Flame Strike animations (the new is done with two Play3DEffect effects, whereas the old is hard-coded projectile 67); the projectile should be set to 1 (or 0 or some other invalid number). It may be worth changing this for Dace's Flame Strike (you only need to worry about level 1) and the trap Flame Strike (both of which use the old, crappy animation).

- For reference, the no-rebound lightning bolt (hard-coded projectile 206) really sucks (it flies way off-center, and rarely hits the target). Don't use it (the lightning mephits use this, which is why they're so weak; I tried to use it for Gesen's bow to replace that slow-ass bolt of glory and found out how crappy it was).

 

There's probably more, but whatever.

Link to comment

Ah, got it. It looks like the current NI beta has the EFF fields names almost correct--it's showing 1 as number of dice (0x38), 6 as dice size (0x3a), and the + damage as Parameter 3 (0x60) in the EFF file with zeroes in the save bonus (0x44) and save type (0x40) fields. So with that in mind, the corrected corrections for IMoD (MoD does not need changes):

 

// changes bonus damage to undead for IMoD to 1d6 + 1 to bring total to 2d6 +4
COPY_EXISTING ~MACEDISR.EFF~ ~override/MACEDISU.EFF~
 WRITE_LONG 0x60 1

// disables "level drained" strings from showing when wielding IMod; also
// changes the icon from generic mace to MoD's one. Also see macedisu.eff.
COPY_EXISTING ~blun25.itm~ ~override~
 WRITE_ASCII 0x3a ~iblun12~ #8 // use MoD BAM
 WRITE_ASCII 0x44 ~gblun06~ #8 // use MoD BAM
 WRITE_ASCII 0x58 ~cblun12~ #8 // use MoD BAM
 READ_LONG   0x64 "abil_off"
 READ_SHORT  0x68 "abil_num"
 READ_LONG   0x6a "fx_off"
 READ_SHORT  0x70 "fx_num"
 WRITE_SHORT 0x70 ("%fx_num%" + 7)
 SET "eff_count" = 0
 WHILE ("%fx_num%" > 0) BEGIN // changes eff file for undead damage
   SET "fx_num" = ("%fx_num%" - 1)
   READ_SHORT ("%fx_off%" +        ("%fx_num%" * 0x30)) "type"
   READ_ASCII ("%fx_off%" + 0x14 + ("%fx_num%" * 0x30)) "eff_file"
   PATCH_IF (("%type%" = 177) AND ("macedisr" STRING_COMPARE_CASE "%eff_file%" = 0)) BEGIN
     WRITE_ASCII ("%fx_off%" + 0x14 + ("%fx_num%" * 0x30)) "macedisu"
   END
 END
 WHILE ("%abil_num%" > 0) BEGIN // if abilities are present, need to adjust their effects index
   SET "abil_num" = ("%abil_num%" - 1)
   READ_BYTE   ("%abil_off%" +        ("%abil_num%" * 0x38)) "type"
   READ_SHORT  ("%abil_off%" + 0x1e + ("%abil_num%" * 0x38)) "abil_fx_num"
   READ_SHORT  ("%abil_off%" + 0x20 + ("%abil_num%" * 0x38)) "abil_fx_idx"
   WRITE_SHORT ("%abil_off%" + 0x20 + ("%abil_num%" * 0x38)) ("%abil_fx_idx%" + 7)
   PATCH_IF ("%type%" = 1) BEGIN // melee ability check
     WRITE_ASCII (0x04 + "%abil_off%" + ("%abil_num%" * 0x38)) ~iblun12~ #8 // use MoD BAM
     WHILE ("%abil_fx_num%" > 0) BEGIN
       SET "abil_fx_num" = ("%abil_fx_num%" - 1)
       READ_SHORT ("%fx_off%" +        (("%abil_fx_idx%" + "%abil_fx_num%") * 0x30)) "type1"
       READ_ASCII ("%fx_off%" + 0x14 + (("%abil_fx_idx%" + "%abil_fx_num%") * 0x30)) "eff_file1"
       PATCH_IF (("%type%" = 177) AND ("mesdie" STRING_COMPARE_CASE "%eff_file%" = 0) AND ("%eff_count%" = 0)) BEGIN
         WRITE_ASCII ("%fx_off%" + 0x14 + (("%abil_fx_idx%" + "%abil_fx_num%") * 0x30)) "die" #8
         WRITE_LONG  ("%fx_off%" + 0x20 + (("%abil_fx_idx%" + "%abil_fx_num%") * 0x30)) 0 // save handled by EFF
         WRITE_LONG  ("%fx_off%" + 0x24 + (("%abil_fx_idx%" + "%abil_fx_num%") * 0x30)) 0 // save handled by EFF
         SET "eff_count" = 1
       END
       PATCH_IF (("%type%" = 177) AND ("die" STRING_COMPARE_CASE "%eff_file%" = 0) AND ("%eff_count%" = 1)) BEGIN
         WRITE_ASCII ("%fx_off%" + 0x14 + (("%abil_fx_idx%" + "%abil_fx_num%") * 0x30)) "mesdie" #8
         WRITE_LONG  ("%fx_off%" + 0x20 + (("%abil_fx_idx%" + "%abil_fx_num%") * 0x30)) 0 // save handled by EFF
         WRITE_LONG  ("%fx_off%" + 0x24 + (("%abil_fx_idx%" + "%abil_fx_num%") * 0x30)) 0 // save handled by EFF
         SET "eff_count" = 2
       END
     END
   END
 END
 INSERT_BYTES  ("%fx_off%" +     ) 0x30
   WRITE_LONG  ("%fx_off%" + 0x04) 41495   // strref
 INSERT_BYTES  ("%fx_off%" +     ) 0x30
   WRITE_LONG  ("%fx_off%" + 0x04) 40968   // strref
 INSERT_BYTES  ("%fx_off%" +     ) 0x30
   WRITE_LONG  ("%fx_off%" + 0x04) 40969   // strref
 INSERT_BYTES  ("%fx_off%" +     ) 0x30
   WRITE_LONG  ("%fx_off%" + 0x04) 40979   // strref
 INSERT_BYTES  ("%fx_off%" +     ) 0x30
   WRITE_LONG  ("%fx_off%" + 0x04) 41616   // strref
 INSERT_BYTES  ("%fx_off%" +     ) 0x30
   WRITE_LONG  ("%fx_off%" + 0x08) 59      // icon: level drain
 SET "loops" = 6
 WHILE ("%loops%" > 6) BEGIN
   SET "loops" = ("%loops%" - 1)
   WRITE_SHORT ("%fx_off%" +        ("%loops%" * 0x30)) 142 // display icon
   WRITE_BYTE  ("%fx_off%" + 0x02 + ("%loops%" * 0x30)) 1   // target self
   WRITE_BYTE  ("%fx_off%" + 0x0c + ("%loops%" * 0x30)) 2   // instant/while equipped
   WRITE_BYTE  ("%fx_off%" + 0x0d + ("%loops%" * 0x30)) 2   // no dispel/not bypass
   WRITE_BYTE  ("%fx_off%" + 0x12 + ("%loops%" * 0x30)) 100 // probability 1
 END
 WRITE_SHORT ("%fx_off%" + ("%loops%" * 0x30)) 169 // prevent portrait icon
 INSERT_BYTES  ("%fx_off%" +     ) 0x30
   WRITE_SHORT ("%fx_off%" +     ) 9    // colorglow pulse
   WRITE_BYTE  ("%fx_off%" + 0x02) 1    // target self
   WRITE_BYTE  ("%fx_off%" + 0x0c) 2    // instant/while equipped
   WRITE_BYTE  ("%fx_off%" + 0x0d) 2    // no dispel/not bypass
   WRITE_BYTE  ("%fx_off%" + 0x12) 100  // probability 1
   WRITE_BYTE  ("%fx_off%" + 0x06) 202  // green
   WRITE_BYTE  ("%fx_off%" + 0x07) 255  // blue
   WRITE_SHORT ("%fx_off%" + 0x08) 21   // weapon head/blade minor
   WRITE_SHORT ("%fx_off%" + 0x10) 0x6e // cycle speed
   WRITE_LONG  ("%fx_off%" + 0x18) 100  // probability 1

 

Included in alpha v3.

Link to comment

Archived

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

×
×
  • Create New...