Jump to content

Habib's Might scimitar


Recommended Posts

Habib, everyone's favorite. The original idea was that he throws a scimitar at the party, the party member targeted catches it, and Habib runs away. The problem was that it was created in the party member's magical weapon slot, overriding their weapons and requiring a dispel magic. BD fixed this by eliminating the creation altogether, I;m just changing it to create the scimitar in inventory.

 

// Habib's mighty scimitar
COPY_EXISTING ~sw1h57.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_SHORT  ("%abil_off%" + ("%abil_num%" * 0x38)) "type"
   PATCH_IF ("%type%" = 1) BEGIN // melee
     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
       SET "abil_fx_num" = ("%abil_fx_num%" - 1)
       READ_SHORT ("%fx_off%" + (("%abil_fx_idx%" + "%abil_fx_num%") * 0x30)) "opcode"
       PATCH_IF ("%opcode%" = 111) BEGIN // create magical weapon
         WRITE_SHORT ("%fx_off%" +        (("%abil_fx_idx%" + "%abil_fx_num%") * 0x30)) 255 // create item in inventory
         WRITE_LONG  ("%fx_off%" + 0x04 + (("%abil_fx_idx%" + "%abil_fx_num%") * 0x30)) 1   // items in stack
       END
     END
   END
 END
 BUT_ONLY_IF_IT_CHANGES

Link to comment

Actually, you can just change the creation to Instant/Limited (0) with a duration of 20 (to match the Delay() in Baldur.bcs). I just checked, and it works perfectly.

 

EDIT: er, better make that 30, just so that the appropriate globals get set

Link to comment

The thing is, you're supposed to catch the scimitar in your hand. Creating a magical weapon is the only way to have the item instantly created *and* equipped.

 

Until somebody comes up with the mod where you catch it and throw it back and chunk him, I guess it doesn't really matter.

Link to comment

If there's no way to have it instantly created, equipped, and real rather than magical, in the inventory is better, I'd say. An evaporating equipped scimitar would be very bad.

Link to comment

Creating it anywhere but inventory can potentially overwrite an item. Though an unlikely scenario, catching Habib's scimitar shouldn't eliminate your spiritual hammer or black blade of disaster. It's not exactly inline with the devs' intentions, but I'd rather not replace a bug with a smaller one. Included in alpha 3.

Link to comment

Archived

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

×
×
  • Create New...