Dug into the files, to see what makes stations in combat tick. Here's what I found:
- Firstly, each module and the base are a separate .ship file and are technically ships. The base is capital sized, and the modules should be frigate-sized. The base should have Axial Rotation as hullmods, to make it spin in place, the modules should have "Reduced Explosion" (reduces death explosion to 1/4 the size and 1/10 the damage), and both the base and modules should have Targeting Supercomputer for extra range (I assume it isn't necessary for the base, if that part is unarmed). If you want your station base to be invincible, give it Vast Bulk (reduces engine and hull damage to 0), it does not affect the mass (that's in the csv). There is also a hullmod called Never Detaches, to stop modules from detaching when destroyed, and Always Detaches, for the opposite.
Axial Rotation forces a ship to always be turning right. You can use that as a template to have hullmods which force a ship to do other commands. Commands are in starfarer\api\combat, and including turning in either direction, strafing in either direction, accelerating forwards or backwards, decelerating, firing, venting, toggling shields or phase, toggling autofire, holding fire, toggling fighter mode, or using system. Have fun.
- Secondly, modules are attached through the use of a new weapon mount type, "STATION_MODULE", which should be large sized and hardpoints. Mounts intended to be used as weapons should be set up as normal, with whatever size and type you want. Since everything is modular, you set what modules go where in the .variant file, which makes it easy to have stations with different weapon loadouts while keeping the same base and modules. Different modules also have their own .variant files where you can decide what weapons each loadout uses.
- Thirdly, for stats, both station bases and modules are made in the same format as normal ships, in the same .csv. The "name" column should be blank, put the name of the entire station (for the base) or what the module is (for the module) in the "designation" column instead. Station bases should have the "STATION" flag (extremely important, this is what allows a station to have modules and what makes it behave like a station. This also forces you into autopilot), and both bases and modules should have "UNBOARDABLE" (also used to make it impossible to board spoiler ships), and "HIDE_IN_CODEX".
- Station bases and modules have .variant files just like normal ships. What modules are on a station is determined by the base. Just stick the name of the module variant you want into the appropriate STATION_MODULE weapon slot.
- Station spawning is handled like normal spawning, with a special category for each station type (each vanilla station has its own category, with just one entry). Not sure when or how it's used.
- Station bases have: an actual max speed, acceleration and deceleration, a turn speed (presumably controlling how fast they rotate), no ordnance points (though armed station bases should probably have them, they don't exist in vanilla), a mass of 5000, a maximum crew, minimum crew, fuel and cargo storage value of 0, and a burn speed of 0 (if you want to have them be actually useable in a normal fleet, don't do that, of course). They should also have no peak CR time or CR loss per second. Supplies/month and deployment is 50 for current stations. There's a few new columns on how a station or ship should break apart, stations have a probability of 0 (normal ships range from 0.4 to 0.75, increasing with fragility), and blanks for where minimum pieces and maximum pieces go.
All of this is adjustable on a per-base baseis (heh), and anything not mentioned is set up exactly like a normal ship (health, flux, armor, shields, systems, etc.)
- Station modules have a max speed, acceleration and deceleration of 0, while turn speed is 10 for all current modules. They have 0 storage space, cost blank supplies, use blanked CR per day but use 1% per deployment. They have breakability stats exactly the same as normal ships. Their max burn speed is blank. They have ordnance points as normal.
All of this is adjustable on a per-module basis, anything not mentioned is exactly like a normal ship. Hangar modules are possible, and are handled just as any other carrier (launch bays are the same as 0.7, but wings now go in the variant file, and the number of fighter bays goes in the .csv. Built in wings are handled just like weapons, but with their own section in the .ship. Check a ship with drones for an example.)
Hopefully this is useful to someone. Not entirely sure how station destruction is handled.