jamerkane34 Posted May 27, 2023 Share Posted May 27, 2023 (edited) At first I thought that changing the values of the FormIDs in the Quest section to the correct one would do the trick. But then I realized that the problem is the script. Magelight in Enderal has a different name so the script can't call it so it just returns "Unable to cast because you don't know that spell". Anyway I opened up the script for Jaxonz Lights Please: scriptName JaxonzLightsPlease extends Quest{Simple utility to improve Candlelight and Magelight casting} ;-- Properties --------------------------------------sound property sndFail autoglobalvariable property giMageLightHotkey autospell property splMageLight autoglobalvariable property giCandleLightHotkey autoactor property actPlayer autoglobalvariable property gfTimeScale autospell property splCandleLight auto ;-- Variables ---------------------------------------Bool bCandleLightOn = false ;-- Functions --------------------------------------- ; Skipped compiler generated GetState function CastCandleLight() if actPlayer.GetActorValue("Magicka") >= splCandleLight.GetEffectiveMagickaCost(actPlayer) as FloatactPlayer.DamageActorValue("Magicka", splCandleLight.GetEffectiveMagickaCost(actPlayer) as Float)splCandleLight.Cast(actPlayer as objectreference, none)self.RegisterForSingleUpdate((splCandleLight.GetNthEffectDuration(0) - 1) as Float)elsesndFail.Play(actPlayer as objectreference)debug.Notification("Insufficient magicka to renew Candlelight, retry in 5 seconds...")self.RegisterForSingleUpdate(5.00000)endIfendFunction function OnUpdate() if bCandleLightOnself.CastCandleLight()endIfendFunction function OnKeyDown(Int KeyCode) if !utility.IsInMenuMode()if KeyCode == giCandleLightHotkey.GetValueInt()if actPlayer.HasSpell(splCandleLight as form)bCandleLightOn = !bCandleLightOnif bCandleLightOnself.CastCandleLight()elseactPlayer.DispelSpell(splCandleLight)endIfelsedebug.Notification("Unable to cast Candlelight because you don't know that spell")endIfelseIf KeyCode == giMageLightHotkey.GetValueInt()if actPlayer.HasSpell(splMageLight as form)if actPlayer.GetActorValue("Magicka") >= splMageLight.GetEffectiveMagickaCost(actPlayer) as FloatactPlayer.DamageActorValue("Magicka", splMageLight.GetEffectiveMagickaCost(actPlayer) as Float)splMageLight.Cast(actPlayer as objectreference, none)elsesndFail.Play(actPlayer as objectreference)endIfelsedebug.Notification("Unable to cast Magelight because you don't know that spell")endIfendIfendIfendFunction ; Skipped compiler generated GotoState function OnSettingsChanged() self.UnregisterForAllKeys()self.RegisterForKey(giCandleLightHotkey.GetValueInt())self.RegisterForKey(giMageLightHotkey.GetValueInt())endFunction function OnInit() self.OnSettingsChanged()endFunctionWhat's the correct variable for Enderal Magelight so that it can be called properly? I know there are other mods like Quick Light that can accomplish what I want, but I want to take this chance to learn how it works. Edited May 27, 2023 by jamerkane34 Link to comment Share on other sites More sharing options...
dylbill Posted May 27, 2023 Share Posted May 27, 2023 To make this work on Enderal, looks like you just need to change the spell properties, and by change I mean fill the properties with the light spells used in Enderal in the Creation Kit. To do this, open the quest this script is attached to, go to the scripts tab and double click on the script to switch the property values. Link to comment Share on other sites More sharing options...
Recommended Posts