Get Started Modding for The Sims 4 - ColonolNutty/Sims4CommunityLibrary GitHub Wiki
Python (ts4scripts):
All of the tools and installation instructions you will need to know for getting setup with Python can be found from here:
!!DO NOT USE THE PROJECT SETUP FILES PROVIDED AT THIS LINK, PLEASE USE THE TEMPLATE LISTED AT THE BOTTOM OF THIS TUTORIAL INSTEAD!! Getting Started with Python Scripting
If the link above does not work, these are the Tools you will need:
- Python 3.7
- Sims 4 uses Python 3.7 specifically
- Download and install Python into a folder you will remember, with no spaces in the entire path
- example path:
C:\Python37\
- example path:
- PyCharm (Community Edition)
- Any version will work, even the latest!
- Git
- This will be used for cloning GitHub repositories
- Alternative to Git, you can download the source files from the latest release.
Package Files:
Tools you will need:
- Sims 4 Studio
- Download the version that matches your operating system.
How to use Sims 4 Studio:
- Open The Sims 4 Studio and enter a Creator Name in the bottom corner.
Create an empty package file:
- Open the Tools menu at the top
- Click the
Create Empty Package
option
Import vanilla Sims 4 Tuning files into your package file:
- Open the Tools menu at the top
- Click the
Extract Tuning
option, wait for it to load. - Locate the Tuning file you wish to import by name. Hint: Tuning file types are determined by the folder they are in i.e. Interaction tuning files are in
interaction/
- Click the
Add to current package
button.
Edit vanilla Tuning files
- To edit a vanilla tuning file, follow the steps above to import the tuning file you wish to edit.
- Open the file by clicking it in the left window. You should now see the xml of the file, or the Data in a pretty format
- If you do not see the xml, switch to the XML tab
- Make the changes you want to make (See the Custom Interactions tutorial in this wiki for more info on editing interactions.)
Creating your own Tuning files
- In order to create your own tuning files, it is a good idea to import one of the vanilla tuning files to work with.
- Once you do this, you will need a unique Hexidecimal Identifier.
- To get a unique hexidecimal identifier
- Open the Tools menu at the top
- Click the
Hash Generator
option. - Enter the name of your tuning file (with no spaces, use underscores instead) into the
Text
box underHash Text
- At this point, you should see a unique
FNV64
identifier for your tuning file. (It is generated based on the text, entering the same text will result in the same identifier.
- Copy the
FNV64
value to the clipboard. - Back in your package file, right click the imported vanilla tuning file, click
Duplicate
- Enter the copied
FNV64
value into theInstance
field. Leave theGroup
field alone.
- You should now have a duplicate tuning file with the
Instance
identifier set to yours. You may now delete the original tuning file.
- Back in the Hash Generator, at the bottom, switch the Mode to Decimal.
- Copy the
FNV64
value (It should contain only numbers, no letters) - Go back to your package file once more.
- Click on your created tuning file to open it.
- Navigate to the XML tab on the right.
- At the top of your tuning file, replace the
s
attribute of theI
element with the copiedFNV64
value- Example tuning file:
<I c="..." i="interaction" m="..." n="..." s="203208">
- Example tuning file:
- Once that is complete, you have created your very own unique tuning file.
How do you Create a Mod Using The Sims 4 Community Library (S4CL)?
- Create a repository based off of the Template Project by pulling the Template down to your Machine and pushing the code to a new repository.
- Use the green button in the top right The Main Page to download this project as a zip file.
- In your project, create another directory called
Libraries
(If it does not exist already) - Within the
Libraries
folder, create one more directory calledS4CL
(If it does not exist already). - Open the downloaded project and copy the
Scripts/sims4communitylib
folder into theLibraries/S4CL
folder we created in the previous step. The folder structure should then be:<Your Project>/Libraries/S4CL/sims4communitylib
- Right click the
S4CL
folder -> Mark Directory as -> Sources Root- The
S4CL
folder should turn a blue color and thesims4communitylib
folder should look like a folder with a dot (In other words, it should NOT be blue).
- The
- Your folder structure should look like this:
<Your Project>/Libraries/S4CL/sims4communitylib
at this point. - Ensure you list in the description of your mod a link to the github releases (You may even link a specific release to ensure compatibility.)
- Ensure you properly attribute S4CL and its author according to the license located at the bottom of the S4CL readme.
- YOU DO NOT HAVE MY PERMISSION TO BUNDLE S4CL INTO YOUR OWN MOD. So don't do it. Redirect the users of your mod to the github repository or releases pages instead.