Difference between revisions of "Template:Infobox/Part"

From Kerbal Space Program Wiki
Jump to: navigation, search
m
(+new type; +show subtemplates for the types (if available);)
Line 11: Line 11:
 
|cm='''[[Command module]]'''
 
|cm='''[[Command module]]'''
 
|pod='''[[Command pod]]'''
 
|pod='''[[Command pod]]'''
 +
|exp
 +
|sen='''[[Environmental sensor]]'''
 
|#default={{#if: {{{role|}}}|'''{{{role|}}}'''}}
 
|#default={{#if: {{{role|}}}|'''{{{role|}}}'''}}
 
}}}} <span style="font-size:smaller; white-space:normal;">{{lang|en=by|de=von|hr=proizveo|pl=wyk. przez|ru=от}} {{#if: {{{type|}}}{{{role|}}}|<br />}}{{Infobox/Part/Manufacturer entry|{{Infobox/Part/Manufacturer|{{#if: {{{manufacturer|}}}|{{{manufacturer}}}|?}}}}}}{{if||{{{manufacturer2|}}}| {{lang|en=and|de=und|hr=i}} {{Infobox/Part/Manufacturer entry|{{Infobox/Part/Manufacturer|{{{manufacturer2}}}}}}}}}</span>|style=text-align: center}}{{if||{{{size|}}}|
 
}}}} <span style="font-size:smaller; white-space:normal;">{{lang|en=by|de=von|hr=proizveo|pl=wyk. przez|ru=от}} {{#if: {{{type|}}}{{{role|}}}|<br />}}{{Infobox/Part/Manufacturer entry|{{Infobox/Part/Manufacturer|{{#if: {{{manufacturer|}}}|{{{manufacturer}}}|?}}}}}}{{if||{{{manufacturer2|}}}| {{lang|en=and|de=und|hr=i}} {{Infobox/Part/Manufacturer entry|{{Infobox/Part/Manufacturer|{{{manufacturer2}}}}}}}}}</span>|style=text-align: center}}{{if||{{{size|}}}|
Line 28: Line 30:
 
   -->|lfe|srb|je=Engine<!--
 
   -->|lfe|srb|je=Engine<!--
 
   -->|cp|cm|pod=Command<!--
 
   -->|cp|cm|pod=Command<!--
 +
  -->|exp=Science<!--
 +
  -->|sen=Utility<!--
 
   -->|#default=}}}}}}<!--
 
   -->|#default=}}}}}}<!--
 
-->|{{lang|en=Unknown cfg|de=Unbekannte cfg|pl=Nieznany cfg|hr=Nepoznata konfiguracija|fr=cfg inconnu|ru=cfg неизвестен|Cfg 파일 없음 }}[[Category:Infobox/Part with missing parameters]]
 
-->|{{lang|en=Unknown cfg|de=Unbekannte cfg|pl=Nieznany cfg|hr=Nepoznata konfiguracija|fr=cfg inconnu|ru=cfg неизвестен|Cfg 파일 없음 }}[[Category:Infobox/Part with missing parameters]]
Line 76: Line 80:
 
! Role
 
! Role
 
! Parent
 
! Parent
 +
! Subtemplate
 
|-
 
|-
 
| lfe
 
| lfe
 
| [[Liquid fuel engine]]
 
| [[Liquid fuel engine]]
 
| rowspan="3" | Engine
 
| rowspan="3" | Engine
 +
| (n/a)
 
|-
 
|-
 
| srb
 
| srb
 
| [[Solid rocket booster]]
 
| [[Solid rocket booster]]
 +
| (n/a)
 
|-
 
|-
 
| je
 
| je
 
| [[Jet engine]]
 
| [[Jet engine]]
 +
| {{Tl|Infobox/Part/JetEngine}}
 
|-
 
|-
 
| cm
 
| cm
 
| [[Command module]]
 
| [[Command module]]
 
| rowspan="3" | Command
 
| rowspan="3" | Command
 +
| rowspan="3" | {{Tl|Infobox/Part/command module}}
 
|-
 
|-
 
| cp
 
| cp
Line 96: Line 105:
 
| pod
 
| pod
 
| [[Command pod]]
 
| [[Command pod]]
 +
|-
 +
| exp
 +
| rowspan="2" | [[Environmental sensor]]
 +
| Science
 +
| rowspan="2" | {{Tl|Infobox/Part/sensor}}
 +
|-
 +
| sen
 +
| Utility
 
|}
 
|}
  

Revision as of 16:26, 23 January 2014

TVR-1180C Mk1 Stack Tri-Coupler
Adapter by
Found lying by the side of the road

Radial size Small
Cost (total) 680.00 Funds
Mass (total) 0.30 t
Drag 0.3
Max. Temp. 3400 K
Volume  ?
Impact Tolerance 12 m/s
Research Unknown
Unlock cost 0 Funds
Since version 0.7.3
Part configuration [[Parts/Utility/stackTriCoupler/{{{filename}}}|{{{filename}}}]]

Usage

Template:Data Template

Parameters

