About This File
The Sims 4 Community Library
Overview:
An API, for The Sims 4, used to make creating/writing mods using Python much easier and more accessible. On its own it does only a few debug commands/interactions. Only install this API if you also have a mod installed that requires it! This mod is intended to always be backwards compatible, so it is recommended to always keep it up to date!
Game/Creator: The Sims 4 [EA]
Modder: ColonolNutty - Documentation - Github Wiki - Discord (Pre Release Builds Available There)
Language: English
Game Version: 1.108.349.1020 (Lovestruck) and above
Features:
A Short List Of Current Features (Not all utilities are listed here because they are waaay too numerous!):
For a complete list of features and utilities, check out the documentation at the top of this description!
- A vast library of Vanilla Tuning identifiers for easy retrieval (Enums)
- Logging
- Exception Handling
-
Custom Dialogs
- Choose Dialogs, Outfit Dialog, Purchase Dialogs, and more!
- Custom Notifications
- Custom Interactions
- Custom Icons
-
Event Handling (Creating, Dispatching, and Listening)
- Dispatching of Vanilla Events, such as Age Changes, Traits Added/Removed, Buffs Added/Removed, and more!
-
Miscellaneous Utilities
- Manipulate Sims, Objects,. the Weather, the Terrain, the UI, and many more!
- Manipulate Sim Voices, Households, Gender Options, Genders, Situation States, Object Repair States,
-
Test Framework
- Write and run tests (Can be run from within the game)
- There are a TON more features not listed here! You may see all utilities/classes available to you at the Documentation link at the top of this description!
Installation:
- Download the API using the links at the bottom of this description
- Unpack the archive using your favorite archiving tool.
- Drag the files and folders to your The Sims 4 directory. The files will be at `The Sims 4/Mods`. Overwrite All if asked!
-
Keep in mind the ts4script file MUST be either top level (Directly in the Mods/folder) or one folder deep (Mods/Blah/). Any deeper and it will not work.
The final paths for the files should be the following:
The Sims 4/Mods/sims4communitylib.package
The Sims 4/Mods/sims4communitylib.ts4script
FAQ:
-
Q: S4CL is throwing a ton of errors in my game! Can you fix it??
- A: S4CL can catch errors caused by other mods. It is extremely rare that S4CL itself is the one breaking.
-
Q: Is S4CL compatible with X???
- A: S4CL is compatible with ALL mods, it is intended to be an extension of The Sims 4 and not replace functionality of it.
-
Q: I don't want to use S4CL because it contains Adult Content!!
- A: S4CL does not contain any adult content whatsoever. It may be available on Sites that permit Adult Content, however it does contain any adult content itself.
Translations:
Usage (For Mod Authors):
A nifty tutorial has been created on the Github Wiki to help those wishing to either get into modding The Sims 4 or to begin utilizing S4CL, you may find it here
Change-Log:
The changelog is kept up to date and is located here
Edited by ColonolNutty
What's New in Version 1.79 See changelog
Released
- Fixed an issue with the order of command arguments when a command is used with quotations.
- Fixed an issue when setting certain Object States on objects.
- Fixed an issue when checking if an object has a state.
- Added more details when an interaction fails to queue or fails its tests.
- Added `CommonEnqueueResult` to be used as a replacement for `EnqueueResult` (and add more functionality to it too)
- Added new Game Object events
- Game Object Added To Inventory
- Game Object Added To Game Object Inventory
- Initialized
- Loaded
- Spawned
- Pre Deleted
- Pre Despawned
- Game Object Pre Removed From Inventory
- Game Object Pre Removed From Game Object Inventory
- Added new Sim events
- Game Object Added To Sim Inventory
- Game Object Pre Removed From Sim Inventory
- Added an alias to the `s4clib.add_object_to_inventory` command called `s4clib.addtosim`
- Added `exclude_values` arguments to many of the enums `get_all` functions.
- Added a function to create objects to `CommonObjectSpawnUtils`.
- Added arguments to specify target actor id and target joint bone name to `CommonVisualEffect`
- Updated the Visual Effect commands to allow specifying target joint bone names.
- Added a function to convert occult types into localized string ids.
- Added new enums `CommonFundType`, `CommonPuddleLiquid`, `CommonPuddleSize`, `CommonSkillEffectiveness`
- Added new strings, one for each occult type.
- `CommonConsoleCommand` can now handle float values.
- Updated the destroy object and schedule object for destruction functions of `CommonObjectSpawnUtils` to better handle objects located in the inventory of the a Sim or an Object. Instead of deleting the entire stack of the same object, they will now properly delete the single instances of the object we intended to destroy.
- The remove all occults function will now remove Ghost and Plant Sim occults.
- The add all occults function will no longer add Robot and Skeleton occult types.
- Moved many of the development centric code to its own script so as not to clutter the main script with it.
- Updated the type hints in `CommonSerializable` so the return types of sub functions is more accurate.
- Added a bunch of new values to `CommonPostureId`
- Added a command to enable all logs registered to S4CL `s4clib.enablealllogs` DO NOT USE THIS COMMAND LIGHTLY!
- Added a function to retrieve the block id in a specific zone.
- Added functions to return the id of the current room a Sim is in as well as whether or not two Sims are in the same room.
- Added a function to the pregnancy utils to determine the Sim that caused another Sim to become pregnant.
- Added a command to check which Sim got a Sim pregnant. `s4clib.print_pregnancy_partner`
- Added new utilities for retrieving the default and current walkstyles of a Sim.
- With version 1.79:
- Download