Jump to content

Hytaler

Members
  • Posts

    18
  • Joined

  • Last visited

Reputation

3 Neutral

Profile Information

  • About me
    18 year old he/they space enthusiast
  • Location
    Germany
  • Interests
    Spaceflight, Machine Learning (not an "AI Techbro" dw), CS, STEM in general, piano, video games :3

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I've just noticed that many Modules depend on this Extension: https://www.mediawiki.org/wiki/Extension:PortableInfobox Either this is a perfect candidate for an additional MediaWiki Extension (although then Infoboxes are gonna look like the ones used by Fandom) or I reprogram the Infobox Modules to use MediaWikis internal Infobox templates (i.e. steal the Module from Wikipedia, making it look more clean and more like the old KSP Wiki). Y'all decide!
  2. Like otheres in this thread, I think that having a new namespace or even another website althogether would be better than having this, as KSP 2 is shaping up to differ from KSP 1. Yeah, they both share similarities (or else KSP 2 wouldn't be named that way, duh), but they're different enough for me to think that starting over would be the better option. It also just creates ambiguity, links the two games together and forces us to use the old MediaWiki version. I don't know about you, but I do not like the old MediaWiki. Here is a comparison (WARNING: Large Code input coming!): <includeonly>{{Infobox|width=280 |name={{{transcription|{{Body data/Name|{{{name|{{BASEPAGENAME}}}}}}}}}} {{#if: {{{transcription|}}}{{#ifeq: {{Body data/Name|{{{name|{{BASEPAGENAME}}}}}}}|{{{name|{{BASEPAGENAME}}}}}||1}}|({{{name|{{BASEPAGENAME}}}}})}} |file={{Body data|{{{name|{{BASEPAGENAME}}}}}|file}} |file style=background:black |notes={{#if: {{Body data|{{{name|{{BASEPAGENAME}}}}}|parent}}|<references group="Note"> <ref name="centered">{{Infobox/Body/Dict|note}}</ref></references>}} |lines= {{Infobox/Line|{{lang |en={{{name|{{BASEPAGENAME}}}}} as seen from orbit. |de={{{name|{{BASEPAGENAME}}}}} vom Orbit aus gesehen. |es={{{name|{{BASEPAGENAME}}}}} como se ve desde la órbita. |fr=La planète {{{name|{{BASEPAGENAME}}}}} vue depuis l'orbite. |hr=Pogled na {{{name|{{BASEPAGENAME}}}}} iz orbite. |hu={{{name|{{BASEPAGENAME}}}}} a pályáról nézve |it={{{name|{{BASEPAGENAME}}}}} visto dall'orbita |ja=軌道からみた{{Body data/Name|{{{name|{{BASEPAGENAME}}}}}}} |ko={{Body data/Name|{{{name|{{BASEPAGENAME}}}}}}} 을 궤도에서 바라본 모습이다. |nl={{{name|{{BASEPAGENAME}}}}} gezien vanuit de ruimte. |pl={{{name|{{BASEPAGENAME}}}}} widok z orbity. |pt={{{name|{{BASEPAGENAME}}}}} visto de uma órbita |ru={{Body data/Name|{{{name|{{BASEPAGENAME}}}}}}} - вид с орбиты. |tr=Uzaydan görünen haliyle {{{name|{{BASEPAGENAME}}}}} |zh-cn=从轨道上看{{{name|{{BASEPAGENAME}}}}}。 }}|style=text-align: center; font-size:smaller;}} {{Infobox/Line|[[{{Body data|{{{name|{{BASEPAGENAME}}}}}|class}}{{if lang}}|{{#switch: {{Body data|{{{name|{{BASEPAGENAME}}}}}|class}} |Star={{Celestial/Dict|Star}} |Planet={{Celestial/Dict|Planet}} |Dwarf planet={{Celestial/Dict|Dwarf}} |Moon={{Celestial/Dict|Moon}} |#default={{Body data|{{{name|{{BASEPAGENAME}}}}}|class}}[[Category:Infobox/Body with unrecognized class]] }}]] {{#if: {{Body data|{{{name|{{BASEPAGENAME}}}}}|parent}}|{{Infobox/Body/Dict|of}} [[{{Body data|{{{name|{{BASEPAGENAME}}}}}|parent}}{{if lang}}|{{Celestial/Dict|{{Body data|{{{name|{{BASEPAGENAME}}}}}|parent}}}}]] }}|style=text-align: center;}} {{#if: {{Body data|{{{name|{{BASEPAGENAME}}}}}|parent}}| {{Infobox/Line|'''{{Infobox/Body/Dict|orbital}}'''}} {{Infobox/Line|{{Infobox/Body/Dict|sma}} |2=<span style="white-space:nowrap;">{{formatnum|{{Body data|{{{name|{{BASEPAGENAME}}}}}|semi-major axis}}}}&nbsp;{{Dict|m}} <ref name="centered" group="Note" /></span>}} {{Infobox/Line|{{Infobox/Body/Dict|apo}} |2=<span style="white-space:nowrap;">{{formatnum|{{#expr: {{Body data/Apoapsis|{{{name|{{BASEPAGENAME}}}}}}} round 1}}}}&nbsp;{{Dict|m}} <ref name="centered" group="Note" /></span>}} {{Infobox/Line|{{Infobox/Body/Dict|per}} |2=<span style="white-space:nowrap;">{{formatnum|{{#expr: {{Body data/Periapsis|{{{name|{{BASEPAGENAME}}}}}}} round 1}}}}&nbsp;{{Dict|m}} <ref name="centered" group="Note" /></span>}} {{Infobox/Line|{{Infobox/Body/Dict|ecc}} |{{#expr: {{Body data|{{{name|{{BASEPAGENAME}}}}}|eccentricity}} round 3}}}} {{Infobox/Line|{{Infobox/Body/Dict|inc}} |{{#expr: {{Body data|{{{name|{{BASEPAGENAME}}}}}|orbinc}} round 3 }}&nbsp;°}} {{Infobox/Line|{{Infobox/Body/Dict|pe arg}} |{{Body data|{{{name|{{BASEPAGENAME}}}}}|pe arg}}&nbsp;°}} {{Infobox/Line|{{Infobox/Body/Dict|an arg}} |{{Body data|{{{name|{{BASEPAGENAME}}}}}|an arg}}&nbsp;°}} {{Infobox/Line|{{Infobox/Body/Dict|anomaly}} |{{#expr: {{Body data|{{{name|{{BASEPAGENAME}}}}}|anomaly}} round 3}}&nbsp;{{Dict|rad}} <small>({{Infobox/Body/Dict|at}})</small>}} {{Infobox/Line|{{Infobox/Body/Dict|period}} |{{formatnum|{{#expr: {{Body data/Sidereal orbit|{{{name|{{BASEPAGENAME}}}}}}} round 1 }}}}&nbsp;{{Dict|s}} |<small>{{ExpandTime|{{Body data/Sidereal orbit|{{{name|{{BASEPAGENAME}}}}}}}}}</small>}} {{Infobox/Line|{{Infobox/Body/Dict|synodic}} |{{#ifeq: {{{name|{{BASEPAGENAME}}}}}|Kerbin|''{{Infobox/Body/Dict|undefined}}''|{{formatnum|{{#expr: {{OrbitSynodicPeriod|{{Body data/Sidereal orbit|{{{name|{{BASEPAGENAME}}}}}}}|{{#ifeq: {{Body data|{{{name|{{BASEPAGENAME}}}}}|parent}}|Kerbol|{{Body data/Sidereal orbit|Kerbin}}|{{Body data/Sidereal orbit|{{Body data|{{{name|{{BASEPAGENAME}}}}}|parent}}}}}}}} round 1 }}|1}}&nbsp;{{Dict|s}} |<small>{{#ifeq: {{{name|{{BASEPAGENAME}}}}}|Kerbin||{{ExpandTime|{{OrbitSynodicPeriod|{{Body data/Sidereal orbit|{{{name|{{BASEPAGENAME}}}}}}}|{{#ifeq: {{Body data|{{{name|{{BASEPAGENAME}}}}}|parent}}|Kerbol|{{Body data/Sidereal orbit|Kerbin}}|{{Body data/Sidereal orbit|{{Body data|{{{name|{{BASEPAGENAME}}}}}|parent}}}}}}}}}}</small>}}}}}} {{Infobox/Line|{{Infobox/Body/Dict|velocity}} |{{#ifeq: {{Body data|{{{name|{{BASEPAGENAME}}}}}|eccentricity}}|0|{{formatnum|{{#expr: 2 * pi * {{Body data|{{{name|{{BASEPAGENAME}}}}}|semi-major axis}} / {{Body data/Sidereal orbit|{{{name|{{BASEPAGENAME}}}}}}} round 1 }}}}|{{formatnum|{{#expr: 2 * pi * {{Body data|{{{name|{{BASEPAGENAME}}}}}|semi-major axis}} / {{Body data/Sidereal orbit|{{{name|{{BASEPAGENAME}}}}}}} * ((1 - {{Body data|{{{name|{{BASEPAGENAME}}}}}|eccentricity}}) / (1 + {{Body data|{{{name|{{BASEPAGENAME}}}}}|eccentricity}}))^(0.5) round 1 }}}} - {{formatnum|{{#expr: 2 * pi * {{Body data|{{{name|{{BASEPAGENAME}}}}}|semi-major axis}} / {{Body data/Sidereal orbit|{{{name|{{BASEPAGENAME}}}}}}} * ((1 + {{Body data|{{{name|{{BASEPAGENAME}}}}}|eccentricity}}) / (1 - {{Body data|{{{name|{{BASEPAGENAME}}}}}|eccentricity}}))^(0.5) round 1 }}}}}}&nbsp;{{Dict|m}}/{{Dict|s}}}} {{#ifeq: {{Body data|{{{name|{{BASEPAGENAME}}}}}|class}}|Moon|{{Infobox/Line|{{Infobox/Body/Dict|eclipsed}} |{{formatnum|{{#expr: ceil(((2 * (({{Body data/Apoapsis|{{{name|{{BASEPAGENAME}}}}}}} + {{Body data/Periapsis|{{{name|{{BASEPAGENAME}}}}}}}) / 2) * (({{Body data/Apoapsis|{{{name|{{BASEPAGENAME}}}}}}} * {{Body data/Periapsis|{{{name|{{BASEPAGENAME}}}}}}})^0.5)) / ((((2 * {{Body data/Apoapsis|{{{name|{{BASEPAGENAME}}}}}}} * {{Body data/Periapsis|{{{name|{{BASEPAGENAME}}}}}}}) / ({{Body data/Apoapsis|{{{name|{{BASEPAGENAME}}}}}}} + {{Body data/Periapsis|{{{name|{{BASEPAGENAME}}}}}}})) * ({{G}} * {{Body data/Mass|{{{name|{{Body data|{{{name|{{BASEPAGENAME}}}}}|parent}}}}}}}))^0.5)) * ((asin({{Body data|{{{name|{{Body data|{{{name|{{BASEPAGENAME}}}}}|parent}}}}}|radius}} / (({{Body data/Apoapsis|{{{name|{{BASEPAGENAME}}}}}}} * {{Body data/Periapsis|{{{name|{{BASEPAGENAME}}}}}}})^0.5))) + (((({{Body data/Apoapsis|{{{name|{{BASEPAGENAME}}}}}}} - {{Body data/Periapsis|{{{name|{{BASEPAGENAME}}}}}}}) / ({{Body data/Apoapsis|{{{name|{{BASEPAGENAME}}}}}}} + {{Body data/Periapsis|{{{name|{{BASEPAGENAME}}}}}}})) * {{Body data|{{{name|{{Body data|{{{name|{{BASEPAGENAME}}}}}|parent}}}}}|radius}}) / (({{Body data/Apoapsis|{{{name|{{BASEPAGENAME}}}}}}} * {{Body data/Periapsis|{{{name|{{BASEPAGENAME}}}}}}})^0.5))))}}}}&nbsp;{{Dict|s}}}}}}}} {{Infobox/Line|'''{{Infobox/Body/Dict|physical}}'''}} {{Infobox/Line|{{Infobox/Body/Dict|radius}} |{{formatnum|{{Body data|{{{name|{{BASEPAGENAME}}}}}|radius}}}}&nbsp;{{Dict|m}}}} {{Infobox/Line|{{Infobox/Body/Dict|circumference}} |{{formatnum|{{#expr: 2 * pi * {{Body data|{{{name|{{BASEPAGENAME}}}}}|radius}}}}}}&nbsp;{{Dict|m}}}} {{Infobox/Line|{{Infobox/Body/Dict|area}} |{{sigfigs|{{#expr: 4 * pi * {{Body data|{{{name|{{BASEPAGENAME}}}}}|radius}}^2}}|8}}&nbsp;{{Dict|m}}<sup>2</sup>}} {{Infobox/Line|{{Infobox/Body/Dict|mass}} |{{sigfigs|{{Body data/Mass|{{{name|{{BASEPAGENAME}}}}}}}|8}}&nbsp;{{Dict|k}}{{Dict|g}}}} {{Infobox/Line|{{Infobox/Body/Dict|gravpar}} |{{sigfigs|{{#expr: {{Body data/Mass|{{{name|{{BASEPAGENAME}}}}}}} * {{G}}}}|8}}&nbsp;{{Dict|m}}<sup>3</sup>/{{Dict|s}}<sup>2</sup>}} {{Infobox/Line|{{Infobox/Body/Dict|density}} |{{sigfigs|{{#expr: {{Body data/Mass|{{{name|{{BASEPAGENAME}}}}}}} / (4 * pi * {{Body data|{{{name|{{BASEPAGENAME}}}}}|radius}}^3 / 3)}}|8}}&nbsp;{{Dict|k}}{{Dict|g}}/{{Dict|m}}<sup>3</sup>}} {{Infobox/Line|{{Infobox/Body/Dict|gravity}} |{{sigfigs|{{#expr: {{Body data|{{{name|{{BASEPAGENAME}}}}}|gravity gees}} * 9.80665}}|3}}&nbsp;{{Dict|m}}/{{Dict|s}}<sup>2</sup> <small>({{#expr: {{Body data|{{{name|{{BASEPAGENAME}}}}}|gravity gees}} round 3 }}&nbsp;''{{Dict|g}}'')</small>}} {{Infobox/Line|{{Infobox/Body/Dict|escape}} |{{formatnum|{{#expr: (2 * {{G}} * {{Body data/Mass|{{{name|{{BASEPAGENAME}}}}}}} / {{Body data|{{{name|{{BASEPAGENAME}}}}}|radius}})^0.5}}|2}}&nbsp;{{Dict|m}}/{{Dict|s}}}} {{Infobox/Line|{{Infobox/Body/Dict|rotation}} |{{sigfigs|{{Body data|{{{name|{{BASEPAGENAME}}}}}|sidrot}}|8}}&nbsp;{{Dict|s}} |<small>{{ExpandTime|{{Body data|{{{name|{{BASEPAGENAME}}}}}|sidrot}}}}</small>}} {{#ifeq: {{Body data|{{{name|{{BASEPAGENAME}}}}}|parent}}|Kerbol| {{Infobox/Line|{{Infobox/Body/Dict|solar}} |{{sigfigs|{{#expr: {{Body data|{{{name|{{BASEPAGENAME}}}}}|sidrot}} / (1 - {{Body data|{{{name|{{BASEPAGENAME}}}}}|sidrot}} / {{Body data/Sidereal orbit|{{{name|{{BASEPAGENAME}}}}}}})}}|8}}&nbsp;{{Dict|s}}|<small>{{ExpandTime|({{Body data|{{{name|{{BASEPAGENAME}}}}}|sidrot}} / (1 - {{Body data|{{{name|{{BASEPAGENAME}}}}}|sidrot}} / {{Body data/Sidereal orbit|{{{name|{{BASEPAGENAME}}}}}}}))}}</small>}}}} {{Infobox/Line|{{Infobox/Body/Dict|sidereal}} |{{sigfigs|{{#expr: {{Body data|{{{name|{{BASEPAGENAME}}}}}|radius}} * 2 * pi / {{Body data|{{{name|{{BASEPAGENAME}}}}}|sidrot}}}}|5}}&nbsp;{{Dict|m}}/{{Dict|s}}}} {{Infobox/Line|{{Infobox/Body/Dict|sync}} |{{#if: {{Body data/SOI|{{{name|{{BASEPAGENAME}}}}}}}{{#ifexpr: {{OrbitAltitude/Core|{{Body data|{{{name|{{BASEPAGENAME}}}}}|sidrot}}|{{Body data/Mass|{{{name|{{BASEPAGENAME}}}}}}}|{{Body data|{{{name|{{BASEPAGENAME}}}}}|radius}}}} < {{Body data/SOI|{{{name|{{BASEPAGENAME}}}}}}}|1}}|{{OrbitAltitude | radius={{Body data|{{{name|{{BASEPAGENAME}}}}}|radius}} | mass={{Body data/Mass|{{{name|{{BASEPAGENAME}}}}}}} | period={{Body data|{{{name|{{BASEPAGENAME}}}}}|sidrot}}|factor=k}}|{{Infobox/Body/Dict|outside}}}}}} {{Infobox/Line|{{Infobox/Body/Dict|soi}} |{{#if: {{Body data/SOI|{{{name|{{BASEPAGENAME}}}}}}}|<span style="white-space:nowrap;">{{sigfigs|{{Body data/SOI|{{{name|{{BASEPAGENAME}}}}}}}|8}}&nbsp;{{Dict|m}} <ref name="centered" group="Note" /></span>|∞}}}} {{Infobox/Line|'''{{Infobox/Body/Dict|atmospheric}}'''}} {{Infobox/Line|{{Infobox/Body/Dict|atmo}} |{{#ifexpr: {{#if: {{Body data|{{{name|{{BASEPAGENAME}}}}}|pressure}}|{{Body data|{{{name|{{BASEPAGENAME}}}}}|pressure}}|0}} > 0|{{Yes}}|{{No}}}}}} {{#ifexpr: {{#if: {{Body data|{{{name|{{BASEPAGENAME}}}}}|pressure}}|{{Body data|{{{name|{{BASEPAGENAME}}}}}|pressure}}|0}} > 0| {{Infobox/Line|{{Infobox/Body/Dict|pressure}} |{{sigfigs|{{#expr: {{Body data|{{{name|{{BASEPAGENAME}}}}}|pressure}} * 101.325}}|6}}&nbsp;{{Dict|k}}{{Dict|Pa}} |{{#expr: {{Body data|{{{name|{{BASEPAGENAME}}}}}|pressure}} round 6 }}&nbsp;{{Dict|atm}}}} {{Infobox/Line|{{Infobox/Body/Dict|height}} |{{formatnum|{{Body data|{{{name|{{BASEPAGENAME}}}}}|atmospheric height}}}}&nbsp;{{Dict|m}} |<small>{{sigfigs|{{#expr: {{Body data|{{{name|{{BASEPAGENAME}}}}}|pressure}} * 1e-6}}|2}}&nbsp;{{Dict|atm}}</small>}} {{Infobox/Line|{{Infobox/Body/Dict|temp-min}} |{{#if: {{Body data|{{{name|{{BASEPAGENAME}}}}}|min temp}}|{{Body data|{{{name|{{BASEPAGENAME}}}}}|min temp}}&nbsp;°C <small>{{#expr: {{Body data|{{{name|{{BASEPAGENAME}}}}}|min temp}} + 273.15}}&nbsp;{{Dict|K}}</small>|{{Dict|Unknown}}}}}} {{Infobox/Line|{{Infobox/Body/Dict|temp-max}} |{{#if: {{Body data|{{{name|{{BASEPAGENAME}}}}}|max temp}}|{{Body data|{{{name|{{BASEPAGENAME}}}}}|max temp}}&nbsp;°C <small>{{#expr: {{Body data|{{{name|{{BASEPAGENAME}}}}}|max temp}} + 273.15}}&nbsp;{{Dict|K}}</small>|{{Dict|Unknown}}}}}} {{Infobox/Line|{{Infobox/Body/Dict|oxygen}} |{{#ifeq: {{uc:{{Body data|{{{name|{{BASEPAGENAME}}}}}|oxygen}}}}|YES|{{Yes}}|{{No}}}}}}}} {{Infobox/Line|'''{{Infobox/Body/Dict|sci}}'''}} {{Infobox/Line|{{Infobox/Body/Dict|surface}} |{{#if: {{Body data|{{{name|{{BASEPAGENAME}}}}}|sci landed surf}}|{{#if: {{#ifexpr: {{Body data|{{{name|{{BASEPAGENAME}}}}}|sci landed surf}} > 0|1}}|{{Body data|{{{name|{{BASEPAGENAME}}}}}|sci landed surf}}|''N/A''}}|''N/A''}}}} {{Infobox/Line|{{Infobox/Body/Dict|splashed}} |{{#if: {{Body data|{{{name|{{BASEPAGENAME}}}}}|sci splashed surf}}|{{#if: {{#ifexpr: {{Body data|{{{name|{{BASEPAGENAME}}}}}|sci splashed surf}} > 0|1}}|{{Body data|{{{name|{{BASEPAGENAME}}}}}|sci splashed surf}}|''N/A''}}|''N/A''}}}} {{#ifexpr: {{#if: {{Body data|{{{name|{{BASEPAGENAME}}}}}|pressure}}|{{Body data|{{{name|{{BASEPAGENAME}}}}}|pressure}}|0}} > 0| {{Infobox/Line|{{Infobox/Body/Dict|low-atmo}} |{{#if: {{BodyData|{{{name|{{BASEPAGENAME}}}}}|sci lower atmo}}|{{#if: {{#ifexpr: {{BodyData|{{{name|{{BASEPAGENAME}}}}}|sci lower atmo}} > 0|1}}|{{BodyData|{{{name|{{BASEPAGENAME}}}}}|sci lower atmo}}|''N/A''}}|''N/A''}}}} {{Infobox/Line|{{Infobox/Body/Dict|up-atmo}} |{{#if: {{BodyData|{{{name|{{BASEPAGENAME}}}}}|sci upper atmo}}|{{#if: {{#ifexpr: {{BodyData|{{{name|{{BASEPAGENAME}}}}}|sci upper atmo}} > 0|1}}|{{BodyData|{{{name|{{BASEPAGENAME}}}}}|sci upper atmo}}|''N/A''}}|''N/A''}}}}}} {{Infobox/Line|{{Infobox/Body/Dict|near}} |{{#if: {{BodyData|{{{name|{{BASEPAGENAME}}}}}|sci near space}}|{{#if: {{#ifexpr: {{BodyData|{{{name|{{BASEPAGENAME}}}}}|sci near space}} > 0|1}}|{{BodyData|{{{name|{{BASEPAGENAME}}}}}|sci near space}}|''N/A''}}|''N/A''}}}} {{Infobox/Line|{{Infobox/Body/Dict|outer}} |{{#if: {{BodyData|{{{name|{{BASEPAGENAME}}}}}|sci outer space}}|{{#if: {{#ifexpr: {{BodyData|{{{name|{{BASEPAGENAME}}}}}|sci outer space}} > 0|1}}|{{BodyData|{{{name|{{BASEPAGENAME}}}}}|sci outer space}}|''N/A''}}|''N/A''}}}} {{Infobox/Line|{{Infobox/Body/Dict|recovery}} |{{#if: {{Body data|{{{name|{{BASEPAGENAME}}}}}|sci recovery}}|{{#if: {{#ifexpr: {{Body data|{{{name|{{BASEPAGENAME}}}}}|sci recovery}} > 0|1}}|{{Body data|{{{name|{{BASEPAGENAME}}}}}|sci recovery}}|''N/A''}}|''N/A''}}}} }}</includeonly> This code here is the entire Infobox/Body Template on the KSP wiki. It works. Can you read it? I can't. Don't get me wrong, this isn't the fault of the authors - they did a great job with what they had. It's just that the MediaWiki Version the KSP Wiki uses is old and doesn't have the Scribunto or ParserFunctions - Extensions installed. For comparison, here is an example with Scribunto (Lua): <includeonly>{{#invoke:Infobox/Body|infoboxCreate|{{FULLPAGENAME}}}}</includeonly> This innocent line invokes the following Lua Module: --<pre> -- Load Modules local loader = require('Module:Loader') local string, table, yesno, arguments, Infobox, templates, body, versionAliases = loader.require('Module:String', 'Module:Table', 'Module:YesNo', 'Module:Arguments', 'Module:Infobox', 'Module:String/Templates', 'Module:Body', 'Module:VersionAliases') local getArgs = arguments.getArgs local curTitle = mw.title.getCurrentTitle() local getBody = body._nicerNumbers local getBodyPrimitive = body._getBody local p = {} --Creates an infobox function p.infoboxCreate(frame) local args = getArgs(frame) return p._infoboxCreate(frame, args[1], args[2]) end --Creates an Infobox using the infobox module. function p._infoboxCreate(frame, pageName, inputName) local celestialBody = getBody(inputName) --returns the body data in nicer form. See Module:Body for more info. if not celestialBody then celestialBody = getBody(pageName) end if not celestialBody then return error("Page Name not working and unknown body "..inputName) end local category_to_add = '[[Category:Celestial Bodies]][[Category:'..celestialBody.typeBody..'s]]'--adds catgeories --Infobox creation starts here. For further information, see Module:Infobox local ibox = Infobox() ibox:addTitle{celestialBody.name} --General Information applying to all Stars ibox:addImage{celestialBody.file} local generalInfo = ibox:addGroup{header = "General Information"} generalInfo:addData{"[["..celestialBody.typeBody.."]]", label = "Type"} --Use data only for non-star objects if(celestialBody.typeBody ~= "Star") then generalInfo:addData{"[["..celestialBody.orbitingBody.."]]", label = "Orbiting Body"} generalInfo:addData{celestialBody.typeSurface, label = "Surface Type"} generalInfo:addData{celestialBody.geothermal_activity, label = "Geothermal Activity"} end generalInfo:addData{"[["..celestialBody.planetarySystem.."]]", label = "Planetary System"} generalInfo:addData{"[["..celestialBody.since_version.."|"..versionAliases[celestialBody.since_version].."]]", label = "Since Version"} :done() local physicalCharacteristics = ibox:addGroup{header = "Physical Characteristics", collapse = 'closed'} physicalCharacteristics:addData{celestialBody.radius.." m", label = "Radius"} physicalCharacteristics:addData{celestialBody.aquetorial_circumference.." m", label = "Aquetorial Circumference"} physicalCharacteristics:addData{celestialBody.surface_area.." m²", label = "Surface Area"} physicalCharacteristics:addData{celestialBody.mass.." kg", label = "Mass"} physicalCharacteristics:addData{celestialBody.GM.." m<sup>3</sup>s<sup>-2</sup>", label = "GM"} if(celestialBody.typeBody ~= "Star") then physicalCharacteristics:addData{celestialBody.sphere_of_influence.." m", label = "Sphere of Influence"} else physicalCharacteristics:addData{celestialBody.luminosity.." kgm<sup>2</sup>s<sup>-3</sup>", label = "Luminosity"} end physicalCharacteristics:addData{celestialBody.density.." kgm<sup>-3</sup>", label = "Density"} physicalCharacteristics:addData{celestialBody.surface_gravity.." ms<sup>-2</sup>", label = "Surface Gravity"} physicalCharacteristics:addData{celestialBody.axial_tilt.."°", label = "Axial Tilt"} physicalCharacteristics:addData{celestialBody.sidereal_rotation.." s", label = "Sidereal Rotation Period"} if(getBodyPrimitive(celestialBody.orbitingBody or '').typeBody == "Star") then physicalCharacteristics:addData{celestialBody.solar_day.." s", label = "Solar Day"} end physicalCharacteristics:addData{celestialBody.escape_velocity.." ms<sup>-1</sup>", label = "Escape Velocity"} physicalCharacteristics:addData{celestialBody.sidereal_rotation_velocity.." ms<sup>-1</sup>", label = "Sidereal Rotation Velocity"} :done() local orbitalCharacteristics = ibox:addGroup{header = "Orbital Characteristics", collapse = 'closed'} if(celestialBody.typeBody ~= "Star") then orbitalCharacteristics:addData{celestialBody.semiMajorAxis.." m", label = "Semi Major Axis"} orbitalCharacteristics:addData{celestialBody.apoapsis.." m", label = "Apoapsis"} orbitalCharacteristics:addData{celestialBody.periapsis.." m", label = "Periapsis"} orbitalCharacteristics:addData{celestialBody.eccentricity, label = "Eccentricity"} orbitalCharacteristics:addData{celestialBody.inclination.."°", label = "Inclination"} orbitalCharacteristics:addData{celestialBody.argument_of_periapsis.."°", label = "Argument of Periapsis"} orbitalCharacteristics:addData{celestialBody.longtitude_of_the_ascending_node.."°", label = "Longtitude of the Ascending Node"} orbitalCharacteristics:addData{celestialBody.orbital_period.." s", label = "Orbital Period"} orbitalCharacteristics:addData{celestialBody.mean_orbital_velocity.." ms<sup>-1</sup>", label = "Mean Orbital Velocity"} orbitalCharacteristics:addData{celestialBody.apoapsis_velocity.." ms<sup>-1</sup>", label = "Apoapsis Velocity"} orbitalCharacteristics:addData{celestialBody.periapsis_velocity.." ms<sup>-1</sup>", label = "Periapsis Velocity"} end orbitalCharacteristics:addData{celestialBody.synchronous_orbit.." m", label = "Synchronous Orbit"} orbitalCharacteristics:addData{celestialBody.semi_synchronous_orbit.." m", label = "Semi-Synchronous Orbit"} :done() local atmosphericCharacteristics = ibox:addGroup{header = "Atmospheric Characteristics", collapse = 'closed'} if(celestialBody.atmosphere == 0) then atmosphericCharacteristics:addData{"Has no atmosphere", label = "Atmosphere"} else atmosphericCharacteristics:addData{celestialBody.atmosphere.." atm", label = "Atmosphere"} atmosphericCharacteristics:addData{celestialBody.atmospheric_heigth.." m", label = "Atmospheric Heigth"} atmosphericCharacteristics:addData{celestialBody.oxygen, label = "Oxygen"} end atmosphericCharacteristics:done() local infoboxString = ibox:tostring() infoboxString = frame:preprocess(infoboxString)--preprocess the table return table.concat{ infoboxString, curTitle.namespace == 0 and category_to_add or '' } end return p It uses some other Lua Modules (which I won't all paste here). Is it a bit slower? Probably. Does it really impact the site? No, not as far as I know (you can test it out yourself, it's on the fandom wiki sadly (I only work with what I have too - that's why so I'm excited about the official wiki, being free from the fangs of Fandom!)). Does it work? Yes. Is it easy to read/maintain/change? Ask it yourself, this was written by me (an 18 year-old with like two years of sporadic Wikipedia/Fandom experience). I bet you could write it too. That's why I again beg for the Scribunto Extension to be installed. It makes life so much easier, makes "complex" wiki edits like creating templates that do stuff a lot easier and gives much more power to the editor. The only drawback is that it is a bit slower than the internal MediaWiki Template Code but as long as the module doesn't have to process databases or something those loading times aren't even noticeable. With a KSP 2 wiki that would work on the old KSP wiki, this wouldn't be possible, though. Sadly.
  3. I've used KER and other mods quality-of-life mods for KSP for a longer time now since they make the game so much more enjoyable, but I can't find any analogues to them in KSP 2. Does anybody know any? Help appreciated!
  4. Will there be a Scribunto (Lua) Extension? Asking because I am currently using the Fandom as a testing ground (and have done some work there too...). By the way, one of the admins of the KSP 2 Fandom Wiki here. Please get me off this website, Fandom is really not worth it, the constant ads, intrusive design, lack of customability... So looking forward for that KSP 2 wiki!
  5. There is an inofficial fandom that acts as a wiki: https://kerbal-space-program-2.fandom.com/f If you want to, you can help us; it’s hella incomplete, we are working hard to make it usable. It is less broken than the new pages on the official KSP wiki about KSP 2, though.
  6. https://kerbal-space-program-2.fandom.com/f we are working on it, if you want to you can help us
  7. After accomplishing a munar landing and quicksaving, loading the quicksave sometimes glitches the craft through the terrain towards the singularity.
×
×
  • Create New...