Author Topic: py files?  (Read 3140 times)

Offline CDR_Daxian

  • Captain_Daxian
  • Posts: 142
  • Cookies: 3
  • On a Mac and still playing Bridge Commander.
    • Captain_Daxian Mods
py files?
« on: August 12, 2010, 10:02:11 PM »
all of bridge commanders scripts and a few other things are .pyc files, but when downloading hardpoints, they're all .py files, what's with that?
Captain_Daxian
BC Amateur Modder and mass consumer of Coca-Cola

All my mods are destroyed... Time to make new ones!

My Website


Offline Morgan

  • Moderator
  • Posts: 1340
  • Cookies: 65535
Re: py files?
« Reply #1 on: August 12, 2010, 10:05:02 PM »
PY files are what allows us to edit BC scripts. PYC's are the compiled versions of those scripts created from the PY's. PYC's can't be edited.

Offline Nebula

  • BC elder / BCC Vice Admin
  • Administrator
  • Posts: 5500
  • Cookies: 1129
  • KM - Mod Team Member & BC - Elder (2002)
    • 9th fleet HQ
Re: py files?
« Reply #2 on: August 12, 2010, 10:05:43 PM »
pyc are the compiled versions of py files... BC is built on a scripting language called python.

EDIT: I've been beat lol silly comp is acting slow today
Canon is what people argue exists on ships that don't exist.

Offline CDR_Daxian

  • Captain_Daxian
  • Posts: 142
  • Cookies: 3
  • On a Mac and still playing Bridge Commander.
    • Captain_Daxian Mods
Re: py files?
« Reply #3 on: August 12, 2010, 10:06:19 PM »
so how do i get them to work?? :help: :hithead:
Captain_Daxian
BC Amateur Modder and mass consumer of Coca-Cola

All my mods are destroyed... Time to make new ones!

My Website


Offline Morgan

  • Moderator
  • Posts: 1340
  • Cookies: 65535
Re: py files?
« Reply #4 on: August 12, 2010, 10:06:55 PM »
Edit a PY. The game will create new PYC's automatically from those PY's.

Offline Nebula

  • BC elder / BCC Vice Admin
  • Administrator
  • Posts: 5500
  • Cookies: 1129
  • KM - Mod Team Member & BC - Elder (2002)
    • 9th fleet HQ
Re: py files?
« Reply #5 on: August 12, 2010, 10:08:11 PM »
all you do to change a ships hardpoints(to the one you just DLed) is just delete the ships old pyc and let BC create a new one using the py file you placed in the hardpoint folder.(by just loading the ship in BC)
Canon is what people argue exists on ships that don't exist.

Offline CDR_Daxian

  • Captain_Daxian
  • Posts: 142
  • Cookies: 3
  • On a Mac and still playing Bridge Commander.
    • Captain_Daxian Mods
Re: py files?
« Reply #6 on: August 12, 2010, 10:08:48 PM »
im a bit less advance in that area, how do you edit them
 :facepalm:
Captain_Daxian
BC Amateur Modder and mass consumer of Coca-Cola

All my mods are destroyed... Time to make new ones!

My Website


Offline Nebula

  • BC elder / BCC Vice Admin
  • Administrator
  • Posts: 5500
  • Cookies: 1129
  • KM - Mod Team Member & BC - Elder (2002)
    • 9th fleet HQ
Re: py files?
« Reply #7 on: August 12, 2010, 10:09:48 PM »
For now just look at my last post... we'll get to editing them later once you get other basics down.

Nero once again you jumped the gun lol he wasn't asking how to edit HP files...
Canon is what people argue exists on ships that don't exist.

Offline Morgan

  • Moderator
  • Posts: 1340
  • Cookies: 65535
Re: py files?
« Reply #8 on: August 12, 2010, 10:11:15 PM »
You can edit PY's with notepad. To change hardpoint's you may want to use the Model Property Editor or BCUT though if you're new to this. It's very easy to make a mistake with notepad.

Offline Nebula

  • BC elder / BCC Vice Admin
  • Administrator
  • Posts: 5500
  • Cookies: 1129
  • KM - Mod Team Member & BC - Elder (2002)
    • 9th fleet HQ
Re: py files?
« Reply #9 on: August 12, 2010, 10:11:55 PM »
Nero... he wasn't asking how to edit until you even mentioned it.... you lost him
Canon is what people argue exists on ships that don't exist.

Offline Morgan

  • Moderator
  • Posts: 1340
  • Cookies: 65535
Re: py files?
« Reply #10 on: August 13, 2010, 12:16:59 AM »
Nero... he wasn't asking how to edit until you even mentioned it.... you lost him
I only mentioned it as the key difference between PY and PYC, but yeah I wouldn't be surprised if that's what lost him. My bad  :facepalm:

Offline CDR_Daxian

  • Captain_Daxian
  • Posts: 142
  • Cookies: 3
  • On a Mac and still playing Bridge Commander.
    • Captain_Daxian Mods
Re: py files?
« Reply #11 on: October 18, 2010, 07:12:24 PM »
i put a py file in but it didn't even display the ship.

