Data and file types
Starsector modding boils down to 5 unique data types:
| Format | Examples | Why it matters |
|---|---|---|
.json |
Hull files (.ship), skin files (.skin), variant files (.variant), and config files like mod_info.json, settings.json, and similar. |
These files may look like a custom format, but they are JSON files in a trenchcoat. Starsector uses a custom .json format that accepts comments, trailing commas, and unquoted strings. |
.csv |
Ship data, weapon data, wing data, faction files, rules.csv, and other tabular game data. | Read literally by the engine; stray characters or encoding issues can cause failures or crashes. The game will not load an entry if the ID reads "Hound" when it expects "hound", or "hound " versus "hound". |
.png |
Ship sprites, weapon sprites, UI graphics, visual effects, items, skills and other small icons. | Requires the correct color space (sRGB), 32-bit, transparent background. Anti-aliasing artifacts or stray pixels show up in game. Starsector applies limited post-processing to sprites when zooming. |
.jpg |
Backgrounds, illustrations, planet textures and mission icons | Used for larger images loaded by the game. "Mission Icons" refers to the missions accessible through the main game menu, not ingame quests. |
.java |
Mod scripting against the Starsector API. Custom skills, hullmods, weapons, missions, campaign plugins. | Used for anything not read by the game as data entry from .json and .csv files. This is what makes the game run; more on that later. |
.json
Rons
.csv
CSV files used in Starsector are UTF-8 encoded with comma separators. This follows standard CSV formatting per RFC 4180.
outline common mistakes outline difference in text editor vs csv editor
.png
Rons
.jpg
Rons
.java
Rons
//todo:
add sections on the peculiarities of each file type. Explain how csv is delimited, how to escape characters in csv ("He said ""hello""""), how the json parser does what it does, png requirements, janino
add section on how to best work with the files (copy an existing one and delete contents...)
UTF-8 and using comma separators. This is standard CSV formatting per RFC 4180.