Replies: 71 (Who?), Viewed: 50266 times.
Page 3 of 3
Test Subject
#51 Old 6th Sep 2014 at 2:21 AM
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?
Test Subject
#52 Old 6th Sep 2014 at 3:31 AM
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 Old 6th Sep 2014 at 3:42 AM
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 Old 7th Sep 2014 at 1:47 AM
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 Old 12th Sep 2014 at 2:40 AM Last edited by Risuun : 12th Sep 2014 at 2:53 AM.
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!
Lab Assistant
#56 Old 12th Sep 2014 at 3:12 AM
Inside the Python33 folder / in the same folder as the python application. The python33 folder is probably in your main drive.
Test Subject
#57 Old 12th Sep 2014 at 4:25 AM
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.
Download - please read all instructions before downloading any files!
File Type: zip simulation_decomp.zip (27.1 KB, 373 downloads) - View custom content
Test Subject
#58 Old 13th Sep 2014 at 8:21 PM
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.
Fat Obstreperous Jerk
#59 Old 14th Sep 2014 at 9:32 AM
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 Old 29th Dec 2014 at 3:37 AM
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 Old 28th Jan 2015 at 6:46 PM
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 Old 18th Jun 2015 at 9:10 AM
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
Test Subject
#63 Old 9th Jul 2015 at 2:28 AM
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
One horse disagreer of the Apocalypse
#64 Old 17th Nov 2015 at 8:51 AM Last edited by Inge Jones : 17th Nov 2015 at 9:27 AM.
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)
Pettifogging Legalist!
retired moderator
#65 Old 17th Nov 2015 at 1:22 PM
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.
One horse disagreer of the Apocalypse
#66 Old 17th Nov 2015 at 3:24 PM
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)
One horse disagreer of the Apocalypse
#67 Old 17th Nov 2015 at 8:05 PM
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)
Pettifogging Legalist!
retired moderator
#68 Old 18th Nov 2015 at 2:40 AM
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.
One horse disagreer of the Apocalypse
#69 Old 18th Nov 2015 at 8:57 AM
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)
Instructor
#70 Old 18th Nov 2015 at 11:49 AM
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
One horse disagreer of the Apocalypse
#71 Old 18th Nov 2015 at 12:38 PM Last edited by Inge Jones : 18th Nov 2015 at 4:26 PM.
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)
Lab Assistant
#72 Old 10th Jul 2016 at 12:41 PM
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
Page 3 of 3
Back to top