Engine events cover the core game loop and all built-in HUD draw calls. They are defined inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/HarbourMasters/Starship/llms.txt
Use this file to discover all available pages before exploring further.
port/hooks/list/EngineEvent.h and are the most commonly used hooks for frame-level mod logic and UI replacement.
Game Loop Events
These events fire at well-defined points in the engine’s main update cycle. None carry extra fields beyond the baseIEvent.
| Event | When it fires | Cancellable |
|---|---|---|
DisplayPreUpdateEvent | Before the display update begins | Yes |
DisplayPostUpdateEvent | After the display update completes | No |
GamePreUpdateEvent | Before game logic runs for the frame | Yes |
GamePostUpdateEvent | After game logic runs for the frame | No |
PlayUpdateEvent | During the play-state update tick | Yes |
PlayUpdateEvent is cancellable and is used internally by the debug-pause feature. If your listener sets cancelled = true, the engine skips the remainder of the play-state update for that tick — effectively freezing gameplay.Example — per-frame logic in DisplayPostUpdateEvent
mymod.c
Example — pausing gameplay with PlayUpdateEvent
pause_hook.c
Player Update Events
Player update events fire around the per-player update tick and carry a pointer to thePlayer struct being updated.
Pointer to the
Player struct for the player being updated this tick.| Event | When it fires | Cancellable |
|---|---|---|
PlayerPreUpdateEvent | Before a player’s update runs | Yes |
PlayerPostUpdateEvent | After a player’s update completes | No |
Example — PlayerPostUpdateEvent
infinite_boost.c
HUD Draw Events
HUD draw events fire immediately before the engine renders each HUD element. Cancelling a HUD event suppresses the default rendering so your listener can draw a replacement.Quick Reference
| Event | Element drawn | Extra fields | Cancellable |
|---|---|---|---|
DrawRadarHUDEvent | Radar background | — | Yes |
DrawRadarMarkArwingEvent | Arwing blip on radar | s32 colorIdx | Yes |
DrawRadarMarkWolfenEvent | Wolfen blip on radar | — | Yes |
DrawBoostGaugeHUDEvent | Boost/brake gauge | — | Yes |
DrawBombCounterHUDEvent | Bomb count display | — | Yes |
DrawIncomingMsgHUDEvent | ”Incoming” message | — | Yes |
PreSetupRadioMsgEvent | Radio message setup | s32* radioRedBox | No |
DrawGoldRingsHUDEvent | Gold ring counter | — | Yes |
DrawLivesCounterHUDEvent | Lives counter | — | Yes |
DrawTrainingRingPassCountHUDEvent | Training ring count | — | Yes |
DrawEdgeArrowsHUDEvent | Edge warning arrows | — | Yes |
DrawBossHealthHUDEvent | Boss health bar | — | Yes |
DrawGlobalHUDPreEvent | Before all HUD is drawn | — | Yes |
DrawGlobalHUDPostEvent | After all HUD is drawn | — | No |
Field Details
DrawRadarMarkArwingEvent
Index into the engine’s arwing colour palette array. Modify this value inside a non-cancelling listener to tint the radar blip, or cancel the event and draw your own.
PreSetupRadioMsgEvent
Pointer to the boolean flag that controls whether the radio message box renders with a red (enemy) border. Write
*ev->radioRedBox = true to force enemy styling.PreSetupRadioMsgEvent uses CALL_EVENT in the engine (not CALL_CANCELLABLE_EVENT), so setting cancelled = true has no effect on engine flow. Use the radioRedBox pointer to influence rendering.Code Examples
Replace the boost gauge
custom_boost_gauge.c
Colour-code arwing radar blips
radar_colors.c
Force enemy radio styling
enemy_radio.c
Overlay extra HUD elements
hud_overlay.c