Decèdere Posted July 29, 2020 Posted July 29, 2020 I made a custom race and I'm using a script to programatically load presets since the CK doesn't understand RaceMenu. The problem I'm having is that whenever I change the preset during character creation the eyes and scars and probably some other headparts/sliders are wrong. What gets me is that the correct eyes are selected, but the wrong eyes are showing. Also when I change preset, no matter what scar I had selected in the preset, it reverts to none. Any clue what's going wrong here? Here's the complete script I'm using to change preset programatically during character creation. One thing I've noticed is that whenever I change preset I can see the correct headparts for a split second, and then I hear the ticking sound like a bunch of sliders changing, and it quickly switches to the wrong headparts. Scriptname BRInit extends RaceMenuBase Race Property BlazeRace Auto Race Property BlazeRaceVampire Auto Event OnInit() Parent.OnInit() EndEvent Event OnSliderChanged(string callback, float value) int isFemale = _targetActorBase.GetSex() race myRace = _targetActorBase.GetRace() If callback == "ChangeHeadPreset" If myRace == BlazeRace || myRace == BlazeRaceVampire chargen.LoadPreset("BlazeRace\\Preset" + isFemale as string + (value as int) as string) EndIf ElseIf callback == "ChangeSex" If myRace == BlazeRace || myRace == BlazeRaceVampire chargen.LoadPreset("BlazeRace\\Preset" + isFemale as string + "0") EndIf EndIf EndEvent
Swe-DivX Posted July 29, 2020 Posted July 29, 2020 1 hour ago, Seelenlos said: I made a custom race and I'm using a script to programatically load presets since the CK doesn't understand RaceMenu. The problem I'm having is that whenever I change the preset during character creation the eyes and scars and probably some other headparts/sliders are wrong. What gets me is that the correct eyes are selected, but the wrong eyes are showing. Also when I change preset, no matter what scar I had selected in the preset, it reverts to none. Any clue what's going wrong here? Here's the complete script I'm using to change preset programatically during character creation. One thing I've noticed is that whenever I change preset I can see the correct headparts for a split second, and then I hear the ticking sound like a bunch of sliders changing, and it quickly switches to the wrong headparts. Scriptname BRInit extends RaceMenuBase Race Property BlazeRace Auto Race Property BlazeRaceVampire Auto Event OnInit() Parent.OnInit() EndEvent Event OnSliderChanged(string callback, float value) int isFemale = _targetActorBase.GetSex() race myRace = _targetActorBase.GetRace() If callback == "ChangeHeadPreset" If myRace == BlazeRace || myRace == BlazeRaceVampire chargen.LoadPreset("BlazeRace\\Preset" + isFemale as string + (value as int) as string) EndIf ElseIf callback == "ChangeSex" If myRace == BlazeRace || myRace == BlazeRaceVampire chargen.LoadPreset("BlazeRace\\Preset" + isFemale as string + "0") EndIf EndIf EndEvent Interesting, i found that the mouth slider is broken in RaceMenu. You can try to add debug to error log. Is the script finding the preset?
Decèdere Posted July 29, 2020 Author Posted July 29, 2020 It definitely is finding the correct presets. Actually I only have two female presets for the time being. When I load a preset it looks correct, except for the eyes and scars, and possibly other headparts or slider values that I haven't noticed yet. I'm not sure what you mean about debug to error log. This is actually my first script ever so I'm not exactly adept at this. Is there any chance the presets I have created in the CK are interfering with the RaceMenu presets that I'm trying to load? I'm not really sure what the relation is, if any, between those two presets. Also possibly worth noting. When I go to save a preset in RaceMenu it shows a list of all the headparts and slider values that will be saved, and it all looks to be in order. Correct eyes and everything. And like I said, once a preset is loaded, the correct eyes will be selected in the Eye Color slider, but the wrong eyes are being shown, even though I can see the correct eyes for a split second when the preset loads.
Swe-DivX Posted July 29, 2020 Posted July 29, 2020 4 hours ago, Seelenlos said: It definitely is finding the correct presets. Actually I only have two female presets for the time being. When I load a preset it looks correct, except for the eyes and scars, and possibly other headparts or slider values that I haven't noticed yet. I'm not sure what you mean about debug to error log. This is actually my first script ever so I'm not exactly adept at this. Is there any chance the presets I have created in the CK are interfering with the RaceMenu presets that I'm trying to load? I'm not really sure what the relation is, if any, between those two presets. Also possibly worth noting. When I go to save a preset in RaceMenu it shows a list of all the headparts and slider values that will be saved, and it all looks to be in order. Correct eyes and everything. And like I said, once a preset is loaded, the correct eyes will be selected in the Eye Color slider, but the wrong eyes are being shown, even though I can see the correct eyes for a split second when the preset loads. Not 100% this will work Scriptname BRInit extends RaceMenuBase Race Property BlazeRace Auto Race Property BlazeRaceVampire Auto Event OnInit() Parent.OnInit() EndEvent Event OnSliderChanged(string callback, float value) int isFemale = _targetActorBase.GetSex() race myRace = _targetActorBase.GetRace() Log("race myRace") If callback == "ChangeHeadPreset" If myRace == BlazeRace || myRace == BlazeRaceVampire chargen.LoadPreset("BlazeRace\\Preset" + isFemale as string + (value as int) as string) Log("chargen.LoadPreset("BlazeRace\\Preset" + isFemale as string + (value as int) as string)") EndIf ElseIf callback == "ChangeSex" If myRace == BlazeRace || myRace == BlazeRaceVampire chargen.LoadPreset("BlazeRace\\Preset" + isFemale as string + "0") Log("chargen.LoadPreset("BlazeRace\\Preset" + isFemale as string + "0")") EndIf EndIf EndEvent
Decèdere Posted July 29, 2020 Author Posted July 29, 2020 It says Log() is not a function. I don't think that's going to help me if all it does is print the name of the preset being selected, because I already know that the correct preset is being loaded. It pisses me off because for a split second it shows the right face, and then the eyes and scars change to something else, but it still shows that the correct eyes and scars are selected. Somehow I got it to work a few times when I first start a new game, but then out of the blue it switched to the wrong headparts again. What in the name of Gord is doing this?
Swe-DivX Posted July 29, 2020 Posted July 29, 2020 2 hours ago, Seelenlos said: It says Log() is not a function. I don't think that's going to help me if all it does is print the name of the preset being selected, because I already know that the correct preset is being loaded. It pisses me off because for a split second it shows the right face, and then the eyes and scars change to something else, but it still shows that the correct eyes and scars are selected. Somehow I got it to work a few times when I first start a new game, but then out of the blue it switched to the wrong headparts again. What in the name of Gord is doing this? Ok, it only works with the sexlab scripts. I think its Racemenu, if you have a really bad cpu and switching sex you can have the menu switching back again. You can ask https://www.patreon.com/expired6978 Papyrus Logger Scripts https://www.nexusmods.com/skyrimspecialedition/mods/20315
Decèdere Posted July 30, 2020 Author Posted July 30, 2020 Can you not use Unisex for headparts? If I separate them to Male and Female the problem goes away.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.