anathemastudio Posted November 9, 2020 Share Posted November 9, 2020 (edited) Hey guys :smile:I made a mod for Skyrim SE, it's here on nexushttps://www.nexusmods.com/skyrimspecialedition/mods/42113 The mod has amulets that you can disenchant and use the enchantment on most anything. The enchantment is animated dragon wings. NPC's can use them too. It is not a flight mod, because I made it for both XBox and PC, and XBox can't use SKSE, so no flight capability, the mod just has the animated wings and slowfall effects. There was a bug reported that when an NPC is wearing the amulet, the player is getting the slowfall effects instead. Now I created this mod originally for my husband, because he loved this other dragon wings mod here https://www.nexusmods.com/skyrim/mods/53271?tab=description But it used potions and spells instead to activate and deactivate the wings, so I got permission to use this mod, and just connected the wings to the amulets instead. So the bug is probably an issue from the original mod, I'm thinking it's coming from the scripting, which I didn't change at all in my mod. I just started learning scripting, so it's not really my thing, but I really want to fix this bug quickly for the people using it.If anyone can give me advice, let me know and I'll upload or paste the scripts here. :smile: Thanks guys, have a good one :smile: Edited November 9, 2020 by anathemastudio Link to comment Share on other sites More sharing options...
maxarturo Posted November 9, 2020 Share Posted November 9, 2020 If you want assistance, post your script, without it is like walking in the dark. Link to comment Share on other sites More sharing options...
NexusComa2 Posted November 9, 2020 Share Posted November 9, 2020 Sounds like in the script everything was aimed towards the player and not towards a player veritable who is wearing it.Possibly change that to a generic player veritable you set each time the amulet is equipped. Should fix that. Link to comment Share on other sites More sharing options...
foamyesque Posted November 10, 2020 Share Posted November 10, 2020 I strongly suspect the slowfall effects are being achieved by messing with the game settings, which are global, and the relevant enchantment isn't checking to make sure it's being worn by a player. Link to comment Share on other sites More sharing options...
dylbill Posted November 10, 2020 Share Posted November 10, 2020 Hey, I checked out the scripts and both NexusComa2 and foamyesque are right. It does change the game setting and uses game.getplayer(). Here's one of the scripts: Â Â Â Scriptname _Anton_ADW_MagicEffect extends activemagiceffect Spell Property _Anton_AnimatedDragonWings_Spell Auto GlobalVariable Property _Anton_AnimatedDragonWings_JumpHeight Auto Event onEffectStart(Actor akTarget, Actor akCaster) _Anton_AnimatedDragonWings_JumpHeight.SetValue( Game.GetGameSettingFloat("fJumpHeightMin") ) Game.SetGameSettingFloat("fJumpHeightMin", 300.0) Game.GetPlayer().AddSpell( _Anton_AnimatedDragonWings_Spell, False) EndEvent Event OnCellLoad() ;_Anton_AnimatedDragonWings_JumpHeight.SetValue( Game.GetGameSettingFloat("fJumpHeightMin") ) Game.SetGameSettingFloat("fJumpHeightMin", 300.0) Game.GetPlayer().AddSpell( _Anton_AnimatedDragonWings_Spell, False) EndEvent Event OnPlayerLoadGame() _Anton_AnimatedDragonWings_JumpHeight.SetValue( Game.GetGameSettingFloat("fJumpHeightMin") ) Game.SetGameSettingFloat("fJumpHeightMin", 300.0) Game.GetPlayer().AddSpell( _Anton_AnimatedDragonWings_Spell, False) EndEvent Which you could change to: Scriptname _Anton_ADW_MagicEffect extends activemagiceffect Spell Property _Anton_AnimatedDragonWings_Spell Auto GlobalVariable Property _Anton_AnimatedDragonWings_JumpHeight Auto Actor Target Event onEffectStart(Actor akTarget, Actor akCaster) Target = akTarget If akTarget == Game.GetPlayer() _Anton_AnimatedDragonWings_JumpHeight.SetValue( Game.GetGameSettingFloat("fJumpHeightMin") ) Game.SetGameSettingFloat("fJumpHeightMin", 300.0) Endif Target.AddSpell( _Anton_AnimatedDragonWings_Spell, False) EndEvent Event OnCellLoad() If Target == Game.GetPlayer() ;_Anton_AnimatedDragonWings_JumpHeight.SetValue( Game.GetGameSettingFloat("fJumpHeightMin") ) Game.SetGameSettingFloat("fJumpHeightMin", 300.0) Endif Target.AddSpell( _Anton_AnimatedDragonWings_Spell, False) EndEvent Event OnPlayerLoadGame() If Target == Game.GetPlayer() _Anton_AnimatedDragonWings_JumpHeight.SetValue( Game.GetGameSettingFloat("fJumpHeightMin") ) Game.SetGameSettingFloat("fJumpHeightMin", 300.0) Endif Target.AddSpell( _Anton_AnimatedDragonWings_Spell, False) EndEvent You would have to do something similar for all the scripts. Link to comment Share on other sites More sharing options...
anathemastudio Posted November 10, 2020 Author Share Posted November 10, 2020 (edited) Hi Dybill :), you're awesome with this stuff! You helped me with another scripting question for addiction involving a sword. :)Â Awesome thanks guys for all your help, I really appreciate it and your time. I'm a complete noob to scripting, but this makes sense now and I can work with it, thanks to you all. :) Edited November 10, 2020 by anathemastudio Link to comment Share on other sites More sharing options...
dylbill Posted November 10, 2020 Share Posted November 10, 2020 No problem, as always happy modding :) Link to comment Share on other sites More sharing options...
anathemastudio Posted November 11, 2020 Author Share Posted November 11, 2020 I've made the changes to that first script _Anton_ADW_MagicEffect and am now changing the others.This one is _Anton_ADW_MagicEffect_Counter Scriptname _Anton_ADW_MagicEffect_Counter extends activemagiceffect GlobalVariable Property _Anton_AnimatedDragonWings_Switch Auto Int SwitchState Event onEffectStart(Actor akTarget, Actor akCaster) SwitchState = _Anton_AnimatedDragonWings_Switch.GetValueInt() If SwitchState >= 2 _Anton_AnimatedDragonWings_Switch.SetValueInt(0) Else SwitchState += 1 _Anton_AnimatedDragonWings_Switch.SetValueInt(SwitchState) EndIf EndEventBased on the changes to the _Anton_ADW_MagicEffect script, I'm thinking this script needs to be changed to say the following, if you have a chance, please let me know if I missed something here: Scriptname _Anton_ADW_MagicEffect_Counter extends activemagiceffect GlobalVariable Property _Anton_AnimatedDragonWings_Switch Auto Int SwitchState Actor Target Event onEffectStart(Actor akTarget, Actor akCaster) Target = akTarget SwitchState = _Anton_AnimatedDragonWings_Switch.GetValueInt() If SwitchState >= 2 _Anton_AnimatedDragonWings_Switch.SetValueInt(0) Else SwitchState += 1 _Anton_AnimatedDragonWings_Switch.SetValueInt(SwitchState) EndIf EndEventAnd the last script is _Anton_ADW_MagicEffect_Dispel this is it here: Scriptname _Anton_ADW_MagicEffect_Dispel extends activemagiceffect GlobalVariable Property _Anton_AnimatedDragonWings_Switch Auto GlobalVariable Property _Anton_AnimatedDragonWings_JumpHeight Auto Event onEffectStart(Actor akTarget, Actor akCaster) Game.SetGameSettingFloat("fJumpHeightMin", _Anton_AnimatedDragonWings_JumpHeight.GetValue() ) _Anton_AnimatedDragonWings_Switch.SetValueInt(2) EndEvent Again, based on the changes to the first script, I'm thinking this one needs to say: Scriptname _Anton_ADW_MagicEffect_Dispel extends activemagiceffect GlobalVariable Property _Anton_AnimatedDragonWings_Switch Auto GlobalVariable Property _Anton_AnimatedDragonWings_JumpHeight Auto Actor Target Event onEffectStart(Actor akTarget, Actor akCaster) Target = akTarget If akTarget == Game.GetPlayer() Game.SetGameSettingFloat("fJumpHeightMin", _Anton_AnimatedDragonWings_JumpHeight.GetValue() ) _Anton_AnimatedDragonWings_Switch.SetValueInt(2) Endif EndEventI know coding for web dev, but this is new to me, so if you have a chance please let me know if I missed something with any of these. I'd really appreciate it. :) Link to comment Share on other sites More sharing options...
dylbill Posted November 11, 2020 Share Posted November 11, 2020 Looks good except you don't need to do Target = akTarget in those. You only need to do that if you need to use the target actor in other events. As those scripts only have 1 event, that's unnecessary. Link to comment Share on other sites More sharing options...
anathemastudio Posted November 11, 2020 Author Share Posted November 11, 2020 Okay awesome, makes sense.Thanks so much for your help. :) Link to comment Share on other sites More sharing options...
Recommended Posts