I've made a pretty simple system for armored spellcasting, and now it is portable, able to be dropped into any mod and used without much fuss. The library can be found here. - click "source code (zip)" to download it. Unzip/decompress it, and within the archive you will find a folder named "d5_armored_casting" and inside that folder are 11 files.
WHAT THIS DOES:
It is basically for arcane casters: mages, sorcerers, bards, and multiclass mages. With this library you can selectively allow a class, kit, or creature to cast wizard spells in light armor (armors that use the "leather" appearance, such as leather, studded, and hide), medium armor (those that use the "chain" appearance, such as chain and splint mail), and heavy armor (those that use the "plate" appearance such as plate and full plate).
HOW TO USE THIS IN YOUR MOD:
1) In your mod folder, have a folder called "/lib" - either you already have such a folder, or if not, create one. Now, drop the "d5_armored_casting" folder inside that "lib" folder.
2) Now, somewhere early in your mod's Weidu code, paste this:
You can apply one of those spells at any given level; or you can apply them progressively, allowing your kit to cast arcane spells in heavier and heavier armor as you gain experience; you can put AP_D5ARCAx into an HLA table to make it a high-level ability; etc. Sky's the limit, it should take a maximum of 5 lines of code.
You can apply this to a particular creature as well; let's say you want to make the Silke battle more difficult by putting her in plate mail. You can give her the ability to cast spells in such armor with this:
Finally, you can enable an entire class or kit or other category of creature (anything targetable by opcode 177) to cast arcane spells in armor, with the following code:
COMPATIBILITY:
This armored casting system is not compatible with the armored casting systems in Item Revisions or Tweaks Anthology, because those are different ways to achieve something similar.
But, this function is compatible with itself; what I mean by that is, multiple mods can use this and run the function, and they will all be compatible with each other. It is currently in use in Might & Guile to allow bards to cast spells in leather armor; and it will probably be in Tome & Blood v0.8+ to allow the Magus sorcerer kit to cast in armor. There is no need to reinvent the wheel with every new mod that wants to have armored casting, and worry about incompatibility with others. Anyone should be able to literally drop this into their mod and enable it with a couple copy/pasted lines of code.
Cheers!
WHAT THIS DOES:
It is basically for arcane casters: mages, sorcerers, bards, and multiclass mages. With this library you can selectively allow a class, kit, or creature to cast wizard spells in light armor (armors that use the "leather" appearance, such as leather, studded, and hide), medium armor (those that use the "chain" appearance, such as chain and splint mail), and heavy armor (those that use the "plate" appearance such as plate and full plate).
HOW TO USE THIS IN YOUR MOD:
1) In your mod folder, have a folder called "/lib" - either you already have such a folder, or if not, create one. Now, drop the "d5_armored_casting" folder inside that "lib" folder.
2) Now, somewhere early in your mod's Weidu code, paste this:
INCLUDE ~%MOD_FOLDER%/lib/d5_armored_casting/d5_armored_casting.tpa~3) Now the armored casting system is installed! And you simply need to apply it to your kit or creature. For a kit, it only takes three lines of code. After the ADD_KIT function, let's say your kit's "CLAB" table is called "mykit.2da." Apply the armored casting ability to your kit like so:
LAM D5_ARMORED_CASTING
ACTION_IF FILE_EXISTS_IN_GAME ~d5_armcast.d5~ BEGIN"D5ARCA1" allows you to cast arcane spells in light armors; "D5ARCA2" allows you to cast spells in light and medium armors; and "D5ARCA3" allows you to cast spells in any armor.
APPEND ~mykit.2da~ ~ARMCAST AP_D5ARCA1 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ~
END
You can apply one of those spells at any given level; or you can apply them progressively, allowing your kit to cast arcane spells in heavier and heavier armor as you gain experience; you can put AP_D5ARCAx into an HLA table to make it a high-level ability; etc. Sky's the limit, it should take a maximum of 5 lines of code.

You can apply this to a particular creature as well; let's say you want to make the Silke battle more difficult by putting her in plate mail. You can give her the ability to cast spells in such armor with this:
ACTION_IF FILE_EXISTS_IN_GAME ~silke.cre~ BEGIN"d5arcaL" is for leather armors, "d5arcaC" is for chain armors, and "d5arcaP" is for plate armors. Giving the NPC 206 protection against all three enables them to cast spells in all three categories of armor.
COPY_EXISTING ~silke.cre~ ~override~
LPF ADD_CRE_EFFECT INT_VAR opcode = 206 target = 1 parameter1 = (0 - 1) timing = 9 STR_VAR resource = ~d5arcal~ END
LPF ADD_CRE_EFFECT INT_VAR opcode = 206 target = 1 parameter1 = (0 - 1) timing = 9 STR_VAR resource = ~d5arcac~ END
LPF ADD_CRE_EFFECT INT_VAR opcode = 206 target = 1 parameter1 = (0 - 1) timing = 9 STR_VAR resource = ~d5arcap~ END
BUT_ONLY
END
Finally, you can enable an entire class or kit or other category of creature (anything targetable by opcode 177) to cast arcane spells in armor, with the following code:
COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~This is how Might & Guile lets bards cast in leather armor. Notably, this will apply universally, even to mods/kits/etc. installed after yours. "Parameter2 = 5" means filter by class, and "parameter1 = 5" means apply this to bards. You can change those to other values usable with opcode 177, as you see fit. And to enable casting in heavier armors just delete the double-slashes (" // ") from the lines for those heavier armors.
PATCH_IF (SOURCE_SIZE > 0x71) BEGIN
READ_SHORT 0x1c type
READ_LONG 0x22 appearance
PATCH_IF (type = 2) BEGIN // armor
PATCH_IF (appearance = 16690) BEGIN // leather appearance
LPF ADD_ITEM_EQEFFECT INT_VAR insert_point = 0 opcode = 177 parameter1 = 5 parameter2 = 5 timing = 2 STR_VAR resource = ~d5arca1~ END
END
// PATCH_IF (appearance = 16691) BEGIN // chain appearance
// LPF ADD_ITEM_EQEFFECT INT_VAR insert_point = 0 opcode = 177 parameter1 = 5 parameter2 = 5 timing = 2 STR_VAR resource = ~d5arca2~ END
// END
// PATCH_IF (appearance = 16692) BEGIN // plate appearance
// LPF ADD_ITEM_EQEFFECT INT_VAR insert_point = 0 opcode = 177 parameter1 = 5 parameter2 = 5 timing = 2 STR_VAR resource = ~d5arca3~ END
// END
END
END
BUT_ONLY
COMPATIBILITY:
This armored casting system is not compatible with the armored casting systems in Item Revisions or Tweaks Anthology, because those are different ways to achieve something similar.
But, this function is compatible with itself; what I mean by that is, multiple mods can use this and run the function, and they will all be compatible with each other. It is currently in use in Might & Guile to allow bards to cast spells in leather armor; and it will probably be in Tome & Blood v0.8+ to allow the Magus sorcerer kit to cast in armor. There is no need to reinvent the wheel with every new mod that wants to have armored casting, and worry about incompatibility with others. Anyone should be able to literally drop this into their mod and enable it with a couple copy/pasted lines of code.

Cheers!