Random Dungeons & Dragons Scripts
I love D&D. I've made a bunch of random generators that aren't quite covered with other websites.
Star System Generator
PLEASE NOTE: The sheer amount of information here makes it impossible to format the system generator for small screens. Please use this on a medium or higher screen for best display results.
I've been involved in star system generation code for quite a while. There was one in particular that offered everything I needed: Aina's Star Generator.
Unfortunately Aina stopped updating the code over twenty years ago and can no longer be reached. He published his code base online back in the day so others could use and improve it.
Here we are in the here and now. I've updated his code to work with php and have made quite a number of modifications. The goal is to make a few tweaks here and there and test out the random generator in a gravity simulator like Universe Sandbox 2 to see just how viable these star systems are.
temperatures: planet temperatures are seriously out of whack. I've left them in until I can figure out the problem.
System Summary
orbit | description | mass | radius | ecc | inc | moons |
---|---|---|---|---|---|---|
primary | G0V : Yellow Dwarf (M-S) | 1.0571 sol | 2.082 sol | |||
0.252 au | Desert | 0.01984 earth | 2,175 km | 0.03 | 3° | 4 |
0.428 au | Desert | 0.89559 earth | 7,742 km | 0.02 | 5° | 4 |
0.428 au | Hot House | 2.16344 earth | 10,388 km | 0.03 | 7° | 0 |
0.899 au | Hot House | 7.57203 earth | 11,470 km | 0.09 | 9° | 2 |
1.528 au | Ice Ball | 0.88938 earth | 8,321 km | 0.02 | 4° | 0 |
3.208 au | Ice Ball | 0.01087 earth | 3,042 km | 5.85 | 29° | 1 |
4.492 au | Gas Giant | 3,964.51880 earth | 127,120 km | 0.08 | 1° | 8 |
13.026 au | Ice Ball | 0.07098 earth | 3,130 km | 0.0 | 3° | 2 |
41.685 au | Gas Giant | 4,468.53381 earth | 179,550 km | 0.11 | 9° | 7 |
Full System Details
Star 1: G0 V Yellow Dwarf (M-S)
Mass | 1.0571 sol |
Diameter | 2.082 sol |
Temp | 5,986°K (Lux: 1.2487 sol) |
Age | 3,350.777 Myears (MAX: 8,465.484 Myears) |
Orbits | min: 0.112 AU inner max: 0.916 AU life max: 1.341 AU max: 42.284 AU |
Planet 1 - Inner Zone - Desert - Rocky | |
Orbit | dist: 0.252 AU period: 6.49 earth days Ecc: 0.03 Inc: 3° |
Body | rad: 2174.5 km mass: 0.020 earth grav: 0.171 earth rot: 155.870 hours tilt: 7° |
Temperatures | avg: 1,395.386°C day: 1,412.042°C night: 1,186.078°C |
Water Type: | Ice - 10.5% |
Atmosphere | type: Thin pres: 0.084 atm comp: Carbon Dioxide oxyg: 0 |
Mineral Resources | Metal Ore: 1 Radioactive Ore: 1 Precious Metals: 1 Raw Crystals: 1 Precious Gems: 1 |
Moons | |
Moon 0: | core: Rocky orbit: 304430 km incline: 3° ecc: 0.03 radius: 1005.5 km mass: 0.0015695857253175 earth tilt: 40° |
Moon 1: | core: Rocky orbit: 217450 km incline: 0° ecc: 0.08 radius: 500 km mass: 0.00062723775182251 earth tilt: 39° |
Moon 2: | core: Rocky orbit: 43490 km incline: 5° ecc: 0.03 radius: 1557.5 km mass: 0.011666832887534 earth tilt: 52° |
Moon 3: | core: Rocky orbit: 43490 km incline: 13° ecc: 0.01 radius: 1214.5 km mass: 0.006223201900009 earth tilt: 11° |
Planet 2 - Inner Zone - Desert - Rocky | |
Orbit | dist: 0.428 AU period: 96.71 earth days Ecc: 0.02 Inc: 5° |
Body | rad: 7742 km mass: 0.896 earth grav: 0.608 earth rot: 2,321.003 hours tilt: 20° |
Temperatures | avg: 1,183.140°C day: 1,195.915°C night: 1,005.669°C |
Water Type: | Ice - 10.5% |
Atmosphere | type: Thin pres: 0.286 atm comp: Carbon Dioxide oxyg: 0 |
Mineral Resources | Metal Ore: 29.71 Radioactive Ore: 1 Precious Metals: 1 Raw Crystals: 1 Precious Gems: 1 |
Moons | |
Moon 0: | core: Rocky orbit: 1393560 km incline: 4° ecc: 0.05 radius: 1752.5 km mass: 0.02077556790354 earth tilt: 28° |
Moon 1: | core: Rocky orbit: 929040 km incline: 7° ecc: 0.04 radius: 1685 km mass: 0.014772994183248 earth tilt: 15° |
Moon 2: | core: Rocky orbit: 1083880 km incline: 6° ecc: 0.15 radius: 1563 km mass: 0.008843150345162 earth tilt: 24° |
Moon 3: | core: Rocky orbit: 108388 km incline: 2° ecc: 0.01 radius: 500 km mass: 0.00062723775182251 earth tilt: 39° |
Planet 3 - Inner Zone - Hot House - Rocky | |
Orbit | dist: 0.428 AU period: 150.31 earth days Ecc: 0.03 Inc: 7° |
Body | rad: 10388 km mass: 2.163 earth grav: 0.815 earth rot: 3,607.396 hours tilt: 28° |
Temperatures | avg: 1,562.406°C day: 1,562.917°C night: 312.481°C |
Water Type: | None - % |
Atmosphere | type: Massive pres: 80.712 atm comp: Carbon Dioxide oxyg: 0 |
Mineral Resources | Metal Ore: 1 Radioactive Ore: 1 Precious Metals: 1 Raw Crystals: 25.988 Precious Gems: 1 |
Planet 4 - Inner Zone - Hot House - Rocky | |
Orbit | dist: 0.899 AU period: 855.75 earth days Ecc: 0.09 Inc: 9° |
Body | rad: 11470 km mass: 7.572 earth grav: 2.340 earth rot: 20,537.928 hours tilt: 31° |
Temperatures | avg: 1,053.345°C day: 1,053.698°C night: 210.669°C |
Water Type: | None - % |
Atmosphere | type: Massive pres: 220.005 atm comp: Carbon Dioxide oxyg: 0 |
Mineral Resources | Metal Ore: 76 Radioactive Ore: 50.8 Precious Metals: 21.8 Raw Crystals: 37 Precious Gems: 21.8 |
Moons | |
Moon 0: | core: Rocky orbit: 1147000 km incline: 8° ecc: 0.05 radius: 2499.5 km mass: 0.036165085640477 earth tilt: 35° |
Moon 1: | core: Rocky orbit: 917600 km incline: 2° ecc: 0.05 radius: 500 km mass: 0.00053073963615751 earth tilt: 20° |
Planet 5 - Outer Zone - Ice Ball - Icy | |
Orbit | dist: 1.528 AU period: 650.06 earth days Ecc: 0.02 Inc: 4° |
Body | rad: 8320.5 km mass: 0.889 earth grav: 0.522 earth rot: 15,601.535 hours tilt: 35° |
Temperatures | avg: 710.779°C day: 717.540°C night: 604.162°C |
Water Type: | Ice - 34% |
Atmosphere | type: Thin pres: 0.261 atm comp: Carbon Dioxide oxyg: 0 |
Mineral Resources | Metal Ore: 23.282 Radioactive Ore: 1 Precious Metals: 1 Raw Crystals: 1 Precious Gems: 1 |
Planet 6 - Outer Zone - Ice Ball - Icy | |
Orbit | dist: 3.208 AU period: 218.66 earth days Ecc: 5.85 Inc: 29° |
Body | rad: 3042 km mass: 0.011 earth grav: 0.048 earth rot: -3,715.627 hours tilt: 43° |
Temperatures | avg: 505.681°C day: 515.012°C night: 480.397°C |
Water Type: | Ice - 41% |
Atmosphere | type: Vacuum pres: 0.000 atm comp: None oxyg: 0 |
Mineral Resources | Metal Ore: 6.042 Radioactive Ore: 1 Precious Metals: 1 Raw Crystals: 1 Precious Gems: 1 |
Characteristics | Orbital Eccentricity Tidal Locked |
Moons | |
Moon 0: | core: Icy orbit: 182520 km incline: 5° ecc: 0.05 radius: 2775.5 km mass: 0.041264113898859 earth tilt: 19° |
Planet 7 - Outer Zone - Gas Giant - Icy | |
Orbit | dist: 4.492 AU period: 218,790.66 earth days Ecc: 0.08 Inc: 1° |
Body | rad: 127120 km mass: 3,964.519 earth grav: 9.977 earth rot: 5,250,975.873 hours tilt: 28° |
Temperatures | avg: -25.000°C day: -24.842°C night: -5.000°C |
Water Type: | Crystals - 1% |
Atmosphere | type: Massive pres: 967.730 atm comp: Methane/Ammonia/Hydrogen oxyg: 0 |
Mineral Resources | Metal Ore: 73.8 Radioactive Ore: 45.2 Precious Metals: 20.4 Raw Crystals: 36.6 Precious Gems: 21.8 |
Moons | |
Moon 0: | core: Icy orbit: 22881600 km incline: 3° ecc: 0.04 radius: 500 km mass: 0.0001447471734975 earth tilt: 34° |
Moon 1: | core: Icy orbit: 1525440 km incline: 9° ecc: 0.01 radius: 500 km mass: 9.6498115665002E-5 earth tilt: 29° |
Moon 2: | core: Icy orbit: 22881600 km incline: 0° ecc: 0.05 radius: 2183 km mass: 0.024093022251378 earth tilt: 33° |
Moon 3: | core: Rocky orbit: 12712000 km incline: 4° ecc: 0.04 radius: 500 km mass: 0.00053073963615751 earth tilt: 16° |
Moon 4: | core: Icy orbit: 15254400 km incline: 8° ecc: 0.03 radius: 500 km mass: 4.8249057832501E-5 earth tilt: 38° |
Moon 5: | core: Icy orbit: 15254400 km incline: 1° ecc: 0.13 radius: 500 km mass: 0.00019299623133 earth tilt: 14° |
Moon 6: | core: Icy orbit: 1779680 km incline: 9° ecc: 0.0 radius: 500 km mass: 9.6498115665002E-5 earth tilt: 24° |
Moon 7: | core: Icy orbit: 5084800 km incline: 5° ecc: 0.02 radius: 500 km mass: 0.00019299623133 earth tilt: 20° |
Planet 8 - Outer Zone - Ice Ball - Icy | |
Orbit | dist: 13.026 AU period: 4,572.02 earth days Ecc: 0.0 Inc: 3° |
Body | rad: 3129.5 km mass: 0.071 earth grav: 0.295 earth rot: 3.903 hours tilt: 25° |
Temperatures | avg: 247.202°C day: 250.907°C night: 222.482°C |
Water Type: | Ice - 50% |
Atmosphere | type: Very Thin pres: 0.027 atm comp: Carbon Dioxide oxyg: 0 |
Mineral Resources | Metal Ore: 1 Radioactive Ore: 1 Precious Metals: 1 Raw Crystals: 1 Precious Gems: 1 |
Characteristics | Strong Magnetic Field |
Moons | |
Moon 0: | core: Icy orbit: 688490 km incline: 1° ecc: 0.12 radius: 1877 km mass: 0.010210138502253 earth tilt: 23° |
Moon 1: | core: Icy orbit: 43813 km incline: 21° ecc: 0.03 radius: 500 km mass: 0.000289494346995 earth tilt: 38° |
Planet 9 - Outer Zone - Gas Giant - Icy | |
Orbit | dist: 41.685 AU period: 6,566,561.70 earth days Ecc: 0.11 Inc: 9° |
Body | rad: 179550 km mass: 4,468.534 earth grav: 5.637 earth rot: 126,361,943.984 hours tilt: 44° |
Temperatures | avg: -25.000°C day: -24.948°C night: -5.000°C |
Water Type: | Crystals - 1% |
Atmosphere | type: Massive pres: 574.929 atm comp: Hydrogen oxyg: 0 |
Mineral Resources | Metal Ore: 78.4 Radioactive Ore: 48.4 Precious Metals: 21 Raw Crystals: 38.4 Precious Gems: 21.6 |
Characteristics | Tidal Locked |
Moons | |
Moon 0: | core: Icy orbit: 21546000 km incline: 8° ecc: 0.07 radius: 3461 km mass: 0.016002344735378 earth tilt: 44° |
Moon 1: | core: Icy orbit: 17955000 km incline: 7° ecc: 0.08 radius: 3385.5 km mass: 0.089866645116031 earth tilt: 10° |
Moon 2: | core: Icy orbit: 7182000 km incline: 9° ecc: 0.03 radius: 500 km mass: 0.000289494346995 earth tilt: 20° |
Moon 3: | core: Icy orbit: 5386500 km incline: 2° ecc: 0.02 radius: 2184.5 km mass: 0.024142721341909 earth tilt: 28° |
Moon 4: | core: Icy orbit: 2872800 km incline: 6° ecc: 0.03 radius: 721.5 km mass: 0.00028994647029182 earth tilt: 33° |
Moon 5: | core: Icy orbit: 5386500 km incline: 15° ecc: 0.13 radius: 2952 km mass: 0.0099295115122401 earth tilt: 38° |
Moon 6: | core: Icy orbit: 12568500 km incline: 3° ecc: 0.13 radius: 2488 km mass: 0.029723500649144 earth tilt: 42° |