
This is what links these pieces of data together, not the filename of the. hullId The unique hullId specified in the corresponding ship_data.csv entry. Setting this bigger or smaller than the actual canvas dimensions will cause the sprite to stretch or shrink to fit in-game. height The maximum height of the sprite canvas in pixels. This has both visual & gameplay effects, as plume width is part of the engine HP calculations. Refers to a visual engine style set as defined in engine_styles.json The location of engine as Cartesian coordinates relative to the defined Center of the ship rotated 90 degrees clockwise. This has both visual & gameplay effects, as plume length is part of the engine HP calculations. NOTE: contrailSize 128 is a special magic hardcoded number that will define this engine as part of a Maneuvering Jets ship system. The size of the visual particle effects trailing the engine plume, in pixels. Please do note that GUI ship editors rotate the sprite 90 degree clockwise, so 180 degrees points relative "down" which is to the left. The angle in degrees that the engine plume will face, relative to the top of the sprite. Number engineSlots An array of engines with each engine defined by an array of values. Ship death explosion radius is also based on this, being collision radius + 200. Collisions cannot occur outside this radius so it is a good idea to have the collision radius fully enclose the shield & bounds. This defines the boundary within which the game engine starts (expensively) checking for collisions with the ship's shield or bounds. collisionRadius The radius of the collision circle in pixels, relative to the defined Center. It is also the pivot point when the ship turns. The defined center point is the relative reference point for the bounds, collisionRadius, engineSlots, shieldCenter, shieldRadius, viewOffset & weaponSlots. Please do note that this is not necessarily the literal center but that it is a really good idea. center The defined center of the ship, as a set of Cartesian coordinates relative to the most bottom left pixel of the sprite. builtInWings An optional array of wingIds that are build into the base ship. builtInMods An optional array of hullmod IDs that are build into the base ship. Excessive amounts of points can be a performance issue. It is generally better to have it a little inside the ship hull rather than outside. The polygon can be concave or convex and non-polygon shapes cause undefined behaviour. The points of the polygon are an array of Cartesian coordinates relative to the defined Center of the ship rotated 90 degrees clockwise. Method unapply is called as the ship system deactivates and commonly calls the unmodify methods nested within MutableShipStatsAPI."spriteName": "graphics/ships/hound/hound_base.png",Įlements bounds The collision bounds of the ship hull as defined by a polygon. Method apply is called when ship system is active (including OUT state) and commonly calls MutableShipStatsAPI. Many types of ship system scripts can implement or extend BaseShipSystemScript.


Method advance is called every frame, often conditionally calling ()

ShipSystemAIScript can be implemented for custom AI to use a ship system. Some simple ship systems can be built without scripting by using built-in functions in certain types, for example Displacer or EMP type systems. system file and then optional scripting defined in the. The most commonly tweaked stats are within the csv file, with additional configuration information within the. 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. system file as well compatibility issues with various ship system AI types. Different types are hardcoded to make use of different fields within the. Ship systems in Starsector have a few different formats, mostly governed by the type field within the. For information on ship systems outside of a modding context see the Ship Systems category page.Įvery ship system must have an entry in ship_systems.csv and a corresponding. This page is about modding ship systems and is not needed for just playing the game.
