Bridge Commander Central
BC Forums => BC Scripting => Topic started by: Kirk on July 17, 2008, 02:00:51 PM
-
Is it possible to reload a ship's hardpoint while ingame? I'm asking because I'm adding blinkers to a ship and it is getting very tedious to add property, load BC, load ship, close BC, add changes, load BC, etc.
-
interesting question... in the past, i would try out a few different kinds of weapons for ship (pulses and such) to see how they would look ingame, and always i would have to exit BC, make the hp change with the new weapon, then reload BC to see the new weapon...
if there were a way to simply pause the game, load the new HP, and then unpause the game without having to exit and reload BC, that would have been useful and time-saving knowledge lol
-
Could you try ending the current battle, Then restarting?
I.E. Play with ship, ALT-TAB, Modify & Save, go back in, load QB Scenario again ?
-
i suppose that is one way, i hadnt really considered that myself lol
i wonder if that would work with all QB scripts (even scripts for bridges or other mods) when trying to fine-tune certain things...
-
Could you try ending the current battle, Then restarting?
I.E. Play with ship, ALT-TAB, Modify & Save, go back in, load QB Scenario again ?
I will try that again, but I believe BC crashes when I exit qb.
-
Don't exit QB, just end the current battle. Then load the ships again.
-
Don't exit QB, just end the current battle. Then load the ships again.
D'oh! Ok.
-
I was going to write the same thing. Except the forum software ate it after 2 sequentially being redirected back to the editor because other people posted. :(
I had some extra options (described now), such as manually added/changing hardpoints from the console, but you those changes don't get saved in the hp.
And changing torpedoes (and pulse weapons as well mostlikely) can be done from the console, in fact, my More Than Four Torpedoes mod (part of a bigger, and older, mod of mine, if you have KM you have it) uses this to emulate torpedo rotation. But I can't really advice using it, for one, it's kinda tedious, and two, it doesn't get saved in the hp.
-
Restarting qb works. :x Why did such a simple answer elude me! Oh well, thanks for all the help!
-
Much welcome are you :D
-
:x Why did such a simple answer elude me!
lol welcome to my world...
ill have to give that a try next time i want to tweak some scripts (bridge-related and such) next time i feel like jumping back into BC...
-
a very useful tool is the reload() command i think it is somehow global;
if you import a module it stays open until all scripts wich imported that module eighter release it or close themselfes.
so if you start a mod it imports a module (like a hp) and uses it wic means it gets compiled and will mostly not be recompiled until bc restarts.
if you call the reload() method it gets compiled again and all scripts that import that module again get the new one, all open modules stay, i think.
so if you reload(__import__('ships.Hardpoints.*HP*')) all ships created afterwards should get the new HP.
I use this for all my mods while developing/fixing them.
I edit them using alt+tab & Notepad++
Maybe you kow already, maybe it helps, i don't know...
-
The code that loads a ship already reloads the hardpoint. Using the reload command.
I would have mentioned it if it was neccesairy. ;)