The samples

Five mods ship with the game in mods/, off until turned on. Their source is in the repository under samples/.

Bounty

A small C# mod, built step by step in getting started: credits for every enemy ship destroyed, by its hull, sometimes double, and a message for the player who earned them. Its numbers are in settings.toml.

Bounty (Lua)

Bounty again, as a Lua script (main.lua), with the same settings and the same rules: the Lua scripting page walks through it. Its kills are counted under its own id, so the two can be on together (and pay twice).

Arsenal

A content pack, no code (content): data/content/arsenal.toml adds a beam weapon past the game's best, a stronger shield, an orbital farm improvement (a 51st improvement; colonies make room for it), a crystalline planet type nobody can breathe but rich in wealth, and a premade cruiser, the Lancer, built from the new weapon and shield. Each new tech copies one of the game's (like) and changes what differs.

Night Menu

A data pack: the Game Start picture at night. Its picture is made at install time from the player's own game data (samples/NightMenu reads the imported picture, moves every color to the palette entry nearest a darker, bluer one, and writes the pack), so no game art is in the repository. See data packs.

Simple Combat

A large C# mod that replaces battles. There is no battle screen, and the game never stops for a battle.

A round

Every few steps a round is fought. The original's battle rules become sums, their rolls replaced by expected values, so nothing is drawn from the game's random numbers.

The attack's chance

It compares how long the attackers would last under the defenders' fire (mines included) with how long the defenders would last, plus, at a planet, the time to bring its people down. Even odds mean the two would wear each other out together. The attacker's own and allied fleets already circling the planet count with it.

Its numbers

Every number is in simple-combat.toml in the mod's folder, each with a note on what it does. Copy the mod to your user folder's mods folder to change them; that copy then wins over the shipped one.

The API it uses

OnBattle takes every battle over; OnStep fights the rounds; Game.ReportFights puts the fights on the system view; OnColonyRating and OnAttackOdds give the planet list and the pointer their numbers; DamageShip, DamageStructure, Bombard, CaptureColony and DeclareWar change the game. See the reference.