Author Topic: Bridge model loading issue  (Read 717 times)

Offline vonfrank

  • Posts: 447
  • Cookies: 182
Bridge model loading issue
« on: December 19, 2020, 01:44:44 PM »
I've run into an issue with Bridge modding...

I have my sovereign bridge set up to load the nemesis style viewscreen (created many years ago) ontop of the stock bridge and it looks wonderful, however, swapping bridges in quickbattle leaves the sovereign viewscreen behind.

It seems that whatever function unloads the bridge model is not unloading the secondary model (for the modded viescreen) when you swap out of the sovereign bridge and into another.

Start in Galaxy Bridge. All is normal


Switch to Sovereign Bridge. New viescreen is loaded


Switch back to Galaxy Bridge. Sovereign viescreen model is left behind.


Does anyone know what function controls the unloading of bridges in quickbattle so that I can modify it to include unloading the sovereign's secondary model, which is this modded viewscreen?


Offline KrrKs

  • Posts: 461
  • Cookies: 25
Re: Bridge model loading issue
« Reply #1 on: December 20, 2020, 12:02:00 PM »
It might be helpful to know how you load the nemesis viewScreen in the first place. Is this a change to the sovereign bridge file or a qb override or?
Also: When you write swapping bridge in quibck battle, do you mean something like the per ship bridge swap that happens when beaming onto another ship?

I've got nothing helpful really, sorry. I haven't really looked at BC for a few years, I have no Idea how stuff works anymore...

Offline vonfrank

  • Posts: 447
  • Cookies: 182
Re: Bridge model loading issue
« Reply #2 on: December 20, 2020, 02:04:16 PM »
It might be helpful to know how you load the nemesis viewScreen in the first place.

Good point. Here's the modifications i've made to the Sovereign Bridge script in order to get the secondary model to load. It's based on the original script provided by the "Nemesis Sovereign Bridge" that loads a secondary model over top of the main bridge in order to provide better looking LCARS and viewscreen frame.



When you write swapping bridge in quibck battle, do you mean something like the per ship bridge swap that happens when beaming onto another ship?

Nope. Just the regular: End Simulation, Select new bridge, Start Simulation.

Offline KrrKs

  • Posts: 461
  • Cookies: 25
Re: Bridge model loading issue
« Reply #3 on: December 21, 2020, 12:46:22 PM »
I guess I have found something:

scripts\LoadBridge.py
Code: [Select]
def Load(sBridgeConfigScript):
....
#
# Remove the old bridge model and viewscreen, if they existed
#
pBridgeSet.DeleteObjectFromSet("bridge") # Remove the bridge, if it exists
pBridgeSet.DeleteObjectFromSet("viewscreen") # Remove viewscreen, if it exists
pBridgeSet.DeleteCameraFromSet("maincamera") # Remove maincamera, if it exists

It seems that only these three models are removed by name, so the added 'bridge2' just stays.

Offline vonfrank

  • Posts: 447
  • Cookies: 182
Re: Bridge model loading issue
« Reply #4 on: December 22, 2020, 12:37:41 AM »
I guess I have found something:

scripts\LoadBridge.py
Code: [Select]
def Load(sBridgeConfigScript):
....
#
# Remove the old bridge model and viewscreen, if they existed
#
pBridgeSet.DeleteObjectFromSet("bridge") # Remove the bridge, if it exists
pBridgeSet.DeleteObjectFromSet("viewscreen") # Remove viewscreen, if it exists
pBridgeSet.DeleteCameraFromSet("maincamera") # Remove maincamera, if it exists

It seems that only these three models are removed by name, so the added 'bridge2' just stays.

I'm guessing we're on the right track here. I tried adding this to the file:

Code: [Select]
    pBridgeSet.DeleteObjectFromSet("bridge")        # Remove the bridge, if it exists
    pBridgeSet.DeleteObjectFromSet("bridge2")       # Remove the second bridge model, if it exists
    pBridgeSet.DeleteObjectFromSet("viewscreen")    # Remove viewscreen, if it exists
    pBridgeSet.DeleteCameraFromSet("maincamera")    # Remove maincamera, if it exists

But it didn't work. No crashes, but still the same end result. The viewscreen frame doesn't get deleted when loading another bridge.