Bridge Commander Central

BC Forums => BC Bridge Modding => Topic started by: vonfrank on December 19, 2020, 01:44:44 PM

Title: Bridge model loading issue
Post by: vonfrank 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
(https://i.imgur.com/tehU3Gj.jpg)

Switch to Sovereign Bridge. New viescreen is loaded
(https://i.imgur.com/vyhvHXm.jpg)

Switch back to Galaxy Bridge. Sovereign viescreen model is left behind.
(https://i.imgur.com/mhhLKwG.jpg)

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?

Title: Re: Bridge model loading issue
Post by: KrrKs 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...
Title: Re: Bridge model loading issue
Post by: vonfrank 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.

(https://i.imgur.com/o92aPMR.jpg)

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.
Title: Re: Bridge model loading issue
Post by: KrrKs 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.
Title: Re: Bridge model loading issue
Post by: vonfrank 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.