Jump to content

Compatibility for casting in armor mods


Recommended Posts

A couple of mods (only mine, so far) implement spellcasting in armor on a per-class/per-kit basis by converting the opcode 145 equipping effects into .EFFs applied via 177.  This way, the effect that disables spellcasting has a name, and you can use various methods to make someone immune to the effect. 

I've made a function for anyone to use for this purpose, so that multiple mods can apply it in different ways (e.g. Tome and Blood introduces a Magus kit which can cast in armor; Might & Guile allows all bards to cast in leather armors only), and they will all be compatible with each other.  However, because there is no more opcode 145 effect in the .ITM itself, it stymies the CDTweaks "cast spells in armor" component.

Tweaks can be patched fairly easily to make sure it still works in this circumstance.  In the item patch, after the two DELETE_ITEM_EQEFFECT lines for opcode 60 and 145, add this:

    LPF DELETE_EFFECT INT_VAR match_opcode = 177 STR_VAR match_resource = ~d5arcal~ END
    LPF DELETE_EFFECT INT_VAR match_opcode = 177 STR_VAR match_resource = ~d5arcac~ END
    LPF DELETE_EFFECT INT_VAR match_opcode = 177 STR_VAR match_resource = ~d5arcap~ END

 

Edited by subtledoctor
Link to comment

But what's the difference between; d5arcal, d5arcac, and d5arcap ? ... cause to me it would make sense for one to be arcane, divine and innate's... but could you give a real explanation. 

*l, *c and *p, what were you thinking ... why not just *a, *d and *i ?  

And couldn't you just delete the opcode 145 type effects everywhere and be compatible with everything, in TA.

Link to comment

Tweaks already does delete all 145 effects. It could go further, and check all 177 effects to find which referencd .EFF files use opcode 145. That would be more thorough, but also a lot more than 3 lines of code, and the benefit would be purely hypothetical. These 3 lines will get it done in a way that works now, with a minimum of effort. 

d5arcaL, -C, and -P refer to Leather, Chain, and Plate armors, respectively. I have a different .EFF file for each armor type so that different kits, classes, feats, etc. can allow casting in specific armor categories. 

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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...