Author Topic: Reload Hardpoint  (Read 2747 times)

Offline Kirk

  • Posts: 1438
  • Cookies: 139
    • My Released Mods
Reload Hardpoint
« 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.

Offline JimmyB76

  • Posts: 6423
  • Cookies: 421
Re: Reload Hardpoint
« Reply #1 on: July 17, 2008, 02:08:28 PM »
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

Offline CJLarkin

  • Posts: 243
  • Cookies: 27
Re: Reload Hardpoint
« Reply #2 on: July 17, 2008, 02:08:58 PM »
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 ?
Build a game and people will be happy for a few years. Build a community... Well, look at BC. :D
Here's to another 20 years!

Offline JimmyB76

  • Posts: 6423
  • Cookies: 421
Re: Reload Hardpoint
« Reply #3 on: July 17, 2008, 02:09:52 PM »
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...

Offline Kirk

  • Posts: 1438
  • Cookies: 139
    • My Released Mods
Re: Reload Hardpoint
« Reply #4 on: July 17, 2008, 02:12:50 PM »
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.

Offline CJLarkin

  • Posts: 243
  • Cookies: 27
Re: Reload Hardpoint
« Reply #5 on: July 17, 2008, 02:16:21 PM »
Don't exit QB, just end the current battle. Then load the ships again.
Build a game and people will be happy for a few years. Build a community... Well, look at BC. :D
Here's to another 20 years!

Offline Kirk

  • Posts: 1438
  • Cookies: 139
    • My Released Mods
Re: Reload Hardpoint
« Reply #6 on: July 17, 2008, 02:19:44 PM »
Don't exit QB, just end the current battle. Then load the ships again.
D'oh! Ok.

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Reload Hardpoint
« Reply #7 on: July 17, 2008, 02:20:43 PM »
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.
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.

Offline Kirk

  • Posts: 1438
  • Cookies: 139
    • My Released Mods
Re: Reload Hardpoint
« Reply #8 on: July 17, 2008, 02:28:13 PM »
Restarting qb works. :x Why did such a simple answer elude me! Oh well, thanks for all the help!

Offline CJLarkin

  • Posts: 243
  • Cookies: 27
Re: Reload Hardpoint
« Reply #9 on: July 17, 2008, 02:32:41 PM »
Much welcome are you :D
Build a game and people will be happy for a few years. Build a community... Well, look at BC. :D
Here's to another 20 years!

Offline JimmyB76

  • Posts: 6423
  • Cookies: 421
Re: Reload Hardpoint
« Reply #10 on: July 17, 2008, 02:36:13 PM »
: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...

Offline cnotsch

  • Posts: 85
  • Cookies: 3
Re: Reload Hardpoint
« Reply #11 on: July 17, 2008, 02:54:41 PM »
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...

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Reload Hardpoint
« Reply #12 on: July 17, 2008, 04:13:13 PM »
The code that loads a ship already reloads the hardpoint. Using the reload command.

I would have mentioned it if it was neccesairy. ;)
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.