Haberdasher Posted May 26, 2022 Posted May 26, 2022 HBD_MorphDebug View File # MorphDebug Provides commands to debug LooksMenu BodyGen/BodyMorph systems. See BodyGen Description doc below for a description of terms of the many features that use BodyGen and some tips. With so many BodyGen features that users and sometimes mod authors may not have full understanding of, I felt there was a need for commands to view and control the underlying Morph Values to get a better understanding of the current state of the BodyGen system and to try and work around issues. # Commands: Commands can be triggered through the MorphDebug MCM page directly. Or via Aid Items which can be added via the Add Command Items button in the MorphDebug MCM page. Items are tagged [CMD][MorphDebug] so you can organize it in your inventory sorting mod how you wish, or set up a category for the Wheel Menu mod. 1.Set TargetActor - Sets TargetActor to the actor currently in crosshair, or Player if none. Used by other MorphDebug functions. 2.Print TargetActor - Prints the current TargetActor. 3.LogMorphs - Logs all morphs for the Target Actor to Papyrus log. 4.ClearBaseMorphs - Clears Base Value for all morphs for the Target Actor. 5.ClearKeywordMorphs - Clears all Keyword Values from morphs but leaves Base Value of the morphs for the Target Actor. 6.RegenerateMorphs - Clears all existing morphs and reapplies BodyGen templates (if any) for the Target Actor. 7.ClearAllMorphs - Removes all morphs from all actors making them re-eligible for BodyGen templates application (save and reload to see changes on NPCs) # Usage Use Set TargetActor to set the Actor you want to apply the other commands on. LogMorphs gives a full list of all morph values set on the TargetActor (must have papyrus logging turned on). The Clear/RegenerateMorph functions clear different values, see the BodyGen Description doc for greater description of the terms. They're intended to clear values that my have been applies/stuck from other mods. Since mods that use SetMorph handle when they apply them in their own different ways you may have to wait for the mod update tick/event or trigger them specifically if you know how in order for its morphs. RegenerateMorphs can be used to re-roll the BeodyGen template for the Actor to gen a better idea of what your templates are doing. # Requirements MCM LL_fourplay dll: You will already have this if you have AAF installed. Used since unlike SKSE, F4SE doesn't have a object-under-crosshair function, but LL_Fourplay.dll does. LooksMenu: For BodyGen, no point in using this to try and fix/look at morphs if you don't have any actually applied. # Installation Install as you would any other mod in your mod manager. MorphDebug is flagged as .esl Credits/Thanks: @expired6978 for LooksMenu/BodyGen @LenAnderson for an example of a nicely structured mod, and the idea of using vscode and various build scripts to manage a mod project. # BodyGen Description This document collates information about the systems to help understand them. # Terms Community and my own terms used to explain stuff: BodyGen system - The overall system provided by Looksmenus f4ee.dll that manages it's features/data and 'does the work'. The community may refer to Morphs by several different terms, and interchangeably mix the Morph name/id with the overall concept of the Morph modifying the shape of the body, or the value(s) Morph Slider - Alternate commonly used term for morph due to the BodySlide or LooksMenu Body Advanced method of changing the values with GUI sliders. Display name - Only in BodySlide (I think) which can show a different name instead of the actual Morph name Value/strength/power/factor - synonyms for the actual numerical value representing the morph. Base Value - By default the many BodyGen features use this singular value for a morph overwriting the current value. None Value - synonym for Base Value, usually used when talking about setting a morph via mods, where giving it a None value for the keyword parameter will set the Base Value. Keyword Value - a morph may have any number of Keyword values, used by mods to separate/identify their own value applied to a morph. # System and Features The BodyGen system supplied by LooksMenus f4ee .dll drives a number of features: When BodyGen system updates the morph it chooses the highest morph value out of the base and all keyword values applied to the morph. Note: there is a bug in LooksMenu f4ee versions before v1.6.19 that would apply the morph value of the highest keyword id (which was dependent on the mod and possibly load order). ## BodyMorph Sliders Simply labeled BodyMorph on the LooksMenu Description page, this is the feature accessed by LooksMenu > Body > Advanced > page of sliders feature. This operates on the Base value of each morph/slider. ## LooksMenu presets These save and load the morphs Base values. ## BodyGen templates system I'll just outright quote the LooksMenu Description page "BodyGen is a feature that allows for random (or specific) BodyMorph generation based on guided files (Because random everything usually results in a horrifying mess) for particular NPCs, or any NPC. If an Actor is eligible for random generation, when that actor is loaded (when you first see them, or load an existing save where they have no morphs) their morph listing will be computed based on the proceeding files. " The BodyGen template sets the morphs Base Value. BodyGen templates are applied once to an Actor - the first time you encounter them, or when you load a save. ##BodyGen.SetMorph Used by mods to set the Base Value (IMHO bad practice as it will override all the other features that use the Base Value), or their own KeyWord value (or technically any KeyWord value they want as long as they can get a reference to it) # Tips ## General (Repeating this, it's important) Note: there is a bug in LooksMenu f4ee versions before v1.6.19 that would apply the morph value of the highest keyword id (which was dependent on the mod and possibly load order) instead of the highest morph value. Some mods might not be set up to use SetMorph correctly (see mod authors request below), so even using the most recent LooksMenu version some mods might not be playing nice with each other. There is a helpful tool [BodyConvert](https://www.nexusmods.com/fallout4/mods/41781) to help convert between different morph setting formats (bodyslide, looksmenu preset, templates.ini) ## BodyGen Templates See the LooksMenu page, or various BodyGen guides scattered across the internet for more information on creating and applying the templates. TODO: Find a decent tutorial to link or crib off. morphs.ini uses formIds not reference ids. Most of the features work off the assumption that the morph .tri files built by BodySlide are set to 0. If you still want starting point values you would previously have set in bodyslide, you can set up a template to be applied to the Player in morphs.ini. Example, assuming you have created a template in templates.ini called FusionGirl-MyCharacter: #Player Fallout4.esm|7=FusionGirl-MyCharacter #AAF doppleganger of the player AAF.esm|72e2=FusionGirl-MyCharacter #AAF doppleganger of the player when in the pre-war/pre-game area (MQ101PlayerSpouseFemale). Don't think you would be doing any AAF stuff here, but you do you. Fallout4.esm|A7D35=FusionGirl-MyCharacter It can also be handy to know/look up the values of your template so you can tell if a mod has changed them. You can look at the f4ee.log in windows Documents/My Games/Fallout4/F4SE/ to see if there's any errors in your templates and morphs ini. Note: It logs referenceIds not formIds. ## SetMorph Beyond using MorphDebugs LogMorphs you can use a text editor find-in-files function to search mods .psc files for BodyGen.SetMorph to see what morphs are being set to. Submitter Haberdasher Submitted 05/27/2022 Category Other Requires MCM, LooksMenu, AAF 8
vaultbait Posted May 26, 2022 Posted May 26, 2022 This seems like it would come in handy for debugging the recent conflicts users have been reporting between the Sex Attributes Framework cumflation belly morphs and Family Planning Enhanced Redux. I'm now starting to wonder if it's the aforementioned LM 1.6.18 keyword morph handling problem at play. 1
Ulfberto Posted May 31, 2022 Posted May 31, 2022 this is so useful than people think. You can actually clean bodygen from actors ingame wtihout having to use the bodygen reset script i provided. Thanks for this! 1
cyewbasa Posted June 13, 2022 Posted June 13, 2022 (edited) Ok Ive read the description 3 times but Im having a brainfog today. Is there a way to determine (in game) which preset (fat, athletic, skinny etc) Im looking at? The presets Ive created sometimes give similar results at certain (randomised) values and Id like to know a way to tell which is which. Example: Im looking at 2 settlers, very similar in body shapes but one is curvy preset and the other is fat preset - of course now Im guessing because I have no way to know that - how do I tell which presets were given to the bodies Im looking at? Tia EDIT: Also, what happens if there is a syntax error in templates? Say i forgot a ',' or ':' somewhere. Does it stop on that slider and not read the rest? Or is it smarter then that? Edited June 13, 2022 by cyewbasa syntax
vaultbait Posted June 13, 2022 Posted June 13, 2022 10 hours ago, cyewbasa said: Ok Ive read the description 3 times but Im having a brainfog today. Is there a way to determine (in game) which preset (fat, athletic, skinny etc) Im looking at? The presets Ive created sometimes give similar results at certain (randomised) values and Id like to know a way to tell which is which. Example: Im looking at 2 settlers, very similar in body shapes but one is curvy preset and the other is fat preset - of course now Im guessing because I have no way to know that - how do I tell which presets were given to the bodies Im looking at? Tia It's not going to answer that, it's reporting the individual slider values. The template definitions are dereferenced and converted into slider ranges by BodyGen when applied to a specific reference, so no trace of the original template name is recorded anywhere as far as I know. 10 hours ago, cyewbasa said: EDIT: Also, what happens if there is a syntax error in templates? Say i forgot a ',' or ':' somewhere. Does it stop on that slider and not read the rest? Or is it smarter then that? BodyGen will skip that template and log an error in your f4ee.log at startup. Always check your log when playing with BodyGen template and morph files. 1
lee3310 Posted July 4, 2022 Posted July 4, 2022 One of the most underrated mod i've ever seen ? I always dreaded bodygen because of the permanant change and having to reload the game each time i don't like a preset. Now i can reset the preset by pressing a button ?. Thank you so much for this awesome mod.
lee3310 Posted July 8, 2022 Posted July 8, 2022 Can someone explain this command "2.Print TargetActor - Prints the current TargetActor." Print what and where ? thx
Haberdasher Posted July 8, 2022 Author Posted July 8, 2022 Should a message/debug.notification (what are those top-left short term hud messages most commonly called?), as well as being in papyrus log if you miss that. 1
rmaku Posted January 11, 2023 Posted January 11, 2023 This tool so far has been incredibly helpful to me. I wonder if it would be possible to have something like a selector from where to choose which bodygen I want to assign to the target character. (like AutoBody and OBody do in Skyrim):
vaultbait Posted April 2, 2023 Posted April 2, 2023 On 1/11/2023 at 6:24 PM, rmaku said: I wonder if it would be possible to have something like a selector from where to choose which bodygen I want to assign to the target character. I guess you're talking about BodyGen templates. I don't think BodyGen's API has the ability to ask it to apply a specific template to an actor, that's all figured out from the morph configs at load time. LooksMenu does have the ability to save and apply presets to actors, which can include body morphs. You'd need to create LM presets from your BG templates with something like BodyConvert, but it should be doable that way.
Madmunchkin Posted April 24, 2024 Posted April 24, 2024 No matter what I do, aiming at an npc third person, first person, with weapon, without weapon, scoping at an npc etc. I always end up selecting myself as target actor and not the npc im trying to reset. Any idea why? Can I run the mods options via console command by just click at the npc to get his id an run a command?
vaultbait Posted April 24, 2024 Posted April 24, 2024 5 minutes ago, Madmunchkin said: No matter what I do, aiming at an npc third person, first person, with weapon, without weapon, scoping at an npc etc. I always end up selecting myself as target actor and not the npc im trying to reset. Any idea why? Can I run the mods options via console command by just click at the npc to get his id an run a command? On 5/26/2022 at 9:12 PM, Haberdasher said: # Requirements LL_fourplay dll: You will already have this if you have AAF installed. Used since unlike SKSE, F4SE doesn't have a object-under-crosshair function, but LL_Fourplay.dll does.
Madmunchkin Posted April 24, 2024 Posted April 24, 2024 (edited) 43 minutes ago, vaultbait said: Thanks for your reply. Yes, that one is missing. I'm not using any AAF stuff on my playthrough at the moment. Do you know if theres a command like the skyrim skee erase bodymorph command for fallout 4 to initiate the reset via console? Edited April 24, 2024 by Madmunchkin
vaultbait Posted April 24, 2024 Posted April 24, 2024 (edited) 11 hours ago, Madmunchkin said: Thanks for your reply. Yes, that one is missing. I'm not using any AAF stuff on my playthrough at the moment. Do you know if theres a command like the skyrim skee erase bodymorph command for fallout 4 to initiate the reset via console? Keep in mind that there's a separately installable LLFP if you don't expect to use any other mods that include a copy (AAF, Real Handcuffs, Rad Morphing Redux...): As to your question, you can call any of BodyGen's global functions with the cgf (CallGlobalFunction) command, like this, replacing 0a1b2c3d with whatever the target's refID is: cgf "BodyGen.RegenerateMorphs" 0a1b2c3d 1 I don't recall the name of the function to clear morphs, but you can extract the BodyGen.psc stub from LooksMenu's Main.ba2 with a tool like BAE. Edited April 24, 2024 by vaultbait
Madmunchkin Posted April 24, 2024 Posted April 24, 2024 2 hours ago, vaultbait said: Keep in mind that there's a separately installable LLFP if you don't expect to use any other mods that include a copy (AAF, Real Handcuffs, Rad Morphing Redux...): As to your question, you can call any of BodyGen's global functions with the cgf (CallGlobalFunction) command, like this, replacing 0a1b2c3d with whatever the target's refID is: cgf "BodyGen.RegenerateMorphs" 0a1b2c3d 1 I don't recall the name of the function to clear morphs, but you can extract the BodyGen.psc stub from LooksMenu's Main.ba2 with a tool like BAE. Thank you very much for your help and your time. I wish you best!
MSEdgeView Posted September 17, 2024 Posted September 17, 2024 So when using `ClearAllMorphs`, then saving and reloading does it take some time until it regenerates the BodyGen morphs or do you need to activate something? Or am I missing something? The clearing itself seems to work, but the BodyGen morph is not being regenerated without me actively setting an actor and using `RegenerateMorphs`. In `f4ee.ini` I have `bEnableBodyGen=1 ;` and it also seems to have worked initially when starting the game.
Dont Tell My Parents Posted December 15, 2024 Posted December 15, 2024 Hey I just want to say a huge thank you for this! It's the only thing I know of that can regen bodygen data. It's amazing! Thank you so much!!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now