Difference between revisions of "Template:Body data"

From Kerbal Space Program Wiki
Jump to: navigation, search
m (+siderial orbit template;)
m (Add new templates)
 
(35 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<includeonly>Don't use {{Tl|BodyData}} directly!</includeonly><noinclude>The subpages of this template are returning a value for each celestial body.
+
<includeonly>{{{{#ifeq: {{{1}}}|Infobox|Template}}:{{{1}}}/Param|{{{2}}}|{{{3|}}}}}</includeonly><noinclude>
 +
Returns for each [[celestial body]] various data about it. It extracts the value from the page named “<body>/Param” (e.g. [[Duna/Param]]) which needs to exists for this template to work. There is also a [[Template:Infobox/Param]] which is used by {{Tl|Infobox/Body}}.
  
== [[:Category:BodyData Base Templates|Base templates]] ==
+
{{Parameter table|parameters=
* Apoapsis: {{Tl|BodyData/Apoapsis}}
+
{{Parameter row|1|Name of the body in English. There needs to be a subpage named “Param” available.}}
* Periapsis: {{Tl|BodyData/Periapsis}}
+
{{Parameter row|2|The requested property.}}
* Parent: {{Tl|BodyData/Parent}}
+
{{Parameter row|3|The default value, if this property doesn't exist.|Not set}}
* Radius: {{Tl|BodyData/Radius}}
+
}}
* Mass: {{Tl|BodyData/Mass}}
 
* Pressure at 0 m altitude (“sea level”): {{Tl|BodyData/Pressure}}
 
* Scale height: {{Tl|BodyData/ScaleHeight}}
 
* Name: {{Tl|BodyData/Name}}
 
  
== [[:Category:BodyData Math Templates|Math templates]] ==
+
== Properties ==
* Surface gravity: {{Tl|BodyData/Gravity}}
+
The following properties are supported:
* Siderial orbit period: {{Tl|BodyData/Siderial Orbit}}
+
{{Parameter table|name=text|style=hover|parameters=
 +
{{Parameter row|name|Name of celestial body. Used to determine all data.}}
 +
{{Parameter row|class|Class of celestial body.}}
 +
{{Parameter row|file|Filename to image of the celestial object.}}
 +
{{Parameter row|parent|Parent body of the celestial object. May be an empty string.}}
 +
{{Parameter row|semi-major axis|The longest orbit diameter in meters measured from the center of the orbit in meters.||1}}
 +
{{Parameter row|eccentricity|Orbital eccentricity.||1}}
 +
{{Parameter row|orbinc|Orbital inclination in degrees.||1}}
 +
{{Parameter row|pe arg|Argument of periapsis in degrees.||1}}
 +
{{Parameter row|an arg|Longitude of the ascending node in degrees.||1}}
 +
{{Parameter row|anomaly|Mean anomaly in radians at 0s UT.||1}}
 +
{{Parameter row|radius|Radius of the body in meters.}}
 +
{{Parameter row|gravity gees|Surface gravity in meters per second squared (m/s2).}}
 +
{{Parameter row|sidrot|Sidereal period in seconds.}}
 +
{{Parameter row|highest|Highest elevation in meters.|Hidden/Not set}}
 +
{{Parameter row|highest longitude|Longitude of the highest elevation in degrees. Positive is north, negative is south.|Hidden/Not set|1}}
 +
{{Parameter row|highest latitude|Latitude of the highest elevation in degrees. Positive is east, negative is west.|Hidden/Not set|1}}
 +
{{Parameter row|pressure|Pressure of the atmosphere at mean sea level in atmospheres. Set to 0 when the body doesn't have an atmosphere.}}
 +
{{Parameter row|scale height|Scale height of the atmosphere in meters.||1}}
 +
{{Parameter row|atmospheric height|Height of the atmosphere in meters.||1}}
 +
{{Parameter row|min temp|Lowest temperature in degrees Celsius.||1}}
 +
{{Parameter row|max temp|Highest temperature in degrees Celsius.||1}}
 +
{{Parameter row|oxygen|Is oxygen present? (Yes/No)||1}}
 +
{{Parameter row|sci landed surf|name2=sci surf|Science multiplier on the surface. <tt>sci landed surf</tt> should be preferred.}}
 +
{{Parameter row|sci splashed surf|Science multiplier on the surface splashed.}}
 +
{{Parameter row|sci lower atmo|Science multiplier in the lower atmosphere.}}
 +
{{Parameter row|sci upper atmo|Science multiplier in the lower atmosphere.}}
 +
{{Parameter row|sci border atmo|Height of the border between lower and upper atmosphere in meters. This is not supported for all, but is not optional.}}
 +
{{Parameter row|sci near space|Science multiplier in near space.}}
 +
{{Parameter row|sci outer space|Science multiplier in outer space.}}
 +
{{Parameter row|sci border space|Height of the border between near and outer space in meters. This is not supported for all, but is not optional.}}
 +
{{Parameter row|sci recovery|Science multiplier for recovery.}}
 +
}}
 +
 
 +
There are the following classes available:
 +
* [[Star]]
 +
* [[Planet]]
 +
* [[Dwarf planet]]
 +
* [[Moon]]
 +
 
 +
Parents which are indented don't need to be set, when the previous non-indented parameter isn't set.
 +
 
 +
== Separate subtemplates ==
 +
Some special properties can be accessed via a separate sub template. These templates can't be called with the property set like <tt><nowiki>{{BodyData|Kerbin|soi}}</nowiki></tt>.
 +
* Name: {{Tl|Body data/Name}}
 +
* Apoapsis: {{Tl|Body data/Apoapsis}}
 +
* Periapsis: {{Tl|Body data/Periapsis}}
 +
* Mass: {{Tl|Body data/Mass}}
 +
* Siderial orbit period: {{Tl|Body data/Sidereal orbit}}
 +
* Sphere of influence: {{Tl|Body data/SOI}}
 +
 
 +
Additional templates calculate a property using other body data templates:
 +
* Altitude for a given pressure: {{Tl|Body data/alt at pressure}}
 +
* Orbital period at an altitude: {{Tl|Body data/orbit period}}
 +
 
 +
Old, unused templates:
 +
* Surface gravity: {{Tl|Body data/Gravity}}
  
 
[[Category:Templates]]</noinclude>
 
[[Category:Templates]]</noinclude>

Latest revision as of 12:38, 10 May 2018

Returns for each celestial body various data about it. It extracts the value from the page named “<body>/Param” (e.g. Duna/Param) which needs to exists for this template to work. There is also a Template:Infobox/Param which is used by {{Infobox/Body}}.

# Optional Description Default
1 No Name of the body in English. There needs to be a subpage named “Param” available.
2 No The requested property.
3 Yes The default value, if this property doesn't exist. Not set

Properties

The following properties are supported:

Name Optional Description Default
name No Name of celestial body. Used to determine all data.
class No Class of celestial body.
file No Filename to image of the celestial object.
parent No Parent body of the celestial object. May be an empty string.
semi-major axis No The longest orbit diameter in meters measured from the center of the orbit in meters.
eccentricity No Orbital eccentricity.
orbinc No Orbital inclination in degrees.
pe arg No Argument of periapsis in degrees.
an arg No Longitude of the ascending node in degrees.
anomaly No Mean anomaly in radians at 0s UT.
radius No Radius of the body in meters.
gravity gees No Surface gravity in meters per second squared (m/s2).
sidrot No Sidereal period in seconds.
highest Yes Highest elevation in meters. Hidden/Not set
highest longitude Yes Longitude of the highest elevation in degrees. Positive is north, negative is south. Hidden/Not set
highest latitude Yes Latitude of the highest elevation in degrees. Positive is east, negative is west. Hidden/Not set
pressure No Pressure of the atmosphere at mean sea level in atmospheres. Set to 0 when the body doesn't have an atmosphere.
scale height No Scale height of the atmosphere in meters.
atmospheric height No Height of the atmosphere in meters.
min temp No Lowest temperature in degrees Celsius.
max temp No Highest temperature in degrees Celsius.
oxygen No Is oxygen present? (Yes/No)
sci landed surf or sci surf No Science multiplier on the surface. sci landed surf should be preferred.
sci splashed surf No Science multiplier on the surface splashed.
sci lower atmo No Science multiplier in the lower atmosphere.
sci upper atmo No Science multiplier in the lower atmosphere.
sci border atmo No Height of the border between lower and upper atmosphere in meters. This is not supported for all, but is not optional.
sci near space No Science multiplier in near space.
sci outer space No Science multiplier in outer space.
sci border space No Height of the border between near and outer space in meters. This is not supported for all, but is not optional.
sci recovery No Science multiplier for recovery.

There are the following classes available:

Parents which are indented don't need to be set, when the previous non-indented parameter isn't set.

Separate subtemplates

Some special properties can be accessed via a separate sub template. These templates can't be called with the property set like {{BodyData|Kerbin|soi}}.

Additional templates calculate a property using other body data templates:

Old, unused templates: