- Site Map >
- Modding and Creation >
- Sims 4 Creation >
- Modding Discussion >
- Converting pyo files to py files
- Site Map >
- Modding and Creation >
- Sims 4 Creation >
- Modding Discussion >
- Converting pyo files to py files
Test Subject
#51
6th Sep 2014 at 2:21 AM
Posts: 13
Quote: Originally posted by gizmozow
I ended up running unpyc3.py from my Ubuntu VM, and everything decompiled properly. I've attached the decompiled files for anybody else having trouble. Here's a MEGA backup as well |
These won't need to be compiled? All we need to do is rezip and put them back where they were?
Advertisement
Test Subject
#52
6th Sep 2014 at 3:31 AM
Posts: 24
Thanks: 16 in 1 Posts
Quote: Originally posted by tycox94
These won't need to be compiled? All we need to do is rezip and put them back where they were? |
These are for informational purposes only actually. I believe in order to change them, you have to recompile them.
Test Subject
#53
6th Sep 2014 at 3:42 AM
Posts: 3
Quote: Originally posted by tycox94
These won't need to be compiled? All we need to do is rezip and put them back where they were? |
No, I don't think that will work. As far as I know, we are able to write custom scripts that will go in the Mods (or Mods/Scripts?) folder, but it's unclear how to do that just yet. EA has said they will release documentation soon as to how to create these scripts. These decompiled files are more of just an API reference to use to write our custom scripts.
EDIT: darkkitten30 beat me to it. I just saw this thread too: http://modthesims.info/showthread.php?t=533091. Gonna start taking a look at that right away
Test Subject
#54
7th Sep 2014 at 1:47 AM
Posts: 7
Quote: Originally posted by gizmozow
No, I don't think that will work. As far as I know, we are able to write custom scripts that will go in the Mods (or Mods/Scripts?) folder, but it's unclear how to do that just yet. EA has said they will release documentation soon as to how to create these scripts. These decompiled files are more of just an API reference to use to write our custom scripts. EDIT: darkkitten30 beat me to it. I just saw this thread too: http://modthesims.info/showthread.php?t=533091. Gonna start taking a look at that right away |
Gizmozow, i've downloaded your folder.... i was trying to modify the clock.py file... after a few tries recompiling it into the ZIP, it was making the game to never load... then i tried to use YOUR original file... and the problem persisted...
I've read in another topic a guy that had sucess recompiling the clock.py and making it to work in the .zip
But he used that quoted "unpyc3.py" to decompile the clock.py.
I'm kinda noob on this matter.... how do you use unpyc3.py to decompile it ??
Did u used unpyc3.py to decompile or what ?
Thanks (and sorry for those stupid questions )
Test Subject
#55
12th Sep 2014 at 2:40 AM
Last edited by Risuun : 12th Sep 2014 at 2:53 AM.
Posts: 3
How do I find Python's base path? The batch says "Make sure you copy unpyc3.py to your Python's base path" but I have no idea where that is!
Thanks!
Thanks!
Lab Assistant
#56
12th Sep 2014 at 3:12 AM
Posts: 197
Inside the Python33 folder / in the same folder as the python application. The python33 folder is probably in your main drive.
Test Subject
#57
12th Sep 2014 at 4:25 AM
Posts: 3
In case anybody wants it, here's a copy of unpyc3 + a modified version of the decompile verification tool I had used for decompiling a Python 2 game along with a few 'verified' files to compare with what the decompiler produces.
It's probably not very important if you just want to get an idea of how something works, but I suppose it'll be useful if you're replacing an EA file.
It's probably not very important if you just want to get an idea of how something works, but I suppose it'll be useful if you're replacing an EA file.
Attached files:
simulation_decomp.zip (27.1 KB, 388 downloads) - View custom content | ||
0 09-11-2014 19:11 simulation_decomp/ 6605 09-04-2014 20:07 simulation_decomp/adaptive_clock_speed.py 6535 09-04-2014 20:13 simulation_decomp/alarms.py 397 09-04-2014 20:14 simulation_decomp/areaops.py 13134 09-04-2014 20:27 simulation_decomp/areaserver.py 810 09-04-2014 20:28 simulation_decomp/asynchronous_log.py 14772 09-04-2014 19:59 simulation_decomp/build_buy.py 2057 09-03-2014 18:51 simulation_decomp/memories.py 347 09-03-2014 20:07 simulation_decomp/__app_paths__.py 588 09-03-2014 20:07 simulation_decomp/__hooks__.py 62223 09-03-2014 17:53 unpyc3.py 4877 09-03-2014 18:50 verify_decompile.py --------- ------- 112345 12 files |
Test Subject
#58
13th Sep 2014 at 8:21 PM
Posts: 30
Thanks: 5754 in 8 Posts
Quote: Originally posted by IceM
Yo. so i am trying some cool python IDES just to check them out. What i have noticed by far: -Most of the game content related to python can be tweaked via the DATA files in the simulation package. I Suspect we can add new traits, careers, moodlets, etc just via DATA files. -Other global values (Such as timescale ) are inside pyc files. And my goal to make a Time Slower mod is most likely going to be a Python mod -I searched for "time" and "clock" and "datetime" and all sorts of related words in all the game packages and os far i found nothing relevant. -I Tried to HexEdit date_and_time.pyo but i dont know which bytes corresponds to the global value "TICKS_PER_REAL_WORLD_SECOND = 1000" some questions are starting to rise: -Is it possible to import functions directly from .pyc\pyo's ? -If i wanted to show a costum notification in the wall (just for testing purposes) whenever the game is loaded, where do i know which event handler i must use? i am so used to C# and c++, i am still a bit clueless regarding this aspects of python, but i think i will get there fast enough. |
I think you're probably (and hopefully) right about just editing the data packages... This one DATA 0x545AC67A appears to have pointers for career tunables with Culinary.
#59
14th Sep 2014 at 9:32 AM
Posts: 3,129
Thanks: 4628 in 9 Posts
Quote: Originally posted by gizmozow
I ended up running unpyc3.py from my Ubuntu VM, and everything decompiled properly. I've attached the decompiled files for anybody else having trouble. |
This seems really light. I don't have the game yet, but I thought I'd take a look, and there doesn't seem to be much there. Is this only a limited selection of what you were able to successfully decompile, or is this all of it?
Grant me the serenity to accept the things I cannot change, the courage to change the things I cannot accept, and the wisdom to hide the bodies of those I had to kill because they pissed me off.
Test Subject
#60
29th Dec 2014 at 3:37 AM
Posts: 3
Quote: Originally posted by TheHologramMan
unpyc3.py failed to work for me with Python 3.3. I found pycdc independently and it crashes on most of the sims 4 python files I've tried usually with something like "Unsupported opcode: LOAD_BUILD_CLASS". Edit: It does seem like most of the generate protobuf pyo files do decompile with pycdc sufficiently that I suspect someone can easily deconstruct .proto files. They included the FileDescriptor and which to my recollection has the complete compiled proto file and then the generated class as well if that does not help. Edit 2: I fixed a local copy of unpyc3.py and it does a much better job of reversing the python 3.3 files for me. |
How do i download it???
thanks in advance
Test Subject
#61
28th Jan 2015 at 6:46 PM
Posts: 20
Quote: Originally posted by RadioactiveMike
Brilliant! Your fix is working like a charm. (Somewhat at least, still tracking through some stuff) |
How do I download this?
Test Subject
#62
18th Jun 2015 at 9:10 AM
Posts: 54
Thanks: 549 in 18 Posts
Okay honestly I thought that I would try to take a swing at modding but i can't seem to freakin figure out how to download the file TheHologramMan posted. I click on it and it takes me to a page with a bunch of text and thats it. I don't understand how to get the modified file which this page sent me here to get: http://zerbu.tumblr.com/post/971493...e-sims-4-python
Please reply back and let me know
Please reply back and let me know
Test Subject
#63
9th Jul 2015 at 2:28 AM
Posts: 54
Thanks: 549 in 18 Posts
Okay I figured it out. I am such a goof. For anyone wishing to know how to download the file from HologramMan you simply right click the unpyc3.py link and click "save link as". Save it somewhere safe and that is the file you need to mod. I wish people would have seen a few of us asking how to download it. But there you go <3
#64
17th Nov 2015 at 8:51 AM
Last edited by Inge Jones : 17th Nov 2015 at 9:27 AM.
Posts: 11,682
Thanks: 9680 in 11 Posts
Zerbu's modding tutorial points me to this thread for the decompiler, but then starts talking about a unpyc3.exe I only see a .py source file linked from this thread? I am a complete beginner on both python and TS4 modding so if someone can explain at least this step of it to me in baby language I would be grateful :D
Later: Actually having studied the batch file for using it, I wonder if Zerbu's tut is maybe not right about the exe, and it's actually meant to be a .py after all.
"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Later: Actually having studied the batch file for using it, I wonder if Zerbu's tut is maybe not right about the exe, and it's actually meant to be a .py after all.
"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
#65
17th Nov 2015 at 1:22 PM
Posts: 11,006
Thanks: 423049 in 1121 Posts
It's been a while since I've last done anything with scripts, but I also used TheHologramMan's unpyc3.py from this thread. I'd guess that is probably what he meant. Other than that, ask Zerbu for clarification?
Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.
In the kingdom of the blind, do as the Romans do.
Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.
In the kingdom of the blind, do as the Romans do.
#66
17th Nov 2015 at 3:24 PM
Posts: 11,682
Thanks: 9680 in 11 Posts
I have asked there but as mine was the only comment on that blog page, and it was not linked from his menu I wasn't sure if it was actually obsolete (I found it through a google search). But yeah from reading everything else it certainly seems the .exe might have been a typo.
"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
#67
17th Nov 2015 at 8:05 PM
Posts: 11,682
Thanks: 9680 in 11 Posts
Ok well everything ran ok, and unzipped etc without any error messages... but all the resulting .py files were completely empty! lol
"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
#68
18th Nov 2015 at 2:40 AM
Posts: 11,006
Thanks: 423049 in 1121 Posts
Did you see this thread? http://modthesims.info/t/532644
Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.
In the kingdom of the blind, do as the Romans do.
Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.
In the kingdom of the blind, do as the Romans do.
#69
18th Nov 2015 at 8:57 AM
Posts: 11,682
Thanks: 9680 in 11 Posts
Yes, and see Arkeus' last post in it? That's my problem too. I wonder if he still exists, I could ask how he finally solved it. On the other hand, failing all else, it would be good if someone would take it upon themself to decompile all the scripts each time there is a patch and share them somewhere, similar to how I used to for TS3
"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
#70
18th Nov 2015 at 11:49 AM
Posts: 559
Thanks: 3205 in 6 Posts
Quote: Originally posted by Inge Jones
Yes, and see Arkeus' last post in it? That's my problem too. I wonder if he still exists, I could ask how he finally solved it. On the other hand, failing all else, it would be good if someone would take it upon themself to decompile all the scripts each time there is a patch and share them somewhere, similar to how I used to for TS3 |
Hi @Inge Jones, you have PM
Try that and see if it solves
#71
18th Nov 2015 at 12:38 PM
Last edited by Inge Jones : 18th Nov 2015 at 4:26 PM.
Posts: 11,682
Thanks: 9680 in 11 Posts
Ok I downloaded. It seems I have to edit the decompiler first tho to work on the sims scripts... as I am not yet conversant with python I could find myself in a bit of a catch22
Later: I got the original working finally. Instead of save-as I copypasted the raw text. Ended up 2Kb larger and actually decompiled the scripts
"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Later: I got the original working finally. Instead of save-as I copypasted the raw text. Ended up 2Kb larger and actually decompiled the scripts
"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Lab Assistant
#72
10th Jul 2016 at 12:41 PM
Posts: 168
Quote: Originally posted by gizmozow
I ended up running unpyc3.py from my Ubuntu VM, and everything decompiled properly. I've attached the decompiled files for anybody else having trouble. Here's a MEGA backup as well EDIT: I've renamed the files, so they do not contain the extra ".pyo" |
Thank you what I have been trying do
Who Posted
|