subtledoctor Posted March 2, 2019 Share Posted March 2, 2019 (edited) 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 March 2, 2019 by subtledoctor Quote Link to comment
Jarno Mikkola Posted March 2, 2019 Share Posted March 2, 2019 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. Quote Link to comment
subtledoctor Posted March 2, 2019 Author Share Posted March 2, 2019 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. Quote Link to comment
CamDawg Posted March 2, 2019 Share Posted March 2, 2019 Thanks SD, I've made the commit. Quote Link to comment
Recommended Posts
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.