a skinblend for ym-em sims that reflects their true age!
base game compatible
1 swatch
thanks to the following creators whose skin details are included in this skin: heihu, simulation cowboy, rope, miiko, and tamo. links to each creator's cc used are on the download post on patreon!
i've been exploring modding as of late and wanted to show how i've been able to decompile sims 4's .pyc files for anybody else who's interested! i was struggling with other modders' resources for decompiling sims 4 files because they're out of date for python 3.13, but i have found a decent workaround!
some important info before we dive in:
this tutorial should work for mac and windows, but i have a mac so i'll be showing how i did this on mac. some steps may be different on windows, but any os-dependent differences will not be covered or noted in this tut.
you need python on your computer. i also will not be covering python installation.
our main holy grail for decompiling will be pycdc. i will cover how to install it, but i think it's worth mentioning that it won't decompile everything perfectly. from my research, it seems python is notorious for changing the format of compiled bytecode with each version, and it is quite the undertaking to keep decompilers up to date with python.
however, the resulting .py files are legible enough imo, but i think their legibility does come down to your skill level with python and\or willingness to research what you don't understand (and probably the project you're using it for lol). i'm not advanced in python by any means, but i've been programming for years atp and i use python very regularly for my degree, so some things may be super obvious to some people and foreign to others.
kinda silly, but in all of the pictures in this tut, i have redacted some info. it's my name, but i say that just so everybody knows i am NOT redacting anything necessary for this tut.
1. install pycdc:
we're going to open terminal and first run the command 'git clone https://github.com/zrax/pycdc', or install via brew install if homebrew is on your computer. if you do that exactly, there will now be a folder named 'pycdc' in /Users/yourprofile. we're now going to run 'cd pycdc' to change the working directory to /Users/yourprofile/pycdc, then we'll run 'mkdir build' to create an empty folder named 'build' inside the pycdc folder.
you won't receive any sort of confirmation that it worked, but you can either go into the pycdc folder in finder and see the build folder or try to cd into it if you want. don't close terminal yet, we'll come back to it and pick up from here.
2. build pycdc:
to complete this step, you'll need to download cmake to actually build the c++ code. once it's installed, we're going to run it, which should display a window like the one below.
we're going to tell cmake where the build files are by selecting 'browse source' and navigating to /Users/yourprofile/pycdc. we'll also want to tell cmake to build the binaries by selecting 'browse build' and navigating to /Users/yourprofile/pycdc/build. we'll then select 'generate', which will trigger the following window to open.
we're not changing anything here, so you can select 'done'. you'll see a bunch of output at the bottom of the cmake window that hopefully ends with 'configuring done' and 'generating done' if every step has been followed correctly up to this point. we can now close cmake.
we're going to go back to terminal real quick and run 'cd build' and then 'make', which should yield the below output. once again, don't close terminal, we're going to come back to it.
3. make copies of the .pyc files:
we're going to pivot to finder now. we don't want to modify the sims 4 contents at all, so make an empty folder somewhere on your laptop to copy the .pyc files to. i put mine on my desktop and named it sims_py, but do whatever is most convenient for you. i'll be referring to this folder as what i named it on my laptop.
then, navigate to the sims 4 app on your laptop (likely in a path like /Users/yourprofile/Applications/EA Games). control+click the sims 4 app and select 'show package contents' (it should be the second option on the dropdown). you should see one folder named 'contents'. open it, and you should see something like the following picture.
obviously, the folder named 'python' contains .pyc files, but they're compressed in a file named 'generated.zip'. make a copy of this .zip file in your sims_py folder. if you're on macos, make sure the copy's kind isn't 'alias', or else any changes made to it will change the original as well. the other place in 'contents' you'll find .pyc files compressed is Data/Simulation/Gameplay; all three .zip files in this folder are .pyc files.
once you copy all these .zip files over, you can go ahead and unzip them by double clicking. you can see below how i've organized my sims_py folder, which i think will be helpful for understanding the next step. each numbered folder contains the contents of one of the .zip files we copied. i'm forgetful, so i also made a text document for each folder to indicate where in the sims 4 app the .zip file was originally located, but that's optional.
4. decompile:
we're going back to terminal now. hopefully it's still open from step one, but if not, just run 'cd pycdc'. from here, we're going to run 'cd build' to navigate into the build folder. the next command is the exciting part:
for f in /pathtodir/*.pyc; do
./pycdc "$f" > "${f%.pyc}.py"
done
of course, replace pathtodir with the path to one of your sims_py subfolders containing .pyc files. for me, this looks like /Users/myprofile/Desktop/sims_py/3. make sure the folder at the end of this path actually contains .pyc files and that they aren't buried in a deeper subfolder, because pycdc doesn't traverse them. however, i would recommend manually looking in the subfolders in finder because most of them (if not all) also contain .pyc files.
you may or may not see output like mine below. like i said towards the beginning of this, pycdc can't decompile everything, so you'll probably see a lot of output that looks like warnings or errors, but if you go to the directory that you replaced path to dir, you should see .py files now.
when i go to the folder named 3 in sims_py, all of the .pyc files from core.zip now have .py counterparts. like i mentioned earlier, many of these folders have subfolders with .pyc files, including this one, so we'll have to run that command for every subfolder. path to dir will be /Users/myprofile/Desktop/sims_py/3/google when i run it next. this google subfolder contains more subfolders with .pyc files, so we'll have to repeat that for each of those folders.
anyways, voila! you can now load these .py files in a python editor/ide of your choice (i use spyder, but you may not like the interface if you're newer to programming in general).
some notes:
if you keep getting an error in terminal that says 'no such file or directory', make sure you've typed the file path exactly as it's named. terminal is case sensitive (pearl ≠ Pearl). additionally, any file or directory names with spaces need quotation marks. for example, a file named pearl sims.py needs to be referenced as 'pearl sims.py'.
i suspect the .dylib files in 'Sims 4.app'/Contents/Frameworks also contain some valuable info, but i'm not sure how to get that info yet lol nor do i currently need it so that may be a future project.
if this tutorial was not helpful or confusing in places let me know and i'll try to clarify or make a video demonstration.
if you found this helpful at all, don't be shy, follow me 😏 i also am creating some stuff on patreon so don't be afraid to check that out!
hi, i made a little executable file that clears your sims 4 cache files for you. it's a dependency for another project i'm working on, but i thought some people might find the cache clearing part useful on its own! download and more info is on patreon. send me a message if there are any questions or concerns 💋
thanks to the following creators whose skin details are included in this skin: heihu, simulation cowboy, rope, miiko, and tamo. links to each creator's cc used are on the download post on patreon!