haMRJha Posted March 13, 2020 Share Posted March 13, 2020 Been trying for forever to make a mod (needed for my new playthrough) but just cant get it and its driving me nuts. Can anyone please help make a mod to put the lingering magicka damage on the summon flaming familiar/wolf spell? or maybe just compile the script that qwertpoI012 was nice enough to write for me(thanks again mate) cause i can not get any scripting programs to work for me. the whole idea for the mod was to have a summon eat away at your magicka pool as long as its summoned and then is possible unsummon when your pool is empty but id settle for it to just drain the pool. Here is the script: Scriptname MySummonScript extends ActiveMagicEffect Spell Property MyMagicDamageSpell Auto Event OnEffectStart(Actor akTarget, Actor akCaster)MyMagicDamageSpell.cast(akCaster, akCaster) ;caster of the summon spell also casts magic damage on themselfEndEventEvent OnEffectFinish(Actor akTarget, Actor akCaster)akCaster.dispelSpell(MyMagicDamageSpell) ;to make sure the spell is dispelled when your summon spell has endedEndEvent Link to comment Share on other sites More sharing options...
VikMorroHun Posted April 21, 2020 Share Posted April 21, 2020 (edited) I needed some practice before deep diving into my project, so... Scriptname MySummonScript extends ActiveMagicEffect{ The whole idea for the mod was to have a summon eat away at your magicka pool as long as its summoned and then is possible unsummon when your pool is empty but id settle for it to just drain the pool. }Spell Property MyMagicDamageSpell Auto ; alchDamageMagickaSpell Property MySummonSpell AutoActor MySummon ;AutoActor caster ;Autofloat fCost1float fCost2float fCost3Event OnEffectStart(Actor akTarget, Actor akCaster) MySummon = akTarget caster = akCaster ;MySummonSpell = Self.GetBaseObject() as Spell - cannot cast a magiceffect to a spell, types are incompatible fCost1 = caster.GetActorValue("Magicka") debug.notification("original magicka: " + fCost1 as String) MyMagicDamageSpell.cast(caster, caster) ;caster of the summon spell also casts magic damage on themself fCost3 = caster.GetActorValue("Magicka") fCost2 = fCost1 - fCost3 debug.notification("new magicka: " + fCost3 as String + " magicka cost: " + fCost2 as String) RegisterForSingleUpdate(1.5)EndEventEvent OnUpdate() if ( MySummon == None ) caster.dispelSpell(MySummonSpell) ;to make sure the spell is dispelled when your summon spell has ended debug.notification("spell dispeled - 0") return endif if ( caster.GetActorValue("Magicka") < fCost2 ) MySummon.disable() ; unsummon would be better caster.dispelSpell(MySummonSpell) ;to make sure the spell is dispelled when your summon spell has ended debug.notification("spell dispeled - 1") return endif if ( MySummon.IsDisabled() || MySummon.IsDead() ) caster.dispelSpell(MySummonSpell) ;to make sure the spell is dispelled when your summon spell has ended debug.notification("spell dispeled - 2") return endif if ( caster.GetActorValue("Magicka") >= fCost2 ) if ( MySummon.GetActorValue("Health") > 0 ) MyMagicDamageSpell.cast(caster, caster) ;caster of the summon spell also casts magic damage on themself RegisterForSingleUpdate(1.5) endif endifEndEvent;Event OnEffectFinish(Actor akTarget, Actor akCaster) ;akCaster.dispelSpell(MyMagicDamageSpell) ;to make sure the spell is dispelled when your summon spell has ended;EndEvent It's not finished but I'm in a hurry so I post this. (You don't need the debug.notification lines)It basically works but it has some issues. Plugin Usage:help "summon familiar" 0 player.addspell <ID> - it will be sg like xx000d62 Best regards,VikMorroHun Edited April 21, 2020 by Luke2135 Link to comment Share on other sites More sharing options...
Recommended Posts