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)...
Post by senorpengwin on Mar 18, 2020 19:19:42 GMT -5
Is there a library to better understand the pre-made functions and the options you have inside them? I created a small mod to tank a players commodities but I want to make some adjustments. This is the code for the mod:
But I don't want to fully tank all commodities, I want to do maybe a percentage of a specific commodity. So I searched for "debug_set_all_to_min" and found the code for this function:
def debug_set_all_to_min(self, core=True): for stat_type in list(self._statistics): if core: if self.get_statistic(stat_type).core: self.set_value(stat_type, stat_type.min_value) self.set_value(stat_type, stat_type.min_value)
So I see there are things in here like "stat_type", "set_value", "min_value", etc. I want to know what options I have inside the functions, can I say something like:
Or something like that? Shouldn't there be a library with what your options are?
Post by stripednoodles on Mar 27, 2020 15:33:19 GMT -5
Hi all, i am on a mac using pycharm 2019.3.4 and i cant get past the decopile. Are there packages I need to install for the syntax to be correct? In unpyc3.py, the errors that seem to mess up the rest of the file are:
1.from unpyc3 import decompile -both unpyc3 and decopile are unresolved references -when I tried to import unpyc3 first it said there was no such module
2. from __future__ import annotations -could not find annotations in file __future__.py -i tried installing the annotations package and the error still occurred
This is the only file with errors. I was on stackexchange and they mentioned that unpyc3 is only compatible for python 3.3. Can someone please help.
Here is the error message that occurs when I run decompile
/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 "/Users/jessicawood/Downloads/Sims 4 Python Script Workspace/decompile_all.py" Traceback (most recent call last): File "/Users/jessicawood/Downloads/Sims 4 Python Script Workspace/decompile_all.py", line 1, in <module> from Utilities import extract_folder File "/Users/jessicawood/Downloads/Sims 4 Python Script Workspace/Utilities/__init__.py", line 6, in <module> from Utilities.unpyc3 import decompile File "/Users/jessicawood/Downloads/Sims 4 Python Script Workspace/Utilities/unpyc3.py", line 373 self.flags: CodeFlags = CodeFlags(code_obj.co_flags) ^ SyntaxError: invalid syntax
Quick question: Will this tutorial work with the latest version of python 3.8.2? Or will it only work with Python 3.7.0?
Sims 4 only works with 3.7.0.
Creator Musings is a Sims 4 modder, poser/animator, and CC creator hangout server (though everyone is allowed) with a tutorial/resource directory, help channels, and mod/cc/sims 4 news channels! Twitter | Tumblr | Patreon
line 1, in <module> from Utilities import compile_module ModuleNotFoundError: No module named 'Utilities' The Utilities folder is there under the downloaded file structure. Sims 4 Python Script Workspace (3.7) > Sims 4 Python Script Workspace > Utilities
Any Idea why this would not be reading the Utilities folder?
; EDIT: I got the compile.py to work by moving the Utilities Folder and the Settings.py to the My Script Mods folder > 'MY MOD' folder along side the compile.py.
Hi, I have been getting the same message and followed your instructions but I keep getting the same error. Did you create the 'MY MOD' folder?
If you are having problems seeing the CAPTCHA, please clear your browser's cache and cookies and ensure that you do not have any browser addons or extensions that interfere with the display of the CAPTCHA. Then, close the CAPTCHA window and click on the register button to open the CAPTCHA again.