Opening .pyc files -1 reply

Please wait...

Guest

I didn't make it!

0 XP

 
#1 16 years ago

How do I open .pyc files so that I can read what it says and not see only complete gibberish? Anybody know?




Magic (tm)

I post to get attention

50 XP

9th July 2002

0 Uploads

64 Posts

0 Threads

#2 16 years ago

thats not easy to open the compiled phyton code. But search on the python download side the think I remeber there was a decompiler. But be sure not to download the decompiler for the newest version 2.2 BC's code is written in an older version 1.3 I think read in the sdk readme. You will find the url to the Python dl page and the correct version there.




Kaschparl

GF makes me horny

50 XP

16th July 2002

0 Uploads

97 Posts

0 Threads

#3 16 years ago

On www.python.org/1.5/ you can download the right version of python. BC has it's own compiler so it's important to use the same version(1.5.2). The decomyle you can find here: goebel-consult.de/decompyle/. Download version 0.6.0 and it should work. I decompiled many of the -pyc files. Install python then copy the files from the decompyle archive into the folder of python. To decompile the files, copy the wanted files into the python folder, open the command line, change to python folder and type in: "python decompyle filename.pyc -o" (without quotes). If you have any probs: [email]halkem@sielearn.net[/email]

Greetings from Germany




Defiant

Free GNU user

50 XP

28th March 2002

0 Uploads

742 Posts

0 Threads

#4 15 years ago
vonfrank

...waiting for new ships...

50 XP

17th September 2007

0 Uploads

134 Posts

0 Threads

#5 11 years ago

sorry if this sounds like a noob question, but how do you open and edit .pyc files? i'd really like to change the weapon dammage on some ships but i dont know how




Henze

perfection!

50 XP

15th December 2006

0 Uploads

489 Posts

0 Threads

#6 11 years ago

you should download the SDK from the bcfiles site, and then use the MPE to edit those pycfile...

or open the pyc files ..then directly save it to an py file ;)




vonfrank

...waiting for new ships...

50 XP

17th September 2007

0 Uploads

134 Posts

0 Threads

#7 11 years ago

wait, the MPE only lets me open the .NIF files, and not the .pyc files and how do i open a .pyc file and save it as a .py file? i cant do that either all i really want to know is how all you modders out there change weapon dammage and ship hull strength




John Hamm

I'm spending more time here

50 XP

1st December 2006

0 Uploads

30 Posts

0 Threads

#8 10 years ago

Okay I have seen this post many times so here is the skinny on pyc files, don't mess with them you can decompile them but it is a pain. use the PY files they can be found fo km 1.0 in the Bridge commander/src file, any py file you want just copy and paste it in the folder of the pyc file you are wanting to edit (and just delete the pyc file) after you have editied the py file and start the game. the game will then create a new pyc file based on the new py file anyway (pyc files are worthless) As for the MPE editing NIF files , yes it is true it edits NIF files but after you have selected your NIF file it askes for another edit option I.E the py file that goes with the NIF file of the ship you are wanting to edit I.E the hard points of the ship and once you select that you acn now edit the hard points of the ship, the MPE will not edit a pyc file thus you must have the py files in there, so set up your MPE to open your model files by going to the top left EDIT then selete options and a boc will open up you will see above the first white box --Default model directory (if you have a default path of BC loaded it should be C:\Program Files\Activision\Bridge Commander\data\Models\Ships\ (just type this path or if your is diff then wahtever path to your models.) the next one is for your py files I.E your hard points wich by default would be C:\Program Files\Activision\Bridge Commander\scripts\ships\Hardpoints\ (type this in) and the next time you open MPE your model files wil open automaticaly and then once you selct a model it will give a an option of yes or no to select a HP file (select yes) and find the corresponding file for the ship you wish to edit. and poof you are ready to edit the hardpoints of a ship. this is of course only if you have moved the py files from the src file file to the scripts/ships/hardpoints file, if you are not using the KM 1.0 then the py files for the BC vanilla are in the SDK under tools/build/etc.., so don't use pyc file they are a pain the py files are all you need just get them and put them into your game, why everyone builds mods and does not include the py file side by side with the pyc files is beyond me but none the less the py files are out there and easy to cut and paste. if you need any further help in any more in depth explanation just ask and I will try to give a better description. I am a avid self taught hard pointer.




John Hamm

I'm spending more time here

50 XP

1st December 2006

0 Uploads

30 Posts

0 Threads

#9 10 years ago

Okay I have seen this post many times so here is the skinny on pyc files, don't mess with them you can decompile them but it is a pain. use the PY files they can be found fo km 1.0 in the Bridge commander/src file, any py file you want just copy and paste it in the folder of the pyc file you are wanting to edit (and just delete the pyc file) after you have editied the py file and start the game. the game will then create a new pyc file based on the new py file anyway (pyc files are worthless) As for the MPE editing NIF files , yes it is true it edits NIF files but after you have selected your NIF file it askes for another edit option I.E the py file that goes with the NIF file of the ship you are wanting to edit I.E the hard points of the ship and once you select that you acn now edit the hard points of the ship, the MPE will not edit a pyc file thus you must have the py files in there, so set up your MPE to open your model files by going to the top left EDIT then selete options and a boc will open up you will see above the first white box --Default model directory (if you have a default path of BC loaded it should be C:\Program Files\Activision\Bridge Commander\data\Models\Ships\ (just type this path or if your is diff then wahtever path to your models.) the next one is for your py files I.E your hard points wich by default would be C:\Program Files\Activision\Bridge Commander\scripts\ships\Hardpoints\ (type this in) and the next time you open MPE your model files wil open automaticaly and then once you selct a model it will give a an option of yes or no to select a HP file (select yes) and find the corresponding file for the ship you wish to edit. and poof you are ready to edit the hardpoints of a ship. this is of course only if you have moved the py files from the src file file to the scripts/ships/hardpoints file, if you are not using the KM 1.0 then the py files for the BC vanilla are in the SDK under tools/build/etc.., so don't use pyc file they are a pain the py files are all you need just get them and put them into your game, why everyone builds mods and does not include the py file side by side with the pyc files is beyond me but none the less the py files are out there and easy to cut and paste. if you need any further help in any more in depth explanation just ask and I will try to give a better description. I am a avid self taught hard pointer.