Repository navigation
API Reference
Every public type of UniverseGenerator 1.0.0, read from the published package: the signatures by reflection over lib/net10.0/UniverseGenerator.dll from nuget.org, the descriptions from the XML documentation that ships beside it. Everything is in the namespace UniverseGeneration. "Since" names 1.0.0 for a member that 1.0.0-beta.1 did not have; a blank means it was there in 1.0.0-beta.1. The netstandard2.0 build has the same public surface.
Records are immutable and have a public parameterless constructor with init properties, so with works on every one of them; the constructors are not listed below. Equality, ToString and Deconstruct are the compiler's record members.
Contents:
- Generating
- Options, presets and guarantees
- Hooks, custom fields and tables
- Units and distances
- Generated records
- Enums
Entry points: one call per level, addresses and links.
record. A small universe at game scale: four to seven galaxy groups and clusters joined by filaments, with named voids holding lone systems, four landmark galaxies, a merging pair and an epoch that sets every cluster's age. Universe.Generate("my-seed") makes one; Universe.At regenerates any object of any level from its address. Positions are in universe units (100,000 light-years) within about Universe.Radius of the centre.
| Member | Description | Since |
|---|---|---|
string Address { get; init; } |
Where it is, such as v1-my-seed/universe. |
|
string Name { get; init; } |
Its name, such as "the Lantern Reach". | |
StellarAge Age { get; init; } |
Its epoch, which every cluster in it takes as its age. | |
double Radius { get; init; } |
The radius of the universe map in universe units. | |
IReadOnlyList<UniverseNode> Nodes { get; init; } |
Every group and cluster as the universe map shows it. | |
IReadOnlyList<Filament> Filaments { get; init; } |
The filaments joining the clusters, each pair once with the lower index first, in index order. | |
IReadOnlyList<CosmicVoid> Voids { get; init; } |
The named voids, each holding a few lone systems. | |
IReadOnlyList<UniverseLandmark> Landmarks { get; init; } |
The landmarks: home spiral, dying giant, ring galaxy, distant quasar and the merger. | |
UniverseMerger Merger { get; init; } |
The merging pair and the conflict on its frontier. | |
IReadOnlyList<GalaxyCluster> Clusters { get; init; } |
Every group and cluster, in the order of Universe.Nodes; their galaxies are generated when first read. |
|
IReadOnlyDictionary<string, string> Custom { get; init; } |
Your own fields, by name, set by a GeneratorHooks hook or your code; empty from the generator. |
1.0.0 |
string ToJson(bool indented = false, bool children = false) |
This universe as JSON: every field, with a schema of universe-generator/1 and a type of universe first; enum values as their names, numbers rounded as stored, the same text on every runtime. Lists generated when first read (a galaxy's systems, a cluster's galaxies, a void's systems) are null unless children is true, which generates and writes them all; each map entry carries the address. |
1.0.0 |
GalaxyCluster Cluster(int index) |
Cluster index, the same as Clusters[index]. Throws System.ArgumentOutOfRangeException The universe has no cluster with that index; the message gives the range. |
|
static Universe Generate(string seed, GeneratorOptions options = null) |
Generates a universe from any seed text, such as "my-seed". Throws System.ArgumentException The seed is too long or an option is out of range; the message says which. |
|
static Universe Generate(string seed, GeneratorOptions options, GeneratorHooks hooks) |
Generates a universe from any seed text, running hooks on it and on every object below it as each is made. Throws System.ArgumentException The seed is too long or an option is out of range; the message says which. |
1.0.0 |
static Universe Generate(long seed, GeneratorOptions options = null) |
Generates a universe from a number; the same as passing the number's digits as text. | |
static string Link(string address, GeneratorOptions options) |
A link to the object at address made with options: the address, then ? and GeneratorOptions.ToCode, such as v1-my-seed/galaxy/system/31?systems=120, or the address alone for the defaults. Universe.At regenerates the object from the link with no options passed. Throws System.ArgumentException The address cannot be read, or an option is out of range. |
1.0.0 |
static object At(string address, GeneratorOptions options = null) |
Regenerates the object at address, such as v1-my-seed/galaxy/system/31/planet/2 or v1-my-seed/planet (a planet generated on its own): a Universe (v1-my-seed/universe), GalaxyCluster (alone, v1-my-seed/cluster, or v1-my-seed/universe/cluster/2), CosmicVoid (v1-my-seed/universe/void/0), Galaxy (alone, or .../cluster/galaxy/2), StarSystem, Planet, Moon, Station or Belt (.../system/belt/0). It gives the same result as generating the level it belongs to and walking down to it. An address does not carry options, so pass the ones the object was generated with, or pass a link from Universe.Link (the address, ? and the options' code), which carries them. Throws System.ArgumentException The address cannot be read, names a level or object that does not exist, or an option is out of range, or a link was passed together with options; the message says which. |
|
static object At(string address, GeneratorOptions options, GeneratorHooks hooks) |
Regenerates the object at address (or a link) as Universe.At does, running hooks on every object on the way down, so it equals what the same hooks gave when the object was first generated. Throws System.ArgumentException The address cannot be read, names a level or object that does not exist, or an option is out of range; the message says which. |
1.0.0 |
record. A group or cluster of galaxies: a map of galaxies with their type codes, ages and cores, joined by gates, a ring of wormholes and tethers so that every galaxy can be reached. Positions are in cluster units within about GalaxyCluster.Radius of the centre. GalaxyCluster.Generate("my-seed") makes one; each galaxy is generated when first read, and equals what its address alone regenerates.
| Member | Description | Since |
|---|---|---|
string Address { get; init; } |
Where it is, such as v1-my-seed/cluster. |
|
string Name { get; init; } |
Its name, such as "Halcyon Group" or "Vesper Cluster". | |
ClusterKind Kind { get; init; } |
A group or a cluster (never ClusterKind.Auto). |
|
StellarAge Age { get; init; } |
The cluster's epoch: young clusters hold younger spirals and more quasars. | |
double Radius { get; init; } |
The radius of the cluster map in cluster units; satellites may lie a little beyond it. | |
IReadOnlyList<ClusterEntry> Map { get; init; } |
Every galaxy as the cluster map shows it. Cheap to read. | |
IReadOnlyList<ClusterLink> Links { get; init; } |
The links between galaxies, each pair once with the lower index first, in index order. | |
IReadOnlyList<Galaxy> Galaxies { get; init; } |
Every galaxy in full, in the order of GalaxyCluster.Map; each is generated when first read. |
|
IReadOnlyDictionary<string, string> Custom { get; init; } |
Your own fields, by name, set by a GeneratorHooks hook or your code; empty from the generator. |
1.0.0 |
string ToJson(bool indented = false, bool children = false) |
This galaxyCluster as JSON: every field, with a schema of universe-generator/1 and a type of galaxyCluster first; enum values as their names, numbers rounded as stored, the same text on every runtime. Lists generated when first read (a galaxy's systems, a cluster's galaxies, a void's systems) are null unless children is true, which generates and writes them all; each map entry carries the address. |
1.0.0 |
Galaxy Galaxy(int index) |
Galaxy index in full, the same as Galaxies[index]. Throws System.ArgumentOutOfRangeException The cluster has no galaxy with that index; the message gives the range. |
|
static GalaxyCluster Generate(string seed, GeneratorOptions options = null) |
Generates a group or cluster of galaxies from any seed text, such as "my-seed". Throws System.ArgumentException The seed is too long or an option is out of range; the message says which. |
|
static GalaxyCluster Generate(string seed, GeneratorOptions options, GeneratorHooks hooks) |
Generates a group or cluster from any seed text, running hooks on it and on each galaxy as it is first read. Throws System.ArgumentException The seed is too long or an option is out of range; the message says which. |
1.0.0 |
static GalaxyCluster Generate(long seed, GeneratorOptions options = null) |
Generates a cluster from a number; the same as passing the number's digits as text. |
record. A galaxy: a map of star systems joined by lanes, grouped into named regions, with danger growing away from the core. Positions are in game units within Galaxy.Radius of the centre. Galaxy.Generate("my-seed") makes one; each system's details are generated when first read, and equal what its address alone regenerates.
| Member | Description | Since |
|---|---|---|
string Address { get; init; } |
Where it is, such as v1-my-seed/galaxy. |
|
string Name { get; init; } |
Its name, such as "Halcyon Galaxy"; unique within a cluster. | |
string Type { get; init; } |
Its type code, such as Sb, SBc, E3, S0, cD, Irr, dSph or Ring. Alone, it is read from the shape. | |
string Descriptor { get; init; } |
The galaxy in words: "an old giant elliptical galaxy, rich in metals, with a quasar at its core". | |
StellarAge Age { get; init; } |
How old its stars are overall; old galaxies hold more old regions. Mature for a galaxy alone. | |
GalaxyRichness Richness { get; init; } |
How rich its stars are in metals: rich galaxies have more giant planets. Normal for a galaxy alone. | |
CoreActivity CoreActivity { get; init; } |
What its central black hole is doing; Quiet for a galaxy alone. | |
double CoreHazardRadius { get; init; } |
The radius around the centre, in game units, where an active core's radiation raises danger; 0 when quiet. | |
IReadOnlyList<GalaxyGate> Gates { get; init; } |
Its links to other galaxies of its cluster, in the cluster's link order; empty for a galaxy alone. | |
SkyLandmark Landmark { get; init; } |
Where the universe's sky landmark appears from here; null for a galaxy outside a universe, and for the landmark itself. | |
GalaxyShape Shape { get; init; } |
The shape the map was drawn with (never GalaxyShape.Auto). |
|
int Arms { get; init; } |
The number of spiral arms; 0 for shapes without arms. | |
double Radius { get; init; } |
The radius in game units; every system lies within it of the centre (0, 0). | |
int Core { get; init; } |
The index of the core system, the one nearest the centre; hops and danger count from it. | |
IReadOnlyList<MapEntry> Map { get; init; } |
Every system as the map shows it: name, position, star class, region, hops, danger. Cheap to read. | |
IReadOnlyList<Lane> Lanes { get; init; } |
The lanes between systems, each listed once with the lower index first. | |
IReadOnlyList<GalaxyRegion> Regions { get; init; } |
The named regions; the first is centred on the core. | |
IReadOnlyList<StarSystem> Systems { get; init; } |
Every system in full, in the order of Galaxy.Map; each is generated when first read. |
|
IReadOnlyList<Faction> Factions { get; init; } |
The powers holding its systems, grown over the lanes from their capitals; MapEntry.Faction says who holds each. |
|
IReadOnlyList<PointOfInterest> PointsOfInterest { get; init; } |
Sites its story places in systems: ruins, wrecks, caches, anomalies, outposts, shrines and a precursor trail. | |
IReadOnlyList<GalaxyHazard> Hazards { get; init; } |
Areas where travel is harder: nebulae, ion storms, rifts, dark clouds and an active core's radiation. | |
IReadOnlyList<Monument> Monuments { get; init; } |
One monument per region, in the order of Galaxy.Regions. |
|
IReadOnlyList<Beacon> Beacons { get; init; } |
Two to four beacons seen from anywhere in the galaxy, spread across the map. | |
IReadOnlyList<GeneratorWarning> Warnings { get; init; } |
What generation had to change or ignore (fewer systems than asked, an ignored option, a numbered name); usually empty. | 1.0.0 |
IReadOnlyDictionary<string, string> Custom { get; init; } |
Your own fields, by name, set by a GeneratorHooks hook or your code; empty from the generator. |
1.0.0 |
string ToJson(bool indented = false, bool children = false) |
This galaxy as JSON: every field, with a schema of universe-generator/1 and a type of galaxy first; enum values as their names, numbers rounded as stored, the same text on every runtime. Lists generated when first read (a galaxy's systems, a cluster's galaxies, a void's systems) are null unless children is true, which generates and writes them all; each map entry carries the address. |
1.0.0 |
StarSystem System(int index) |
System index in full, the same as Systems[index]. Throws System.ArgumentOutOfRangeException The galaxy has no system with that index; the message gives the range. |
|
static Galaxy Generate(string seed, GeneratorOptions options = null) |
Generates a galaxy from any seed text, such as "my-seed". Throws System.ArgumentException The seed is too long or an option is out of range; the message says which. |
|
static Galaxy Generate(string seed, GeneratorOptions options, GeneratorHooks hooks) |
Generates a galaxy from any seed text, running hooks on it and on each system as it is first read. Throws System.ArgumentException The seed is too long or an option is out of range; the message says which. |
1.0.0 |
static Galaxy Generate(long seed, GeneratorOptions options = null) |
Generates a galaxy from a number; the same as passing the number's digits as text. |
record. A star system: its star (and companion), planets with their moons, belts, stations, landmarks and story tags. Distances are in au. StarSystem.Generate("my-seed") makes one on its own; a galaxy makes them in place.
| Member | Description | Since |
|---|---|---|
string Address { get; init; } |
Where it is, such as v1-my-seed/system or v1-my-seed/galaxy/system/31. |
|
string Name { get; init; } |
The star's name, which is also the system's. | |
Star Star { get; init; } |
The primary star. | |
Companion Companion { get; init; } |
A second star, or null. | |
StellarAge Age { get; init; } |
How old the system's region is. | |
int Danger { get; init; } |
How dangerous it is, 1 (safe) to 10 (deadly). | |
double HabitableZoneInner { get; init; } |
The inner edge of the habitable zone in au. | |
double HabitableZoneOuter { get; init; } |
The outer edge of the habitable zone in au. | |
double FrostLine { get; init; } |
The frost line in au, past which ices condense. | |
IReadOnlyList<Planet> Planets { get; init; } |
The planets, innermost first. | |
IReadOnlyList<Belt> Belts { get; init; } |
Asteroid and icy belts, innermost first. | |
IReadOnlyList<Station> Stations { get; init; } |
The stations. | |
IReadOnlyList<Landmark> Landmarks { get; init; } |
What makes the system memorable; always at least one. | |
IReadOnlyList<string> Tags { get; init; } |
One or two story tags, such as "mining boom", that agree with the system's data. | |
string Descriptor { get; init; } |
One line in plain words, such as "a yellow star with 6 planets and an asteroid belt". | |
IReadOnlyDictionary<string, string> Custom { get; init; } |
Your own fields, by name, set by a GeneratorHooks hook or your code; empty from the generator. |
1.0.0 |
string ToJson(bool indented = false) |
This starSystem as JSON: every field, with a schema of universe-generator/1 and a type of starSystem first; enum values as their names, numbers rounded as stored, the same text on every runtime. |
1.0.0 |
static StarSystem Generate(string seed, GeneratorOptions options = null) |
Generates a star system on its own from any seed text, such as "my-seed". Throws System.ArgumentException The seed is too long or an option is out of range; the message says which. |
|
static StarSystem Generate(string seed, GeneratorOptions options, GeneratorHooks hooks) |
Generates a star system on its own from any seed text, running hooks on its planets and on it. Throws System.ArgumentException The seed is too long or an option is out of range; the message says which. |
1.0.0 |
static StarSystem Generate(long seed, GeneratorOptions options = null) |
Generates a star system from a number; the same as passing the number's digits as text. |
record. A planet. Orbit in au, period in days, mass and radius in Earths, temperatures in kelvin, gravity in g. Planet.Generate("my-seed") makes one on its own; a star system makes them in place. The fields after Planet.Descriptor are the planet level (ai-docs/notes/2026-10-02-planet-level-design.md).
| Member | Description | Since |
|---|---|---|
string Address { get; init; } |
Where it is, such as v1-my-seed/galaxy/system/31/planet/2 or v1-my-seed/planet. |
|
int Index { get; init; } |
Its position counting outwards from 0. | |
string Name { get; init; } |
Its name: the system's name and a letter, such as "Tau Ceti e". | |
PlanetKind Kind { get; init; } |
What kind of world. | |
OrbitZone Zone { get; init; } |
Its zone: hot, warm, temperate, cold or outer. | |
double Orbit { get; init; } |
Distance from the star (or both stars of a close pair) in au. | |
double Period { get; init; } |
Orbital period in days. | |
double Eccentricity { get; init; } |
Orbital eccentricity, 0 (a circle) to 0.6: small in systems of several planets (about 0.05, as Kepler's multi-planet systems show), larger for a planet alone, near 0 for hot planets, and never enough to cross a neighbour's orbit. Planet.Orbit is the semi-major axis. |
1.0.0 |
double Inclination { get; init; } |
Inclination in degrees to the system's mean plane (to the star's equator for a planet alone). | 1.0.0 |
double PeriapsisAngle { get; init; } |
Where the orbit comes closest to the star, as an angle in degrees (0 to 360) on the map, for drawing the ellipse. | 1.0.0 |
double Mass { get; init; } |
Mass in Earths. | |
double Radius { get; init; } |
Radius in Earths. | |
bool Rings { get; init; } |
True when it has rings. | |
IReadOnlyList<Moon> Moons { get; init; } |
Its moons, innermost first. | |
string Descriptor { get; init; } |
One line in plain words, such as "a cold ocean world under a red dwarf". | |
Composition Composition { get; init; } |
What it is mostly made of. | |
double Gravity { get; init; } |
Surface gravity in g (at the cloud tops for giants). | |
double EscapeVelocity { get; init; } |
Escape velocity in km/s. | |
double Density { get; init; } |
Mean density in g/cm³ (Earth 5.51). | |
double Insolation { get; init; } |
Starlight received, Earth = 1. | |
double Albedo { get; init; } |
The share of starlight reflected, 0 to 1. | |
double Temperature { get; init; } |
Average surface temperature in kelvin (cloud tops for giants). | |
double DayTemperature { get; init; } |
Average day-side temperature in kelvin. | |
double NightTemperature { get; init; } |
Average night-side temperature in kelvin. | |
Atmosphere Atmosphere { get; init; } |
Its air. | |
double Water { get; init; } |
The share of the surface under liquid water, 0 to 1. | |
double Ice { get; init; } |
The share of the surface under ice, 0 to 1. | |
double Rotation { get; init; } |
The time to turn once, in hours (its orbital period when locked). | |
Spin Spin { get; init; } |
Free, in a 3:2 resonance, or tidally locked. | |
double Tilt { get; init; } |
Axial tilt in degrees; over 90 it spins backwards. | |
IReadOnlyList<ClimateBand> Bands { get; init; } |
Six bands from equator to pole (or from the point under the star when locked); empty for giants. | |
IReadOnlyList<BiomeShare> Biomes { get; init; } |
The surface by biome, largest first; empty for giants. | |
LifeLevel Life { get; init; } |
How far life has come. | |
int Flora { get; init; } |
How much plant life, 0 to 5. | |
int Fauna { get; init; } |
How much animal life, 0 to 5. | |
IReadOnlyList<string> Traits { get; init; } |
One or two things that make it memorable, such as "global dust storms", true to its data. | |
string Anomaly { get; init; } |
Something no one can explain, or null; the Weirdness option sets how often. | |
ResourceGrades Resources { get; init; } |
What can be mined or harvested. | |
int Hazard { get; init; } |
How dangerous the surface is: 1 shirt-sleeves, 2 a mask or coat, 3 a pressure suit, 4 heavy protection, 5 lethal. | |
IReadOnlyList<string> Hazards { get; init; } |
The dangers in words, worst first, such as "vacuum" or "dangerous wildlife". | |
double Similarity { get; init; } |
The Earth Similarity Index, 0 to 1 (Earth 1). | |
Habitability Habitability { get; init; } |
How well people could live there; Planet.HabitabilityFor asks for another species. |
|
string Summary { get; init; } |
A second line of plain words, such as "1 g, breathable air at 1.2 bar, 17 °C, 64% ocean, mostly temperate forest, complex life; hazard 1". | |
IReadOnlyDictionary<string, string> Custom { get; init; } |
Your own fields, by name, set by a GeneratorHooks hook or your code; empty from the generator. |
1.0.0 |
string ToJson(bool indented = false) |
This planet as JSON: every field, with a schema of universe-generator/1 and a type of planet first; enum values as their names, numbers rounded as stored, the same text on every runtime. |
1.0.0 |
Habitability HabitabilityFor(Species species) |
How well species could live here, from its temperature, gravity, pressure and air. |
|
static Planet Generate(string seed, GeneratorOptions options = null) |
Generates a planet on its own, with its star drawn from the same seed, from any seed text such as "my-seed". Throws System.ArgumentException The seed is too long or an option is out of range; the message says which. |
|
static Planet Generate(string seed, GeneratorOptions options, GeneratorHooks hooks) |
Generates a planet on its own from any seed text, running hooks on it. Throws System.ArgumentException The seed is too long or an option is out of range; the message says which. |
1.0.0 |
static Planet Generate(long seed, GeneratorOptions options = null) |
Generates a planet from a number; the same as passing the number's digits as text. |
record. A star's name on its own, for a name tool or a story: StarName.Generate("my-seed") gives one, and StarName.Generate("my-seed", 20) twenty different ones. The names are catalogue-style, as the systems carry (IAU proper names, Bayer and Flamsteed designations, HD, HIP, GJ, Kepler, TOI and the remnants' PSR, WD and Gaia BH), and fit the star's class. They come from their own seeds, so they are not the names of the systems of the same seed.
| Member | Description | Since |
|---|---|---|
string Name { get; init; } |
The name, such as "HD 31487", "Lambda Pegasi" or "PSR J2204+3957". | |
StarClass Class { get; init; } |
The class of the star the name fits. | |
static int MaxCount |
The most names one call makes. | |
static StarName Generate(string seed, StarClass? starClass = null, GeneratorOptions options = null) |
One star name from any seed text. With starClass, a name for that class; without it, the class is drawn with the options' star mix. The same as the first of StarName.Generate. Throws System.ArgumentException The seed is too long or an option is out of range; the message says which. |
|
static IReadOnlyList<StarName> Generate(string seed, int count, StarClass? starClass = null, GeneratorOptions options = null) |
count different star names from any seed text, 1 to StarName.MaxCount. Throws System.ArgumentException The seed is too long, the count is out of range or an option is; the message says which. |
|
static IReadOnlyList<StarName> Generate(long seed, int count, StarClass? starClass = null, GeneratorOptions options = null) |
Star names from a number; the same as passing the number's digits as text. |
What you can ask for, validated before anything is generated.
record. Every setting of the generator, as an immutable record: start from a Preset and change what you need with with, for example Preset.SpaceOpera with { Weirdness = 10 }. Each level reads the settings it uses. Invalid values are refused before anything is generated, with a message saying what to change.
| Member | Description | Since |
|---|---|---|
StarMix StarMix { get; init; } |
The star types to draw from. | |
int Weirdness { get; init; } |
The percentage of systems (0 to 100) that get an outlier landmark breaking the usual rules. | |
int MaxPlanetsPerSystem { get; init; } |
The most planets a system may have (0 to 20). | |
int Systems { get; init; } |
How many systems a galaxy has (1 to GeneratorOptions.MaxSystems); 60 reads well on one screen. |
|
GalaxyShape Shape { get; init; } |
The galaxy's shape; GalaxyShape.Auto draws one that reads at the requested count. |
|
ClusterKind ClusterKind { get; init; } |
Whether a galaxy cluster is a small group or a rich cluster; ClusterKind.Auto draws one. |
|
Epoch Epoch { get; init; } |
The age of a universe or of a cluster generated alone; Epoch.Auto draws one. |
|
int? Arms { get; init; } |
The number of arms of spiral and barred galaxies (2 to 4); null draws it from the seed. | 1.0.0 |
int ExtraLanes { get; init; } |
The chance, in percent (0 to 100), that two neighbouring systems get a lane beyond the network that keeps every system reachable; higher means more routes and fewer chokepoints. The default is 25. | 1.0.0 |
int DangerShift { get; init; } |
Added to every system's danger (-5 to 5), which stays within 1 to 10; negative for a safer galaxy. | 1.0.0 |
NameStyle Names { get; init; } |
Catalogue names (the default) or invented ones; planets and moons take their system's name either way. | 1.0.0 |
Guarantee Require { get; init; } |
What every galaxy must hold at least one of, such as Guarantee.GardenWorld | Guarantee.BlackHole (default none). A galaxy missing one gets it in a system its own stream picks; the rest of the map is unchanged, and Galaxy.Warnings says when a guarantee cannot be met. Lone systems and planets ignore it. |
1.0.0 |
string Tables { get; init; } |
The id of registered GeneratorTables to draw star classes, planet kinds and giant planets' moons from, such as my-mod; null (the default) uses the built-in tables. Register the tables before generating, in every program that regenerates from a link. |
1.0.0 |
static int MaxSeedLength |
The longest seed text accepted. | |
static int MaxSystems |
The most systems a galaxy may have; a galaxy has fewer only if its shape cannot hold them all. | |
void Validate() |
Throws an System.ArgumentException naming the first invalid setting and what it must be. |
|
string ToCode() |
The settings that differ from the defaults as short text, such as systems=120&shape=barred (empty for the defaults). Put it after an address with ? to share an object with its options (see Universe.Link), or read it back with GeneratorOptions.FromCode. Codes stay readable for the whole major version. |
1.0.0 |
static GeneratorOptions FromCode(string code) |
Reads a code written by GeneratorOptions.ToCode; a leading ? is allowed and an empty code gives the defaults. Throws System.ArgumentException The code names an unknown setting, repeats one, or gives a value out of range; the message says which. |
1.0.0 |
IReadOnlyList<GeneratorWarning> Check() |
Soft problems with these settings that GeneratorOptions.Validate lets through, such as GeneratorOptions.Arms for a shape without arms, each as a GeneratorWarning; empty when there are none. A galaxy also lists what generation itself had to change in Galaxy.Warnings. Throws System.ArgumentException A setting is invalid (see GeneratorOptions.Validate). |
1.0.0 |
static class. Ready-made settings. Each is a GeneratorOptions record, so with adjusts it.
| Member | Description | Since |
|---|---|---|
static GeneratorOptions Default |
The defaults: game-tuned stars, a 5% outlier share. | |
static GeneratorOptions SpaceOpera |
Busier and stranger: more outliers. | |
static GeneratorOptions Plausible |
Real star shares and few outliers, for hard science fiction. | |
static GeneratorOptions Pocket |
A small map for a short game or one session: 20 systems with at most 6 planets each. | 1.0.0 |
static GeneratorOptions Roguelike |
A run: 30 systems, few extra lanes (so more chokepoints), danger two levels higher, more outliers. | 1.0.0 |
static GeneratorOptions Cozy |
Gentle: 40 well-connected systems, danger three levels lower, few outliers. | 1.0.0 |
static GeneratorOptions Epic |
A long campaign: 300 systems, so spirals and bars read (Auto picks them from 80). | 1.0.0 |
enum. Things every galaxy must hold at least one of, for GeneratorOptions.Require; combine them with \|, as in Guarantee.GardenWorld \| Guarantee.BlackHole. A galaxy that already has one changes nothing; one that lacks it gets it in a system its own constraints stream picks, and every other system stays as it was. Since 1.0.0.
| Value | Description | Since |
|---|---|---|
None |
Nothing guaranteed (the default). | |
GardenWorld |
A garden world, in the temperate zone of a star that can host one. | |
OceanWorld |
An ocean world in a temperate zone. | |
PrecursorSite |
A precursor site (PointOfInterestKind.PrecursorSite). |
|
BlueStar |
A blue star: class O or B. | |
Giant |
A giant or supergiant. | |
WhiteDwarf |
A white dwarf. | |
NeutronStar |
A neutron star. | |
BlackHole |
A stellar black hole. | |
SunLikeStar |
A yellow star like the Sun (class G). |
enum. The overall form of a galaxy's map.
| Value | Description | Since |
|---|---|---|
Auto |
Drawn from the seed among the shapes that read at the requested count: spirals and bars from 80 systems. | |
Spiral |
Two to four logarithmic arms around a bright core. | |
Barred |
Arms that start from the ends of a central bar. | |
Elliptical |
A smooth oval, densest in the middle. | |
Ring |
A ring of systems around a sparse middle and a small core. | |
Irregular |
A few uneven clumps. | |
Colliding |
Two discs pulling each other apart, joined by a tidal bridge and trailing tails. Never drawn by GalaxyShape.Auto; ask for it by name. |
1.0.0 |
Starburst |
A dense, bright core with knots of new stars around it. Never drawn by GalaxyShape.Auto. |
1.0.0 |
Clustered |
Tight knots of systems scattered over a faint oval, with empty space between them. Never drawn by GalaxyShape.Auto. |
1.0.0 |
enum. Which star types a generated region holds.
| Value | Description | Since |
|---|---|---|
Game |
Tuned for play: about a third red dwarfs, and giants, blue stars and remnants often enough to find. | |
Plausible |
The real shares near the Sun: about 73% red dwarfs, blue stars almost never. |
enum. How systems are named. Since 1.0.0.
| Value | Description | Since |
|---|---|---|
Catalogue |
Real catalogue names: IAU proper names, Bayer, HD, HIP, GJ, Kepler and TOI designations. | |
Invented |
Invented names of two or three syllables, such as Kessaran or Valdor, for fantasy and space opera. |
enum. Which kind of galaxy gathering a cluster is.
| Value | Description | Since |
|---|---|---|
Auto |
Drawn from the seed: a group six times in ten, a cluster four. | |
Group |
A small group: two big spirals with their satellites and a few small galaxies, like the Local Group. | |
Cluster |
A rich cluster: a giant elliptical at the centre, ellipticals crowded round it, spirals at the edge. |
enum. The age of a universe, which every cluster in it takes as its own.
| Value | Description | Since |
|---|---|---|
Auto |
Drawn from the seed: young three times in ten, mature 45 in a hundred, old a quarter. | |
Young |
A young universe: more small groups, young spirals and twice the quasars. | |
Mature |
A middle-aged universe, like ours. | |
Old |
An old universe: more rich clusters, old galaxies and few quasars. |
record. A soft problem: generation went on, and this says what was changed or ignored, and why. Since 1.0.0.
| Member | Description | Since |
|---|---|---|
WarningCode Code { get; init; } |
The kind of problem. | |
string Message { get; init; } |
What happened, in words, naming the setting or object. |
enum. The kinds of soft problem the generator reports instead of throwing. Since 1.0.0.
| Value | Description | Since |
|---|---|---|
SystemsTrimmed |
A galaxy's shape could not hold every system asked for, so it has fewer. | |
ArmsIgnored |
GeneratorOptions.Arms was set for a galaxy whose shape has no arms, so it changed nothing. |
|
ShapeTooSmall |
A spiral or barred shape was asked for with fewer than 80 systems, where arms do not read on a map. | |
NameNumbered |
A system's name had to take a number to stay unique in its galaxy. | |
GuaranteeUnmet |
A galaxy could not meet a GeneratorOptions.Require guarantee, such as a garden world with no planets allowed. |
Your own post-processing, your own fields and your own weight tables.
class. Post-processors that change objects as they are generated, such as adding fields to Custom, renaming a system or turning a planet into a colony. Each takes the generated object and returns the one to use (usually with { ... }). Pass the same hooks to Generate and to Universe.At: hooks are code, so a link cannot carry them, and At runs them again on every object it regenerates. Hooks run on what the generator made; they never change what it draws, so the seed promise holds for the input they see. A hook must give the same result for the same input, or At cannot regenerate what it made. Hooks are kept out of GeneratorOptions on purpose: options are a value (two equal options make the same universe) with a text code for links, and a delegate has neither value equality nor a text form. Since 1.0.0.
| Member | Description | Since |
|---|---|---|
new GeneratorHooks() |
||
Func<Planet, Planet> OnPlanet { get; init; } |
Runs on every planet, in a system or alone, before its system's GeneratorHooks.OnSystem. |
|
Func<StarSystem, StarSystem> OnSystem { get; init; } |
Runs on every star system, in a galaxy, a void or alone, after GeneratorHooks.OnPlanet ran on its planets; its moons, belts and stations are its to change. |
|
Func<Galaxy, Galaxy> OnGalaxy { get; init; } |
Runs on every galaxy, alone or in a cluster; its systems run their own hooks when first read. | |
Func<GalaxyCluster, GalaxyCluster> OnCluster { get; init; } |
Runs on every group or cluster of galaxies, alone or in a universe. | |
Func<Universe, Universe> OnUniverse { get; init; } |
Runs on the universe; its clusters have run theirs, and its voids' systems run theirs when first read. |
static class. Helpers for the Custom fields every generated object carries: your own text values by name, empty until a GeneratorHooks hook (or your code) sets them, and written by ToJson with the names in ordinal order. planet with { Custom = planet.Custom.With("owner", "red") } adds one. Since 1.0.0.
| Member | Description | Since |
|---|---|---|
static IReadOnlyDictionary<string, string> Empty |
No fields: the value of every Custom until something sets it. |
|
static IReadOnlyDictionary<string, string> With(this IReadOnlyDictionary<string, string> fields, string name, string value) |
A copy of fields with name set to value; the original is unchanged. Throws System.ArgumentNullException A name or value is null. |
class. A set of weight tables, the data behind some of the generator's choices: which star classes a region holds (by its age, and for StarMix.Plausible), which rocky planet kinds each orbit zone holds, and the moons of giant planets. Load one from JSON (GeneratorTables.FromJson), or change GeneratorTables.Default with GeneratorTables.With, then GeneratorTables.Register it and name it in GeneratorOptions.Tables; a link then carries the id, and Universe.At finds the same tables by it in any program that registered them. The built-in tables give exactly the output of a generator without tables. Since 1.0.0.
| Member | Description | Since |
|---|---|---|
new GeneratorTables(string id, IEnumerable<WeightTable> tables) |
Makes a set of tables; every table not given keeps its built-in weights. Throws System.ArgumentException The id is not lowercase letters, digits and dashes; a table id is unknown or repeated; a name is not a choice of its table or is repeated; a weight is out of range; or a table has no weight above 0. |
|
static IReadOnlyList<string> Ids |
The ids of the tables the generator reads, in the order GeneratorTables.Tables lists them. |
|
static GeneratorTables Default |
The built-in tables, with the id default; registered from the start. |
|
string Id |
The name a program registers these tables under and a link carries, such as my-mod. |
|
IReadOnlyList<WeightTable> Tables |
Every table, in the order of GeneratorTables.Ids, each listing every choice of its table. |
|
static int MaxIdLength |
The longest id accepted. | |
static string Schema |
The format name written by GeneratorTables.ToJson. |
|
WeightTable Table(string id) |
The table with id id. Throws System.ArgumentException There is no table with that id; the message lists them. |
|
GeneratorTables With(string id, WeightTable[] tables) |
A copy with a new id and tables in place of the tables with the same ids. |
|
static void Register(GeneratorTables tables) |
Makes these tables findable by GeneratorTables.Id, so GeneratorOptions.Tables and links can name them; registering the same id again replaces the tables (the built-in default cannot be replaced). Every program that regenerates an object must register the same tables under the same id. Throws System.ArgumentException The id is default. |
|
static GeneratorTables Find(string id) |
The tables registered under id, or null. |
|
static GeneratorTables FromJson(string json) |
Reads tables from JSON written by GeneratorTables.ToJson: {"id": "my-mod", "tables": [{"id": "star-classes.young", "entries": [{"name": "M", "weight": 300}]}]}. Tables left out keep their built-in weights; a schema key is allowed. Throws System.FormatException The text is not JSON of that shape; the message gives the position. Throws System.ArgumentException The JSON is well formed but a value is not allowed (see the constructor). |
|
string ToJson(bool indented = false) |
These tables as JSON that GeneratorTables.FromJson reads back: the schema, the id, then every table in full. |
record. A weight table the generator draws from, by id, such as star-classes.mature. Since 1.0.0.
| Member | Description | Since |
|---|---|---|
string Id { get; init; } |
Which table this is; GeneratorTables.Ids lists them. |
|
IReadOnlyList<WeightEntry> Entries { get; init; } |
The choices; names come from the built-in table, and a name left out has weight 0. |
record. One choice of a weight table and its weight; a choice with weight 0 is never drawn. Since 1.0.0.
| Member | Description | Since |
|---|---|---|
string Name { get; init; } |
The choice, such as M (a star class) or Garden (a planet kind). |
|
int Weight { get; init; } |
Its weight, 0 to 1,000,000; the chance of a choice is its weight over the table's total. |
Conversions on plain doubles.
static class. Conversions between the units the generated values are stored in and any other, on plain doubles (no units library, D19). Each field's summary names its unit, for example Planet.Orbit in au and Planet.Radius in Earths: Units.Convert(planet.Orbit, LengthUnit.AstronomicalUnits, LengthUnit.Kilometres). Map coordinates convert through Units.Map. Conversions use IAU nominal values and do not round. Since 1.0.0.
| Member | Description | Since |
|---|---|---|
static double Convert(double value, LengthUnit from, LengthUnit to) |
value in from, expressed in to. |
|
static double Convert(double value, MassUnit from, MassUnit to) |
value in from, expressed in to. |
|
static double Convert(double value, TimeUnit from, TimeUnit to) |
value in from, expressed in to. |
|
static double Convert(double value, TemperatureUnit from, TemperatureUnit to) |
value in from, expressed in to. |
|
static double Map(MapLevel level, double units, LengthUnit to) |
units of the map at level (a galaxy, cluster or universe map's coordinates or distances) as a length in to; the scale is Distances'. |
static class. Two distance frames: the map units an engine draws with, and light-years for text, plus a stylised travel time for every kind of route. Nothing here draws from a seed; the numbers are for games and stories, not physics.
| Member | Description | Since |
|---|---|---|
static double GalaxyUnitLightYears |
Light-years in one unit of a galaxy map. | |
static double ClusterUnitLightYears |
Light-years in one unit of a cluster map. | |
static double UniverseUnitLightYears |
Light-years in one unit of the universe map. | |
static double LightYears(MapLevel level, double units) |
The light-years that units of the map at level stand for. |
|
static int LaneDays(double length) |
Days along a lane of a galaxy map: one day per 100 game units or part of one, at least one. | |
static int TravelDays(LinkTier tier, double length) |
Days through a link between galaxies or clusters: a gate 7, a wormhole 3, a tether 2, a tidal link 1, a filament 30 plus a day per 50 universe units of length or part of them. |
enum. Units of length. Generated values use au (orbits), Earth radii (planets), Suns (stars) and kilometres (moons, belts). Since 1.0.0.
| Value | Description | Since |
|---|---|---|
Kilometres |
Kilometres. | |
EarthRadii |
Earth radii (6,371 km). | |
JupiterRadii |
Jupiter radii (69,911 km). | |
SolarRadii |
Solar radii (695,700 km, IAU nominal). | |
AstronomicalUnits |
Astronomical units (149,597,870.7 km). | |
LightYears |
Light-years. | |
Parsecs |
Parsecs. |
enum. Units of mass. Generated values use Earths (planets, moons, belts) and Suns (stars). Since 1.0.0.
| Value | Description | Since |
|---|---|---|
Kilograms |
Kilograms. | |
EarthMasses |
Earth masses. | |
JupiterMasses |
Jupiter masses (317.83 Earths). | |
SolarMasses |
Solar masses. |
enum. Units of temperature. Generated values use kelvin. Since 1.0.0.
| Value | Description | Since |
|---|---|---|
Kelvin |
Kelvin. | |
Celsius |
Degrees Celsius. | |
Fahrenheit |
Degrees Fahrenheit. |
enum. Units of time. Generated values use hours (rotation) and days (orbits). Since 1.0.0.
| Value | Description | Since |
|---|---|---|
Hours |
Hours. | |
Days |
Days. | |
Years |
Julian years of 365.25 days. |
enum. The three maps, each with its own units so game coordinates stay small enough for floats.
| Value | Description | Since |
|---|---|---|
Galaxy |
A galaxy map: radius 1,000 game units, 50,000 light-years. | |
Cluster |
A cluster map: radius 1,000 cluster units, 2 million light-years. | |
Universe |
The universe map: radius 1,000 universe units, 100 million light-years. |
What generation returns. Every record is immutable; change a copy with with.
record. A planet's air. Pressure in bar.
| Member | Description | Since |
|---|---|---|
AtmosphereClass Class { get; init; } |
How much air, from none to crushing, or an envelope with no surface. | |
double? Pressure { get; init; } |
Surface pressure in bar; null where there is no surface (giants and mini-Neptunes). | |
IReadOnlyList<Gas> Gases { get; init; } |
The main gases, most abundant first. | |
double LightestGasKept { get; init; } |
The molecular mass of the lightest gas the planet can keep for billions of years (the Jeans rule: escape velocity at least six times the gas's thermal speed). Earth's is about 7: it keeps water and nitrogen and loses hydrogen and helium. | |
bool Breathable { get; init; } |
True when people could breathe it: oxygen at 0.5 to 3 bar. | |
string Why { get; init; } |
Why the air is as it is, in plain words. |
record. A beacon seen or heard from anywhere in its galaxy; beacons are spread across the map.
| Member | Description | Since |
|---|---|---|
int System { get; init; } |
The index of its system. | |
BeaconKind Kind { get; init; } |
What it is; a star beacon always matches the system's star. | |
string Name { get; init; } |
Its name, such as "the Vega Pulsar". | |
string Text { get; init; } |
One line in plain words. |
record. A belt of asteroids or icy bodies, from Belt.Inner to Belt.Outer au. The fields after Belt.Outer are the belt level (ai-docs/notes/2026-10-03-moon-and-belt-level-design.md).
| Member | Description | Since |
|---|---|---|
BeltKind Kind { get; init; } |
Rocky or icy. | |
double Inner { get; init; } |
Inner edge in au. | |
double Outer { get; init; } |
Outer edge in au. | |
string Address { get; init; } |
Where it is, such as v1-my-seed/system/belt/0. |
|
int Index { get; init; } |
Its position in the system's list of belts, from 0. | |
string Name { get; init; } |
Its name, such as "Tau Ceti Belt" or "Tau Ceti Outer Belt". | |
BeltComposition Composition { get; init; } |
What its bodies are made of, in whole percent. | |
double Mass { get; init; } |
Total mass in Earths (the Sun's asteroid belt about 0.0004). | |
double LargestBody { get; init; } |
The radius of its largest body in kilometres (Ceres 470). | |
double Temperature { get; init; } |
The temperature of its bodies at its middle, in kelvin. | |
ResourceGrades Resources { get; init; } |
What can be mined. | |
string Summary { get; init; } |
One line in plain words, such as "65% carbonaceous rock, 25% silicate rock, 10% metal; largest body 470 km in radius; -103 °C; richest in organics". | |
IReadOnlyDictionary<string, string> Custom { get; init; } |
Your own fields, by name, set by a GeneratorHooks hook or your code; empty from the generator. |
1.0.0 |
string ToJson(bool indented = false) |
This belt as JSON: every field, with a schema of universe-generator/1 and a type of belt first; enum values as their names, numbers rounded as stored, the same text on every runtime. |
1.0.0 |
record. What a belt's bodies are made of, in whole percent summing to 100.
| Member | Description | Since |
|---|---|---|
int Silicate { get; init; } |
Stony silicate rock (S-type asteroids). | |
int Carbonaceous { get; init; } |
Dark carbon-rich rock (C-type asteroids). | |
int Metal { get; init; } |
Iron and nickel (M-type asteroids). | |
int Ice { get; init; } |
Water and other ices. |
record. A biome and its share of the planet's surface.
| Member | Description | Since |
|---|---|---|
Biome Biome { get; init; } |
The biome. | |
double Share { get; init; } |
Its share of the surface, 0 to 1. |
record. A band of a planet's surface: latitude ClimateBand.From to ClimateBand.To in degrees, both hemispheres together; for a tidally locked planet, degrees from the point under its star (80 to 100 is the terminator).
| Member | Description | Since |
|---|---|---|
int From { get; init; } |
Where the band starts, in degrees. | |
int To { get; init; } |
Where the band ends, in degrees. | |
double Share { get; init; } |
Its share of the planet's surface, 0 to 1. | |
double Temperature { get; init; } |
Its average temperature in kelvin. | |
Biome Biome { get; init; } |
The band's land biome, or its water's when it has no land. |
record. A galaxy as the cluster map shows it, without its systems.
| Member | Description | Since |
|---|---|---|
int Index { get; init; } |
Its index in the cluster, as in cluster.Galaxy(index). |
|
string Address { get; init; } |
Its address, such as v1-my-seed/cluster/galaxy/2. |
|
string Name { get; init; } |
Its name, unique in the cluster. | |
string Type { get; init; } |
Its type code, such as Sb, SBc, E3, S0, cD, Irr, dSph or Ring; it decides the shape. | |
GalaxyShape Shape { get; init; } |
The shape its map is drawn with, from ClusterEntry.Type. |
|
GalaxyRole Role { get; init; } |
Its part in the cluster. | |
int Host { get; init; } |
The index of the major a satellite is bound to; -1 for every other galaxy. | |
double X { get; init; } |
Across, in cluster units from the centre. | |
double Y { get; init; } |
Up, in cluster units from the centre. | |
double Size { get; init; } |
Its radius on the cluster map, in cluster units, for drawing; grows with its system count. | |
int Systems { get; init; } |
How many systems it has. | |
StellarAge Age { get; init; } |
How old its stars are; old galaxies have more old regions. | |
GalaxyRichness Richness { get; init; } |
How rich its stars are in metals. | |
CoreActivity CoreActivity { get; init; } |
What its central black hole is doing. |
record. A link between two galaxies of a cluster.
| Member | Description | Since |
|---|---|---|
int A { get; init; } |
The lower galaxy index. | |
int B { get; init; } |
The higher galaxy index. | |
LinkTier Tier { get; init; } |
Gate, wormhole or tether. | |
double Length { get; init; } |
The distance between the two galaxies on the cluster map, in cluster units. |
record. A second star in the system.
| Member | Description | Since |
|---|---|---|
Star Star { get; init; } |
The companion star. | |
CompanionOrbit Orbit { get; init; } |
Close (planets circle both) or wide (planets circle the primary). | |
double Separation { get; init; } |
Distance from the primary in au. |
record. A void in the cosmic web: a wide empty space holding a few lone systems far from any galaxy.
| Member | Description | Since |
|---|---|---|
int Index { get; init; } |
Its index in the universe. | |
string Address { get; init; } |
Its address, such as v1-my-seed/universe/void/0. |
|
string Name { get; init; } |
Its name, such as "the Hollow Void". | |
double X { get; init; } |
Across, in universe units from the centre. | |
double Y { get; init; } |
Up, in universe units from the centre. | |
double Radius { get; init; } |
Its radius in universe units: the room between it and the nearest cluster, filament, void or the map edge. | |
IReadOnlyList<StarSystem> Systems { get; init; } |
Its lone systems: old, quiet and poor in metals; each generated when first read. | |
IReadOnlyDictionary<string, string> Custom { get; init; } |
Your own fields, by name, set by a GeneratorHooks hook or your code; empty from the generator. |
1.0.0 |
string ToJson(bool indented = false, bool children = false) |
This cosmicVoid as JSON: every field, with a schema of universe-generator/1 and a type of cosmicVoid first; enum values as their names, numbers rounded as stored, the same text on every runtime. Lists generated when first read (a galaxy's systems, a cluster's galaxies, a void's systems) are null unless children is true, which generates and writes them all; each map entry carries the address. |
1.0.0 |
record. A power that holds systems of a galaxy, grown over its lanes from a capital.
| Member | Description | Since |
|---|---|---|
int Index { get; init; } |
Its index in Galaxy.Factions, as in MapEntry.Faction. |
|
string Name { get; init; } |
Its name, such as "Vega Hegemony"; unique in the galaxy. | |
FactionKind Kind { get; init; } |
What kind of power it is. | |
int Capital { get; init; } |
The index of its capital system. | |
int Systems { get; init; } |
How many systems it holds, its capital included. | |
string Description { get; init; } |
One line in plain words, such as "an empire ruled from Vega, holding 14 systems". |
record. A filament of the cosmic web between two clusters, opening in one galaxy of each.
| Member | Description | Since |
|---|---|---|
int A { get; init; } |
The lower cluster index. | |
int B { get; init; } |
The higher cluster index. | |
double Length { get; init; } |
Its length on the universe map, in universe units. | |
int GalaxyA { get; init; } |
The galaxy of cluster A where it opens. | |
int GalaxyB { get; init; } |
The galaxy of cluster B where it opens. |
record. One end of a cluster link, as the galaxy it starts from sees it.
| Member | Description | Since |
|---|---|---|
int Galaxy { get; init; } |
The index in the cluster of the galaxy it leads to. | |
string Name { get; init; } |
The name of the galaxy it leads to. | |
LinkTier Tier { get; init; } |
Gate, wormhole or tether. | |
int System { get; init; } |
The index of the system in this galaxy where it opens. | |
int Cluster { get; init; } |
For a filament, the index in the universe of the cluster it leads to; -1 for a link inside the cluster. |
record. An area of a galaxy where travel is harder. It does not change any system's danger.
| Member | Description | Since |
|---|---|---|
HazardKind Kind { get; init; } |
What it is. | |
string Name { get; init; } |
Its name, such as "the Veil Nebula"; unique in the galaxy. | |
double X { get; init; } |
Its centre across, in game units. | |
double Y { get; init; } |
Its centre up, in game units. | |
double Radius { get; init; } |
Its radius in game units. | |
IReadOnlyList<int> Systems { get; init; } |
The indexes of the systems inside it, in order. | |
string Effect { get; init; } |
What it does to travellers, in plain words. |
record. A named region of a galaxy, such as "Vela Reach", with an age and a story theme.
| Member | Description | Since |
|---|---|---|
int Index { get; init; } |
Its index in Galaxy.Regions. |
|
string Name { get; init; } |
Its name, unique in the galaxy. | |
StellarAge Age { get; init; } |
How old its stars are; old regions hold more giants and white dwarfs. | |
string Theme { get; init; } |
A story theme, such as "frontier" or "precursor ruins". | |
int Centre { get; init; } |
The index of the system at its centre. |
record. Something memorable in a system.
| Member | Description | Since |
|---|---|---|
LandmarkKind Kind { get; init; } |
What it is. | |
int? Planet { get; init; } |
The planet it belongs to, when it belongs to one. | |
bool Outlier { get; init; } |
True for an outlier that breaks the usual rules on purpose (the Weirdness option). | |
string Text { get; init; } |
One line in plain words. |
record. A lane between two systems of a galaxy.
| Member | Description | Since |
|---|---|---|
int A { get; init; } |
The lower system index. | |
int B { get; init; } |
The higher system index. | |
bool Bridge { get; init; } |
True when this lane is the only route between the two parts of the map it joins. |
record. A system as the galaxy map shows it, without its planets.
| Member | Description | Since |
|---|---|---|
int Index { get; init; } |
Its index in the galaxy, as in galaxy.System(index). |
|
string Address { get; init; } |
Its address, such as v1-my-seed/galaxy/system/31. |
|
string Name { get; init; } |
Its name, unique in the galaxy; the same as the full system's. | |
double X { get; init; } |
Across, in game units from the centre. | |
double Y { get; init; } |
Up, in game units from the centre. | |
StarClass StarClass { get; init; } |
The class of its primary star. | |
int Region { get; init; } |
The index of its region in Galaxy.Regions. |
|
int Hops { get; init; } |
Lanes on the shortest route to the core. | |
int Danger { get; init; } |
How dangerous it is, 1 (safe) to 10 (deadly): grows with hops from the core, varied by region and system. | |
bool Chokepoint { get; init; } |
True when every route between some other systems passes through this one. | |
int? Faction { get; init; } |
The index of the faction holding it in Galaxy.Factions, or null when it is independent. |
|
bool Contested { get; init; } |
True when it is held and a lane joins it to a system of another faction: a border. |
record. The one monument of a region, chosen to fit the region's theme.
| Member | Description | Since |
|---|---|---|
int Region { get; init; } |
The index of its region in Galaxy.Regions. |
|
int System { get; init; } |
The index of its system, which lies in the region. | |
MonumentKind Kind { get; init; } |
What it is. | |
string Name { get; init; } |
Its name, such as "the Colossus of Vela Reach". | |
string Text { get; init; } |
One line in plain words. |
record. A moon. Orbit in planet radii, radius and distance in kilometres, temperatures in kelvin, gravity in g. Every moon keeps one face to its planet. The fields after Moon.Radius are the moon level (ai-docs/notes/2026-10-03-moon-and-belt-level-design.md).
| Member | Description | Since |
|---|---|---|
string Address { get; init; } |
Where it is, such as v1-my-seed/system/planet/3/moon/0. |
|
int Index { get; init; } |
Its position counting outwards from 0. | |
string Name { get; init; } |
Its name, such as "Kepler-22 c II". | |
MoonKind Kind { get; init; } |
What kind of moon. | |
double Orbit { get; init; } |
Distance from the planet's centre in planet radii. | |
double Radius { get; init; } |
Radius in kilometres. | |
string Descriptor { get; init; } |
One line in plain words, such as "a hazy moon of a ringed gas giant". | |
double Distance { get; init; } |
Distance from the planet's centre in kilometres. | |
double Period { get; init; } |
The time to circle its planet, in days. | |
Composition Composition { get; init; } |
What it is mostly made of. | |
double Density { get; init; } |
Mean density in g/cm³ (the Moon 3.34). | |
double Mass { get; init; } |
Mass in Earths (the Moon 0.0123). | |
double Gravity { get; init; } |
Surface gravity in g (the Moon 0.165). | |
double EscapeVelocity { get; init; } |
Escape velocity in km/s. | |
double Insolation { get; init; } |
Starlight received, Earth = 1 (its planet's). | |
double Albedo { get; init; } |
The share of starlight reflected, 0 to 1. | |
double TidalHeating { get; init; } |
Heat raised inside it by its planet's tides, in watts per square metre (Io about 2.4, Earth's own heat 0.09). | |
double Temperature { get; init; } |
Average surface temperature in kelvin. | |
double DayTemperature { get; init; } |
Average day-side temperature in kelvin. | |
double NightTemperature { get; init; } |
Average night-side temperature in kelvin. | |
Atmosphere Atmosphere { get; init; } |
Its air. | |
double Water { get; init; } |
The share of the surface under liquid water, 0 to 1. | |
double Ice { get; init; } |
The share of the surface under ice, 0 to 1. | |
bool SubsurfaceOcean { get; init; } |
True when an ocean lies under its ice, like Europa's. | |
double Rotation { get; init; } |
The time to turn once, in hours: its period, since it keeps one face to its planet. | |
double Tilt { get; init; } |
Axial tilt to its star in degrees: its planet's, since it circles in the planet's equator. | |
IReadOnlyList<ClimateBand> Bands { get; init; } |
Six bands from equator to pole. | |
IReadOnlyList<BiomeShare> Biomes { get; init; } |
The surface by biome, largest first. | |
LifeLevel Life { get; init; } |
How far life has come. | |
int Flora { get; init; } |
How much plant life, 0 to 5. | |
int Fauna { get; init; } |
How much animal life, 0 to 5. | |
IReadOnlyList<string> Traits { get; init; } |
One or two things that make it memorable, such as "ice geysers", true to its data. | |
string Anomaly { get; init; } |
Something no one can explain, or null; the Weirdness option sets how often. | |
ResourceGrades Resources { get; init; } |
What can be mined or harvested. | |
int Hazard { get; init; } |
How dangerous the surface is: 1 shirt-sleeves, 2 a mask or coat, 3 a pressure suit, 4 heavy protection, 5 lethal. | |
IReadOnlyList<string> Hazards { get; init; } |
The dangers in words, worst first, such as "the giant's radiation belts". | |
double Similarity { get; init; } |
The Earth Similarity Index, 0 to 1 (Earth 1). | |
Habitability Habitability { get; init; } |
How well people could live there; Moon.HabitabilityFor asks for another species. |
|
string Summary { get; init; } |
A second line of plain words, such as "0.13 g, dense nitrogen air at 1.5 bar, -176 °C, an ocean under the ice, prebiotic chemistry; hazard 3". | |
IReadOnlyDictionary<string, string> Custom { get; init; } |
Your own fields, by name, set by a GeneratorHooks hook or your code; empty from the generator. |
1.0.0 |
string ToJson(bool indented = false) |
This moon as JSON: every field, with a schema of universe-generator/1 and a type of moon first; enum values as their names, numbers rounded as stored, the same text on every runtime. |
1.0.0 |
Habitability HabitabilityFor(Species species) |
How well species could live here, from its temperature, gravity, pressure and air. |
record. A site the galaxy's story places in one system.
| Member | Description | Since |
|---|---|---|
PointOfInterestKind Kind { get; init; } |
What it is. | |
int System { get; init; } |
The index of its system; no system holds two points of interest. | |
string Name { get; init; } |
Its name, such as "the Broken Spires of Vega". | |
string Text { get; init; } |
One line in plain words. | |
int ChainStep { get; init; } |
Its step on the precursor trail, from 1; 0 when it is not on the trail. | |
int ChainLength { get; init; } |
How many sites the precursor trail has; 0 when it is not on the trail. |
record. What can be mined or harvested on a planet, moon or belt, each graded 0 (none) or 1 (poor) to 5 (rich).
| Member | Description | Since |
|---|---|---|
int Metals { get; init; } |
Iron, nickel and common metals. | |
int RareElements { get; init; } |
Rare earths, heavy and radioactive elements. | |
int Ices { get; init; } |
Water and other ices. | |
int Gases { get; init; } |
Hydrogen, helium-3 and other fuel gases. | |
int Organics { get; init; } |
Biomass and organic compounds. |
record. The universe's sky landmark as one galaxy sees it.
| Member | Description | Since |
|---|---|---|
string Name { get; init; } |
The landmark galaxy's name. | |
string Address { get; init; } |
The landmark galaxy's address. | |
int Bearing { get; init; } |
Its direction on the universe map, in whole degrees counter-clockwise from +x (0 to 359). | |
long LightYears { get; init; } |
How far away it is, in light-years, to the nearest thousand. |
record. What a species needs, for Planet.HabitabilityFor: temperatures in kelvin, gravity in g, pressure in bar. Start from Species.Human and change what differs, for example Species.Human with { MaxTemperature = 340 }.
| Member | Description | Since |
|---|---|---|
static Species Human |
People: 263 to 313 K (-10 to 40 °C), 0.4 to 1.6 g, 0.5 to 3 bar, breathing oxygen. | |
string Name { get; init; } |
The species' name. | |
double MinTemperature { get; init; } |
The coldest comfortable average temperature in kelvin. | |
double MaxTemperature { get; init; } |
The warmest comfortable average temperature in kelvin. | |
double MinGravity { get; init; } |
The lowest comfortable gravity in g. | |
double MaxGravity { get; init; } |
The highest comfortable gravity in g. | |
double MinPressure { get; init; } |
The lowest comfortable pressure in bar. | |
double MaxPressure { get; init; } |
The highest comfortable pressure in bar. | |
bool BreathesOxygen { get; init; } |
True when it needs oxygen in the air. |
record. A star. Mass, luminosity and radius are in Suns, temperature in kelvin.
| Member | Description | Since |
|---|---|---|
StarClass Class { get; init; } |
The kind of star. | |
string SpectralType { get; init; } |
The spectral type, such as G2V, K3III or DA5; empty for neutron stars and black holes. | |
double Mass { get; init; } |
Mass in Suns. | |
double Luminosity { get; init; } |
Luminosity in Suns. | |
double Radius { get; init; } |
Radius in Suns. | |
double Temperature { get; init; } |
Surface temperature in kelvin (0 for a black hole). | |
string Colour { get; init; } |
The colour of its light as #rrggbb. | |
string Description { get; init; } |
Plain words for the star, such as "red dwarf" or "blue supergiant". |
record. A station.
| Member | Description | Since |
|---|---|---|
string Address { get; init; } |
Where it is, such as v1-my-seed/system/station/0. |
|
string Name { get; init; } |
Its name, such as "Halcyon Shipyard". | |
StationKind Kind { get; init; } |
What it is for. | |
int? Planet { get; init; } |
The index of the planet it orbits, or null when it orbits the star. | |
IReadOnlyDictionary<string, string> Custom { get; init; } |
Your own fields, by name, set by a GeneratorHooks hook or your code; empty from the generator. |
1.0.0 |
string ToJson(bool indented = false) |
This station as JSON: every field, with a schema of universe-generator/1 and a type of station first; enum values as their names, numbers rounded as stored, the same text on every runtime. |
1.0.0 |
record. One of the universe's landmarks.
| Member | Description | Since |
|---|---|---|
UniverseLandmarkKind Kind { get; init; } |
What it is. | |
string Name { get; init; } |
The galaxy's name, or the collision's for the merger. | |
string Address { get; init; } |
The galaxy's address, or the merging group's. |
record. The merging pair and the shared conflict on its tidal frontier.
| Member | Description | Since |
|---|---|---|
string Name { get; init; } |
The collision's name, such as "the Kestrel-Vesper Collision". | |
int Cluster { get; init; } |
The index of the merging group in the universe. | |
string GalaxyA { get; init; } |
The address of the first galaxy of the pair. | |
string GalaxyB { get; init; } |
The address of the second galaxy of the pair. | |
string Hook { get; init; } |
The conflict both galaxies share on the frontier, as one sentence. |
record. A group or cluster as the universe map shows it.
| Member | Description | Since |
|---|---|---|
int Index { get; init; } |
Its index in the universe, as in universe.Cluster(index). |
|
string Address { get; init; } |
Its address, such as v1-my-seed/universe/cluster/2. |
|
string Name { get; init; } |
Its name, unique in the universe. | |
ClusterKind Kind { get; init; } |
A group or a cluster. | |
NodeRole Role { get; init; } |
Its part in the universe. | |
double X { get; init; } |
Across, in universe units from the centre. | |
double Y { get; init; } |
Up, in universe units from the centre. | |
int Galaxies { get; init; } |
How many galaxies it holds. |
The enums the records use. Every value is listed with its description in the XML documentation; the names are what ToJson writes.
| Enum | Values | Since |
|---|---|---|
AtmosphereClass: How much air a planet has. |
None, Trace, Thin, Standard, Dense, Crushing, Envelope
|
|
BeaconKind: What a beacon is. |
Pulsar, BeaconStar, AccretionGlow, NavigationBeacon, SignalTower
|
|
BeltKind: What kind of belt. |
Asteroid, Ice
|
|
Biome: A kind of surface. Plants grow only where there is life to grow them. |
Ocean, IceSheet, Tundra, Taiga, TemperateForest, Grassland, Savanna, Rainforest, Desert, Barren, Volcanic
|
|
CompanionOrbit: How far a companion star is from the primary. |
Close, Wide
|
|
Composition: What a planet is mostly made of. |
Metal, Rock, IceAndRock, Water, GasEnvelope, HydrogenHelium, Ices
|
|
CoreActivity: What the black hole at a galaxy's centre is doing. |
Quiet, Seyfert, Quasar
|
|
FactionKind: What kind of power a faction is. |
Empire, Republic, Corporate, Theocracy, Guild, Pirates
|
|
GalaxyRichness: How rich a galaxy's stars are in metals; rich galaxies have more giant planets. |
Poor, Normal, Rich
|
|
GalaxyRole: A galaxy's part in its cluster. |
Major, Member, Satellite, Dwarf
|
|
Gas: A gas in an atmosphere. |
Hydrogen, Helium, Methane, WaterVapour, Nitrogen, Oxygen, CarbonDioxide, SulphurDioxide, RockVapour
|
|
Habitability: How well a species could live on a world. |
Hostile, Marginal, Habitable, Ideal
|
|
HazardKind: What a hazard area is. |
Nebula, IonStorm, GravityRift, DarkCloud, RadiationZone
|
|
LandmarkKind: What makes a system memorable. |
UnusualStar, BinaryStar, LivingWorld, RingedGiant, HotJupiter, AsteroidBelt, Ruins, Derelict, Nebula, Comet, Anomaly, Megastructure, RoguePlanet, AncientBeacon, ShatteredWorld, TemporalAnomaly, DerelictFleet
|
|
LifeLevel: How far life has come on a world. |
None, Prebiotic, Microbial, Simple, Complex
|
|
LinkTier: The kind of a link between galaxies. |
Gate, Wormhole, Tether, Filament, Tidal
|
|
MonumentKind: What a region's monument is. |
ColossalStatue, Necropolis, Archive, Battlefield, GreatGate, Observatory, Shrine, Market
|
|
MoonKind: What kind of moon. |
Barren, Ice, Volcanic, Ocean, Hazy, Garden
|
|
NodeRole: A cluster's part in its universe. |
Home, GreatCluster, Merger, Field
|
|
OrbitZone: Where an orbit sits relative to the star's habitable zone and frost line. |
Hot, Warm, Temperate, Cold, Outer
|
|
PlanetKind: What kind of world a planet is. |
Lava, Iron, Barren, Desert, Rocky, Greenhouse, Ocean, Garden, Ice, Dwarf, SubNeptune, GasGiant, IceGiant, HotJupiter
|
|
PointOfInterestKind: What a point of interest is. |
Ruins, PrecursorSite, Wreck, Cache, Anomaly, Outpost, Shrine
|
|
Spin: How a planet turns. |
Free, Resonant, Locked
|
|
StarClass: The kind of star. Main-sequence classes run from hot blue O to cool red M. |
O, B, A, F, G, K, M, WhiteDwarf, Giant, Supergiant, NeutronStar, BlackHole
|
|
StationKind: What a station is for. |
TradeHub, Shipyard, MiningPlatform, ResearchStation, NavalBase, PirateDen, Refinery, Relay
|
|
StellarAge: How old a region's stars are; old regions hold more giants and remnants, young ones more blue stars. |
Young, Mature, Old
|
|
UniverseLandmarkKind: What a universe landmark is. |
Home, DyingGiant, RingGalaxy, Quasar, Merger
|
This wiki describes UniverseGenerator 1.0.0 and was last updated on 2026-10-03. The library is MIT licensed. Report problems in the issues. On NuGet: UniverseGenerator. On OpenUPM: com.m4bwav.universe-generator.
Using it
- Getting started
- API reference
- Same seed, same galaxy
- Plausibility rules
- Errors and edge cases
- Recipes
- Feature matrix
- FAQ
The releases
Contributing
Elsewhere