Difference between revisions of "Template:Body data"
From Kerbal Space Program Wiki
(*okay let's get started;) |
m (*don't use Data;) |
||
Line 7: | Line 7: | ||
|pressure={{BodyData/Pressure|{{{1}}}}} | |pressure={{BodyData/Pressure|{{{1}}}}} | ||
|scale height={{BodyData/ScaleHeight|{{{1}}}}} | |scale height={{BodyData/ScaleHeight|{{{1}}}}} | ||
− | |#default={{:{{{1}}}/ | + | |#default={{:{{{1}}}/Param|{{{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!}} | {{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 | + | {{Parameter Row|1|Name of the body in English. There needs to be a subpage named “Param” available.}} |
{{Parameter Row|2|The requested property.}} | {{Parameter Row|2|The requested property.}} | ||
}} | }} |
Revision as of 11:30, 14 September 2013
Returns for each celestial body various data about it.
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.
- apoapsis: {{BodyData/Apoapsis}}
- periapsis: {{BodyData/Periapsis}}
- parent: {{BodyData/Parent}}
- radius: {{BodyData/Radius}}
- mass: {{BodyData/Mass}}
- pressure: {{BodyData/Pressure}} (returns the pressure at 0 m altitude (“sea level”))
- scale height: {{BodyData/ScaleHeight}}
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
- Name: {{BodyData/Name}}
- Surface gravity: {{BodyData/Gravity}}
- Siderial orbit period: {{BodyData/Sidereal orbit}}
- Sphere of influence: {{BodyData/SOI}}