Hi All!
Long time no speak! With GOG re-releasing BC, I've been playing through the game again, and earlier this afternoon had an idea for a little script to protect the ship, before a Core Breach can destroy the ship:
###############################################################################
# Filename: CoreEjectAuto.py
#
# Neither Confidential nor Proprietary, Apologies to Totally Games!
#
# Gives Brex Agency to eject the Warp Core if the damage level reaches
# 95%
#
# Created: 26/09/21 - JB2005
###############################################################################
import Lib.LibEngineering
import Custom.Sneaker.CoreEject.SneakerCoreMenuHandlers
import App
import MissionLib
pButton = None
def init():
global pButton
pButton = Lib.LibEngineering.CreateMenuButton("Eject Core", "Engineer", __name__ + ".Eject")
pButton.SetChoosable(1)
App.g_kEventManager.AddBroadcastPythonFuncHandler(App.ET_WEAPON_HIT, MissionLib.GetMission(), __name__ + ".EjectAuto")
def Eject(pObject, pEvent):
global pButton
print pButton.IsChosen()
if pButton.IsChosen() == 0:
pButton.SetChosen(1)
return 0
if pButton.IsChosen() == 1:
pButton.SetChosen(0)
return 0
def EjectAuto(pObject, pEvent):
pGame = App.Game_GetCurrentGame()
pPlayer = pGame.GetPlayer()
pPlayerPower = pPlayer.GetPowerSubsystem()
pLevel = pPlayerPower.GetCondition() / pPlayerPower.GetMaxCondition()
print(pLevel)
if pLevel > 0.05:
return
if pButton.IsChosen() == 0:
return
Custom.Sneaker.CoreEject.SneakerCoreMenuHandlers.CoreEject(pObject, pEvent)
It requires Sneaker 98's Core Eject Mod to work, and the file just drops into the QBAutostart folder!