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 2017 at 6:19 PM Last edited by BroTeamLight : 8th Jan 2017 at 2:32 PM. Reason: Insert Version 2 With Sims 4 Python Files Automatic Decompile With Subfolders
Default Python Recursive decompiler (For Sims Python Files Or Others)
Hi Guys! I'm new! I'm BroTeam Light, i'm european and i love coding! I'm trying to enter in this world of "The sims mod" but i have to admit, is very difficult! I've Created for me an Automatic decompiler of .pyo files in Python. It uses the Recursive Scan so you can decompile what you need and what you want. If you want to decompile all python files of The Sims You Can, with subfolders. You want decompile an existing mod, you can. it uses unpyc3.py, so thanks to the developer who did this.


INSTRUCTIONS FOR SCAN A DIR (SUBFOLDERS INCLUDED) FOR .pyo FILES AND DECOMPILE
1. Open the "Decompiler.py" with an editor
2. Change the "PATH_DIR" with the link to folder (Recommended root folder) where the files are located
3. Run "python Decompiler.py" - The decompiled files will be in a new folder called "decompiled"


INSTRUCTION FOR DECOMPILE THE SIMS 4 PYTHON FILES - AUTOMATIC MODE
1. Run "python automatic_dec_ts.py" and follow the instructions! That's all! (The program ask you to insert the path of The sims 4 and the destination path)
2. Once decompiled, the files that remains with extension ".pyo" are not good for decompile process


INSTRUCTION FOR DECOMPILE AN EXISTING MOD
1. Explore all files of mod
2. If there is a file with extension ".ts4script", rename it with extension ".zip" - If the file is already ".zip", leave it ".zip".
4. Extract the zip in a folder and delete the zip (You don't need anymore)
5. Extract My Python Script (Decompiler_Recursive.zip) and put the files .py where you have extract the previous files
6. Open the "Decompiler.py" with an editor and change the "PATH_DIR" with "./"
7. Run "python Decompiler.py" - The decompiled files will be in a new folder called "decompiled"


Sorry for my bad english.
Thanks all of you and i hope you like it!
Attached files:
File Type: zip  Recursive_Decompiler_v2.zip (15.2 KB, 866 downloads) - View custom content
5 users say thanks for this. (Who?)
Advertisement
Test Subject
#2 Old 14th Jan 2017 at 11:47 AM Last edited by RomanIt : 14th Jan 2017 at 5:03 PM.
Many very big thank you for this script is very useful, I have a very English with not much: D. I am Russian, and this Google translator.non-working the script after the mod is not working. but nepoluchaetsya completely decompile, videmo he feels bad that it make, since I cant create a script changed, the game freezes. even if just for py file in, and then back into pyo
Test Subject
Original Poster
#3 Old 17th Jan 2017 at 3:21 PM
Hi Romanit, when you decompile a mod, if the mod (in zip or ts4script ext) has a folder inside, you have to recompile .py in .pyo and put back in folder. then you zip all files with folder included. if the mod hasn't a folder inside .zip, compile .py and put it in .zip without create folder. For me works. but if you can tell me more, i will appreciate. Try to write to traslator more words and what come out i'll try to understand.
Test Subject
#4 Old 23rd Jan 2017 at 9:47 AM Last edited by RomanIt : 23rd Jan 2017 at 9:59 AM.
Quote: Originally posted by BroTeamLight
Hi Romanit, when you decompile a mod, if the mod (in zip or ts4script ext) has a folder inside, you have to recompile .py in .pyo and put back in folder. then you zip all files with folder included. if the mod hasn't a folder inside .zip, compile .py and put it in .zip without create folder. For me works. but if you can tell me more, i will appreciate. Try to write to traslator more words and what come out i'll try to understand.


Thank you for having responded to my post . For example, I try to unpack the same mc center comander of Deaderpool, decompile, and then gather the unchanged even in .py files from .pyo and departures occur or games or events will not start, or the game, or just hang game or the characters move. .pyo ready to have a different weight in megabytes unlike the originals. Pyo is collected in this file PythonOptimizeCompile.bat.Would you like to try to rebuild yourself some realties complex scripting events
Below is the same thing only in Russian.

Спасибо за то что ответили на моё сообщение . Например, я пробую распаковать тот же mc center comander от Deaderpool , декомпилировать , а потом собрать неизменные даже файлы из .py в .pyo и происходят либо вылеты игры либо мод не запускается или игра , либо просто зависает игра или не двигаются персонажи . готовые .pyo имеют другой вес в мегабайтах в отличие от оригиналов . Собираю в pyo этим файлом PythonOptimizeCompile.bat . Не могли бы ли вы сами попробовать пересобрать какой нибуть сложный скриптовый мод
Lab Assistant
#5 Old 14th Oct 2021 at 3:41 PM
Quote: Originally posted by BroTeamLight
6. Open the "Decompiler.py" with an editor and change the "PATH_DIR" with "./"


how can i do it?

как мне это сделать?
Back to top