Mod idea: Consumed Magic

Post » Wed Mar 02, 2016 7:24 am

So, I've always liked the idea of consumable but useful items, that's why I liked the concept of how scrolls work. I've also been playing Dungeons and Dragons, and immediately fell in love with the mechanic that magic is potentially very powerful, but it's more or less a one-time use until you have time to recharge it. I was hoping that someone far smarter than I am (because I know literally nothing about using the CK) could create a mod that incorporates these mechanics into Skyrim.



Mainly, I want a mod that makes all magic 5 to 10 times more powerful (two separate .esps maybe?), but on the flipside it makes it so that whenever you use a spell, you "forget" it and need to find a spell tome so that you can get that spell back. By my understanding, the real tricky bits would be adding a Quest Item tag to quest-specific spells until that quest is over, and, if at all possible, making a script that incorporates all detected mod and DLC spells into the system without the need for compatibility patches.



Does this sound at all possible?

User avatar
JD FROM HELL
 
Posts: 3473
Joined: Thu Aug 24, 2006 1:54 am

Post » Wed Mar 02, 2016 11:28 am

Very possible.



All you would need is the player to be in a quest alias, with a ReferenceAlias script attached, and use an OnSpellCast event to remove the spell after casting. OnSpellCast will catch all spells, even DLC, or even custom spells, you just have to do a bit of extra work for the latter. No need for patches. It's only known limitation is for concentration spells, since it fires only once and as soon as you charge it, so those might be hard to catch.



I'll post a concept script, but I wont attempt this mod. Just providing a method I would try if I did. Might help someone(or you) jump start it.



Here's my concept script.




Spoiler

Scriptname ConsumeMagicAliasScript extends ReferenceAlias
{Remove the currently equipped spell. Ala consumed magic}

Actor property PlayerRef auto

; We need to store the currently equipped spell, so we can remove them on spell cast.
Spell LeftCurrentSpell ; Left hand
Spell RightCurrentSpell ; Right hand

Event OnSpellCast(Form akSpell)
LeftCurrentSpell = PlayerRef.GetEquippedSpell(0)
RightCurrentSpell = PlayerRef.GetEquippedSpell(1)
Spell spellcast = akSpell as Spell

if spellcast && spellcast == LeftCurrentSpell ; Did we use a spell in the left hand?
PlayerRef.RemoveSpell(LeftCurrentSpell)
elseif spellcast && spellcast == RightCurrentSpell ; Did we use a spell in the right hand?
PlayerRef.RemoveSpell(RightCurrentSpell)
endif

EndEvent

User avatar
.X chantelle .x Smith
 
Posts: 3399
Joined: Thu Jun 15, 2006 6:25 pm


Return to V - Skyrim