|
Post by fufu508 on Sept 22, 2019 13:30:26 GMT -5
Hi @nickette, I'm not sure what your ultimate goal is, but if it's just to make sure .pyc files (not .py files) are distributed in your mod, that will happen automatically when you use compile.py in PyCharm create your .ts4script file. If you make a copy of your newly created .ts4script (or someone else's) and rename that copy to end in .zip, you'll find that Windows Explorer will open it and you'll find .pyc files inside.
From Andrew's post at the top of this thread:
|
|
|
Post by KiaraSims4Mods on Sept 27, 2019 10:47:25 GMT -5
Awesome! Right now in my grad class, we are using Python in the Programming course.
|
|
h3i
New Member
Posts: 2
|
Post by h3i on Nov 4, 2019 13:42:02 GMT -5
Hey Gurus,
Ups, lost like 5 hours trying to start modding the old way with the unpyc37.py and then i discovered this thread and it worked in minutes... Thanks a lot guys.
I need to get information about sim's body parts location (like joints) on the 2D/3D image to output them to a text file. I guess they would be like mesh points but i dont know i supose there is a structure with that info at least for the movements. Anyone knows a which files/modules should i search for?
Once again thanks a lot.
Keep up the good work. Cheers
|
|
|
Post by sigma1202 on Nov 5, 2019 2:07:07 GMT -5
Hey Gurus, Ups, lost like 5 hours trying to start modding the old way with the unpyc37.py and then i discovered this thread and it worked in minutes... Thanks a lot guys. I need to get information about sim's body parts location (like joints) on the 2D/3D image to output them to a text file. I guess they would be like mesh points but i dont know i supose there is a structure with that info at least for the movements. Anyone knows a which files/modules should i search for? Once again thanks a lot. Keep up the good work. Cheers You want to find the location and rotation of the sims bones, relative to the worlds coordinates? I have noooo idea what you would need this for, but it's probably hard-coded in the c++ engine, the only way to get it would be by reverse engineering it with a disassembler
|
|
h3i
New Member
Posts: 2
|
Post by h3i on Nov 5, 2019 10:37:18 GMT -5
Hey Gurus, Ups, lost like 5 hours trying to start modding the old way with the unpyc37.py and then i discovered this thread and it worked in minutes... Thanks a lot guys. I need to get information about sim's body parts location (like joints) on the 2D/3D image to output them to a text file. I guess they would be like mesh points but i dont know i supose there is a structure with that info at least for the movements. Anyone knows a which files/modules should i search for? Once again thanks a lot. Keep up the good work. Cheers You want to find the location and rotation of the sims bones, relative to the worlds coordinates? I have noooo idea what you would need this for, but it's probably hard-coded in the c++ engine, the only way to get it would be by reverse engineering it with a disassembler Thanks for the reply! I suspected it wouldn't be easy. I'll keep looking.
|
|
|
Post by MizoreYukii on Nov 9, 2019 17:50:09 GMT -5
So I know this isn't entirely relevant for most casual scripters, but I just experienced some issues while trying to install FNVhash. Python wasn't installed correctly because I wasn't aware I needed to select "Add Python 3.7' to PATH" during the initial installation, so nothing was working and after investigating found that reason. If you can, I'd really recommend just adding a small note, or link Python installation tutorials, that lets people know this should be selected when installing (if they want to add more features, etc.).
|
|
jalex
New Member
Posts: 9
|
Post by jalex on Nov 14, 2019 17:31:43 GMT -5
Could someone help e fix this. I can't decompile. Here's what it looks like. I'm a mac user on Mojave.
from Utilities import extract_folder from settings import *
ea_folder = 'EA' if not os.path.exists(ea_folder): os.mkdir(ea_folder)
gameplay_folder_data = os.path.join(game_folder, 'Data', 'Simulation', 'Gameplay') gameplay_folder_game = os.path.join(game_folder, 'Python')
extract_folder(ea_folder,gameplay_folder_data) extract_folder(ea_folder,gameplay_folder_game)
ERRORS below
/usr/local/bin/python3.8 "/Users/joykennedy/Documents/Electronic Arts/The Sims 4/Mods/Project Folder/Sims 4 Python Script Workspace/decompile_all.py" Traceback (most recent call last): File "/Users/joykennedy/Documents/Electronic Arts/The Sims 4/Mods/Project Folder/Sims 4 Python Script Workspace/decompile_all.py", line 1, in <module> from Utilities import extract_folder File "/Users/joykennedy/Documents/Electronic Arts/The Sims 4/Mods/Project Folder/Sims 4 Python Script Workspace/Utilities/__init__.py", line 6, in <module> from Utilities.unpyc3 import decompile File "/Users/joykennedy/Documents/Electronic Arts/The Sims 4/Mods/Project Folder/Sims 4 Python Script Workspace/Utilities/unpyc3.py", line 65, in <module> SETUP_LOOP, BREAK_LOOP, CONTINUE_LOOP, NameError: name 'SETUP_LOOP' is not defined
Process finished with exit code 1
|
|
|
Post by mafiasimer on Dec 10, 2019 1:15:37 GMT -5
I have a Problem with pycharm .... Now when i Run decompile_all.py the Console message
C:\Users\Me\AppData\Local\Programs\Python\Python38-32\python.exe "C:/Sims 4 Python Script Workspace/decompile_all.py" Traceback (most recent call last): File "C:/Sims 4 Python Script Workspace/decompile_all.py", line 1, in <module> from Utilities import extract_folder File "C:\Sims 4 Python Script Workspace\Utilities\__init__.py", line 6, in <module> from Utilities.unpyc3 import decompile File "C:\Sims 4 Python Script Workspace\Utilities\unpyc3.py", line 77, in <module> SETUP_LOOP, BREAK_LOOP, CONTINUE_LOOP, NameError: name 'SETUP_LOOP' is not defined
Process finished with exit code 1 Any help on that ?
|
|
|
Post by mafiasimer on Dec 10, 2019 2:49:45 GMT -5
When i Run Decompile_all.py i get this message below
Traceback (most recent call last): File "C:/project folder/Sims 4 Python Script Workspace/decompile_all.py", line 1, in <module> from Utilities import extract_folder File "C:\project folder\Sims 4 Python Script Workspace\Utilities\__init__.py", line 6, in <module> from Utilities.unpyc3 import decompile File "C:\project folder\Sims 4 Python Script Workspace\Utilities\unpyc3.py", line 77, in <module> SETUP_LOOP, BREAK_LOOP, CONTINUE_LOOP, NameError: name 'SETUP_LOOP' is not defined
Process finished with exit code 1
|
|
|
Post by mafiasimer on Dec 10, 2019 2:53:21 GMT -5
When i run Decompile _all.py i get this Message below.
Traceback (most recent call last): File "C:/project folder/Sims 4 Python Script Workspace/decompile_all.py", line 1, in <module> from Utilities import extract_folder File "C:\project folder\Sims 4 Python Script Workspace\Utilities\__init__.py", line 6, in <module> from Utilities.unpyc3 import decompile File "C:\project folder\Sims 4 Python Script Workspace\Utilities\unpyc3.py", line 77, in <module> SETUP_LOOP, BREAK_LOOP, CONTINUE_LOOP, NameError: name 'SETUP_LOOP' is not defined
Process finished with exit code 1
|
|
|
Post by mafiasimer on Dec 10, 2019 2:59:59 GMT -5
Help! when i run decompile_all.py i get this message Below Traceback (most recent call last): File "C:/project folder/Sims 4 Python Script Workspace/decompile_all.py", line 1, in <module> from Utilities import extract_folder File "C:\project folder\Sims 4 Python Script Workspace\Utilities\__init__.py", line 6, in <module> from Utilities.unpyc3 import decompile File "C:\project folder\Sims 4 Python Script Workspace\Utilities\unpyc3.py", line 77, in <module> SETUP_LOOP, BREAK_LOOP, CONTINUE_LOOP, NameError: name 'SETUP_LOOP' is not defined
Process finished with exit code 1
|
|
|
Post by mafiasimer on Dec 10, 2019 3:01:36 GMT -5
Help! when i run decompile_all.py i get this message Below
Traceback (most recent call last):
File "C:/project folder/Sims 4 Python Script Workspace/decompile_all.py", line 1, in <module>
from Utilities import extract_folder
File "C:\project folder\Sims 4 Python Script Workspace\Utilities\__init__.py", line 6, in <module>
from Utilities.unpyc3 import decompile
File "C:\project folder\Sims 4 Python Script Workspace\Utilities\unpyc3.py", line 77, in <module>
SETUP_LOOP, BREAK_LOOP, CONTINUE_LOOP,
NameError: name 'SETUP_LOOP' is not defined
Process finished with exit code 1
|
|
|
Post by toprapidity on Dec 19, 2019 2:29:44 GMT -5
You must use Python version 3.7 only. Otherwise, you won't run that decompile script normally. Help! when i run decompile_all.py i get this message Below Traceback (most recent call last): File "C:/project folder/Sims 4 Python Script Workspace/decompile_all.py", line 1, in <module> from Utilities import extract_folder File "C:\project folder\Sims 4 Python Script Workspace\Utilities\__init__.py", line 6, in <module> from Utilities.unpyc3 import decompile File "C:\project folder\Sims 4 Python Script Workspace\Utilities\unpyc3.py", line 77, in <module> SETUP_LOOP, BREAK_LOOP, CONTINUE_LOOP, NameError: name 'SETUP_LOOP' is not defined Process finished with exit code 1
|
|
|
Post by alisrabbo on Jan 1, 2020 6:23:02 GMT -5
Hi, I've followed the tutorial (with the mac adjustments by zembee) and when i run decompile it says "Process finished with exit code 0" but it doesnt show any log of decompiled files nor do the EA subfolders get any subfolders. Any ideas what I could be doing wrong?
|
|
spqr
New Member
Posts: 1
|
Post by spqr on Jan 2, 2020 0:10:50 GMT -5
Someone else asked here about module imports and got an answer that it's better to test in-game. That seems pretty painful, especially if you're doing something complex? Is there really no other way to run outside of the game? I get that the module imports are kind of strange (tbh, I really hate Python's package/module patterns... :( ), but it seems to me it should be possible?
FWIW, a number of the files in what seem to be Python's standard lib failed to decompile for me. Does this matter particularly? Did they make any enhancements to lib?
I also noted that unpyc3 has a more recent version on GitHub than the one linked here, but that one hung interminably on `argparse.py` (I'm using 3.7.0)...
|
|