Halstrom Posted April 11, 2018 Posted April 11, 2018 I got a slight issue with a body morphing script: I somehow need to link it to find the BodyGen function in Looks Menu. Scriptname SynthPlayer:Synth9LooksMenu extends ReferenceAlias Group Misc Quest Property qMQ101 Auto GlobalVariable Property gBootup Auto GlobalVariable Property gDebugSetting Auto GlobalVariable Property gInCombat Auto Const GlobalVariable Property gMorphBellyPerc Auto GlobalVariable Property gMorphButtPerc Auto GlobalVariable Property gMorphBreastsPerc Auto GlobalVariable Property gMorphMusclesPerc Auto GlobalVariable Property gHoldBellyPerc Auto GlobalVariable Property gHoldButtPerc Auto GlobalVariable Property gHoldBreastsPerc Auto GlobalVariable Property gHoldMusclesPerc Auto GlobalVariable Property gSexFertilePerc Auto GlobalVariable Property gBreastsLubriCoolPerc Auto GlobalVariable Property gBellyLubriCoolPerc Auto GlobalVariable Property gButtLubriCoolPerc Auto Keyword Property kwSynthPlayer_Morph Auto ActorValue Property avStrength Auto EndGroup ;----------------------------------------------------------------------------------------------------------------------------- Actor rActor Int iBootup String sModName = "LooksMenu.esp" Int iDebugSetting Float fCurrProcessingLevel Int iCurrMorphPerc Int iPrevMorphPerc Int iCurrBellyPerc Int iPrevBellyPerc Int iCurrBreastsPerc Int iPrevBreastsPerc Int iCurrButtPerc Int iPrevButtPerc Int iCurrMusclesPerc Int iPrevMusclesPerc Int iTimerID = 32 Float fFrequencyTimer = 1.0 Int iInCombat ;----------------------------------------------------------------------------------------------------------------------------- Event OnInit() Utility.wait(3.0) If (Game.IsPluginInstalled(sModName)) rActor = Game.GetPlayer() RegisterForRemoteEvent(rActor, "OnDeath") fnInit() endif EndEvent Event OnPlayerLoadGame() If (Game.IsPluginInstalled(sModName)) fnInit() endif EndEvent Function fnInit() If (Game.IsPluginInstalled(sModName)) iDebugSetting = (gDebugSetting.GetValue()) as Int gMorphBreastsPerc.SetValue(100) gMorphBellyPerc.SetValue(100) gMorphButtPerc.SetValue(100) gMorphMusclesPerc.SetValue(100) iPrevMorphPerc = 400 fnMessage("SynthPlayer: " + sModName + " Assets Loaded") StartTimer(fFrequencyTimer, iTimerID) else CancelTimer( iTimerID) endif EndFunction ;----------------------------------------------------------------------------------------------------------------------------- Event OnTimer(int aiTimerID) iDebugSetting = (gDebugSetting.GetValue()) as Int iBootup = (gBootup.GetValue()) as Int iInCombat = (gInCombat.GetValue()) as Int If (Game.IsPluginInstalled(sModName)) && (aiTimerID >= iTimerID) && (iBootup >= 9) && (qMQ101.IsCompleted() == True) && (iInCombat == 0) Float fSexFertilePerc = gSexFertilePerc.GetValue() Float fBellyLubriCoolPerc = gBellyLubriCoolPerc.GetValue() Float fBreastsLubriCoolPerc = gBreastsLubriCoolPerc.GetValue() Float fButtLubriCoolPerc = gButtLubriCoolPerc.GetValue() Float fMorphBreastsPerc = gMorphBreastsPerc.GetValue() Float fMorphBellyPerc = gMorphBellyPerc.GetValue() Float fMorphButtPerc = gMorphButtPerc.GetValue() Float fMorphMusclesPerc = gMorphMusclesPerc.GetValue() Float fHoldBreastsPerc = gHoldBreastsPerc.GetValue() Float fHoldBellyPerc = gHoldBellyPerc.GetValue() Float fHoldButtPerc = gHoldButtPerc.GetValue() Float fHoldMusclesPerc = gHoldMusclesPerc.GetValue() Float fStrength = rActor.GetValue(avStrength) Float fBreastsPerc = fBreastsLubriCoolPerc - 100 + (fSexFertilePerc / 10) if (fBreastsPerc < -100) fBreastsPerc = -100 elseif (fBreastsPerc > 200) fBreastsPerc = 200 endif if (fHoldBreastsPerc > 0) &&(fBreastsPerc > fHoldBreastsPerc) fBreastsPerc = fHoldBreastsPerc endif Float fBellyPerc = fBellyLubriCoolPerc if (fBellyPerc < -100) fBellyPerc = -100 elseif (fBellyPerc > 200) fBellyPerc = 200 endif if (fHoldBellyPerc > 0) && (fBellyPerc > fHoldBellyPerc) fBellyPerc = fHoldBellyPerc endif Float fButtPerc = fButtLubriCoolPerc - 100 if (fButtPerc < -100) fButtPerc = -100 elseif (fButtPerc > 200) fButtPerc = 200 endif if (fHoldButtPerc > 0) && (fButtPerc > fHoldButtPerc) fButtPerc = fHoldButtPerc endif Float fMusclesPerc = fStrength * 10 if (fMusclesPerc < -100) fMusclesPerc = -100 elseif (fMusclesPerc > 200) fMusclesPerc = 200 endif if (fHoldMusclesPerc > 0) && (fMusclesPerc > fHoldMusclesPerc) fMusclesPerc = fHoldMusclesPerc endif iCurrBreastsPerc = fBreastsPerc as Int iCurrBellyPerc = fBellyPerc as Int iCurrButtPerc = fButtPerc as Int iCurrMusclesPerc = fMusclesPerc as Int iCurrMorphPerc = (fMorphBreastsPerc + fMorphBellyPerc + fMorphButtPerc + fMorphMusclesPerc) as Int if (iCurrBreastsPerc != iPrevBreastsPerc) || (iCurrBellyPerc != iPrevBellyPerc) || (iCurrButtPerc != iPrevButtPerc) || (iCurrMorphPerc != iPrevMorphPerc) if (iCurrBreastsPerc != iPrevBreastsPerc) || (iCurrMorphPerc != iPrevMorphPerc) Float fMorph = fBreastsPerc / 100 * fMorphBreastsPerc / 100 BodyGen.SetMorph(rActor, True, "Breasts", kwSynthPlayer_Morph, fMorph) ; BodyGen.SetMorph(rActor, True, "BreastsNewSH", kwSynthPlayer_Morph, fMorph) ; BodyGen.SetMorph(rActor, True, "BreastFantasy", kwSynthPlayer_Morph, fMorph) endif if (iCurrBellyPerc != iPrevBellyPerc) || (iCurrMorphPerc != iPrevMorphPerc) Float fMorph = fBellyPerc / 100 * fMorphBellyPerc / 100 ; BodyGen.SetMorph(rActor, True, "BigBelly", kwSynthPlayer_Morph, fMorph) BodyGen.SetMorph(rActor, True, "Belly", kwSynthPlayer_Morph, fMorph) BodyGen.SetMorph(rActor, True, "Waist", kwSynthPlayer_Morph, fMorph) endif if (iCurrButtPerc != iPrevButtPerc) || (iCurrMorphPerc != iPrevMorphPerc) Float fMorph = fButtPerc / 100 * fMorphButtPerc / 100 BodyGen.SetMorph(rActor, True, "Butt", kwSynthPlayer_Morph, fMorph) ; BodyGen.SetMorph(rActor, True, "ButtNew", kwSynthPlayer_Morph, fMorph) endif if (iCurrMusclesPerc != iPrevMusclesPerc) || (iCurrMorphPerc != iPrevMorphPerc) Float fMorph = fMusclesPerc / 100 * fMorphMusclesPerc / 100 ; BodyGen.SetMorph(rActor, True, "MuscularChest", kwSynthPlayer_Morph, fMorph) ; BodyGen.SetMorph(rActor, True, "MuscularArms", kwSynthPlayer_Morph, fMorph) ; BodyGen.SetMorph(rActor, True, "MuscularButt", kwSynthPlayer_Morph, fMorph) ; BodyGen.SetMorph(rActor, True, "MuscularLegs", kwSynthPlayer_Morph, fMorph) endif BodyGen.UpdateMorphs(rActor) rActor.QueueUpdate(flags=0xC) fnMessage("Breasts/Butt/Belly/Muscle: " + iCurrBreastsPerc + "/" + iCurrButtPerc + "/" + iCurrBellyPerc + "/" + iCurrMusclesPerc) fnMessage("Breasts/Butt/Belly/Muscle: " + fBreastsLubriCoolPerc + "/" + fButtLubriCoolPerc + "/" + fBellyLubriCoolPerc + "/" + fStrength) endif iPrevMorphPerc = iCurrMorphPerc iPrevBellyPerc = iCurrBellyPerc iPrevBreastsPerc = iCurrBreastsPerc iPrevButtPerc = iCurrButtPerc iPrevMusclesPerc = iCurrMusclesPerc Endif StartTimer(fFrequencyTimer, iTimerID) EndEvent ;----------------------------------------------------------------------------------------------------------------------------- Function fnMessage(String sMessage) if (iDebugSetting > 0) Debug.Trace(sMessage) endif if (iDebugSetting > 1) Debug.Notification(sMessage) endif EndFunction ;----------------------------------------------------------------------------------------------------------------------------- Event Actor.OnDeath(Actor akSender, Actor akKiller) CancelTimer(iTimerID) UnregisterForAllEvents() EndEvent I'm betting these errors:
Carreau Posted April 11, 2018 Posted April 11, 2018 You need BodyGen.psc in your compiler folder (or wherever you have your compiler pointing to. Usually script\user). So long as you have looksmenu enabled in your mod manager, your script will have access to BodyGen.pex during run time since it's packed in Looksmenu - main.ba2 (unless you unpacked the BA2 and placed the pex in the script folder).
Halstrom Posted April 11, 2018 Author Posted April 11, 2018 Ah that got it took some looking to find it, and I had to extract it, it should be a dev download or something Do you know if 2 mods morph breasts does one overwrite the other or do they just stack?
Carreau Posted April 11, 2018 Posted April 11, 2018 Whatever you plug into setmorph() is the value the slider will show. The way i deal with it is I use GetMorph() to find the value of the slider and then make any adjustments to that value, then plug it back in through SetMorph().
Halstrom Posted April 11, 2018 Author Posted April 11, 2018 1 hour ago, Carreau said: Whatever you plug into setmorph() is the value the slider will show. The way i deal with it is I use GetMorph() to find the value of the slider and then make any adjustments to that value, then plug it back in through SetMorph(). Yeah, sounds like that's the way to do it and not screw with anything elses Morphing
Carreau Posted April 11, 2018 Posted April 11, 2018 Depending on implementation from other mods that may affect that particular slider, you may or may not be fighting for control. But in all honesty, I can’t think of too many mods that make use of bodygen during gameplay. There’s my weight gain mod for Fallout Vore at ekas and ColdSteel’s weightgain on DA. With cold’s, he's only affecting his ssbbw and muscle sliders. Workout through the fallout only affects vanilla triangle last I checked (which i last looked at that in february)
Halstrom Posted April 11, 2018 Author Posted April 11, 2018 Well I'm planning on calculating Family Plannings Belly expansion by the PregMonth value, I can do similar for other mods. You don't have your Vore mod uploaded here at LL? I wasn't planning on touching the vanilla Triangle sliders. Just got to do some testing now of the morphing and a couple of other little things, so hopefully can release a beta in next few days, and then get back to feature creep
Carreau Posted April 11, 2018 Posted April 11, 2018 My vore mod is over at Eka’s Portal (aryion.com). It’s a plug in for Fallout Vore which is hosted there. I can link it if you want.
Halstrom Posted April 11, 2018 Author Posted April 11, 2018 Ah yours is a plugin for the Vore mod hosted there, that makes sense. I'll have a look later, but will allow for compatibility for it in the future. Just in case someone wants to be a Synth that requires human flesh for bio fuel
Carreau Posted April 11, 2018 Posted April 11, 2018 https://aryion.com/forum/viewtopic.php?f=79&t=52059 You can get my plug in at the bottom of the OP under the spoiler tag. I'm working with both Atomic Beauty and CBBE sliders as well as ColdSteelJ's SSBBW sliders. I wouldn't worry too much about working around the sliders. You do you, mang.
Guest Posted October 19, 2019 Posted October 19, 2019 Maybe still of interest for somebody. When using keywords from your own mod with the functions getmorph and setmorph, the morphings, do not interfere with morphings of other mods. Advantage: There is no need to use the function getmorph and make calculations by yourself in your own mod. On the other side the morphings with the keywords are not shown in the sliders of the looksmenu. Looksmenu does not use a keyword (Keyword = None) and shows only the morphings without keyword in the sliders. How the morphings from different mods are combined together I do not know, but propably they are simply added together
Recommended Posts
Archived
This topic is now archived and is closed to further replies.