-
Notifications
You must be signed in to change notification settings - Fork 0
Aircraft Daemon System
The Aircraft Daemon is a complete replacement for the vanilla AircraftDaemon. It supports custom crash durations, actions triggered on repair or crash, and provides a global altimeter overlay for story design.
Core implementation contributed by April_Crystal — special thanks.
- Daemon name:
FlightDaemon - Registration: add
<FlightDaemon .../>directly in the target computer's XML. - Key enhancements:
- Configurable crash duration (
FallDurationin seconds, default 135) - Trigger
OnFailed/OnSavedactions on crash or repair respectively - Dedicated attack, repair, and overlay actions
- Automatic cleanup of static dictionaries to avoid memory leaks
- Configurable crash duration (
Declare the daemon directly in the computer configuration file:
<Computer id="dair_crash" ... >
...
<FlightDaemon FallDuration="90" OnFailed="Actions/plane_failed.xml" OnSaved="Actions/plane_saved.xml" />
...
</Computer>| Attribute | Default | Description |
|---|---|---|
FallDuration |
135 |
Total seconds for the aircraft to fall from 38,000 feet to the ground (in immediate fall mode). |
OnFailed |
null |
Action file executed when the aircraft crashes (altitude reaches 0). |
OnSaved |
null |
Action file executed when the aircraft is repaired (firmware reload succeeds and the DLL is restored). |
Note:
FallDurationonly takes effect in immediate fall mode (AircraftFallStartsImmediately = true), which is enabled by default. The daemon initialises the runtime variableHfromFallDurationon start‑up.
Triggers a critical firmware failure on the target computer's FlightDaemon and starts the fall.
<AttackAircraft NodeID="dair_crash" FallDuration="60" />-
NodeID: theidNameof the target computer (must already have aFlightDaemonconfigured). -
FallDuration(optional): specifies the total crash duration in seconds; overrides the daemon's ownFallDuration.
Special values:-
-1(or omitted): use the daemon's current fall duration (determined by its own configuration) -
0: crash instantly (skip the descent, directly triggerOnFailedand node removal) - positive number: override the daemon's
FallDuration.
-
Attack flow: generates a firmware DLL and deletes it immediately → 6 seconds later firmware reload fails → enters critical failure → the aircraft falls for the specified duration.
Writes a valid 747FlightOps.dll into the target computer's FlightSystems folder.
<UploadAircraftSysFile NodeID="dair_crash" />- If the target computer is already running
FlightDaemon, the file is written directly intoFlightSystems/747FlightOps.dll. - Otherwise, the file is written to the path specified by the
Pathattribute. - The player still needs to connect to that computer and manually click the Reload Firmware button to complete the repair (triggers
OnSaved).
Allows the aircraft's altimeter to be permanently displayed on the left side of the screen even without connecting to the target computer.
<!-- Show overlay -->
<ShowAircraftOverlay NodeID="dair_crash" />
<!-- Hide overlay -->
<HideAircraftOverlay />- The overlay is automatically hidden when the aircraft crashes (if it was being displayed).
- The overlay is implemented via
OverlayPatches(Harmony patch) and does not interfere with normal gameplay.
After connecting to a computer with FlightDaemon, the flight instrument panel is shown:
- Disconnect button: disconnects from the current aircraft (hides the panel).
-
Pilot Alert button: sends an alert to the pilot (sets the
PilotAlertedflag, changing the interface colors). -
Reload Firmware button: starts the firmware reload process. If a valid
747FlightOps.dllexists inFlightSystems, the fault is cleared after 6 seconds andOnSavedis triggered.
-
Immediate fall mode (default): altitude decreases linearly according to
FallDuration(or the action‑overriddenH):
CurrentAltitude = 38000 * (1 - timeFallingFor / H)
The descent rate is fixed at-876.9231ft/s, but the altitude is calculated directly by the formula to ensure the total duration equalsHseconds. -
Non‑immediate fall mode (
AircraftFallStartsImmediately = false): the first 15 seconds accelerate to maximum rate via a quadratic ease‑out, then the fall continues at constant speed. In this modeFallDurationdoes not control the total time.
Typically, only the immediate fall mode needs attention; its crash duration is completely determined by
FallDurationor the value specified by the action. The non‑immediate fall mode is not currently in use.
Button labels (e.g., "Disconnect", "Pilot Alert", "Reload Firmware") use the game's built‑in locale terms and automatically switch language (Chinese, English, etc.).
- Home – Return to main index
- 飞机Daemon系统 (中文) – Chinese version
- Misc – Other things not covered in the major system pages
- Actions – Full list of custom actions
Special thanks to April_Crystal for providing the core implementation of this system.
KernelExtensions Wiki · GitHub Repository · Licensed under MIT