Name Optional Description Default
name Yes Name of the part, which can be found in the localization file. Uses {{Dict/part name}} to translate names. {{BASEPAGENAME}}
file Yes Filename to image of the part. File:Image needed.svg
type No Type of the part. Automatically defines the role and parent parameter.
role Yes Role of the part. Overrides the type parameter. {{type}}
size Yes Radial size of the part (uses {{Radial Size}}). Not set/Hidden
size2 Yes Second radial size of the part (uses {{Radial Size}}). Not set/Hidden
size3 Yes Third radial size of the part (uses {{Radial Size}}). Not set/Hidden
manufacturer Yes Manufacturer of the part. If set linked to the category of this name (see also Category:Manufacturers). Automatically uses {{Infobox/Part/Manufacturer}} and {{Infobox/Part/Manufacturer entry}} on it. Not set/Hidden
manufacturer2 Yes Second manufacturer of the part. Not set/Hidden
costs No Cost of the part, which is usually given in the part.cfg.
mass No Mass of the part, which is usually given in the part.cfg.
lf Yes Amount of Liquid Fuel on that part in units. Only used for wet mass/dry costs calculation. 0
ox Yes Amount of Oxidizer on that part in units. Only used for wet mass/dry costs calculation. 0
mp Yes Amount of Monopropellant on that part in units. Only used wet mass/dry costs calculation. 0
sf Yes Amount of Solid Fuel on that part in units. Only used for wet mass/dry costs calculation. 0
xg Yes Amount of Xenon Gas on that part in units. Only used for wet mass/dry costs calculation. 0
ia Yes Amount of Intake Air on that part in units. Only used for wet mass/dry costs calculation. 0
or Yes Amount of Ore on that part in units. Only used for wet mass/dry costs calculation. 0
ab Yes Amount of Ablator on that part in units. Only used for wet mass/dry costs calculation. 0
drag No Drag of the part. By different values, add minimum_drag first and then maximum_drag
temp No Temperature resistance of the part, which is usually given in the part.cfg.
tolerance No Impact tolerance of the part, which is usually given in the part.cfg.
volume Yes Volume of the part for cargo storage, which is usually given in the part.cfg in the ModuleCargoPart module. If the volume is -1, it is considered as a construction part which cannot be stored (N/A). Unknown volume (?)
research Yes Research node required for this part. Uses {{Dict/sci node}} to translate names. Unknown
unlock cost No Cost to unlock the part, which is usually given in the part.cfg.
since Yes Version the part first appeared in. It will be used in {{version}}. Unknown
dlc Yes Name of the dlc. Used for link to cfg-entry in wiki. Can be:
  • mh
  • bg
Not Set
filename No The filename (with extension) of the part.cfg
part No Name of the part folder. Used for link to cfg-entry in wiki. It will create a link to Parts/{{{parent}}}/{{{part}}}/part.cfg.
parent No Parent directory of the part folder. Used for part.cfg file, see above. Overrides the type parameter.
physics insignificant Yes Mark the mass and drag automatically with a note that they are insignificant (so called massless parts). This will use {{{nref}}}, so if it isn't set, will set it automatically to "N". Other notes can use that group then too. Must be set to "Y" or "y" to show insignificance. Not set/Hidden
notes Yes Additional notes below the part information. Not set/Hidden
nref Yes Automatically add references of the group with that name (usually N). Modules might have a nref parameter which needs to be set to the same value. Not set/Hidden
more Yes More module-specific information (see More parameter). Not set

If a mandatory parameter is missing Category:Infobox/Part with missing parameters will be added.

Configuration file

With the new folder structure since version 0.20 the part.cfg should be placed at Parts/{{{parent}}}/{{{part}}}/part.cfg. If the configuration file wasn't moved yet the Category:Infobox/Part with unmoved part.cfg is added. If both a new and an old part.cfg exist the page is added to Category:Infobox/Part with leftover part.cfg. The {{Part config}} template should be used in the part configuration pages.

The infobox links to the new location, if the parent parameter is determined and there is no old file. It will link to the old location, if there is still an article and not a new one. The suggested handling would be, to move the old page and then updated that. This way it is possible to get old versions definitions of the part in the history. As only sysops can move articles, only updating the text is usually the best way: At some point this page might be get moved.

More parameter

To add additional fields the {{{more}}} parameter should be used with {{Infobox/Part/Line}} or {{Infobox/Part}}.

Manufacturer

The template {{Infobox/Part/Manufacturer}} is a template to quickly add a manufacturer.

Types

For different types of parts this template allows to set the type parameter. The type will automatically set {{{role}}} and {{{parent}}} though they can be manually overwritten. The following values are supported:

Type Role Parent Subtemplate
lfe Liquid fuel engine Engine (n/a)
srb Solid rocket booster (n/a)
je Jet engine {{Infobox/Part/JetEngine}}
cm Command module Command {{Infobox/Part/command module}}
cp Cockpit
pod Command pod
exp Environmental sensor Science {{Infobox/Part/sensor}}
sen Utility

Roles

For different roles with special additional parameters one of the following templates should be used. This system is in process of redesigning and will be replaced by modules and types.

Command

Engines

Fuel tanks

Structural

Other

(Some of those should be sorted into sections)

These subtemplates are categorised in Category:Infobox/Part subtemplates.

Template

{{Infobox/Part
|name=
|file=
|role=
|manufacturer=
|size=
|size2=
|costs=
|mass=
|drag=
|temp=
|tolerance=
|more=
|additional=
|since=
|class=
|part=
|parent=
}}

Example

Example used on this page:

{{Infobox/Part
|name=TVR-1180C Mk1 Stack Tri-Coupler
|file=Tvr-1180C mk1 stack tri-coupler.jpg
|role=Adapter
|parent=Utility
|manufacturer=Found lying by the side of the road
|size=small
|costs=680
|mass=0.3
|drag=0.3
|temp=3400
|tolerance=12
|since=0.7.3
|class=Part
|part=stackTriCoupler
}}

Translation

To translate this template or one of the subtemplates see also this article.

At the moment only English is supported by all templates.

  • Deutsch (German): Infobox/Part complete, subtemplates partially
  • Polish (Polski): Infobox/Part mostly, subtemplates partially
  • Русский (Russian): Infobox/Part partially, subtemplates partially
  • Français (French): Infobox/Part mostly, subtemplates partially
  • 한국어 (Korean) : Infobox/Part complete, subtemplates partially