|
Post by sigma1202 on Jan 4, 2020 7:36:47 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)... No there is no way to do this you can reload the script without restarting the game though, it might save you a little time, make sure to download the latest version by Scumbumbo
|
|
|
Post by noobishdev on Feb 7, 2020 9:56:40 GMT -5
Can you show example of adding interaction in game ?
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Mar 16, 2020 9:16:12 GMT -5
Thank you so much for this! It worked wonderfully! Now to learn to navigate...
|
|
|
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:
@sims4.commands.Command('test1', command_type=sims4.commands.CommandType.Live) def getpop(opt_sim:OptionalTargetParam=None, _connection=None): output = sims4.commands.CheatOutput(_connection) output('Test') sim = get_optional_target(opt_sim, _connection) sim.commodity_tracker.debug_set_all_to_min()
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:
self.set_value(hunger, stat_type.50%)
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
|
|
|
Post by laughingdead on Apr 1, 2020 13:46:28 GMT -5
Is this going to cause me problems?
FAILED to decompile EA\base\lib\calendar.pyc
I have several of these but the exit code was 0
I also had to change my settings to
game_folder = os.path.join('F:', os.sep, 'GAMES', 'The Sims 4')
|
|
|
Post by huongle on Apr 16, 2020 11:48:57 GMT -5
Thanks a lot for your post!!! It worked like a charm for me :D. I really really appreciate it!
|
|
|
Post by bienchen83 on Apr 25, 2020 15:10:07 GMT -5
I'm struck at step 9 of this great tutorial. When I click decompile_all, I just get Process finished with exit code 0. The reason might be that I have to change the settings of my mods_folder and game_folder first as the default settings don't seem to be right, but I'm unsure of how to do it. My Mods folder ist located at: E:\Eigene Dateien\Electronic Arts\Die Sims 4\Mods My Game folder ist located at: C:\Program Files (x86)\EA\The Sims 4 How do I write that in the settings.py? Thanks in advance for anyone who might offer some help.
EDIT: Never mind, I got it to work as soon as I had posted. I had to change the settings.py to
mods_folder = os.path.expanduser( os.path.join('E:', os.sep, 'Eigene Dateien', 'Electronic Arts', 'Die Sims 4', 'Mods') )
game_folder = os.path.join('C:', os.sep, 'Program Files (x86)', 'EA', 'The Sims 4')
|
|
|
Post by abookwyrm on May 10, 2020 23:23:15 GMT -5
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?
|
|
|
Post by MizoreYukii on May 11, 2020 0:12:21 GMT -5
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.
|
|
|
Post by abookwyrm on May 11, 2020 18:59:52 GMT -5
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. Okay, thank you.
|
|
|
Post by mentaltraveller on May 12, 2020 11:06:19 GMT -5
I keep getting this error with the compile.py 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?
|
|
|
Post by mrscorpioxx on May 25, 2020 0:09:55 GMT -5
I am Stuck. When i run decompile_all.cy. it just completes the process without doing anything.
|
|
|
Post by mrscorpioxx on May 25, 2020 0:11:42 GMT -5
When i click run decompiler_all.py nothing happens. in fact it completes it without doing anything.
|
|
|
Post by minisimkarma on Jun 14, 2020 9:19:26 GMT -5
🙏🙏🙏 Thank you everyone who posted their answers for the pathing to decompress them files. I finally got it set up!
|
|