Difference between revisions of "Template:Body data"

From Kerbal Space Program Wiki
Jump to: navigation, search
(-test removed (math templates can't be used within this template);)
(*okay let's get started;)
Line 7: Line 7:
 
|pressure={{BodyData/Pressure|{{{1}}}}}
 
|pressure={{BodyData/Pressure|{{{1}}}}}
 
|scale height={{BodyData/ScaleHeight|{{{1}}}}}
 
|scale height={{BodyData/ScaleHeight|{{{1}}}}}
|#default={{#explode:{{#explode:{{#explode:{{msgnw::{{{1}}}/Data}}|{{{2}}}&#61;|1}}|&#124;|0}}|&#125;&#125;|0}}}}</includeonly><noinclude>
+
|#default={{:{{{1}}}/Data|{{{2}}}}}}}</includeonly><noinclude>
 +
{{Box|type=warning|This template and {{Tl|Infobox/Body}} are under heavy development at the moment. Expect problems with display of automatically generated numbers in tables for the next hours until it is sorted out. Don't make adjustments unless you really know what to do!}}
 
Returns for each [[celestial body]] various data about it.
 
Returns for each [[celestial body]] various data about it.
  
 
{{Parameter Table|parameters=
 
{{Parameter Table|parameters=
 
{{Parameter Row|1|Name of the body in English. There needs to be a subpage named “Data” available.}}
 
{{Parameter Row|1|Name of the body in English. There needs to be a subpage named “Data” available.}}
{{Parameter Row|2|The requested property. Supports all parameters of {{Tl|Infobox/Body}} and some additional values.}}
+
{{Parameter Row|2|The requested property.}}
 
}}
 
}}
 +
 +
== Properties ==
 +
The following properties are supported:
 +
{{Parameter Table|name=text|style=hover|parameters=
 +
{{Parameter Row|name|Name of celestial body. Used to determine mass.}}
 +
{{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|apoapsis|Apoapsis of the orbit in meters measured from the center of the bodies in meters.||1}}
 +
{{Parameter Row|periapsis|Periapsis of the orbit in meters measured from the center of the bodies in meters.||1}}
 +
{{Parameter Row|orbinc|Orbital inclination in degrees.||1}}
 +
{{Parameter Row|pe arg|Argument of periapsis||1}}
 +
{{Parameter Row|an arg|Longitude of the ascending node||1}}
 +
{{Parameter Row|anomaly|Mean anomaly in radians at 0s UT||1}}
 +
{{Parameter Row|radius|Radius of the body in meters}}
 +
{{Parameter Row|mass|Mass in kilograms}}
 +
{{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 see 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|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}}
 +
}}
 +
 +
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.
  
 
For backwards compatibility this template also supports the following properties. It simply calls the appropriate subtemplate. They additionally support Sun and Mün instead of Kerbol and Mun.
 
For backwards compatibility this template also supports the following properties. It simply calls the appropriate subtemplate. They additionally support Sun and Mün instead of Kerbol and Mun.
Line 25: Line 60:
 
'''The direct usage of those subtemplates is not recommended anymore!'''
 
'''The direct usage of those subtemplates is not recommended anymore!'''
  
This template don't support math templates directly as parameters like <tt><nowiki>{{BodyData|Kerbin|soi}}</nowiki></tt>. It may also return a value, but it may get removed when it is no longer used by the infobox.
+
This template don't support math templates directly as parameters like <tt><nowiki>{{BodyData|Kerbin|soi}}</nowiki></tt>.
  
 
== Separate subtemplates ==
 
== Separate subtemplates ==

Revision as of 11:11, 14 September 2013

This template and {{Infobox/Body}} are under heavy development at the moment. Expect problems with display of automatically generated numbers in tables for the next hours until it is sorted out. Don't make adjustments unless you really know what to do!

Returns for each celestial body various data about it.

Template:Parameter Table

Properties

The following properties are supported: Template:Parameter Table

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.

For backwards compatibility this template also supports the following properties. It simply calls the appropriate subtemplate. They additionally support Sun and Mün instead of Kerbol and Mun.

The direct usage of those subtemplates is not recommended anymore!

This template don't support math templates directly as parameters like {{BodyData|Kerbin|soi}}.

Separate subtemplates

Some special properties can be accessed via a separate sub template