Most features can be disabled either through the Config (see below) or by deleting the corresponding .package file from the mod!
All sliders should now copy across occult sim transformations!
Sliders:
We have 4 general sliders at the moment: Height, Neck, Hands, and Bulge.
All sliders apply to Male and Female sims except Bulge. The non-height sliders only work for Teens and older.
For use in commands, the sliders are named:
height (-100 to 100, negative values use Height Slider Short.package and positive ones use Height Slider Tall.package)
neck (-100 to 100)
hand/hands (0 to 100)
bulge (0 to 100) (only works with specific clothing, see Technical information -> Technical details below)
chs/childheightslider (“Height Slider Growth.package” only, -100 to 100)
ths/teenheightslider (“Height Slider Growth.package” only, -100 to 100, positive values will use the positive “height” slider, at least until/unless I get a teen-specific positive height slider)
They should work in the following commands:
set_slider [slider name] [amount] [optional Sim ID] (e.g. ‘set_slider hands 75’) – sets the slider to the given value for the active or specified Sim. Sliders set to 0 will technically be removed from the Sim.
get_slider [slider name] [optional Sim ID] – gives the value of the given slider for the active or specified Sim
set_slider_all [slider_name] [amount] – sets the slider to the given value for all Sims in the save
random_slider_all / randomize_slider_all [slider_name] – randomizes the given slider for all Sims in the save. If any slider data would apply to the same slider, it adds them together.
migrate_sim_sliders [optional Sim ID] – migrates all of the slider data (from this mod) to the correct location for the target sim (if they are not already in the correct location)
migrate_all_sliders – same as migrate_sim_sliders, but for all loaded Sims
other commands in Sliders.py:
print_outfit_parts [optional Sim ID] – prints the Part IDs in the Sim’s current outfit
random_outfit [optional Sim ID] – randomizes the Sim’s current outfit
set_bulge_stat [amount] [optional Sim ID] – sets the BulgeStat directly (most commands that set the bulge slider will set this as well!)
assign_bulge_clothes [optional Part ID] [optional Sim ID] – equips the given clothing article (or else a random one meant to be compatible with bulges) to the Sim
Sliders.py should catch any Outfit changes and apply the Bulge slider (from the remembered value in the BulgeStat) only when compatible clothing is worn
commands from HeightModule.py:
set_age / sa [amount] [optional Sim ID] – sets the Sim’s age in days
set_age_and_update_height / sau [amount] [optional Sim ID] – sets the Sim’s age in days, then updates their height according to the Gradual Growth module (see below)
add_age / aa [amount] [optional Sim ID] – adds the given amount to the Sim’s age in days
add_age_and_update_height / aau [amount] [optional Sim ID] – adds the given amount to the Sim’s age in days, then updates their height according to the Gradual Growth module
get_height_stat [optional Sim ID] – gives the HeightStat on the Sim (see above)
get_height_sliders [optional Sim ID] – gives any non-0 height-based sliders (height, chs, ths) that are set on the Sim
get_height [optional Sim ID] – does combines the above 2 commands
set_height_stat [amount] [optional Sim ID] – sets the HeightStat on the Sim (see above) and gives them the HeightRandomized trait
set_height [amount] [optional Sim ID] – in addition to the above command, does the Gradual Growth update on the Sim if they are YA or below, and otherwise sets the “height” slider
randomize_height_in_category [category string] [optional Sim ID] – randomizes the sims height within the given category. Valid category strings are VERY_TALL, TALL, AVERAGE, SHORT, and VERY_SHORT.
randomize_all_heights / rhall – does set_height for all Sims with a random height tending towards Average
randomize_sim_height / rhone [optional Sim ID] – same as the above, but for one Sim
randomize_default_heights – same as randomize_all_heights, but only for Sims whose sliders (from this mod) have never been touched
update_all_heights – performs the Gradual Growth 1am update for all Sims
update_sim_height [optional Sim ID] – same as the above, but for the selected or specified Sim only
HeightModifier.py should also catch any Age Up/Down and clean up the age-based height sliders. In the future this can be used to ensure (with math) that there is no visual height change on Age Up, compared to the Sim’s max height in the previous Age Group
Tips and tricks:
Using set_slider or set_slider_all on a Sim will prevent the Gradual Growth module from automatically changing the Sim’s height until/unless set_height or set_height_stat is used on them
Setting the bulge slider may have a temporary visual effect, but it should stop if you exit/load or go to the World Map temporarily. Since the Bulge stat is restricted to Male sims, Teen through Adult, only those Sims should still have bulges when you get back – and only if they’re wearing working clothing.
There are 3 ways to edit Sim heights in the mod: in CAS, via Pie Menu interaction, or precisely via commands (see in spoiler above):
CAS Hotspots:
(For premade sims, these are the only things in the mod that should require ‘testingcheats on’, followed by ‘cas.fulleditmode’, then Shift-Click -> CAS Modify, or ‘Edit Household in CAS’ in MCCC -> CAS)
I’ve added a remake of CmarNYC’s hotspots that I made via TS4 MorphMaker in Height Slider Hotspots.package. It should make it so that dragging a sim’s foot in CAS up or down should make their height go in the direction you dragged (via the “height” slider), for any age other than Baby.
I’ve also added a remake of Wihi’s Hand Hotspot – an optional Hotspot for the Hand slider, by dragging vertically on the upper arm/bicep. Should still be compatible with (and complement) Luumia’s Hand Sliders.
Height Pie Menu:
The Pie Menu that Tedw promised has been added! It requires XMLInjector, and can be found by Shift+Clicking on any Sim!
Gradual Growth
The Height Slider Growth.package will make your Child and Teen sims grow taller day by day as they age!
The Gradual Growth update will run however often you configure, or daily at 1am by default
Will randomize the height of any Sim with a default height (defined as a Sim with no custom slider settings from this mod) *see RandomizeHeights in the Config section to configure this
Uses a hidden HeightStat to determine the Sim’s height relative to the average for their age group
On the Gradual Growth update, sets Child / Teen sim height (chs/ths) based on their HeightStat and their percentage of progress towards the next Age Up
(In the future I’d love to make this work for Infants and Toddlers as well, but I’ll need someone to provide me with versions of the BonePoses found in Height Slider Growth.package for those ages, as I am a Programmer and do not understand such magicks!)
Configuration
I’ve added configuration via a JSON file named MycroftJr_HeightSliders.cfg . Be careful not to break the validity of the JSON when editing it manually, but the mod should either fix your errors or warn you with a pop-up when a save loads.
The config file should be generated/fixed up when a save is loaded with the mod enabled, and only reloaded (for now) when the game starts.
As before, removing a .package will stop it from running, but prefer these config options over removing Tall.package or Short.package entirely.
Default values in the config are ones that don’t need to be present in the config file to have their effect, so feel free to remove those lines.
As with any JSON, spaces don’t matter outside of quotes, and letters are only valid inside quotes, except for the values true and false.
config values:
FormatOnNextLoad: default: false. When true, will be removed from the config on next mod load and the config will be re-formatted.
FillInDefaultsOnNextLoad: default: false. When true, will become false on next mod load and copy ALL the default values into your config.
MigrateAllSlidersOnLoad: default: true. Whether to perform migrate_all_sliders when a save is loaded, moving all slider data from this mod to the correct locations for all Sims.
RandomizeHeights: a map from AGE to boolean (true/false). The defaults are true for each key, so use i.e. “ADULT”: false, for custom behavior. Controls whether the given AGE group will have their heights first-time randomized at Gradual Growth time. Observed by rhall and the Gradual Growth update; ignored by ‘randomize_sim_height’ and the Pie Menu.
RandomHeightRanges: a map from AGE to [min height, max height]. The defaults for each are [-100, 100]. If changed, randomly generated heights will be remapped to the given range before being applied.
PieMenuUseRandomHeightRanges: default: true. Whether to use the RandomHeightRanges when changing sim height via the Pie Menu.
GrowthEnabled: a map from AGE to boolean (true/false). The default for each is true. Controls whether sims of the given AGE group will grow at Gradual Growth time. Adding keys other than CHILD or TEEN will have no effect, as the math is not present for their gradual growth. NOTE: to disable the mod from changing heights at all for the given AGE group, you must also set RandomizeHeights to false for that age group.
valid AGEs are:
“BABY”
“INFANT”
“TODDLER”
“CHILD”
“TEEN”
“YOUNGADULT” <- ONE WORD
“ADULT”
“ELDER”
The following config values determine the timing of the Gradual Growth height update. Time is only counted while the game is not paused.
Valid time labels are:
“seconds”
“minutes”
“hours”
“days”
“weeks”
The labels are in game/sim time by default. You can add real_ at the beginning of any time label to make it real time instead. (ex. “real_seconds”)
So the final config options:
GrowthStart: a list of [amount, time label] tuples. Each tuple is added up to determine the time of the first Gradual Growth update after game load. So for example, [[1, “hours”], [33, “minutes”], [7, “seconds”]] would be 1 hour, 33 minutes and 7 seconds. The default is the empty list, so only remove all the lines inside the { } if you really mean 0 seconds.
GrowthStartAbsolute: default true. If true, GrowthStart is applied from the beginning of a sim day (e.x. so the starting value [[1, “hours”]] means 1am, [[17, “hours”]] would mean 17:00 aka. 5pm, etc). If false, GrowthStart is applied from when the zone loads (so with “GrowthStartAbsolute”: false, “GrowthStart”: [[1, “minutes”]], which I like to use for testing, makes the first Gradual Growth update happen 1 sim-minute after the zone loads).
GrowthFrequency: a list of [amount, time label] tuples. Each tuple is added up to determine how often Gradual Growth updates are run. So for example, the starting value of [[1, “days”]] means the Gradual Growth update happens daily. [[2, “weeks”]] would mean it happens every 2 weeks. The default is the empty list, so do not remove all lines inside the { }, lest the Gradual Growth update happen constantly.
The slider names should no longer be case-sensitive.
add_slider was renamed to set_slider.
There should no longer be any errors from removing any .packages you don’t want the features of.
The HeightVariance trait was renamed to HeightRandomized for clarity.
Gradual Growth should no longer double-up on sliders (it used to keep the “height” slider set to HeightStat while also adjusting the chs/ths sliders. Since they now both use the HeightStat in their calculations, I hope that’s no longer necessary.
A lot of code was refactored.
The hand sliders are now enabled for Females.
Technical details:
The commented python source code can be found in the .ts4script!
See CREDITS.txt in the zip for my best reconstruction of everyone who worked on this mod.
All sliders are 0.0 to 1.0 under the hood. The script keeps track of what should be negative and converts/scales all input/output before it reaches the user.
The HeightRandomized trait will be added by set_slider & set_slider_all in addition to the commands from HeightModule.py that set the HeightStat. This is so that customized Sims will not be changed by the Gradual Growth module until you give the go-ahead with set_height or set_height_stat.
Gradual Growth will use an existing “height” slider value as the HeightStat in place of first-time randomizing height, so your YA+ Sims customized via this mod will not be effected by it, and your Child / Teen Sims will have it used as the basis of their growth.
The visual changes won’t apply without the corresponding package, but the slider data is saved in a way that should make it persist through the removal of the mod. You’ll need to clear that data yourself by setting all sliders to 0.
Technical issues:
The bulge slider is having some issues – it gives a nice, round result for ymBottom_EF01SwimShortsBoard, but gives a “spike” for ymBottom_UnderwearSexy and ymBottom_EF01SwimBriefs, and doesn’t work at all on the remaining clothes it was supposed to work on (ymBottom_EF01SwimTrunks, ymBottom_EF02ShortsBoxerValentine, ymBottom_GP02SwimMid, ymBottom_GP02SwimShort, ymBottom_SP02SwimMidTrunk). If somebody could help fix that, that would be great.
The Gradual Growth math needs some work so that sims will have a minimal “growth spurt” change in visible height when aging up. This should already be working for Teens, but I’m struggling to measure the sliders for the other cases.
The chs/ths sliders should maybe be moved out of “Height Slider Growth.package” so they can be used without the Gradual Growth effect? Thoughts?
Integration
Lastly, the mod is pending explicit permission to incorporate various slider upgrades posted in the thread. If you’d like your slider upgrades incorporated into the mod from now on, please let me know!
Error Reporting
Please let me know if you experience any errors or if anything isn’t working the way you think it should! Please share any related MCCC/BetterExceptions .html files, your MycroftJr_HeightSliders.cfg file, and the generated MycroftJr_HeightSliders.log file (the latter 2 should both be in the same folder as the ts4script).
Have fun, and please support me at my profile links if you can! (Published on: 2023-07-06 12:00:00)