virginharvester Posted October 15, 2019 Share Posted October 15, 2019 Hi, SFMBE,i like to mod transmute spell.from 1 cast = 1 item, to 1 cast spell = as long the raw ingredient and magicka avaliable, the transmute will be do it again,this is the original code Scriptname transmuteMineralScript extends ActiveMagicEffect {script for spell to allow transmutation of ores} import game MiscObject Property Ore01 Auto {Lowest value ore} MiscObject Property Ore02 Auto {Middle value ore} MiscObject Property Ore03 Auto {Highest value ore} Sound Property FailureSFX Auto float property skillAdvancement = 15.0 auto {How much to advance the skill? Only works when spell actually transmutes something} message property failureMSG auto EVENT OnEffectStart(Actor akTarget, Actor akCaster) objectReference caster = akCaster if caster.getItemCount(Ore02) >= 1 ; favor the more valuable ore first caster.removeItem(Ore02, 1, TRUE) caster.addItem(Ore03, 1, FALSE) advanceSkill("alteration",skillAdvancement) elseif caster.getItemCount(Ore01) >= 1 ; if none of that, look for the base ore to upgrade caster.removeItem(Ore01, 1, TRUE) caster.addItem(Ore02, 1, FALSE) advanceSkill("alteration",skillAdvancement) else ; caster must have had no valid ore FailureSFX.play(caster) failureMSG.show() endif endEVENT and this is the code after i edit: Scriptname transmuteMineralScript extends ActiveMagicEffect {script for spell to allow transmutation of ores} import game MiscObject Property Ore01 Auto {Lowest value ore} MiscObject Property Ore02 Auto {Middle value ore} MiscObject Property Ore03 Auto {Highest value ore} Sound Property FailureSFX Auto float property skillAdvancement = 15.0 auto {How much to advance the skill? Only works when spell actually transmutes something} message property failureMSG auto float property Cost = 88 auto EVENT OnEffectStart(Actor akTarget, Actor akCaster) objectReference caster = akCaster While (caster.getItemCount(Ore02) >= 1) && (caster.GetActorValue("Magicka") >= Cost) && !(caster.IsInCombat())) caster.DamageAV("Magicka", Cost) caster.removeItem(Ore02, 1 , TRUE) caster.addItem(Ore03, 1 , TRUE) Game.advanceSkill("alteration",skillAdvancement) EndWhile While (caster.getItemCount(Ore01) >= 1) && (caster.GetActorValue("Magicka") >= Cost) && !(caster.IsInCombat())) caster.DamageAV("Magicka", Cost) caster.removeItem(Ore01, 1 , TRUE) caster.addItem(Ore02, 1 , TRUE) Game.advanceSkill("alteration",skillAdvancement) EndWhile endEVENT as you can see, the code will constant reduce 88 point of magicka in every items "transmute",i like to reduce it, if the caster have "Adept Alteration perk" And/Or equipment that reduce magicka cost for Alteration spell,so, if i equipped with 4x "reduce 25% Alteration spell" gears, the cost will changed from 88 to 0, can someone guide me please?thanks for reading, have a nice day Link to comment Share on other sites More sharing options...
virginharvester Posted October 16, 2019 Author Share Posted October 16, 2019 i found it, this is the script : SPELL Property TransmuteOreMineral Auto Cost = TransmuteOreMineral.GetEffectiveMagickaCost(caster) i require SKSE, i hope it useful for somebody who look for it Link to comment Share on other sites More sharing options...
Recommended Posts