Author Topic: Idea: Bridge destroyed -> ship temporarily out of control  (Read 1529 times)

Offline FekLeyr Targ

  • DS9FX Team
  • Posts: 490
  • Cookies: 537
Idea: Bridge destroyed -> ship temporarily out of control
« on: December 28, 2018, 04:30:29 PM »
Hello friends,

after reading a few stories about Starfleet ships temporarily being out of control due to damage to the bridge, I have been wondering: Wouldn't it be interesting to have such a feature in Bridge Commander?

A python script could track the status of a ship's "bridge" subsystem and perhabs override the "critical" flag if set to "1".
Once the bridge is critically damaged or destroyed, the ship temporarily loses control by ceasing fire and keeping its current speed and course. After a random amount of time (e.g. 90-240 seconds), the crew manages to reroute ship control to auxillary control or engineering and the ship returns to its previous AI behavior.

What do you think about this idea?
TaH pagh, Tah be.

Offline King Class Scout

  • Posts: 1775
  • Cookies: 893
  • the other half of SFRD
Re: Idea: Bridge destroyed -> ship temporarily out of control
« Reply #1 on: December 29, 2018, 06:55:27 AM »
I found a script guy that might be able to do that.  AND he'd be able to do it without the crash errors, i think.
OS novel fan

Coming Soon: King's Mod Tuning Shop

best line I've ever read
Me: mine [my bridges] would probably be simple to get the characters to use.  the only person that sits is the captian.
Baz: space is vast there[sic] legs will be tired by the time they get to the next planet

Offline FekLeyr Targ

  • DS9FX Team
  • Posts: 490
  • Cookies: 537
Re: Idea: Bridge destroyed -> ship temporarily out of control
« Reply #2 on: January 04, 2019, 05:17:37 PM »
I found a script guy that might be able to do that.  AND he'd be able to do it without the crash errors, i think.

That's sounds great. I'm looking forward to see what he can do. :)
TaH pagh, Tah be.

Offline King Class Scout

  • Posts: 1775
  • Cookies: 893
  • the other half of SFRD
Re: Idea: Bridge destroyed -> ship temporarily out of control
« Reply #3 on: January 05, 2019, 06:22:52 AM »
found the guy on a Discord server, believe it or not.  i sent him a sample script that constantly crashes on me to look at, and apparently a lot of script errors are tabs being replaced with spaces.
OS novel fan

Coming Soon: King's Mod Tuning Shop

best line I've ever read
Me: mine [my bridges] would probably be simple to get the characters to use.  the only person that sits is the captian.
Baz: space is vast there[sic] legs will be tired by the time they get to the next planet

Offline eclipse74569

  • Roger Smith of the U.S.S. Lollypop, a good ship
  • Webmaster
  • Posts: 2240
  • Cookies: 65535
Re: Idea: Bridge destroyed -> ship temporarily out of control
« Reply #4 on: January 07, 2019, 09:01:38 PM »
found the guy on a Discord server, believe it or not.  i sent him a sample script that constantly crashes on me to look at, and apparently a lot of script errors are tabs being replaced with spaces.

Sorry for the off topic:

Maybe you should let him look at NanoFX and see if he can get the save function working for SP  :funny
Humankind cannot gain anything without first giving something in return, to obtain, something of equal value must be lost.  That is alchemy's first law of equivalent exchange.  In those days we really believed that to be the world's one and only truth~Alphonse Elric

Offline King Class Scout

  • Posts: 1775
  • Cookies: 893
  • the other half of SFRD
Re: Idea: Bridge destroyed -> ship temporarily out of control
« Reply #5 on: January 08, 2019, 06:33:20 AM »
actually, not as far-fetched as you think.  the sample I sent him was FROM Nano!  I was having the same three scripts go kaput al the time, so I saved a set in case of corruption for repairs.
OS novel fan

Coming Soon: King's Mod Tuning Shop

best line I've ever read
Me: mine [my bridges] would probably be simple to get the characters to use.  the only person that sits is the captian.
Baz: space is vast there[sic] legs will be tired by the time they get to the next planet

Offline eclipse74569

  • Roger Smith of the U.S.S. Lollypop, a good ship
  • Webmaster
  • Posts: 2240
  • Cookies: 65535
