Bridge Commander Central
BC Forums => BC Scripting => Topic started by: JerichoKru on February 15, 2008, 11:11:26 PM
-
I was wondering is there is a program or something out there that i can use to open .pyc files.
I'm doing a bit of modding...and requires access to .pyc files since there are no .py's
-
I believe,
if you search the forums, this question has been asked and answered. :wink: From what I can remember, the process that decompiles the pyc is unreliable. #Please Note: If my reply seems scathing or rude, it was never intended to be. It's late and I am only offering friendly advice. Also, any spelling or grammatical errors are also a result of lack of sleep.#
Edit: I just searched the forums myself, and was unable to find the thread, however, I know it exists.
-
Defiant used to have a decompiler at http://defiant.homedns.org/%7Est/dec.../decompyle.php (http://defiant.homedns.org/%7Est/dec.../decompyle.php)
However, the link is currently forbidden.
-
i wonder if i can contact Defiant...
-
Look under members
-
or www.bckobayashimaru.de
-
The link posted is broken because it's incomplete.
But what pyc files are you trying to look into?
Any stock pyc file can be found as py file (with comments, which decompiling can't retrieve) in the SDK.
Any pyc file included in KM without a py file can be found in the src directory (found with KM, but it already includes a lot of py files).
-
thanks MLeo, i shall check the SDK to see what i need is in there
EDIT: hmm..it kinda has what i want...you see, a friend and I were going to make a custom install of BC. Since we are kind of bored with what is there, so, we gathered a bunch of ships and put them in. Since they aren't in the multiplayer ship menu, we simply spawned them with the "Add Ships" button...i ran into 2 problems: 1) only the host can properly see the ship (to the other, the are marauders...) and 2) the game goes crazy when the non-host transports over to one, randomly crashing and/or booting me from the game completely.
I was hoping that if i add them to the multiplayer menu the problem will dissapear...but...since we are using KM 0.9.1 as a base...i cant excatly edit the files nessisary
any help will be appreciated :D
-
KM1.0 contains the source of it.
The file to edit is SpeciesToShip.py and then every ship and projectile (the species number).
-
the...KM 1 source file is compatible with 0.9.1? hmm...i shall try
-
No, KM1.0 is simply newer/better. And it includes the source.
-
eh...editing the KM 1.0 file to fit 0.9.1 shouldn't be too hard
-
Why would you want that? Since it KM1.0 also fixes bugs in KM0.9...
-
Well...I obviously did something wrong (probably everything)
I'm still a bit of a newb when it comes to python...I'm almost afraid to attach the file in question...you might laugh at my horrid programming skills... Hopefully an expert can point out all of the bad code I made... :(
btw...i attempted to make this ...KM 0.9.1 compatible...which may be part of the problem.
No, i didn't change our whole custom install to KM 1...1) too lazy and 2.) my bud wanted KM 0.9.1
-
You only have to change the constants and the list, nothing else.
So what's the problem?
And making it KM0.9.1 compatible isn't possible, only KM0.9.1 is compatible with KM0.9.1, same as KM1.0 is only compatible with KM1.0. If you change anything from it, it isn't KMX anymore, and therefor won't be compatible with something else.
BC is picky about this, every player has to have the same set of scripts for it to work.
-
constants? is that the number in the middle of the
("MPneghvar", 403, "Klingon", 1),
?
i wasn't sure what that meant...(i was thinking of ship classification or something...)
-
That's a constant, but I was refering to lines like this:
UNKNOWN = 0
AKIRA = 1
AMBASSADOR = 2
GALAXY = 3
NEBULA = 4
SOVEREIGN = 5
BIRDOFPREY = 6
VORCHA = 7
WARBIRD = 8
MARAUDER = 9
GALOR = 10
KELDON = 11
CARDHYBRID = 12
KESSOKHEAVY = 13
So what is the problem you were having?
-
As above, i tried to add the ships in...but...I get a black screen after i attempt to host. In other words, No ship selection screen.
I did something wrong, just not sure what... :(
-
It would be rather helpfull if you told us what is wrong, not the effect (the effect is a black screen, the cause of it is a scripting error, the console shows you the "what" or reaso and where).
If you don't know about the console, it's immensly helpfull in trying stuff out (scripting wise), since it's an interactive Python interpretter, allowing you to interact with BC as if you were writing a script in a file. Therefor it also shows you if you wrote something wrong.
-
the problem is...it wont show the console...and yes, i do have it enabled, as i used it before
i will try to see if i can get it to show
-
When are you getting this problem?
In MP mode maybe?
Use a console logger for that, since MP doesn't allow the console.
-
What do you suggest for the logger? cause yes, it is MP that causes it :|
-
My own. :P
Put this in scripts/ and let it overwrite when/if asked.
To disable it, turn the if 1: to a if 0: or replace the file with the stock one from the SDK.
-
which file(s) do you want?
-
Zip all the txt files and attach them? Makes the most sense to me.
-
i believe this is what you want
-
Add:
from bcdebug import debugto the top of your SpeciesToShip.py
-
i commented that line out because it gave me a BSOD...I'll uncomment it
EDIT: that line gave me a BSOD
-
I thought you said you were using KM?
Also, commenting that line removes the link to "debug" giving you a problem there.
Anyway, if you would have searched for that exact error (can't find bcdebug or someting like that, can't remember the right name for it) or even bcdebug, eventually you would have gotten here:
http://bc-central.net/forums/index.php?topic=2214.0
-
well, good thing is i see the menu bad thing is that none of the ships i added show up and the menu's got all goofy
i added an updated console report and a screenshot of the menu...(yes, this is supposed to be KM)
-
You are missing TGL entries, and atleast one ship with expected ship file ValdoreG, which could mean it's somewhere else than scripts/ships (for example, if it's a Favour The Bold ship).