Skip to content

Instantly share code, notes, and snippets.

@vontrapp
Created October 29, 2025 02:14
Show Gist options
  • Save vontrapp/ab3dc73f79c5de7481a3a84cb9ba30a6 to your computer and use it in GitHub Desktop.
Save vontrapp/ab3dc73f79c5de7481a3a84cb9ba30a6 to your computer and use it in GitHub Desktop.
{_ Preferences _}
{set interestingPct to 99.9}
{set awesomePct to 99.99}
{set extremePct to 99.999}
{set interestLevel to 1}
{set reportTerraformables to 1} {_ Reports terraformable and terraformed bodies _}
{set reportPlanetTypes to 1} {_ Reports Earth-like and water worlds _}
{set reportMass to 1} {_ Reports notable masses (relative to Earth's) _}
{set reportRadius to 1} {_ Reports notable radii (in kilometers) _}
{set reportDensity to 1} {_ Reports notable densities (in kilograms per cubic meter) _}
{set reportGravity to 1} {_ Reports notable gravity (in G's) for landable bodies _}
{set reportTemperature to 1} {_ Reports notable temperatures _}
{set reportTempScale to 0} {_ Set to 0 for temperatures in Kelvin _}
{_ Set to 1 for temperatures in Celsius _}
{_ Set to 2 for temperatures in Fahrenheit _}
{set reportMaterials to 1} {_ Reports materials per preferences in the `Body materials` script. _}
{set reportLandableVolcanism to 1} {_ Reports volcanism on landable worlds _}
{set reportRings to 1} {_ Reports ring details _}
{set reportInterestingOrbits to 1} {_ Reports notable orbital characteristics _}
{set reportRapidRotation to 1} {_ Reports very fast rotating bodies _}
{_ Fetch from context _}
{set reportbody to BodyDetails(state.eddi_context_body_name, state.eddi_context_body_system)}
{if !reportbody:
{set reportbody to BodyDetails(state.eddi_context_body_name)}
}
{_ Begin processing _}
{if !reportbody.name || reportbody.name = "":
{_ If it's still not possible to get the body name... _}
Which body are you
{OneOf("asking about","referring to")}?
|else:
{set notables to []}
{if reportInterestingOrbits:
{set orbitNotables to []}
{if reportbody.eccentricityprobability:
{if reportbody.eccentricityprobability > extremePct && interestLevel >= 1:
{set orbitNotables to cat(orbitNotables, [cat("incredibly ", OneOf("elliptical", "oblong", "elongated"))])}
|elif reportbody.eccentricityprobability > awesomePct && interestLevel >= 2:
{set orbitNotables to cat(orbitNotables, [cat("extremely ", OneOf("elliptical", "oblong", "elongated"))])}
|elif reportbody.eccentricityprobability > interestingPct && interestLevel >= 3:
{set orbitNotables to cat(orbitNotables, [cat("unusually ", OneOf("elliptical", "oblong", "elongated"))])}
}
}
{if reportbody.inclinationprobability:
{if reportbody.inclinationprobability > extremePct && interestLevel >= 1:
{set orbitNotables to cat(orbitNotables, [cat("incredibly inclined")])}
|elif reportbody.inclinationprobability > awesomePct && interestLevel >= 2:
{set orbitNotables to cat(orbitNotables, [cat("extremely inclined")])}
|elif reportbody.inclinationprobability > interestingPct && interestLevel >= 3:
{set orbitNotables to cat(orbitNotables, [cat("unusually inclined")])}
}
}
{if reportbody.orbitalperiodprobability:
{if reportbody.orbitalperiod < 0: {set retrograde to cat(" ", "retrograde", " ")} }
{if reportbody.orbitalperiodprobability < (100 - extremePct) && interestLevel >= 1:
{set orbitNotables to cat(orbitNotables, [cat("incredibly fast", retrograde)])}
|elif reportbody.orbitalperiodprobability < (100 - awesomePct) && interestLevel >= 2:
{set orbitNotables to cat(orbitNotables, [cat("extremely fast", retrograde)])}
|elif reportbody.orbitalperiodprobability < (100 - interestingPct) && interestLEvel >= 3:
{set orbitNotables to cat(orbitNotables, [cat("unusually fast", retrograde)])}
}
}
{if len(orbitNotables) > 0:
{if StartsWithVowel(orbitNotables[0]): {set a to "an"} |else: {set a to "a"} }
{set cur to 0}
{set length to len(orbitNotables) - 1}
{while cur < len(orbitNotables):
{set orbitdescription to cat(orbitdescription, orbitNotables[cur])}
{set cur to cur + 1}
{if cur = length:
{set orbitdescription to cat(orbitdescription, " and ")}
|elif cur < length:
{set orbitdescription to cat(orbitdescription, ", ")}
}
}
{set notables to cat(notables, [cat(a, " ", orbitdescription, " ", "orbit")])}
}
}
{if reportbody.rotationalperiod < 0: {set retrograde to cat(" ", "retrograde", " ")} }
{if reportRapidRotation && reportbody.rotationalperiodprobability:
{if abs(reportbody.rotationalperiod) < 1.1:
{set dayRounding to 1}
|else:
{set dayRounding to 2}
}
{set days to Humanise(round(reportbody.rotationalperiod, dayRounding)))}
{if days = "1": {set days to cat(days, " day")} |else: {set days to cat(days, " days")}}
{if !retrograde && reportbody.rotationalperiodprobability < (100 - extremePct) && interestLevel >= 1:
{set notables to cat(notables, [cat("an incredibly short rotational period of ", days)])}
|elif !retrograde && reportbody.rotationalperiodprobability < (100 - awesomePct) && interestLevel >= 2:
{set notables to cat(notables, [cat("an extremely short rotational period of ", days)])}
|elif !retrograde && reportbody.rotationalperiodprobability < (100 - interestingPct) && interestLevel >= 3:
{set notables to cat(notables, [cat("an unusually short rotational period of ", days)])}
}
}
{if reportMass && reportbody.massprobability:
{if reportbody.massprobability < (100 - extremePct) && interestLevel >= 1:
{set notables to cat(notables, [cat("an incredibly low mass at ", Humanise(reportbody.earthmass), " times Earth's")])}
|elif reportbody.massprobability < (100 - awesomePct) && interestLevel >= 2:
{set notables to cat(notables, [cat("an extremely low mass at ", Humanise(reportbody.earthmass), " times Earth's")])}
|elif reportbody.massprobability < (100 - interestingPct) && interestLevel >= 3:
{set notables to cat(notables, [cat("an unusually low mass at ", Humanise(reportbody.earthmass), " times Earth's ")])}
|elif reportbody.massprobability > extremePct && interestLevel >= 1:
{set notables to cat(notables, [cat("an incredibly high mass at ", Humanise(reportbody.earthmass), " times Earth's")])}
|elif reportbody.massprobability > awesomePct && interestLevel >= 2:
{set notables to cat(notables, [cat("an extremely high mass at ", Humanise(reportbody.earthmass), " times Earth's")])}
|elif reportbody.massprobability > interestingPct && interestLevel >= 3:
{set notables to cat(notables, [cat("an unusually high mass at ", Humanise(reportbody.earthmass), " times Earth's")])}
}
}
{if reportRadius && reportbody.radiusprobability:
{if reportbody.radiusprobability < (100 - extremePct) && interestLevel >= 1:
{set notables to cat(notables, [cat("an incredibly low radius of ", Humanise(reportbody.radius), " kilometers")])}
|elif reportbody.radiusprobability < (100 - awesomePct) && interestLevel >= 2:
{set notables to cat(notables, [cat("an extremely low radius of ", Humanise(reportbody.radius), " kilometers")])}
|elif reportbody.radiusprobability < (100 - interestingPct) && interestLevel >= 3:
{set notables to cat(notables, [cat("an unusually low radius of ", Humanise(reportbody.radius), " kilometers")])}
|elif reportbody.radiusprobability > extremePct && interestLevel >= 1:
{set notables to cat(notables, [cat("an extremely high radius of ", Humanise(reportbody.radius), " kilometers")])}
|elif reportbody.radiusprobability > awesomePct && interestLevel >= 2:
{set notables to cat(notables, [cat("an incredibly large radius of ", Humanise(reportbody.radius), " kilometers")])}
|elif reportbody.radiusprobability > interestingPct && interestLevel >= 3:
{set notables to cat(notables, [cat("an unusually high radius of ", Humanise(reportbody.radius), " kilometers")])}
}
}
{if reportTemperature && reportbody.tempprobability:
{_ Convert to desired temperature scale _}
{if reportTempScale = 0:
{set surfTemp to round(reportbody.temperature, 0)}
{set tempScale to " Kelvin"}
|elif reportTempScale = 1:
{set surfTemp to round(reportbody.temperature - 273.15, 0)}
{set tempScale to " degrees Celsius"}
|elif reportTempScale = 2:
{set surfTemp to round((reportbody.temperature - 273.15) * 9 / 5 + 32, 0)}
{set tempScale to " degrees Fahrenheit"}
}
{set temp to cat(" surface temperature of ", Humanise(surfTemp), tempScale)}
{if reportbody.tempprobability < (100 - extremePct) && interestLevel >= 1:
{set notables to cat(notables, [cat("an incredibly low", temp)])}
|elif reportbody.tempprobability < (100 - awesomePct) && interestLevel >= 2:
{set notables to cat(notables, [cat("an extremely low:", temp)])}
|elif reportbody.tempprobability < (100 - interestingPct) && interestLevel >= 3:
{set notables to cat(notables, [cat("an unusually low", temp)])}
|elif reportbody.tempprobability > extremePct && interestLevel >= 1:
{set notables to cat(notables, [cat("an extremely high", temp)])}
|elif reportbody.tempprobability > awesomePct && interestLevel >= 2:
{set notables to cat(notables, [cat("an incredibly high", temp)])}
|elif reportbody.tempprobability > interestingPct && interestLevel >= 3:
{set notables to cat(notables, [cat("an unusually high", temp)])}
}
}
{if reportGravity && reportbody.landable && reportbody.gravityprobability:
{if reportbody.gravityprobability < (100 - extremePct) && interestLevel >= 1:
{set notables to cat(notables, [cat("an incredibly low gravity of ", Humanise(reportbody.gravity), " times Earth's")])}
|elif reportbody.gravityprobability < (100 - awesomePct) && interestLevel >= 2:
{set notables to cat(notables, [cat("an extremely low gravity of ", Humanise(reportbody.gravity), " times Earth's")])}
|elif reportbody.gravityprobability < (100 - interestingPct) && interestLevel >= 3:
{set notables to cat(notables, [cat("an unusually low gravity of ", Humanise(reportbody.gravity), " times Earth's")])}
|elif reportbody.gravityprobability > extremePct && interestLevel >= 1:
{set notables to cat(notables, [cat("an incredibly high gravity of ", Humanise(reportbody.gravity), " times Earth's")])}
|elif reportbody.gravityprobability > awesomePct && interestLevel >= 2:
{set notables to cat(notables, [cat("an extremely high gravity of ", Humanise(reportbody.gravity), " times Earth's")])}
|elif reportbody.gravityprobability > interestingPct && interestLevel >= 3:
{set notables to cat(notables, [cat("an unusually high gravity of ", Humanise(reportbody.gravity), " times Earth's")])}
}
}
{if reportDensity && reportbody.densityprobability:
{if reportbody.densityprobability < (100 - extremePct) && interestLevel >= 1:
{set notables to cat(notables, [cat("an incredibly low density of ", Humanise(reportbody.density), " kilograms per cubic meter")])}
|elif reportbody.densityprobability < (100 - awesomePct) && interestLevel >= 2:
{set notables to cat(notables, [cat("an extremely low density of ", Humanise(reportbody.density), " kilograms per cubic meter")])}
|elif reportbody.densityprobability < (100 - interestingPct) && interestLevel >= 3:
{set notables to cat(notables, [cat("an unusually low density of ", Humanise(reportbody.density), " kilograms per cubic meter")])}
|elif reportbody.densityprobability > extremePct && interestLevel >= 1:
{set notables to cat(notables, [cat("an incredibly high density of ", Humanise(reportbody.density), " kilograms per cubic meter")])}
|elif reportbody.densityprobability > awesomePct && interestLevel >= 2:
{set notables to cat(notables, [cat("an extremely high density of ", Humanise(reportbody.density), " kilograms per cubic meter")])}
|elif reportbody.densityprobability > interestingPct && interestLevel >= 3:
{set notables to cat(notables, [cat("an unusually high density of ", Humanise(reportbody.density), " kilograms per cubic meter")])}
}
}
{if reportLandableVolcanism:
{if reportbody.volcanism && reportbody.landable:
{set notables to cat(notables, [cat(OneOf("volcanic", "tectonic"), " activity")])}
}
}
{if reportRings:
{if reportbody.rings:
{set ringcompositions to []}
{set cur to 0}
{for ring in reportbody.rings:
{if find(ring.name, "Ring") > -1:
{if find(ringcompositions, ring.composition) = -1:
{set ringcompositions to cat(ringcompositions, [cat(ring.composition)])}
}
}
{set cur to cur + 1}
}
{set cur to 0}
{set length to len(ringcompositions) - 1}
{while cur < len(ringcompositions):
{set ringsdescription to cat(ringsdescription, ringcompositions[cur])}
{set cur to cur + 1}
{if cur = length:
{set ringsdescription to cat(ringsdescription, " and ")}
|elif cur < length:
{set ringsdecription to cat(ringsdescription, ", ")}
}
}
{if ringsdescription:
{if len(ringcompositions) = 1:
{if StartsWithVowel(reportbody.reserves):
{set a to "an "}
|else:
{set a to "a "}
}
{set rings to "ring"}
|else:
{set rings to "rings"}
}
{if reportbody.reserveLevel.invariantName != "None":
{set reserves to reportbody.reserves}
}
{set notables to cat(notables, [cat(a, " ", reserves, " ", ringsdescription, " ", rings)])}
}
}
}
{if reportTerraformables:
{if reportbody.terraformState.invariantName = "Candidate for terraforming":
{set notables to cat(notables, [OneOf("potential for terraforming", "terraformable conditions")])}
}
}
{if reportPlanetTypes:
{if reportbody.planetClass.invariantName = "Earth-like world":
{set notables to cat(notables, ["Earth-like conditions"])}
|elif reportbody.planetClass.invariantName = "Water world":
{set notables to cat(notables, [OneOf("abundant liquid water", "abundant liquid water at the surface")])}
}
}
{_ Begin speaking _}
{if len(notables) > 0:
{if reportbody.shortname != reportbody.bodyname:
{if reportbody.bodytype:
{reportbody.bodytype}
|else:
Body
}
{P(reportbody.shortname, "body")}
|else:
{P(reportbody.bodyname, "body")}
}
is
{if len(notables) = 1:
{set desc to "notable"}
|elif len(notables) = 2:
{set desc to OneOf('interesting', 'notable', 'remarkable')}
|elif len(notables) = 3:
{set desc to OneOf('exceptional', 'remarkable')}
|elif len(notables) = 4:
{set desc to OneOf('extraordinary')}
|elif len(notables) >= 5:
{set desc to OneOf('one of a kind', 'unique')}
}
{OneOf("{desc},", "{if StartsWithVowel(desc): an |else: a } {desc} {P(reportbody.planettype, 'planettype')}")}
with {List(notables)}.
}
{if reportMaterials:
{F("Body materials report")}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment