Jump to content

New Component


Recommended Posts

This was fairly easy to do, so...


Cast Spells from Scrolls (and Other Items) at Character Level


If you cast a spell directly from a scroll, the spell is always cast as if you were a 10th level mage. This component removes that fixed value so the spell is cast at the same level as your character. This component affects all items, including any non-scrolls which can cast spells.


For Tutu (or the BG portion of BG2) this is a fairly big nerf, whereas in BG2 this will be a powergamer's component. Enjoy.

Link to comment

Sigh, this will break some of Refinements coding...


Could you PM me before releasing, so I can cross-release an updated version of Ref. to avoid problems?


(actually reading the released code of Ref.: which will be the new opcode that G3T will use? if it's either 0x92 or 0x94 then I'm safe).

Link to comment

All it's doing is changing the parameter from Cast Spell (146 and 148) effects to Cast at Level: 0.


COPY_EXISTING_REGEXP GLOB ~^.+\.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
   READ_BYTE ("%abil_off%" + (0x38 * "%index%")) "type"
   PATCH_IF ("%type%" = 3) BEGIN // magical
     READ_SHORT ("%abil_off%" + 0x1e + (0x38 * "%index%")) "abil_fx_num"
     READ_SHORT ("%abil_off%" + 0x20 + (0x38 * "%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%" = 146) OR ("%opcode%" = 148)) BEGIN // cast spell
         WRITE_LONG ("%fx_off%" + 0x04 + (0x30 * ("%abil_fx_idx%" + "%index2%"))) 0 // cast at character's level

Link to comment


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

  • Create New...