Star System Generator

roymartin

Mongoose
I've been writing a star system generator, based on the World Builder's Handbook. It's in its early days, with only the stars, worlds and moons completed. It's a command-line tool generating output to the console, but also creates an HTML file (system.html). The output is based on the style used in the WBH.

Star System Generator

Hopefully, some will find it useful.

Roy

16/2/26 - Released version 2.0.0. Details are below, and I have updated the link above.
19/2/26 - Release 2.3
4/4/26 - Release 3.0 - Now does a full generation of a system based on the World Builder's Handbook
 
Last edited:
It's a command-line tool generating output to the console, but also creates an HTML file (system.html).
I would like to look at this program but I am not sure where to start. So here are some questions:
you've written a commandline (CL) tool but where do you recommend users download the pre-compiled github files (.exe and .dll)?
Does the program run on 64-bit only machines or on 32-bit as well?
Does the program always generate a Html file, or is that an option?
Is the Html output saved to disk, or is it simply output to a browser window?
Does the default Html file have to be called "system.html" as my Windows AV might pick that up as a potential virus threat. Please, could it be called something like StarSystem.html or world_system.html? as that would be much less ambiguous for me.
If I specify a new filename for the Html file, would I need to supply the complete filepath, or does the output default to the documents folder, or somewhere else? And, if I specify a new filename, do I need to specify a space or a backslash or something between the CL switch option and the filename?

Thanks for sharing, and I hope you find those sort of questions useful.
 
you've written a commandline (CL) tool but where do you recommend users download the pre-compiled github files (.exe and .dll)?
I would download them, create an empty folder and put them in there. I would recommend running them from a command prompt directly, not double-clicking on the icon in Windows (the next version will have some options you can use from the command line.
Does the program run on 64-bit only machines or on 32-bit as well?
I believe it is 64bit
Does the program always generate a Html file, or is that an option?
It always does. It creates an overview called system.html and a seperate html file for each terrestrial planet and moon in a folder called surveys, which is created in the same directory. If you run TravellerSystemsGenerator -u the program will add the seed number to the system.html file (e.g. system_67964296.html) and the surveys folder, so you can run it multiple times without overwriting the output. I can add an option to disable html output, but more detail is contained therein that isn't in the console output.
Does the default Html file have to be called "system.html" as my Windows AV might pick that up as a potential virus threat. Please, could it be called something like StarSystem.html or world_system.html? as that would be much less ambiguous for me.
Good idea, I'll change it in the next release.
If I specify a new filename for the Html file, would I need to supply the complete filepath, or does the output default to the documents folder, or somewhere else?
You can't at the moment, I'll add that in a future release.
Thanks for sharing, and I hope you find those sort of questions useful.
Yes, thank you, and I hope you find the answers enlightening :)

Roy
 
Note that the top of the console output includes a seed number. This is the random number the program uses to make all the dice rolls to generate the system.

═══════════════════════════════════════════════════════════════
TRAVELLER STAR SYSTEM GENERATION
Version 1.9.1
Seed: 378180750
═══════════════════════════════════════════════════════════════

If you run the program again with the seed number as a parameter to the command (e.g. TravellerSystemsGenerator 378180750) the same star system will be generated. I've not tried this between computers, though I think it would work.

Roy
 
I've just published version 2.0.0, which now generates systems based on the Stars, Systems Worlds and Orbits, and World Physical Characteristics chapters of the World Builder's Handbook.

Release v2.0.0

This release includes the following features:
  • Star generation, including companions, class, mass, diameter, luminosity and orbital eccentricity
  • Generation of orbits and placement of planets, gas giants and Planetoid Belts
  • Generation of the habitable zone
  • Anomalous planets (eccentric, inclined, retrograde and trojan orbits)
  • Orbital periods
  • Significant moons
  • World gas giant and moon sizing
  • World and moon gravity, mass, orbital periods and day length
  • Planetoid Belt characteristics
  • World and moon atmospheres, including atmospheric pressure, Albedo and Hydrographics
  • Tidal locks for planets and moons
  • Mean, max and low temperature for Worlds and moons
  • Generation of systems for existing systems
  • HTML and console output
  • Command line help
I have not included
  • some of the details of atmospheres, particularly taint details, exotic details and atmospheric chemical composition
  • the more detailed aspects of temperature calculation
  • Seismology
  • Native Lifeforms (this is next on the list)
  • World Social Characteristics (this is also a priority)
Roy
 
Release 2.3.0

Added native lifeforms, seismic stress, techtonics, resource rating and habitability rating.

Next, I plan to add the logic to select a mainworld, if one is not provided as a parameter; and then move onto the world social characteristics.

Roy
 
Just released version 3.0, which now does a full automated system generation based on the World Builder's Handbook, including:

Stars
Planets, Gas Giants, Planetoid Belts and moons
World physical characteristics
World Social Characteristics

It's a command-line application which builds html files containing details of the system generated (by default these are overwritten each time the program is run). Look for StarSystem.html in the program's directory, open it in your browser, and note the hyperlinks.

