Real-Time Body Physics (RTBP) by CPVC
Version 0.4-p4 - 2022-08-10
Disclaimer
Play with this at your own risk. I recommend you back up your save files or start a new throw-away game before trying it. I am not liable for any damage this mod does to your computer.
If your firewall complains about The Sims 4 attempting to listen on port 8008 (BOOB) or 8009 (BOOB+1), that's just the command and simulation servers for the mod.
Installation
Move "d3d9.dll", and "RTBP" to your Sims 4 installation directory + "Game/Bin/". It should be in the same directory as "TS4_x64.exe". Currently, this mod only works with the 64 bit version of The Sims 4.
Copy the folder "RTBP Mod" to your documents + "Electronic Arts/The Sims 4/Mods/".
To use ReShade with RTBP, rename the ReShade "d3d9.dll" DLL to "reshade.dll" and place it in the same directory as "TS4_x64.exe".
Settings
The settings file "RTBP/Settings.ini" can be modified to change the behavior of the mod.
The section "rtbp.general" is for general settings of the mod, like if you want to start the debug command server or if you want to enable/disable breast and butt physics.
The section "rtbp.leftBreast" sets the variables that control the spring physics of the left breast. If you don't know what these variables do, please read the next section "Simulation Variables".
I think the rest is self-explanatory.
Simulation Variables
RTBP is based off spring physics. The following variables can be modified through the "RTBP/Settings.ini" file or by sending commands directly to RTBP in-game.
- Mass is how heavy the body part is. How resistant it is to its position changing. Higher values will make the targeted body parts heavier in the simulation.
- Damping is how fast the bouncing stops. Kinda like friction on the spring. Higher values make the bouncing stop quicker.
- The springK constant defines the spring characteristics of the simulation. Basically how elastic the spring is and how it will respond when force acts upon it. Google "Hooke's Law" for more information. Higher values will make the spring act more springy. "For every action, there is an equal and opposite reaction."
- (min|max)(X|Y|Z) defines how far the body part is allowed to get away from its intended position. Basically, how far the spring can stretch before it won't stretch anymore, in three dimensions.
- Power is is the multiplier for the force that acts on the simulations. At "1.0" the force is unchanged. "2.0" is double, "0.5" is half. I don't recommend playing with this one. I put it in for debugging purposes and will probably remove it in the future.
- Gravity is the gravity constant of the simulations, a constant downward force acting on the springs in meters per second. "9.80665" is the gravity of earth. RTBP assumes every sim is 1.7272 meters tall, or 5'8". Higher gravity levels will will make everything sag much more. I wouldn't play with this one either, unless you'd like to pretend your sims live on another planet or if they're training to fight Cell or something.
Commands
You can send commands to RTBP in-game. Start each command with "rtbp.command" then send your command enclosed in quotation marks. Note that this method only works in-game, so you won't be able to send commands in Create a Sim.
The following list of commands is automatically generated from the command "listCommands".
- dumpSimBuffers [DIRECTORY]: Saves the geometry of all known sim buffers in the Wavefront OBJ format to the directory [DIRECTORY]. These files can be imported into a 3D modeling program like Blender to examine them. Unless you know what you're doing, you won't ever need to execute this command.
- fireWalkWithMe: Do you want to walk with fire? (Don't execute this command.)
- forceQuit: (DEBUG COMMAND) Force the game to quit immediately.
- forceTest: When you really need to know whether RTBP is working or not.
- getDebugFlag [NAME]: (DEBUG COMMAND) Gets the value of a debug flag.
- getSpringValue [TARGET] [VARIABLE]: Prints the value of spring [TARGET], variable [VARIABLE].
- help [COMMAND_NAME]: Prints the help string associated with the specified command.
- iddqd: Enables God Mode.
- listAllSims: Lists all known sims.
- listCommands: Lists all registered commands.
- listDebugFlags: (DEBUG COMMAND) Lists all known debug flags and their values.
- listSimBuffers: Lists all known sim buffers and their debug information.
- listSims: *Currently unimplemented*
- listSimulatorTargets [TARGET_NAME](Optional): Lists all the simulator targets if no arguments are provided or the simulator target specified by [TARGET_NAME] if it exists.
- loadSettings [SETTINGS_FILE]: Loads the specified settings file and resets all the simulators.
- messageBox [TITLE] [MESSAGE]: Opens a message box with the title "[TITLE]" and message "[MESSAGE]".
- ping: Outputs the string "Pong!". No, really, that's all it does.
- printFPS: Prints the current frames per second of the Sims 4.
- printLog: Prints all lines of the log file.
- printMemory [ADDRESS] [TYPE]: (DEBUG COMMAND) Highly experimental. Don't touch unless you want to crash your game.
- printSettings: Prints all current settings.
- printTime: Prints the current time.
- reset: Instructs RTBP to reload the Settings.ini file and apply the settings found within to all active simulators.
- saveSettings: Creates a backup of the existing Settings.ini file then writes a new one using the current settings.
- setDamping [TARGET] [VALUE]: Sets the damping of body part [TARGET] to [VALUE].
- setDebugFlag [NAME] [VALUE]: (DEBUG COMMAND) Sets the value of a debug flag. You won't need to mess with this command unless CPVC asks you to.
- setEnabled [VALUE]: Enables/disables RTBP temporarily..
- setEnabledSpeeds [PAUSED] [NORMAL] [FAST] [FASTER]: Sets the speeds RTBP will simulate at. By default, RTBP only simulates at normal speed.
- setGeneralSetting [NAME] [VALUE]: Sets the value of one of the variables in the [rtbp.general] section. You may need to save the settings and restart the game to see the changes.
- setGravity [TARGET] [VALUE]: Sets the gravity of body part [TARGET] to [VALUE].
- setHalted [VALUE]: (DEBUG COMMAND) RTBP halts the Sims 4 while still handling commands. Useful if you want to halt the game and analyze its memory.
- setMass [TARGET] [VALUE]: Sets the mass of body part [TARGET] to [VALUE].
- setMaxLength [TARGET] [VALUE]: Sets the maximum length of body part [TARGET] to [VALUE].
- setMaxX [TARGET] [VALUE]: Sets the maximum distance a simulator can differ from its target location in the positive X axis.
- setMaxY [TARGET] [VALUE]: Sets the maximum distance a simulator can differ from its target location in the positive Y axis.
- setMaxZ [TARGET] [VALUE]: Sets the maximum distance a simulator can differ from its target location in the positive Z axis.
- setMinX [TARGET] [VALUE]: Sets the maximum distance a simulator can differ from its target location in the negative X axis.
- setMinY [TARGET] [VALUE]: Sets the maximum distance a simulator can differ from its target location in the negative Y axis.
- setMinZ [TARGET] [VALUE]: Sets the maximum distance a simulator can differ from its target location in the negative Z axis.
- setPower [TARGET] [VALUE]: Sets the power of body part [TARGET] to [VALUE].
- setSpringK [TARGET] [VALUE]: Sets the spring K of body part [TARGET] to [VALUE].
- setSpringValue [TARGET] [VARIABLE] [VALUE]: Sets the value of spring [TARGET], variable [VARIABLE], to [VALUE].
- showLogo: Shows the RTBP logo in the upper left of the screen again.
- test [AXIS]: Tests all simulators on the axis specifed. Valid values are 'x', 'y', and 'z'. If no axis is specified, 'y' is assumed.
- version: Prints the version of RTBP currently running.
Command Targets
This list is also automatically generated. What can I say? The less time I spend writing documentation, the more time I have to work on RTBP.
- dick: Targets male and female left and right dick
- rball: Targets male and female right balls
- rmbutt: Targets male right butt cheeks
- lmbutt: Targets male left butt cheeks
- rfbutt: Targets female right butt cheeks
- balls: Targets male and female left and right balls
- lfbutt: Targets female left butt cheeks
- rbreast: Targets male and female right breasts
- lball: Targets male and female left balls
- fbutt: Targets female left and right butt cheeks
- lbreast: Targets male and female left breasts
- mbutt: Targets male left and right butt cheeks
- breasts: Targets male and female left and right breasts
Postscript
Thank you for helping me develop RTBP through your bug reports, suggestions, and other feedback.