Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Test Subject
Original Poster
#1 Old 3rd Jan 2018 at 6:40 AM Last edited by todoabout : 3rd Jan 2018 at 7:05 AM.
sim_commands.pyo doesn't decompile
I try to look up what has changed in simulation/server_commands/sim_commands.pyo with arrival of Cats & Dogs, but the file doesn't decompile to *.py at all. I've tried TheHologramMan's unpyc3.py (it responds with "file has wrong magic number"), uncompyle6 ("Parse error at or near `MAKE_FUNCTION_N1_A_2_0' instruction at offset 3737" + several screens of errors) and darkkitten30’s Python decompiler batch file (doesn't go further than the first few commented lines).

Has anyone been able to successfully decompile this file lately? Is there any other option? Earlier versions were parsing successfully, but not the current one that I need.
Advertisement
Deceased
#2 Old 3rd Jan 2018 at 7:14 PM
Quote: Originally posted by todoabout
Has anyone been able to successfully decompile this file lately?

Weird, I have a version in my current Python scripts folder, so I must be using a different decompiler (I thought I had TheHologramMan's version). The version I have does fail on two files, but everything else seems to be working.

I'm attaching a zip with the two files I use. I'd love to give credit where credit is due, but I have no clue anymore where I originally got these
Attached files:
File Type: zip  ts4_decompiler.zip (14.8 KB, 126 downloads) - View custom content
Test Subject
#3 Old 4th Jan 2018 at 6:40 PM
Scumbumbo, I get the eror wrong magic number with same file. Am I using it incorrect?
Deceased
#4 Old 4th Jan 2018 at 7:15 PM
Quote: Originally posted by Neppuu
Scumbumbo, I get the eror wrong magic number with same file. Am I using it incorrect?

Wrong magic number appears to refer to a bad magic number in a .pyc compiled file. This can happen if a .py file is compiled to .pyc with a different version of Python, or it can just be corrupted in some ways.

I'd suggest maybe looking for any files named unpyc3.pyc and removing those to ensure that the .py version from the rar I posted is being loaded.

Also, what version of Python are you using? I'm thinking that could also be an issue with loading the game's .pyo files, so you'll want to be using the same version as used by the game version 3.3.5
Back to top