Modding ship systems overview
This page is about modding ship systems and is not needed for just playing the game. For information on ship systems outside of a modding context see the Ship Systems category page.
Every ship system must have an entry in ship_systems.csv and a corresponding .system file in \data\shipsystems\
Ship systems in Starsector have a few different formats, mostly governed by the type field within the .system file. Different types are hardcoded to make use of different fields within the .system file as well compatibility issues with various ship system AI types. Be aware something that works within one type of ship system does not necessarily mean that it will also work with a different ship system type.
The most commonly tweaked stats are within the csv file, with additional configuration information within the .system file and then optional scripting defined in the .system file as well. Some simple ship systems can be built without scripting by using built-in functions in certain types, for example Displacer or EMP type systems. Most ship systems will use scripting.
Scripting interfaces
Custom AI
ShipSystemAIScript can be implemented for custom AI to use a ship system. method int is called once. Method advance is called every frame, often conditionally calling this.ship.useSystem()
Basic systems scripts
Many types of ship system scripts can implement or extend BaseShipSystemScript. Method apply is called when ship system is active (including OUT state) and commonly calls MutableShipStatsAPI. Method unapply is called as the ship system deactivates and commonly calls the unmodify methods nested within MutableShipStatsAPI.
System Types
Known vanilla types of ship system:
WEAPON
ENGINE_MOD
SHIELD_MOD
STAT_MOD
FAST_RELOAD
AMMO_RELOAD
TELEPORTER
PHASE_CLOAK
DISPLACER
DRONE_LAUNCHER
EMP
AI Types
Known vanilla AI types for ship system:
ACAUSAL_DISRUPTOR
AMMO_RELOAD
BURN_DRIVE
CUSTOM - Using CUSTOM type will read additional field aiScript for location of the custom AI script, which needs to implement ShipSystemAIScript
DAMPER_FIELD
DRONE_LAUNCHER_PD
DRONE_LAUNCHER_STANDARD
EMP
ENTROPY_AMPLIFIER
FAST_RELOAD
FLARE
FLARE_JAMMER
FORTRESS_SHIELD
HIGH_ENERGY_FOCUS
INTERDICTOR
MANEUVERING_JETS
MINE_STRIKE
NONE - Placeholder for null AI
PHASE_CLOAK
PHASE_DISPLACER
PHASE_TELEPORTER
RECALL_DEVICE
RESERVE_DEPLOYMENT
TARGETING_FEED
TEMPORAL_SHELL
WEAPON_BOOST