Quick Reply
Search this Thread
Test Subject
Original Poster
#1 Old 17th Aug 2025 at 2:34 AM Last edited by jove_the_robot_wreck : 17th Aug 2025 at 3:09 AM.
Default Tips for debugging script mod
I'm trying to create a very basic script mod using an online tutorial but for some reason, nothing happens when I type in the cheats from the mod. I had some issues with the file initially being empty but I did fix it and it does look like it contain the proper pyc files. Admittedly, I couldn't check to see if the contents of the pyc files are correct, but that's mainly because it's pretty difficult to decompile them and I've tried a couple of different ways to do that without any results. The mod still isn't working though. I wasn't sure if maybe the compilation of the .py files was causing issues, so I did try manually compiling the python files, zipping them and renaming the zip file to a .ts4script file and while the game does recognize it it as a mod (it shows up in the popup naming all of the mods in game), still nothing is happening. I did see some discussions about how TS4 uses Python 3.7 instead of the latest version, does that mean I have to downgrade my local python version to get this to work? At this point, I'm not really sure what else to do or what else to try to get this to work. Does anyone have any tips for debugging and figuring out why this mod isn't working?

Edit: I did decide to download Python 3.7 but it's literally incompatible with the current version of macOS and I downloaded 3.8 instead, but again, the mod still isn't working. I am 100% out of ideas on how to fix this lol
Theorist
#2 Old 9th Oct 2025 at 8:29 PM
I use https://www.toolnb.com/tools-lang-en/pyc.html for decompiling pyc files, it works great. Just click on "point I choose" to find the pyc you want to decompile on your computer. That is all I can help with lol, I am pretty new to python myself.
Back to top