Arxez Posted April 1, 2020 Share Posted April 1, 2020 Scriptname MonliRaceChanger extends ActiveMagicEffect {Changes Race to Monli} Race Property MonliRace auto Event OnEffectStart(Actor Target, Actor Caster) Game.GetPlayer().SetRace(MonliRace) Debug.Notification("Hopefully it worked!") EndEventHello, So I'm pretty familiar with coding but not specifically with skyrim. I simply created a magic effect in CK with the script archetype, added it to a lesser power spell, and tested it in skyrim. For some reason, no effect happens. I've tried this in several ways at this point and the debug notification always shows but my body simply does not change. I can even check my race and see that nothing has changed. I've even used a mod that adds a custom spell script (https://www.nexusmods.com/skyrim/mods/79074/) that sets everything up and when i input the race change code Game.GetPlayer().SetRace(MonliRace) It still doesn't work. I added the debug notification to that one too just to see what happens and the notification still shows the text. I can use player.setrace on the console in game but I tend to play this on a tv with a controller and figured this might be a nice way to look into the bones of scripting. The thing is, this is ripped right out of the werewolf transformation script. So why wouldn't it work for me? For what it's worth, this is a simple fix I'm using for a couple of transformation mods (uchiha clan and undeath) that has weird effects with their respective transformations. For Undeath, it's the classic "black lich on revert transformation" bug that keeps me stuck in the lich race when I change back. For Uchiha clan susano changes me back to the uchiha race when I'm using a different custom race. I'm not asking for a bug fixes for what i mentioned unless someone has the patience, as doing anything to make this one line of code work would be satisfying enough haha. Any ideas? I can include a plugin list if that helps but i wanted to make sure from a coding standpoint this should work fine as is Link to comment Share on other sites More sharing options...
maxarturo Posted April 1, 2020 Share Posted April 1, 2020 (edited) The "SetRace()" by itself does absolutely nothing !, except adding the race ability and attack data of that race. To change the body + their animation etc... you need to do everything that the werewolf transformation script has and create all the associated references that goes along with it, the actual swap of the mesh/body is handle/done by the "Armor FX'" holder. If it was so easy and simple to just change races, then it wouldn't be necessary to have those transformation scripts and all those references in CK/game. You will need to dig in deeper into the mechanics of the transformations/change race. * The transformation is not actually an npc but the same npc using/wearing a body armor of the transforming race. I hope it helps. Edited April 1, 2020 by maxarturo Link to comment Share on other sites More sharing options...
Recommended Posts