Re: Idea: Bridge destroyed -> ship temporarily out of control
« Reply #6 on: January 08, 2019, 07:41:49 AM »
Doooooooooooood!  :bigdance
Humankind cannot gain anything without first giving something in return, to obtain, something of equal value must be lost.  That is alchemy's first law of equivalent exchange.  In those days we really believed that to be the world's one and only truth~Alphonse Elric

Offline JimmyB76

  • Posts: 6423
  • Cookies: 421
Re: Idea: Bridge destroyed -> ship temporarily out of control
« Reply #7 on: January 12, 2019, 03:28:12 PM »
i am so bumping this for updates...

Offline King Class Scout

  • Posts: 1775
  • Cookies: 893
  • the other half of SFRD
Re: Idea: Bridge destroyed -> ship temporarily out of control
« Reply #8 on: January 13, 2019, 07:25:50 AM »
I've started a separate thread for the repair topic.  please see there for updates.
OS novel fan

Coming Soon: King's Mod Tuning Shop

best line I've ever read
Me: mine [my bridges] would probably be simple to get the characters to use.  the only person that sits is the captian.
Baz: space is vast there[sic] legs will be tired by the time they get to the next planet

Offline JimmyB76

  • Posts: 6423
  • Cookies: 421
Re: Idea: Bridge destroyed -> ship temporarily out of control
« Reply #9 on: January 13, 2019, 02:38:14 PM »
please link that thread here so i can merge the two :)

Offline FekLeyr Targ

  • DS9FX Team
  • Posts: 490
  • Cookies: 537
Re: Idea: Bridge destroyed -> ship temporarily out of control
« Reply #10 on: January 13, 2019, 03:50:12 PM »
please link that thread here so i can merge the two :)

Certainly:
http://www.bc-central.net/forums/index.php/topic,10581.0.html

Back on topic:
What do you guys think about my idea with the destroyed bridge?
TaH pagh, Tah be.

Offline King Class Scout

  • Posts: 1775
  • Cookies: 893
  • the other half of SFRD
Re: Idea: Bridge destroyed -> ship temporarily out of control
« Reply #11 on: January 14, 2019, 05:59:57 AM »
lol.  and I pulled mine to keep this thread consistent.

frankly, I like the idea.
OS novel fan

Coming Soon: King's Mod Tuning Shop

best line I've ever read
Me: mine [my bridges] would probably be simple to get the characters to use.  the only person that sits is the captian.
Baz: space is vast there[sic] legs will be tired by the time they get to the next planet

Offline JimmyB76

  • Posts: 6423
  • Cookies: 421
Re: Idea: Bridge destroyed -> ship temporarily out of control
« Reply #12 on: January 16, 2019, 11:12:43 AM »
i thought both threads were on the same topic, before reading them...
nvm...

Offline Tethys

  • -=USF=- Co-Leader
  • Posts: 256
  • Cookies: 89
Re: Idea: Bridge destroyed -> ship temporarily out of control
« Reply #13 on: June 05, 2019, 09:27:23 PM »
This should be fairly simple to do.

First the Bridge subsystem needs to be called, and health status needs to be assessed. A trigger then should be setup, such as when the Bridge subsystem falls below a certain value, or base it upon the disabled percentage of the subsystem (every ship bridge may have differing disability values). Then a check for if the Bridge subsystem is not online or is offline or is < or = to disabled percentage, shut off the impulse subsystem and add a hulk rotation (similar to what happens when ships explode) for x amount of time, or until Bridge subsystem health status is > disabled percentage. I personally would add a buff to the disability, maybe an extra 10 seconds after Bridge health rises above the disabled percentage, as sort of a feature of the helmsman actually working the console to regain control of the ship. It should work with minimal scripting. I could probably write it up in a week if I worked on it for an hour each night. :)

Update: The problem I have encountered early on (within first 15 minutes) is that many of the ship hardpoints do not contain a targetable bridge, and it does not seem to count as a subsystem property (unless I am mistaken and there is a subsystem property, I have not found it). So either we create a new subsystem set for bridges and give it some function (probably exe based, so would be hard) or add a targetable bridge hardpoint to all ship hardpoints (easier). However, I fear it may need both to work (hardest). Though I believe we could steal some stuff from the shuttle launching framework since we can target and affect shuttlebays and shuttle launching via weapon impacts, I believe we can do the same for bridges. In which case it would be on the easier side, only really needing to fetch the disabled percentages and include some code to cut off the engines and spin the hulk. For now, I will see if I can get this feature to work when knocking a shuttlebay offline. If I can do that, its just a matter of copy-pasta, and renaming stuff to avoid conflicts.

