Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Test Subject
Original Poster
#1 Old 7th Jan 2019 at 9:14 PM
Default Decompiling python files
Since it took me few hours of googling and looking at code to get these partially working im posting these in case it helps someone else. I will try to keep these thread up to date, if you find something wrong or have suggestion to change/add something please let me know bellow or PM me.

First of all according to these post around October 2018 The Sims 4 patch upgraded python version from 3.3.x to 3.7.x and tutorials on these forums do not mention that and tools i found are not updated. These "guide" is meant for versions after update, before update follow these guide

On a side note, as far as i know changes are only related to python version and file extension ( .pyo files have been renamed to .pyc)

You will need TheHologramMan’s decompiler batch file (fixed version will be attached in these post, original can be found here ) and Python 3.6+ (I recommend 3.7.x since it is newer and more similar to one as TS4 engine uses)

Steps to decompile .pyc files:
  1. Download script attached bellow
  2. Extract it from zip anywhere you want (For example on desktop)
  3. Right click and edit (or open with your favorite file editor like Sublime or VS Code)
  4. Find
    Code:
    @set SIMS4DIR=
    and edit path to fit your The Sims 4 root folder
  5. After that save and run batch file as administrator (in case pip needs to install package in program files folder)
  6. You will need to "Press any key" several times during the process until it finishes
As a note, not every script will be decompiled successfully, and process might hang on some of them (in that case press CTRL+C and when asked to terminate batch file, input N and press Enter)

After running decompile.bat your decompiled The Sims 4 python files should be located in C:\Temp

Edit: cant seem to attach file (even thru it is in attachments) - moderators, please help (i dont want to upload anywhere on external site)
Advertisement
Test Subject
#2 Old 16th Jan 2019 at 10:02 PM
Going to put this here for anyone that reads this and may be confused and/or stumped due to issues.

A wonderful user named scumbumbo has a modding tool that simplifies this entire nightmarish process and makes it much easier to access Python files. http://www.modthesims.info/showthread.php?t=620210

I don't mean for this to come off in a bad way, Negative - Your tutorial isn't in any way bad.
Back to top