Template:Infobox engines: Difference between revisions

From Kerbal Space Program 2 Wiki
Jump to navigation Jump to search
Updated image and caption template data
Tag: 2017 source edit
simplified formatting
 
(44 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
<templatedata>
{{Documentation}}
{
</noinclude><includeonly>
"params": {
{{Infobox | subbox = yes
"image": {
| headerstyle  = font-weight: bold; font-size: 18px; text-align: left;
"aliases": [
| labelstyle  = width: 50%; text-align: left;
"picture",
| header20 = {{#if: {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|alt_mode}} | {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|mode_name}} |}}
"thumbnail"
| label21  = {{#invoke:Data infobox|getFuelLabels|{{PAGENAME}}}}
],
data21  = {{#invoke:Data infobox|getFuelValues|{{PAGENAME}}}}
"label": "Part Image",
  | label22   = Thrust: 1 atm. (kN)
"description": "The filename of the part, including the file extension",
data22   = {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|max_thrust|atm}} <small>kN</small>
"example": "LV-3000_Tuba.png",
  | label23   = Thrust: Vac. (kN)
"type": "wiki-file-name",
data23   = {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|max_thrust|vac}} <small>kN</small>
"required": true
| label24   = I<sub>sp</sub>: 1 atm. (s)
},
data24  = {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|isp|atm}} <small>s</small>
"caption": {
  | label25   = I<sub>sp</sub>: Vac. (s)
"aliases": [
data25  = {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|isp|vac}} <small>s</small>
"subtitle"
}}
],
{{#if: {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|alt_mode}}  
"label": "Caption",
| {{Infobox | subbox = yes
"description": "The part's classification per the in-game description.",
   | headerstyle  = font-weight: bold; font-size: 18px; text-align: left;
"example": "Deep Space Hydrogen Engine",
  | labelstyle = width: 50%; text-align: left;
"type": "string",
   | header20 = {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|alt_mode|mode_name}}
"required": true
   | label21   = {{#invoke:Data infobox|getFuelLabels|{{PAGENAME}}|alt}}
},
   |  data21   = {{#invoke:Data infobox|getFuelValues|{{PAGENAME}}|alt}}
"size": {
  | label22   = Thrust: 1 atm.
"label": "Size",
  data22   = {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|max_thrust|atm}} <small>kN</small>
"description": "Size of part (using {{Size}})",
  | label23  = Thrust: Vac.
"type": "string",
   |  data23   = {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|max_thrust|vac}} <small>kN</small>
"required": true,
  | label24   = I<sub>sp</sub>: 1 atm.
"suggestedvalues": [
  data24  = {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|isp|atm}} <small>s</small>
"XS",
  | label25   = I<sub>sp</sub>: Vac.
"SM",
  data25  = {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|isp|vac}} <small>s</small>
"MD",
   }}
"LG",
}}
"XL",
"2X"
]
},
"max temp": {
"label": "Max Temperature (K)",
"description": "Maximum withstandable engine temperature",
"type": "string",
"required": true
},
"impact tol": {
"label": "Impact Tolerance (m/s)",
"description": "Impact Tolerance (m/s)",
"type": "string",
"required": true
},
"mass": {
"label": "Mass (t)",
"description": "Mass (t)",
"type": "string",
"required": true
},
"fuel type": {
"aliases": [
"fuel"
],
"label": "Fuel Type",
"description": "The fuel this engine burns.",
"type": "string",
"suggestedvalues": [
"Methalox",
"Methane",
"Monopropellant",
"Solid Fuel",
"Hydrogen",
"Xenon"
],
"required": true
},
"vacuum thrust": {
"aliases": [
"vac thrust",
"thrust vac"
],
"label": "Thrust (Vacuum)",
"description": "The max thrust this engine creates in vacuum",
"type": "string",
"required": true
},
"vacuum isp": {
"aliases": [
"vac isp",
"isp vac"
],
"label": "Isp (Vac.)",
"description": "The specific impulse of this engine in vacuum.",
"type": "string",
"required": true
},
"manufacturer": {
"aliases": [
"maker",
"brand"
],
"label": "Manufacturer",
"description": "The in-game manufacturer of the part.",
"example": "Jebediah's Junkyard",
"type": "string",
"required": true
}
},
"description": "Generate an infobox for an engine.",
"paramOrder": [
"image",
"caption",
"mass",
"size",
"max temp",
"impact tol",
"manufacturer",
"fuel type",
"vacuum thrust",
"vacuum isp"
]
}
</templatedata>
 
{{Infobox
| name    = Test
| title    = Test box
| image    = {{{image|}}}
| caption = Test caption
 
| labelstyle = width: 33%
| bodystyle  = width: 20em
| headerstyle  = font-weight: bold; color: black; background: #f7aa33;
 
| header1 = Statistics
| label2   = Mass (t)
data2   = #
| label3  = Size
| data3  = #
| label4   = Max Temp (K)
data4   = {{{max temp|#}}}
| label5   = Impact Tolerance (m/s)
data5  = {{{impact tol|#}}}
 
| header6  = Engine Info
| label7  = Fuel
| data7  = #
| label8  = Thrust
| data8  = #
| label9   = I<sub>sp</sub>
data9  = #
 
| below    = Jedediah's Junk Yard
 
}}
</noinclude>
 
<includeonly>
{{Infobox
| name    = {{PAGENAME}}
| title    = {{PAGENAME}}
| image    = [[File:{{{image|}}}]]
| caption = {{{caption|}}}
 
| labelstyle  = width: 33%
| bodystyle   = width: 20em
| headerstyle  = font-weight: bold; color: black; background: #f7aa33;
 
| header1 = Statistics
 
| label2   = Mass (t)
| data2  = {{{mass|}}}
| label3   = Size
| data3   = {{Size|Size={{{size|}}}|Add Category=1}}
| label4   = Max Temp (K)
data4   = {{{max temp|}}}
| label5   = Impact Tolerance (m/s)
data5   = {{{impact tol|}}}
 
 
| header6  = Engine Info
| label7   = Fuel
data7   = {{{fuel type|}}}
| label8   = Thrust (Vac.)
data8  = {{{vacuum thrust|}}}
| label9   = I<sub>sp</sub> (Vac.)
data9  = {{{vacuum isp|}}}
 
|  below   = {{{manufacturer|}}}
 
}}
</includeonly>
</includeonly>

Latest revision as of 23:45, 28 January 2025