Difference between revisions of "Template:Infobox/Part"

From Kerbal Space Program Wiki
Jump to: navigation, search
(If the (empty) mass is less than 0.04t, then display the mass (for fuel tanks: full mass) with 5 decimal places instead of 2. (This is a bit crude but since the full mass is computed on the fly its easier to just use the empty mass for the check instead.))
(117 intermediate revisions by 19 users not shown)
Line 1: Line 1:
<includeonly>{{Infobox
+
<includeonly>{{Infobox|width=280
|name={{{name|}}}
+
|name={{Dict/part name|{{#if: {{{name|}}}|{{{name}}}|{{BASEPAGENAME}}}}}}
 
|file={{{file|}}}
 
|file={{{file|}}}
|hovertext={{lang|en=Part image|de=Bild des Bauteils|hr=Slika dijela|ru=Изображение детали|ko=파트 이미지|pt=Imagem da peça}}
+
|hovertext={{Infobox/Part/Dict|Image}}
 
|lines=
 
|lines=
{{Infobox/Line|1={{#if: {{Infobox/Part/roles|{{{type|}}}|{{{role|}}}}}|'''{{Infobox/Part/roles|{{{type|}}}|{{{role|}}}}}'''}} <span style="font-size:smaller; white-space:normal;">{{lang|en=by|de=von|hr=proizveo|pl=wyk. przez|ru=от|pt=por}} {{#if: {{{type|}}}{{{role|}}}|<br />}}{{Infobox/Part/Manufacturer entry|{{Infobox/Part/Manufacturer|{{#if: {{{manufacturer|}}}|{{{manufacturer}}}|?}}}}}}{{if||{{{manufacturer2|}}}| {{lang|en=and|de=und|hr=i|pt=e}} {{Infobox/Part/Manufacturer entry|{{Infobox/Part/Manufacturer|{{{manufacturer2}}}}}}}}}</span>|style=text-align: center}}{{if||{{{size|}}}|
+
<!-- Type -->
{{Infobox/Part/Line|[[Radial size{{if lang}}|{{lang|en=Radial size|de=Größe|ru=Размер|hr=Promjer|pl=Rozmiar|fr=Taille|zh-cn=径向尺寸|ko=직경|pt=Tamanho}}]]|2=<span style="white-space:normal;">{{Radial Size|{{{size}}}}}{{#if: {{{size2|}}}|, {{Radial Size|{{{size2}}}}}}}</span>}}}}
+
{{Infobox/Line|{{#if: {{Infobox/Part/roles|{{{type|}}}|{{{role|}}}}}|'''{{Infobox/Part/roles|{{{type|}}}|{{{role|}}}}}'''}} <span style{{=}}"font-size:smaller; white-space:normal;">{{Dict|by}} {{#if: {{{type|}}}{{{role|}}}|<br/>}}{{Infobox/Part/Manufacturer entry|{{Infobox/Part/ManufacturerUntranslated|{{#if: {{{manufacturer|}}}|{{{manufacturer}}}|?}}}}|{{Infobox/Part/Manufacturer|{{#if: {{{manufacturer|}}}|{{{manufacturer}}}|?}}}}}}{{#if: {{{manufacturer2|}}}|  
{{Infobox/Line|{{lang|en=Cost|de=Kosten|ru=Стоимость|hr=Cijena|pl=Cena|fr=Prix|zh-cn=价格|ko=가격|pt=Custo}}|{{{costs}}}&nbsp;&curren;}}
+
<!-- Type -->
<!--{{Infobox/Line|{{lang|en=Total Mass|de=Gesamtmasse|ru=Полная масса|hr=Ukupna masa|pl=Masa całkowita|fr=Masse totale|zh-cn=质量|ko=총 질량|pt=Massa total}}|{{{mass}}}&nbsp;t {{{mass note|}}}}}-->
+
{{Dict|and}} {{Infobox/Part/Manufacturer entry|{{Infobox/Part/ManufacturerUntranslated|{{#if: {{{manufacturer2|}}}|{{{manufacturer2}}}|?}}}}|{{Infobox/Part/Manufacturer|{{#if: {{{manufacturer2|}}}|{{{manufacturer2}}}|?}}}}}}}}</span>|style=text-align: center}}{{#if: {{{size|}}}|<br/>
{{Infobox/Line|{{lang|en=Mass|de=Masse|ru=Масса|hr=Masa|pl=Masa|pt=Massa}}|{{#expr: {{{mass}}}+({{{lf|0}}})*0.005+({{{ox|0}}})*0.005+({{{mp|0}}})*0.004+({{{sf|0}}})*0.0075+({{{xg|0}}})*0.0001+({{{ia|0}}})*0.005}}&nbsp;t {{{mass note|}}}|{{#if: {{{lf|}}}{{{ox|}}}{{{mp|}}}{{{sf|}}}{{{xg|}}}{{{ia|}}}|{{{mass}}}&nbsp;t}}
+
<!-- Manufacturer -->
|type1={{lang|en=total|de=gesamte|ru=полная|hr=ukupna|pl=całkowita|pt=total}}
+
{{Infobox/Line|[[Radial size{{if lang}}|{{Infobox/Part/Dict|Size}}]]|<span style{{=}}"white-space:normal;">{{Radial Size|{{{size}}}}}{{#if: {{{size2|}}}|, {{Radial Size|{{{size2}}}}}}}{{#if: {{{size3|}}}|, {{Radial Size|{{{size3}}}}}}}</span>}}}}
|type2={{lang|en=dry|de=leer|ru=сухая|hr=suha|pl=sucha|pt=vazio}}}}
+
<!-- Cost -->
{{Infobox/Line|{{lang|en=Drag|de=Luft&shy;wiederstand|ru=Лобовое сопротивление|hr=Aerodinamični otpor|pl=Opór|fr=Traînée|zh-cn=阻力|ko=항력|pt=Arrasto atmosférico}}|{{{drag}}} {{{drag note|}}}|type1={{{drag type|}}}}}
+
{{Infobox/Line|{{Dict|Cost}}|{{Formatnum|{{{costs}}}|2}}&nbsp;{{Mark|fund}}|{{#if: {{{lf|}}}{{{ox|}}}{{{mp|}}}{{{sf|}}}{{{xg|}}}{{{ia|}}}{{{or|}}}{{{ab|}}}|{{Formatnum|{{#expr: {{{costs}}}-(({{{lf|0}}})*0.8+({{#if: {{{ox|}}}|{{{ox}}}|{{#if: {{{lf|}}}|{{{lf}}}*11/9|0}}}})*0.18+({{{mp|0}}})*1.2+({{{sf|0}}})*0.6+({{{xg|0}}})*4+({{{ia|0}}})*0+({{{or|0}}})*0.02+({{{ab|0}}})*0.5)}}|2}}&nbsp;{{Mark|fund}}}}
{{Infobox/Line|{{lang|en=Max. Temp.|de=Höchst&shy;temperatur|hr=Maksimalna temperatura|ru=Макс. температура|pl=Maks. Temp.|pt=Temperatura máxima|fr=Température maximale|zh-cn=最高承受温度|ko=최고저항온도}}|{{{temp}}}&nbsp;K}}
+
|type1={{Infobox/Part/Dict|Total}}
{{Infobox/Line|{{lang|en=Impact Tolerance|de=Einschlags&shy;toleranz|ru=Допустимое ускорение|hr=Otpornost na udarac|pl=Wytrzymałość zderzenia|fr=Tolérance d'impact|zh-cn=冲击承受|ko=충돌파괴최소속도|pt=Tolerância a impactos}}|{{{tolerance}}}&nbsp;m/s}}  
+
|type2={{Infobox/Part/Dict|Dry}}}}
{{Infobox/Line|{{lang|en=Research|de=Forschung|ru=Исследования|hr=Istraživanje|pl=Badania|pt=Pesquisa}}|{{#if: {{{research|}}}|[[{{#if: {{{research page|}}}|{{{research page}}}|{{{research}}}}}|{{{research}}}]]|{{Dict|Unknown}}}}}}
+
<!-- Mass -->
 +
{{Infobox/Line|{{Infobox/Part/Dict|Mass}}|{{Formatnum|{{#expr: {{{mass}}}+({{{lf|0}}})*0.005+({{#if: {{{ox|}}}|{{{ox}}}|{{#if: {{{lf|}}}|{{{lf}}}*11/9|0}}}})*0.005+({{{mp|0}}})*0.004+({{{sf|0}}})*0.0075+({{{xg|0}}})*0.0001+({{{ia|0}}})*0.005+({{{or|0}}})*0.01+({{{ab|0}}})*0.001}}| {{#ifexpr: {{{mass}}} < 0.04  | 5 | 2 }} }}&nbsp;{{Dict|t}} {{{mass note|}}}{{#ifeq: {{lc:{{{physics insignificant}}}}}|y|{{#tag:ref|{{Infobox/Part/Dict|Massless}}|name="phyinsig"|group="{{{nref|N}}}"}}}}|{{#if: {{{lf|}}}{{{ox|}}}{{{mp|}}}{{{sf|}}}{{{xg|}}}{{{ia|}}}{{{or|}}}{{{ab|}}}|{{Formatnum|{{{mass}}}| {{#ifexpr: {{{mass}}} < 0.04  | 5 | 2 }} }}&nbsp;{{Dict|t}}}}
 +
|type1={{Infobox/Part/Dict|Total}}
 +
|type2={{Infobox/Part/Dict|Dry}}}}
 +
<!-- Drag -->
 +
{{Infobox/Line|{{Infobox/Part/Dict|Drag}}|{{{drag}}} {{{drag note|}}}{{#ifeq: {{lc:{{{physics insignificant}}}}}|y|{{#tag:ref|{{Infobox/Part/Dict|Massless}}|name="phyinsig"|group="{{{nref|N}}}"}}}}}}
 +
<!-- Max. Temp. -->
 +
{{Infobox/Line|{{Infobox/Part/Dict|Temp}}|{{{temp}}}&nbsp;{{Dict|K}}}}
 +
<!-- Volume -->
 +
{{Infobox/Line|{{Infobox/Part/Dict|Volume}}|{{#if: {{{volume|}}}|{{#ifeq: {{{volume|}}}|-1|N/A|{{{volume}}}&nbsp;{{Dict|l}}}}|?}}}}
 +
<!-- Impact Tolerance -->
 +
{{Infobox/Line|{{Infobox/Part/Dict|Tolerance}}|{{{tolerance}}}&nbsp;{{Dict|m}}/{{Dict|s}}}}  
 +
<!-- Research -->
 +
{{Infobox/Line|{{Infobox/Part/Dict|Research}}|{{#if: {{{research|}}}|{{#if: {{Infobox/Part/ricon|{{{research}}}}}|[[{{Infobox/Part/ricon|
 +
{{{research}}}}}|24x24px|link={{{research}}}{{if lang}}]]&nbsp;}}[[{{{research}}}{{if lang}}|{{Dict/sci node|{{{research}}}}}]]|{{Dict|Unknown}}}}}}
 +
<!-- Unlock cost -->
 +
{{Infobox/Line|{{Infobox/Part/Dict|Unlock}}|{{Formatnum|{{{unlock cost}}}}}&nbsp;{{Mark|fund}}}}
 +
<!-- Since version -->
 
{{Infobox/Line|{{Dict|Since}}|{{#if: {{{since|}}}|{{version|{{{since}}}|}}|{{Dict|Unknown}}}}}}
 
{{Infobox/Line|{{Dict|Since}}|{{#if: {{{since|}}}|{{version|{{{since}}}|}}|{{Dict|Unknown}}}}}}
{{Infobox/Line|{{lang|en=Part configuration|de=Bauteilkonfiguration|ru=Конфигурация компонента|hr=Konfiguracija dijela|pl=Plik konfiguracyjny|pt=Configuração da parte}}|{{#if: {{{part|}}}<!--
+
<!-- Part configuration -->
-->|style="word-break:break-all;" {{!}} {{Infobox/Part/parent check|{{{part}}}|{{#if: {{{parent|}}}|{{{parent}}}|{{#switch: {{lc:{{{type|}}}}}<!--
+
{{Infobox/Line|{{Infobox/Part/Dict|Config}}|{{#if: {{{part|}}}<!--
  -->|lfe|srb|je|ie=Engine<!--
+
-->|style="word-break:break-all;" {{!}} {{#switch: {{lc:{{{dlc|}}}}}<!--
  -->|cp|cm|pod|re|sas|rw=Command<!--
+
  -->|mh=[[MakingHistory/Parts/{{#if: {{{parent|}}}|{{{parent}}}/}}{{{part}}}/{{{filename}}}|{{{filename}}}]]<!--
  -->|exp|lab=Science<!--
+
  -->|bg=[[Serenity/Parts/{{#if: {{{parent|}}}|{{{parent}}}/}}{{{part}}}/{{{filename}}}|{{{filename}}}]]<!--
  -->|sen|ada|ant=Utility<!--
+
  -->|#default={{#if: {{{parent|}}}{{{type|}}}|[[Parts/{{#if: {{{parent|}}}|{{{parent}}}|{{#switch: {{lc:{{{type|}}}}}<!--
  -->|nc=Aero<!--
+
      -->|cs|fan|fr|hs|int|let|nc|win=Aero<!--
  -->|str=Structural<!--
+
      -->|car|cit=Cargo<!--
   -->|#default=}}}}}}<!--
+
      -->|cm|cp|pod|rw|sas=Command<!--
-->|{{lang|en=Unknown cfg|de=Unbekannte cfg|pl=Nieznany cfg|hr=Nepoznata konfiguracija|fr=cfg inconnu|ru=cfg неизвестен|Cfg 파일 없음 |pt=Configuração desconhecida}}[[Category:Infobox/Part with missing parameters]]
+
      -->|ft|str=CompoundParts<!--
}}}}{{if||{{{more|}}}|
+
      -->|air|dec|epl|sep=Coupling<!--
{{{more|}}}}}{{if||{{{additional|}}}|
+
      -->|ant2|gen2|pan2|sen2=DeployedScience<!--
{{Infobox/Line|{{lang|en=Additional:|de=Weiteres:|pl=Dodatkowe:|hr=Dodatno:|pt=Adicional:|fr=Additionnel:|ru=Дополнительно:|ko=추가 설명:}}}}
+
      -->|bat|gen|pan=Electrical<!--
{{{additional}}}}}
+
      -->|lfe|mpe|srb|je|ie=Engine<!--
|notes={{{notes|}}}
+
      -->|dra|lft|mpt|xgt=FuelTank<!--
}}<!-- {{#ifeq: {{SUBPAGENAME}}|Box||[[Category:Infoboxes outside of data templates]]}} this is not working, because this is getting transcluded to other pages, so every infobox page lands there. --></includeonly><noinclude>{{Infobox/Part
+
      -->|tel=Misc<!--
|name=TVR-1180C Mk1 Stack Tri-Coupler
+
      -->|pro=Propellers<!--
|file=Tvr-1180C mk1 stack tri-coupler.jpg
+
      -->|con|dri|fc|ot|sca=Resources<!--
|role=Adapter
+
      -->|cyl|eng|hin|pco|rot|ser=Robotics<!--
|parent=Utility
+
      -->|arm|lab|sen|sto=Science<!--
|manufacturer=Found lying by the side of the road
+
      -->|ada|grp|ste=Structural<!--
|size=small
+
      -->|rad=Thermal<!--
|costs=680
+
      -->|ant|cb|chu|claw|dp|fla|hab|lad|leg|les|lig|rcs|sb=Utility<!--
|mass=0.3
+
      -->|gea|rov=Wheel<!--
 +
      -->|#default=<!--
 +
   -->}}}}/{{{part}}}/{{{filename}}}|{{{filename}}}]]|<abbr title="Parameter missing">{{{part}}}</abbr>[[Category:Infobox/Part with missing parameters]]}}<!--
 +
-->}}|{{Infobox/Part/Dict|Unknown}}[[Category:Infobox/Part with missing parameters]]
 +
}}}}{{#if: {{{more|}}}|<br/>
 +
{{{more|}}}}}
 +
|notes={{{notes|}}}{{#if: {{{nref|}}}{{#ifeq: {{lc:{{{physics insignificant}}}}}|y|1}}|{{#tag:references||group="{{{nref|N}}}"}}}}
 +
}}</includeonly><noinclude>
 +
<!-- Infobox exemple -->
 +
{{Infobox/Part
 +
|file=TVR-400L Stack Quad-Adapter.png
 +
|type=ada
 +
|size=large
 +
|size2=small
 +
|size3=tiny
 +
|manufacturer=OMB
 +
|costs=800
 +
|mass=0.2
 +
|volume=-1
 
|drag=0.3
 
|drag=0.3
 
|temp=3400
 
|temp=3400
 
|tolerance=12
 
|tolerance=12
|since=0.7.3
+
|research=Meta-Materials
|class=Part
+
|unlock cost=1200
|part=stackTriCoupler
+
|since=0.21
|research=General Construction
+
|filename=part.cfg
 +
|part=adapterLargeSmallQuad
 +
|more={{Infobox/Part/adapter
 +
|out=4
 
}}
 
}}
 +
}}
 +
 
== Usage ==
 
== Usage ==
{{Data Template|Box}}
+
{{Data template|Box}}
  
 
== Parameters ==
 
== Parameters ==
Line 57: Line 97:
  
 
=== Configuration file ===
 
=== 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 {{Tl|Part config}} template should be used in the part configuration pages.
+
With the new folder structure since {{version|0.20}} the part config file must be placed at ''Parts/{{{parent}}}/{{{part}}}/{{{filename}}}''. The {{Tl|Part config}} template should be used in the part configuration pages. For some parts the actual <tt>parent</tt> differs from the <tt>type</tt>. For those cases <tt>parent</tt> overrides the <tt>type</tt>-based parent definition. One example is the [[Vernor Engine]], because it's a [[RCS]] engine but it's definition is in ''Engine'' although the other two RCS engines are in ''Utility''.
 
 
The infobox links to the new location, if the <tt>parent</tt> 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 ===
 
=== More parameter ===
Line 65: Line 103:
  
 
=== Manufacturer ===
 
=== Manufacturer ===
The template {{Tl|Infobox/Part/Manufacturer}} is a template to quickly add a manufacturer.
+
To add a manufacturer, it has to be added to the template {{Tl|Infobox/Part/Manufacturer}} and to {{Tl|Infobox/Part/ManufacturerUntranslated}}.
  
 
== Types ==
 
== Types ==
 
For different types of parts this template allows to set the <tt>type</tt> parameter. The type will automatically set <tt>{{{role}}}</tt> and <tt>{{{parent}}}</tt> though they can be manually overwritten. The following values are supported:
 
For different types of parts this template allows to set the <tt>type</tt> parameter. The type will automatically set <tt>{{{role}}}</tt> and <tt>{{{parent}}}</tt> though they can be manually overwritten. The following values are supported:
{| class="wikitable"
+
 
! Type
+
{{Infobox/Part/Types}}
! Role
 
! Parent
 
! Subtemplate
 
|-
 
| lfe
 
| [[Liquid fuel engine]]
 
| rowspan="4" | Engine
 
| {{Tl|Infobox/Part/reaction engine}}
 
|-
 
| srb
 
| [[Solid rocket booster]]
 
| {{Tl|Infobox/Part/solid fuel engine}}
 
|-
 
| je
 
| [[Jet engine]]
 
| {{Tl|Infobox/Part/jet engine}}
 
|-
 
| ie
 
| [[Ion engine]]
 
| {{Tl|Infobox/Part/ion engine}}
 
|-
 
| re
 
| [[Reaction Control System]]
 
| rowspan="6" | Command
 
| {{Tl|Infobox/Part/reaction engine}}, {{Tl|Infobox/Part/thrust vectors}}
 
|-
 
| sas
 
| [[Stability Augmentation System]]
 
| {{Tl|Infobox/Part/SAS}}
 
|-
 
| rw
 
| [[Reaction wheel]]
 
| {{Tl|Infobox/Part/torque}}
 
|-
 
| cm
 
| [[Command module]]
 
| rowspan="3" | {{Tl|Infobox/Part/command module}}
 
|-
 
| cp
 
| [[Cockpit]]
 
|-
 
| pod
 
| [[Command pod]]
 
|-
 
| lab
 
| [[Laboratory]]
 
| rowspan="2" | Science
 
| {{Tl|Infobox/Part/laboratory}}
 
|-
 
| exp
 
| rowspan="2" | [[Environmental sensor]]
 
| rowspan="2" | {{Tl|Infobox/Part/sensor}}
 
|-
 
| sen
 
| rowspan="3" | Utility
 
|-
 
| ada
 
| [[Adapter]]
 
| (not yet)
 
|-
 
| ant
 
| [[Antenna]]
 
| {{Tl|Infobox/Part/antenna}}
 
|-
 
| nc
 
| [[Nose cone]]
 
| Aero
 
| (n/a)
 
|-
 
| str
 
| Strut
 
| Structural
 
| (n/a)
 
|}
 
  
 
If a part uses more than one type, for example the [[R.A.P.I.E.R. Engine]], the type parameter is usually omitted and each subtemplate should use a header from {{Tl|Infobox/Part/title}}.
 
If a part uses more than one type, for example the [[R.A.P.I.E.R. Engine]], the type parameter is usually omitted and each subtemplate should use a header from {{Tl|Infobox/Part/title}}.
  
== Roles ==
+
Additionally test subjects can use {{Tl|Infobox/Part/test subject}}.
:'''Note''': This template is transitioning from ''roles'' to ''modules''. Use a module if possible and only roles if there aren't any modules yet.
 
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 ===
+
=== Roles ===
* [[Parts#S.A.S.|SAS]]: {{Tl|Infobox/Part/SAS}}
+
Prior to the module system "roles" where used, but have been abandoned because they are not flexible enough. Currently only {{Tl|Infobox/Part/Strut}} is the only role template still used.
* Reaction wheel: {{Tl|Infobox/Part/ReactionWheel}}
 
 
 
=== Engines ===
 
* [[Parts#RCS|RCS thrusters]]: {{Tl|Infobox/Part/Engine/RCS}}
 
 
 
=== Fuel tanks ===
 
* [[Parts#Liquid_Fuel_Tanks|Liquid Fuel Tank]]: {{Tl|Infobox/Part/FuelTank/Liquid}}
 
* [[Parts#Fuselages (Jet Fuel Tanks)|Jet Fuel Tank]]: {{Tl|Infobox/Part/FuelTank/Jet}}
 
* [[Parts#Xenon|Xenon Tank]]: {{Tl|Infobox/Part/FuelTank/Xenon}}
 
* [[Parts#RCS_Fuel_Tanks|RCS Fuel Tanks]]: {{Tl|Infobox/Part/FuelTank/RCS}}
 
 
 
=== Structural ===
 
* [[Parts#Parts#Adapters.2C_Couplers_.26_Struts|Struts]]: {{Tl|Infobox/Part/Strut}}
 
* [[Parts#Parts#Adapters.2C_Couplers_.26_Struts|Adapters]]: {{Tl|Infobox/Part/Adapter}}
 
 
 
=== Other ===
 
: ''(Some of those should be sorted into sections)''
 
 
 
* [[Parts#Decouplers_and_Separators|Decouplers]]: {{Tl|Infobox/Part/Decoupler}}
 
* [[Parts#Rover_Wheels|Rover wheels]]: {{Tl|Infobox/Part/RoverWheel}}
 
* [[Parts#Electricity|Solar panel]]: {{Tl|Infobox/Part/SolarPanel}}
 
* [[Parts#Electricity|Battery]]: {{Tl|Infobox/Part/Battery}}
 
* [[Parts#Wings_and_Wing_Parts|Wing]]: {{Tl|Infobox/Part/Wing}}
 
* [[Parts#Docking|Docking Port]]: {{Tl|Infobox/Part/DockingPort}}
 
* [[Parts#Parachutes|Parachute]]: {{Tl|Infobox/Part/Parachute}}
 
* [[Parts#Controlled_wings_and_surfaces|Control surface]]: {{Tl|Infobox/Part/ControlSurface}}
 
* [[Parts#Ladders|Ladder]]: {{Tl|Infobox/Part/Ladder}}
 
* [[Parts#Landing_Gear|Landing Gear]]: {{Tl|Infobox/Part/LandingStrut}}
 
 
 
These subtemplates are categorised in [[:Category:Infobox/Part subtemplates]].
 
  
 
== Template ==
 
== Template ==
Line 189: Line 121:
 
|name=
 
|name=
 
|file=
 
|file=
 +
|type=
 
|role=
 
|role=
|manufacturer=
 
 
|size=
 
|size=
 
|size2=
 
|size2=
 +
|size3=
 +
|manufacturer=
 +
|manufacturer2=
 
|costs=
 
|costs=
 
|mass=
 
|mass=
 +
|volume=
 +
|lf=
 +
|ox=
 +
|mp=
 +
|sf=
 +
|xg=
 +
|ia=
 +
|or=
 +
|ab=
 
|drag=
 
|drag=
 
|temp=
 
|temp=
 
|tolerance=
 
|tolerance=
|more=
+
|research=
|additional=
+
|unlock cost=
 
|since=
 
|since=
|class=
+
|dlc=
 +
|filename=
 
|part=
 
|part=
 
|parent=
 
|parent=
 +
|physics insignificant=
 +
|notes=
 +
|nref=
 +
|more=
 
}}</pre>
 
}}</pre>
  
 
== Example ==
 
== Example ==
 
Example used on this page:
 
Example used on this page:
 +
 
<pre>{{Infobox/Part
 
<pre>{{Infobox/Part
|name=TVR-1180C Mk1 Stack Tri-Coupler
+
|file=TVR-400L Stack Quad-Adapter.png
|file=Tvr-1180C mk1 stack tri-coupler.jpg
+
|type=ada
|role=Adapter
+
|size=large
|parent=Utility
+
|size2=small
|manufacturer=Found lying by the side of the road
+
|size3=tiny
|size=small
+
|manufacturer=OMB
|costs=680
+
|costs=800
|mass=0.3
+
|mass=0.2
 
|drag=0.3
 
|drag=0.3
 
|temp=3400
 
|temp=3400
 
|tolerance=12
 
|tolerance=12
|since=0.7.3
+
|research=Meta-Materials
|class=Part
+
|unlock cost=1200
|part=stackTriCoupler
+
|since=0.21
|research=General Construction
+
|filename=part.cfg
 +
|part=adapterLargeSmallQuad
 +
|more={{Infobox/Part/adapter
 +
|out=4
 +
}}
 
}}</pre>
 
}}</pre>
  
 
== Translation ==
 
== Translation ==
To translate this template or one of the subtemplates see also [[Kerbal_Space_Program_Wiki:Translation#Templates|this article]].
+
When using this template, most of it is translated automatically. To translate this template or one of the subtemplates, go to the {{Tl|Infobox/Part/Dict}} template.
  
At the moment only English is supported by all templates.
+
=== Manufacturer ===
* Deutsch (German): Infobox/Part complete, subtemplates partially
+
To add a translation for a manufacturer's name, add it to {{Tl|Infobox/Part/Manufacturer}} (use the {{Tl|lang}} template). '''Do not translate manufacturer names in the template {{Tl|Infobox/Part/ManufacturerUntranslated}}'''.
* 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
 
* Português (Portuguese) : Infobox/Part complete, subtemplates partially
 
  
[[Category:Templates]]
+
[[Category:Infobox templates]]
 
[[Category:Translating templates]]</noinclude>
 
[[Category:Translating templates]]</noinclude>

Revision as of 18:06, 7 October 2022

Infobox
Part image
Adapter by
O.M.B. Demolition Enterprises

Radial size Large, Small, Tiny
Cost (total) 800.00 Funds
Mass (total) 0.200 t
Drag 0.3
Max. Temp. 3400 K
Impact Tolerance 12 m/s
Research Meta-materials.png Meta-Materials
Unlock cost 1 200 Funds
Since version 0.21
Part configuration part.cfg
Outgoing connectors 4

Usage

To avoid adding the information for each language this templates should be reused and with the suggested subpage name /Box. The Templates help page contains additional information how to implement reusing. All page which use template directly should add the {{Data template used}} note.

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 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
size4 Yes Fourth 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. ?
manufacturer2 Yes Second manufacturer of the part. Not set/Hidden
costs No Cost of the part, which is usually given in the part configuration.
mass No Mass of the part, which is usually given in the part configuration.
lf Yes Max amount of Liquid Fuel on the part in units. Only used for wet mass/dry costs calculation. 0
ox Yes Max amount of Oxidizer on the part in units. Only used for wet mass/dry costs calculation. 0
sf Yes Max amount of Solid Fuel on the part in units. Only used for wet mass/dry costs calculation. 0
mp Yes Max amount of Monopropellant on the part in units. Only used wet mass/dry costs calculation. 0
xg Yes Max amount of Xenon Gas on the part in units. Only used for wet mass/dry costs calculation. 0
ia Yes Max amount of Intake Air on the part in units. Only used for wet mass/dry costs calculation. 0
eva Yes Max amount of EVA Propellant on the part in units. Only used for wet mass/dry costs calculation. 0
or Yes Max amount of Ore on the part in units. Only used for wet mass/dry costs calculation. 0
ab Yes Max amount of Ablator on the part in units. Only used for wet mass/dry costs calculation. 0
capacity Yes Total amount of crew capacity on the part. Only used for wet mass/dry costs calculation. 0
crew Yes Amount of crew the part starts with. Only used for wet/dry mass calculation. 0
motorOutput Yes Maximum output of the motor on the part. Only used for wet mass/dry costs calculation. 0
motorCost Yes The extra cost the motor adds to the part. Only used for wet costs calculation. 0
motorMass Yes The extra mass the motor adds to the part. Only used for wet mass calculation. 0
maxShots Yes Maximum amount of firework shots on the part. Only used for wet mass calculation. 0
shellMass Yes The extra mass every firework shell adds to the part. Only used for wet/dry mass calculation. 0
variantCost Yes The extra cost the default variant adds to the part. Only used for wet costs calculation. 0
variantMass Yes The extra mass the default variant adds to the part. Only used for wet mass 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 configuration.
tolerance No Impact tolerance of the part, which is usually given in the part configuration.
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 configuration.
since Yes Version the part first appeared in. It will be used in {{version}}. Unknown
dlc Yes Name of the dlc. Used for linking to the cfg-entry on the wiki. Can be:
  • mh (Making History)
  • bg (Breaking Ground)
Not Set
physics insignificant Yes Mark the mass and drag automatically with a note that they are insignificant (so called massless parts). Must be set to "y" to show insignificance. This will use {{{nref}}}, so if it isn't set, will set it automatically to "1". Not set/Hidden
applyKerbalMass Yes Whether the part applies extra mass of a Kerbal on the part. Must be set to "n" to exclude the added mass. Only used for wet/dry mass calculation. y
filename No The filename (with extension) of the part configuration.
part Yes Name of the part folder. Used for linking to the cfg-entry on the wiki. It will create a link to Parts/{{{parent}}}/{{{part}}}/{{{filename}}}. Unknown cfg
parent Yes Parent directory of the part folder. Used for linking to the cfg-entry on the wiki. Not set/Hidden
more Yes More module-specific information (see More parameter). Not set
notes Yes Additional notes below the part information. Not set/Hidden
nref Yes Automatically adds references below the part information. Not set/Hidden

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 config file must be placed at Parts/{{{parent}}}/{{{part}}}/{{{filename}}}. The {{Part config}} template should be used in the part configuration pages. For some parts the actual parent differs from the type. For those cases parent overrides the type-based parent definition. One example is the Vernor Engine, because it's a RCS engine but it's definition is in Engine although the other two RCS engines are in Utility.

More parameter

To add additional fields the {{{more}}} parameter should be used with {{Infobox/Part/Line}} or {{Infobox/Line}}. It is preferred to use one of the modules.

Manufacturer

To add a manufacturer, it has to be added to the template {{Infobox/Part/Manufacturer}} and to {{Infobox/Part/ManufacturerUntranslated}}.

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
cs Control surface Aero {{Infobox/Part/control surface}}
fan Fan shroud (n/a)
fr Fairing {{Infobox/Part/fairing}}
hs Heat shield {{Infobox/Part/heat shield}}
int Air intake {{Infobox/Part/air intake}}
let Winglet {{Infobox/Part/winglet}}
nc Nose cone (n/a)
win Wing {{Infobox/Part/lifting surface}}
car Cargo module Cargo {{Infobox/Part/inventory}}
cit Cargo item {{Infobox/Part/cargo}}
ga Ground anchor (n/a)
cm Command module Command {{Infobox/Part/command module}}
cp Cockpit
pod Command pod
rw Reaction wheel {{Infobox/Part/torque}}
sas Stability Augmentation System {{Infobox/Part/SAS}}
ft Fuel transfer CompoundParts (n/a)
str Strut (n/a)
air Airlock Coupling (n/a)
dec Decoupler {{Infobox/Part/separator}}
sep Separator
epl Engine plate
bat Battery Electrical {{Infobox/Part/energy storage}}
gen Generator {{Infobox/Part/generator}}
pan Solar panel {{Infobox/Part/solar panel}}
lfe Liquid fuel engine Engine {{Infobox/Part/reaction engine}}
mpe Monopropellant engine
srb Solid rocket booster {{Infobox/Part/solid fuel engine}}
je Jet engine {{Infobox/Part/jet engine}}
ie Ion engine {{Infobox/Part/ion engine}}
he Hybrid engine {{Infobox/Part/reaction engine}}, {{Infobox/Part/jet engine}}
dra Drain valve FuelTank (n/a)
lft Liquid fuel tank {{Infobox/Part/tank}}
mpt Monopropellant tank
xgt Xenon gas tank
tel Telescope Misc (n/a)
pro Propeller Propellers {{Infobox/Part/control surface}}
con Converter Resources {{Infobox/Part/converter}}
dri Resource harvester (n/a)
fc Fuel cell {{Infobox/Part/converter}}
ot Ore tank {{Infobox/Part/tank}}
sca Scanner (n/a)
cyl Cylinder Robotics {{Infobox/Part/servo}}
eng Engine
hin Hinge
pco Robotic controller (n/a)
rot Rotor {{Infobox/Part/servo}}
ser Servo
arm Scanning arm Science {{Infobox/Part/scanner arm}}, {{Infobox/Part/sensor}}
lab Laboratory {{Infobox/Part/laboratory}}
sen Environmental sensor {{Infobox/Part/sensor}}
sto Experiment Storage (n/a)
ada Adapter Structural {{Infobox/Part/adapter}}
grp Grip pad (n/a)
ste Structural element (n/a)
rad Radiator Thermal {{Infobox/Part/radiator}}
ant Antenna Utility {{Infobox/Part/antenna}}
cb Cargo bay (n/a)
chu Parachute {{Infobox/Part/parachute}}
claw Advanced Grabbing Unit (n/a)
dp Docking port {{Infobox/Part/docking port}}
fla Flag (n/a)
hab Habitation module {{Infobox/Part/crew}}
lad Ladder {{Infobox/Part/ladder}}
leg Landing leg (n/a)
les Launch Escape System (n/a)
lig Electric light {{Infobox/Part/electric usage}}
rcs Reaction Control System {{Infobox/Part/reaction engine}}, {{Infobox/Part/thrust vectors}}
sb Service bay (n/a)
gea Landing gear Wheel (n/a)
rov Rover wheel {{Infobox/Part/rover wheel}}


If a part uses more than one type, for example the R.A.P.I.E.R. Engine, the type parameter is usually omitted and each subtemplate should use a header from {{Infobox/Part/title}}.

Additionally test subjects can use {{Infobox/Part/test subject}}.

Roles

Prior to the module system "roles" where used, but have been abandoned because they are not flexible enough. Currently only {{Infobox/Part/Strut}} is the only role template still used.

Template

{{Infobox/Part
|name=
|file=
|type=
|role=
|size=
|size2=
|size3=
|manufacturer=
|manufacturer2=
|costs=
|mass=
|volume=
|lf=
|ox=
|mp=
|sf=
|xg=
|ia=
|or=
|ab=
|drag=
|temp=
|tolerance=
|research=
|unlock cost=
|since=
|dlc=
|filename=
|part=
|parent=
|physics insignificant=
|notes=
|nref=
|more=
}}

Example

Example used on this page:

{{Infobox/Part
|file=TVR-400L Stack Quad-Adapter.png
|type=ada
|size=large
|size2=small
|size3=tiny
|manufacturer=OMB
|costs=800
|mass=0.2
|drag=0.3
|temp=3400
|tolerance=12
|research=Meta-Materials
|unlock cost=1200
|since=0.21
|filename=part.cfg
|part=adapterLargeSmallQuad
|more={{Infobox/Part/adapter
|out=4
}}
}}

Translation

When using this template, most of it is translated automatically. To translate this template or one of the subtemplates, go to the {{Infobox/Part/Dict}} template.

Manufacturer

To add a translation for a manufacturer's name, add it to {{Infobox/Part/Manufacturer}} (use the {{lang}} template). Do not translate manufacturer names in the template {{Infobox/Part/ManufacturerUntranslated}}.