chajapa Posted June 23, 2017 Posted June 23, 2017 I'm trying to change my follower's body shape through dialogue. I've never used NiOverride before and I'm having trouble getting this to work. I have a script that contains the following: Scriptname CheckStats extends Quest conditional {Check various stats} SexLabFramework property SexLab auto Actor property PlayerRef auto SPELL Property MilkLeak Auto Quest Property MME Auto conditional Quest Property ELV Auto conditional Alias Property Elsie Auto bool property isPreg auto conditional String Property NIO_KEY = "CP_Elsie.esp" AutoReadOnly hidden float property hip1 auto conditional float property waist1 auto conditional float property nipSize1 auto conditional float property nipLength1 auto conditional float property hipbone1 auto conditional float property cleavage1 auto conditional String property hips = "Hips" AutoReadOnly hidden String property waist = "Waist" AutoReadOnly hidden String property nipSize = "Nipplesize" AutoReadOnly hidden String property nipLength = "Nipplelength" AutoReadOnly hidden String property hipBone = "Hipbone" AutoReadOnly hidden String property cleavage = "Breastcleavage" AutoReadOnly hidden Function changes(ObjectReference ref) NiOverride.SetBodyMorph(ref,hips, NIO_KEY, hip1) NiOverride.SetBodyMorph(ref,waist, NIO_KEY, waist1) NiOverride.SetBodyMorph(ref,nipSize, NIO_KEY, nipSize1) NiOverride.SetBodyMorph(ref,nipLength, NIO_KEY, nipLength1) NiOverride.SetBodyMorph(ref,hipBone, NIO_KEY, hipbone1) NiOverride.SetBodyMorph(ref,cleavage, NIO_KEY, cleavage1) EndFunction Function applyChanges(ObjectReference ref) NiOverride.ApplyNodeOverrides(ref) EndFunction I get no errors compiling that. The floats have set values in the properties. for example, hip1 and hipbone1 have initial values of 0.6 The others have values that, if I were to use them in Racemenu, I would definitely see the difference. In my dialogue I have script fragments at beginning and ending such that my script for the topic looks like this: ;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment ;NEXT FRAGMENT INDEX 3 Scriptname ELV_testPregYes Extends TopicInfo Hidden ;BEGIN FRAGMENT Fragment_2 Function Fragment_2(ObjectReference akSpeakerRef) Actor akSpeaker = akSpeakerRef as Actor ;BEGIN CODE Stats.Changes(akSpeakerREF) ;END CODE EndFunction ;END FRAGMENT ;BEGIN FRAGMENT Fragment_0 Function Fragment_0(ObjectReference akSpeakerRef) Actor akSpeaker = akSpeakerRef as Actor ;BEGIN CODE ; Stats.applyChanges(akSpeakerREF) ;END CODE EndFunction ;END FRAGMENT ;END FRAGMENT CODE - Do not edit anything between this and the begin comment ELVMain property ELV auto conditional SexLabFramework Property SexLab Auto Quest Property MME Auto conditional Checkstats property Stats auto conditional Alias property ElsieBody auto conditional referenceAlias property ElsieREF auto conditional I get no errors compiling that either. Some of those properties I'm not using. Was trying different things to get this to work. However when I test this in game, nothing happens. I tried dressing and undressing her, changing cells. Nope. If I open racemenu on her (Using EFF as follow framework) I can adjust her UUNP morphs and that's definitely working. Her body meshes are UUNP using zeroed sliders preset and tri files are there. If I make her a milkmaid or get her pregnant with soul gem oven, her body scales as it should. So I am assuming I'm just really clueless about how to get NiOverride to work. Help appreciated
chajapa Posted June 23, 2017 Author Posted June 23, 2017 OK, well... with zero views I guess nobody saw this, but I got it working. This is for one specific character (the follow I created in this mod) so... after a bit of fiddling, I got it. OK, it was several HOURS of fiddling... cause... trial and error, read the errors in papyrus logs, google those and see what causes them, try this...try that... Papyrus was not able to pass a NONE object or whatever... As it turns out, I had to set the property for the actor as an object reference in the script fragment as well as the script where the function resides. BUT... now that I know how to do this, I can use it.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.