Offline KrrKs

  • Posts: 461
  • Cookies: 25
Re: Idea: Bridge destroyed -> ship temporarily out of control
« Reply #14 on: June 06, 2019, 01:27:06 PM »
Bridges are usually 'Hull' properties, (mostly set as 'critical') and I would keep it that way, personally.

Maybe adding the affected bridges' names as another ftech (or dtech or what those were called) in the ship's plugin might be better.

That way, whether destryoing the 'bridge' (or central,or cic,or borg-001 or whatever) destroys the ship or sends it spinning would be a user/ modder choice rather than a single fixed behaviour for all.

Offline Mario

  • Senior Software Developer
  • Administrator
  • Posts: 2186
  • Cookies: 1706
  • Life is life
Re: Idea: Bridge destroyed -> ship temporarily out of control
« Reply #15 on: June 06, 2019, 06:08:42 PM »
What do you think about this idea?

I like. Open a feature request on DS9FX github pls. I'll add it once I get an opportunity.
Acta, non verba.
aka USS Sovereign

Offline Tethys

  • -=USF=- Co-Leader
  • Posts: 256
  • Cookies: 89
Re: Idea: Bridge destroyed -> ship temporarily out of control
« Reply #16 on: June 06, 2019, 08:08:44 PM »
I like. Open a feature request on DS9FX github pls. I'll add it once I get an opportunity.

Sweet, this means I don't have to do it  :funny It's probably better I don't do it because I tend to mess shit up when I do new and experimental things lol

Offline Mark McWire

  • Posts: 83
  • Cookies: 1010
Re: Idea: Bridge destroyed -> ship temporarily out of control
« Reply #17 on: June 19, 2019, 03:03:20 PM »
The best way to do that is to set the bridge to "not critical" so that the game engine does not automatically destroy the spaceship and then program its own handler, which in this case becomes active.

Offline FekLeyr Targ

  • DS9FX Team
  • Posts: 490
  • Cookies: 537
Re: Idea: Bridge destroyed -> ship temporarily out of control
« Reply #18 on: June 19, 2019, 06:22:45 PM »
I like. Open a feature request on DS9FX github pls. I'll add it once I get an opportunity.

Done. Sorry for taking so long to do this. :)
TaH pagh, Tah be.

Offline Mark McWire

  • Posts: 83
  • Cookies: 1010
Re: Idea: Bridge destroyed -> ship temporarily out of control
« Reply #19 on: June 19, 2019, 07:43:31 PM »
Code: [Select]
from bcdebug import debug
import App
import MissionLib

def SetupEventHandlers():
debug(__name__ + ", SetupEventHandlers")
try:
pPlayer = MissionLib.GetPlayer()
if pPlayer:
pSet = pPlayer.GetContainingSet()
if pSet:
ObjTuple = pSet.GetClassObjectList(App.CT_SHIP)
if ObjTuple:
for pShip in ObjTuple:
if pShip:
pShip.AddPythonFuncHandlerForInstance(App.ET_SUBSYSTEM_DISABLED, __name__ + ".BridgeDisabled")
pShip.AddPythonFuncHandlerForInstance(App.ET_SUBSYSTEM_DESTROYED, __name__ + ".BridgeDestroyed")

except:
pass

def BridgeDisabled (pShip, pEvent):
debug(__name__ + ", BridgeDisabled")

pSubsystem = App.ShipSubsystem_Cast( pEvent.GetSource() )
pBridge = MissionLib.GetSubsystemByName(pShip, 'Bridge')
if (pSubsystem.GetName() == pBridge.GetName()):
pShip.SetAI(None)
pShip.SetAlertLevel(App.ShipClass.GREEN_ALERT)
pShip.CallNextHandler(pEvent)
else:
pShip.CallNextHandler(pEvent)

return

def BridgeDestroyed (pShip, pEvent):
debug(__name__ + ", BridgeDestroyed")

pSubsystem = App.ShipSubsystem_Cast( pEvent.GetSource() )
pBridge = MissionLib.GetSubsystemByName(pShip, 'Bridge')
if (pSubsystem.GetName() == pBridge.GetName()):
pShip.SetAI(None)
pShip.SetAlertLevel(App.ShipClass.GREEN_ALERT)
pShip.CallNextHandler(pEvent)
else:
pShip.CallNextHandler(pEvent)

return