This is the ultimate loading guide to how the game loads your script files. I sat down and tested numerous different combinations of trial and error in figuring out the loader. Here’s what I discovered:
The top-level mods folder is meant only for packaged mods that end in
zip. If any folders are in this they are presumed to be a mod folder for extra organization, if any files are in this they are completely ignored.
Scripts folder mentioned below is treated like normal mod folder here. Thus
Scripts/Scripts would still work but
Scripts would not.
In this part we’re going to cover adding custom interactions to existing objects.
By now I assume your up-to-speed on how to mod for the Sims 4 using python scripting which I already covered in part 1 & part 2. If you’re new to all of this I really recommend starting in part 1 and progressing through each part in order. At the very least the first 2 parts.
By this point I assume you know the basics, up until now that’s what we’ve been covering and we’ve been taking things really slowly because both of us are new to…
Currently, the only known way at this time to debug is by using PyCharm Pro. Back in Jul 28 of this year, Sigma1202 discovered that PyCharm pro has a package that can be given to running code to add debugging capability and Sigma1202 worked out how to make that happen for The Sims 4.
This is a link to Sigma1202’s video which explains the process.
If you’re not using my boilerplate template then the link above should be easy to follow but an exciting update I made to the boilerplate template is I added the ability to automate most of…
This is the tutorial for the project template I made which lays out the new project groundwork for you and comes with scripting to automate much of the modding process.
I’m using Windows, but this ~ should ~ be cross-platform compatible. Please let me know if it’s not either by leaving a comment on here or by filing an issue at the issue tracker here.
Since I’ve written this article, many major updates have taken place and it will be continued to be updated into the future but I felt enough updates have happened that it warranted re-writing this tutorial.
This is going to be a much easier and shorter tutorial and a bit more fun. You’re going to learn how to extend an in-game list. Extending a list is much safer because it’s often the least likely to conflict with other mods because we’re not replacing anything yet can add additional options or functionality to the entire game.
As briefly mentioned in part 4, there’s an official list of words/strings considered to be “true” and another list for “false”. These 2 lists are used in any command that takes a yes or no / true or false argument. Most…
What we’re going to do is replace another piece of code to get more practice at it and we’re going to step it up a small bit to make thing just a tiny bit more challenging.
This tutorial was fairly difficult to make happen because it took a long time to track down the needed code and then go through the many road blocks that happened. I’d say it took me close to three days to get to this point and quite a bit of frustration, just remember patience and practice is key to mastering Sims 4 python scripting.
Python has the ability to replace code with other code. This is an important and often easy skill that is frequently overlooked. It allows you to alter existing code in a way that wouldn’t be possible without replacing it which comes in handy with modding. This tutorial shows you how to do exactly that.
It’s worth noting that anytime you make a mod that replaces code with other code you need to tell players who download your mod about that. Replacing code means 2 mods cannot replace the same code without creating issues so players need to know this. …
In this part we’re going to create a mod that prints Hello World to the console. This gets you familiar with the process of writing the code and converting it into a mod that can run inside the game. It also familiarizes you with the Sims 4 python library that we decompiled in part 1 and I briefly talked about.
This part assumes you have finished part 1, if not, you need to read through and go through part 1.
Let’s make the overly common “Hello World” program which is only 6 lines. …
I’ve been programming for many years but I’m very new to Sims 4 modding and was ashamed and baffled by the state of Sims 4 scripting tutorials online. Most tutorials are from 2014–2018 and are terribly written and put together using bad teaching practices and are very much out of date. Explanations were also very lacking. You can’t just be told what to do, you obviously want to be a great modder and to do that you have to understand what you’re doing.
The tutorials are so bad that for the past 6 years all people have been talking about…
I just love creating art, taking photographs, programming, and teaching new skills to people.