TravellerSystemGenerator

Roy
 
Does it incorporate the errata on the thread on this forum please?
You mean this one? https://forum.mongoosepublishing.co...d-world-builders-handbook-know-issues.126280/

I only found it yesterday, and I just started taking a look at it. There are several items that point out items that need fixing, but not clear fixes, eg

p. 55 gas giant diameters and masses. Make mass formula related to diameter result (use it or a derivation as the multiplier constant) with a possible DM for HZCO.

p. 57 given the Significant Moon Sizing table, and the wording of the paragraph that follows, clarify what happens with Size 1 and 2 worlds – consider a re-write of that paragraph.
 
p. 55 gas giant diameters and masses. Make mass formula related to diameter result (use it or a derivation as the multiplier constant) with a possible DM for HZCO.

p. 57 given the Significant Moon Sizing table, and the wording of the paragraph that follows, clarify what happens with Size 1 and 2 worlds – consider a re-write of that paragraph.

I've used the original calculations, as I'm uncertain of a replacement formula

p. 70 Size F second number should be 24,799 (not 4,799)

I caught that already. I did ask Claude Code (AI) to take a look at this, and this was the response:

  • Base = 23,200
  • d3 modifier: 0, 600, or 1,200
  • d6 modifier: 0, 100, 200, 400, 400, or 500 (the reroll logic on d3=3 + d6=5 or 6 means d3+d6 max without overlap caps at 1,200+500=1,700... but the reroll prevents d3=3 combining with d6=5 or 6)
  • d100 = 1–100
Maximum without the reroll restriction: 23,200 + 1,200 + 500 + 100 = 25,000 — but the reroll rule prevents d3=3 (1,200) combining with d6=5 or 6 (400/500). So the true maximum when d3=3 is d6 max 4 (400): 23,200 + 1,200 + 400 + 100 = 24,900. When d3≠3, max is 23,200 + 600 + 500 + 100 = 24,400.

So the actual range is 23,201 – 24,900, not 23,200–24,799. Your lower bound of 23,200 is technically unreachable too (d100 minimum is 1, so minimum is 23,201).

The range you quoted (23,200–24,799) doesn't match the code. Is this a discrepancy against the rulebook you'd like corrected?


p. 73: Belt Bulk = 2D +2 +DMs, not 2D2+DMs

This is the formula I'm using

p. 76, for Moon Orbit: any MOR less than 0 is treated as 0. If a moon is created above the HSML, then it is discarded. For cases where a Large Moon is near the Roche Limit and near the Size of the Planet, consider a Roche World scenario – but only if the HSML is sufficiently large enough to support the configuration.

MOR is checked, if < 0 then it doesn't assign orbits.

I wasn't discarding moons above the HSML, I've just added that check (will be in the next release).

I've not got a check for large moons near the Roche Limit.

P. 81: Each Oxygen Fraction formula should only have two terms:
(Published copy first formula has an extra +(1D-1)/20 which needs to be deleted.

Changed, I now use ((1d6 + DM) / 20) + ((2d6 − 7) / 100) (will be in the next release).

p. 89: unbound pressure ranges –
ignore the span. Instead, roll D3 to determine the number of zeros, then roll d10 (with 10=10, not 0) in front of it. So if you had a 1 for the D3, you'd get a total atmospheric pressure of 10-90, and with a D3 of 3, the range would be 1000-9000 and then if you want, roll d10 (with 10=0) for additional digits of accuracy if desires.

I currently don't do corrosive and insidious subtypes. I plan to revisit atmospheres in the future.

p. 107 #3 should be the same text as the first sentence of the chart note:
On either a 3:2 or 1:1 tidal lock, If a world’s axial tilt is more than 3°, reroll the world’s axial tilt as (2D-2) ÷ 10 degrees

This has been updated for the next version.

p. 109: Basic Temperature for 0 should be 188K

Also updated for the next version.

p.110: change: ‘On the table, a rocky terrestrial world is considered any world with a density greater than 0.4.’ to 0.5 to match table and spreadsheet.

Updated in the next version

p. 132 Habitability DM table, 2nd line for Gravity should be 0.2-0.4 (rather than 0.2-0.7)

Already fixed that one.

p. 157: Balkanisation: … compete (not complete)

Didn't understand this one. Balkanisation must have resulted in hundreds of lines of extra code, the gift that kept giving :)

p. 187: Resource factor DM for Agricultural:
Agricultural: DM+1-1D

Already fixed


How official is this? I can do it, is it something people want?
 
Good job with that generator @roymartin. However, I do believe it incorrectly calculates the HZ for planets with an orbit# below 1. Orbit# ranges <1 are 10× as Big. So for example a system with a HZCO 0.22 should have a HZ ranging from 0.12-0.32. But the generator assigned a planet in Orbit #0.86 to the HZ.
 

Attachments

  • Screenshot 2026-04-12 185340.png
    Screenshot 2026-04-12 185340.png
    65.1 KB · Views: 1
Back
Top