Jump to content

Toss your semi-useful WeiDU macros here


Recommended Posts

This is not complicated, but maybe useful for kit mods: I've made a drop-in-ready .tpa file containing two functions which will check whether the next kit to be installed will overlap with the IDS value of the Abjurer, Conjurer, or Diviner mage specialists.  (They are 0x0040, 0x0080, and 0x0100.)  If you add enough kits into your game, three of the mod-added kits might be assigned IDS values of 0x4040, 0x4080, and 0x4100 by Weidu's ADD_KIT function.  (My current install has about 300 kits; all three of those overlaps occur.)  When this happens, especially if the mod-added kit is an arcane spellcaster, some aspects of it will be overridden by characteristics of the vanilla mage kits.

The linked code will 1) check whether the next kit to be installed will overlap with one of those three; and 2) if so, it will insert a dummy kit first to take the problematic spot, and then continue on to allow the next real kit to be installed after.  Using this is simple: drop that .tpa file into a mod (or replicate it, whatever); then

INCLUDE ~%MOD_FOLDER%/lib/extra_kits.tpa~

LAF check_kit_conflict END

ADD_KIT ~D5_ARCANIST~
...etc.

 

Edited by subtledoctor
Link to post
On 8/14/2020 at 12:09 AM, Caedwyr said:

Thanks, adding this to my sorcerer kit mod since I seem to recall that sorcerer kits could run into this issue as well.

Definitely can affect sorcerers - the game will happily apply a mage kit to a sorcerer.  (I once played with Dynaheir as a sorcerer, but let her keep the Invoker kit.)  This issue can really affect any kit; you may end up with a cleric that imposes a -2 save bonus against conjuration spells upon targets.  I don't think the record screen will say anything with a cleric kit, but cleric spells do have schools and this might (slightly) affect gameplay even if you don't realize it.

Link to post

@ptifab

OK, technically speaking some of them are not really bugs (e.g., offsets 0x2, 0x10).

For instance, let's consider offset 0x2 ("Location").

Since legal values for these fields never fall outside the byte range, then writing WRITE_BYTE is not that bad (even if the "Location" field of SPL files is 2 bytes long...)

Edited by Luke
Link to post
1 hour ago, Luke said:

@ptifab

OK, technically speaking some of them are not really bugs (e.g., offsets 0x2, 0x10).

For instance, let's consider offset 0x2 ("Location").

Since legal values for these fields never fall outside the byte range, then writing WRITE_BYTE is not that bad (even if the "Location" field of SPL files is 2 bytes long...)

0x10 (Minimum level) does have a full two-byte range.  Standard spellcasting only utilizes the first byte (0-255), but opcodes that specify casting level (146*2/326*EFF/333) have access to the entire range (0 - 65535).

Link to post
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...