(BTW may this have anything to do with KM 1.0?) :hithead: :hithead: :hithead:

man i'm a complete nube at thisw :eek
Captain_Daxian
BC Amateur Modder and mass consumer of Coca-Cola

All my mods are destroyed... Time to make new ones!

My Website


Offline X_TheUnknown_X

  • Posts: 325
  • Cookies: 328
  • (Semi) Retired
Re: py files?
« Reply #12 on: October 19, 2010, 12:28:43 PM »
It depends upon which kind of .pyc file you are trying to edit. I assume, here, you are trying to edit a ship hardpoint (that is, the file which detemines its weapons, shields, etc.) which are in the scripts\ships\hardpoints folder. As mentioned above, .pyc files are close to uneditable; unless you have the Model Property Editor in the Bridge Commander SDK.
To start editing a ship with the MPE, you must first load a .nif ship model (found in data\models\ships\[ship name]\, then it will ask you to load your hardpoint, so you need to find your .pyc hardpoint and select it. To view the attached hardpoints, you must check the 'Named Objects' box on the right-hand side of the screen (when you can see the ship model in the viewer), and then click on the 'Scene Root' option in the menu above. From here, you can edit any of the hardpoints from the menu on the left-hand side of the screen.
However, MPE can be difficult to use (I still find it annoying at times), so if you just want to edit the settings without adding any new ones, I would just hit the save button as soon as you load the hardpoint in MPE - which will save it as an editable .py file. From here, I would use the far simpler 'Hardpoint Tweaker' feature in BCUT (available from BC Files) to change a ship's settings. Hope this helps  ;) .

Edit: Just noticed you mentioned you use KM1.0, there should be a folder named 'src' in the BC directory, which contains copies of all the .py files from the KM install. But if the one you need isn't there, just use the method above.

Offline JimmyB76

  • Posts: 6423
  • Cookies: 421
Re: py files?
« Reply #13 on: October 19, 2010, 02:17:18 PM »
i put a py file in but it didn't even display the ship.
what exactly are you trying to accomplish?
let's start from there...

Offline CDR_Daxian

  • Captain_Daxian
  • Posts: 142
  • Cookies: 3
  • On a Mac and still playing Bridge Commander.
    • Captain_Daxian Mods
Re: py files?
« Reply #14 on: October 19, 2010, 06:30:54 PM »
pretty much adding ships, which involves adding the hardpoints.
Captain_Daxian
BC Amateur Modder and mass consumer of Coca-Cola

All my mods are destroyed... Time to make new ones!

My Website


Offline Nebula

  • BC elder / BCC Vice Admin
  • Administrator
  • Posts: 5500
  • Cookies: 1129
  • KM - Mod Team Member & BC - Elder (2002)
    • 9th fleet HQ
Re: py files?
« Reply #15 on: October 19, 2010, 06:35:54 PM »
ships you made?

because 99% of ships come with their own hp files and should be a simple c/p
what you are missing may be the custom ship file to get them in game.
Canon is what people argue exists on ships that don't exist.

Offline CDR_Daxian

  • Captain_Daxian
  • Posts: 142
  • Cookies: 3
  • On a Mac and still playing Bridge Commander.
    • Captain_Daxian Mods
Re: py files?
« Reply #16 on: October 19, 2010, 06:44:26 PM »
custom ship file, like in scripts\custom\ships

if so, how do you load them into a pyc with Model Property Editor

sorry for this noviceness :facepalm:
Captain_Daxian
BC Amateur Modder and mass consumer of Coca-Cola

All my mods are destroyed... Time to make new ones!

My Website


Offline Nebula

  • BC elder / BCC Vice Admin
  • Administrator
  • Posts: 5500
  • Cookies: 1129
  • KM - Mod Team Member & BC - Elder (2002)
    • 9th fleet HQ
Re: py files?
« Reply #17 on: October 19, 2010, 07:09:52 PM »
no need to load them in the MPE cause they can't be edited that way... you use the BCUT to create custom ship files.

actually here is an idea... why don't you post the ships you are trying to add to the game.
Canon is what people argue exists on ships that don't exist.

Offline CDR_Daxian

  • Captain_Daxian
  • Posts: 142
  • Cookies: 3
  • On a Mac and still playing Bridge Commander.
    • Captain_Daxian Mods
Re: py files?
« Reply #18 on: October 19, 2010, 07:13:44 PM »
just added the charleston class

(fan of Hidden Frontier here :yay: :dance)

so i wanted to ad it and i created the custom ship file, what may i ask is the next step?
Captain_Daxian
BC Amateur Modder and mass consumer of Coca-Cola

All my mods are destroyed... Time to make new ones!

My Website


Offline Nebula

  • BC elder / BCC Vice Admin
  • Administrator
  • Posts: 5500
  • Cookies: 1129
  • KM - Mod Team Member & BC - Elder (2002)
    • 9th fleet HQ
Re: py files?
« Reply #19 on: October 19, 2010, 07:15:35 PM »
you added the whole ship + this custom ship file into the BC folders? right? ok good... next step should be just loading up BC turning on the mutators and loading quick battle.
Canon is what people argue exists on ships that don't exist.