Template:VehicleSimple: Difference between revisions

Template page
No edit summary
No edit summary
Line 1: Line 1:
{| class="infobox" cellspacing="5" style="width: 25em; font-size: 90%; text-align: left; float: right; clear: right; margin: 0 0 1em 1em;
{{Documentation}}
! colspan="2" style="text-align: center; font-size: 160%; padding-top: 14px; padding-bottom: 14px; " | {{{name|{{PAGENAME}}}}}
This template handles data related to vehicles.
|-
! colspan="2" style="font-size: 160%; text-align: center; | {{#if:{{{type|}}}|{{{type}}}|Vehicle}}
|-
{{#if: {{{image|}}}|
{{!}} align="center" colspan="2" {{!}} [[{{#setmainimage:{{{image}}}}}|{{{imagewidth|350}}}px]] {{#if:{{{caption|}}}|<br /><small>''{{{caption|}}}''}}
{{!}}-
|
{{!}} align="center" colspan="2" {{!}} [[{{#setmainimage:File:This space intentionally left blank.gif}}|350px]] {{#if:{{{caption|}}}|<br /><small>''{{{caption|}}}''}}
{{!}}-
}}
{{#if:{{{rpgManualLink|}}}|
! style="padding-left: 5px; padding-right: 5px; {{!}} RPG
{{!}} [[{{{rpgManualLink|}}}]]
{{!}}-
|
{{#if:{{{rpg|}}}|
! style="padding-left: 5px; padding-right: 5px; {{!}} RPG
{{!}} [[{{{rpg|}}}]]
{{!}}-
}}
}}
{{#if:{{{type|}}}|
! style="padding-left: 5px; padding-right: 5px; {{!}} Type
{{!}} {{{type|}}}
{{!}}-
}}
{{#if:{{{nicknames|}}}|
! style="padding-left: 5px; padding-right: 5px; {{!}} Nicknames
{{!}} {{{nicknames|}}}
{{!}}-
}}
{{#if:{{{aliases|}}}|
! style="padding-left: 5px; padding-right: 5px; {{!}} Aliases
{{!}} {{{aliases|}}}
{{!}}-
}}
{{#if:{{{appearance|}}}|
! style="padding-left: 5px; padding-right: 5px; {{!}} Appearance
{{!}} {{{appearance|}}}
{{!}}-
}}
{{#if:{{{disablecomposition|}}}||
! colspan="2" style="font-size: 120%; text-align: center; {{!}} Composition
{{!}}-
}}
{{#if:{{{modifications|}}}|
! style="padding-left: 5px; padding-right: 5px; {{!}} Modifications
{{!}} {{{modifications|}}}
{{!}}-
}}
{{#if:{{{facilities|}}}|
! style="padding-left: 5px; padding-right: 5px; {{!}} Facilities
{{!}} {{{facilities|}}}
{{!}}-
}}
{{#if:{{{stations|}}}|
! style="padding-left: 5px; padding-right: 5px; {{!}} Stations
{{!}} {{{stations|}}}
{{!}}-
}}
{{#if:{{{weaponry|}}}|
! style="padding-left: 5px; padding-right: 5px; {{!}} Weaponry
{{!}} {{{weaponry|}}}
{{!}}-
}}
{{#if:{{{weakness|}}}|
! style="padding-left: 5px; padding-right: 5px; {{!}} Weaknesses
{{!}} {{{weakness|}}}
{{!}}-
}}
{{#if:{{{disableusage|}}}||
! colspan="2" style="font-size: 120%; text-align: center; {{!}} Usage
{{!}}-
}}
{{#if:{{{native|}}}|
! style="padding-left: 5px; padding-right: 5px; {{!}} Native To
{{!}} {{{native|}}}
{{!}}-
}}
{{#if:{{{nativeto|}}}|
! style="padding-left: 5px; padding-right: 5px; {{!}} Native To
{{!}} {{{nativeto|}}}
{{!}}-
}}
{{#if:{{{home|}}}|
! style="padding-left: 5px; padding-right: 5px; {{!}} Home
{{!}} {{{home|}}}
{{!}}-
}}
{{#if:{{{residesat|}}}|
! style="padding-left: 5px; padding-right: 5px; {{!}} Resides At
{{!}} {{{residesat|}}}
{{!}}-
}}
{{#if:{{{faction|}}}|
! style="padding-left: 5px; padding-right: 5px; {{!}} Faction
{{!}} {{{faction|}}}
{{!}}-
}}
{{#if:{{{guild|}}}|
! style="padding-left: 5px; padding-right: 5px; {{!}} Guild
{{!}} {{{guild|}}}
{{!}}-
}}
{{#if:{{{group|}}}|
! style="padding-left: 5px; padding-right: 5px; {{!}} Group
{{!}} {{{group|}}}
{{!}}-
}}
{{#if:{{{affiliation|}}}|
! style="padding-left: 5px; padding-right: 5px; {{!}} Affiliation
{{!}} {{{affiliation|}}}
{{!}}-
}}
|}


{{#if:{{{rpg|}}}|
On the vehicle page
<includeonly>[[Category:Characters ({{{rpg}}})]]</includeonly>|
*Saves template parameters and API data as SMW data
<includeonly>[[Category:Characters]]</includeonly>
*Set category from SMW data
}}
*Set short description from SMW data
*Display infobox from SMW data


{{#if:{{{statusic|}}}|
On other pages, it can be used to display the infobox of other vehicles.
{{#if:{{{rpg|}}}|
<includeonly>[[Category:{{{statusic|}}} ({{{rpg}}})]]</includeonly>|
<includeonly>[[Category:{{{statusic|}}}]]</includeonly>
}}|
}}
 
{{#if:{{{statusooc|}}}|
{{#if:{{{rpg|}}}|
<includeonly>[[Category:{{{statusooc|}}} Characters ({{{rpg}}})]]</includeonly>|
<includeonly>[[Category:{{{statusooc|}}} Characters]]</includeonly>
}}|
}}


<noinclude>
== Usage ==
== Usage ==
<div style="width: 40%;"><pre>
The template should fill in data automatically from API even if there are no template parameters.
{{Vehicle
| name                =
| image              =
| caption            =
| rpg                =
| rpgManualLink      =
| type                =


| nicknames          =
<syntaxhighlight lang="wikitext">
| aliases            =
{{Vehicle}}
 
</syntaxhighlight>
| appearance          =
 
| disablecomposition  =
| modifications      =
| facilities          =
| stations            =
| components          =
| abilities          =
| weaponry            =
| hardpoints          =
| weakness            =
 
| disablehistory      =
| native              =
| nativeto            =
| home                =
| faction            =
| guild              =
| group              =
| affiliation        =


Optional parameters:
{{Note|'''Note''': Like other infoboxes, you don't need to put units and separators in the infobox. It will be added automatically.}}
<syntaxhighlight lang="wikitext">
{{Vehicle
| image = <!-- Image name on wiki -->
| manufacturer = <!-- Manufacturer name -->
| productionstate = <!-- In Production/Retired -->
| mincrew = <!-- Minimum crew of the vehicle -->
| maxcrew = <!-- Maximum crew of the vehicle -->
| length = <!-- Length of the vehicle -->
| height = <!-- Height of the vehicle -->
| width = <!-- Width of the vehicle -->
| name = <!-- Name override of the vehicle if different from the page name -->
}}
</syntaxhighlight>


The following parameters are needed if there are no data in game or on ship matrix.
<syntaxhighlight lang="wikitext">
{{Vehicle
| name = <!-- Vehicle name -->
| size = <!-- Size of the vehicle (e.g. small grid/large grid) -->
| role = <!-- Role of the ship -->
| cargocapacity = <!-- Cargo capacity in L -->
}}
}}
</pre></div>
</syntaxhighlight>
The only required parameter is the name. Any others which are unknown or inapplicable should be left blank. Fields marked with "Unknown" blank automatically.
 
The parameters `statusic`, `statusooc`, `rpg`, `species`, `gender`, `alignment`, and `element` will automatically add the character to the respective categories and create a link to the pages for each, so DO NOT make a link with `[[  ]]` when inputting these parameters. That will be done automatically.
 
If you want to make a custom link and/or not auto-categorize, use the `rpgManualLink` and so on. `rpg` will still be used for auto-categorization, but `rpgManualLink` will be displayed in the infobox, so mix and match to your leisure


[[Category:Infobox Templates]]
== TemplateData ==
</noinclude>
<templatedata>
{
"params": {
"image": {
"label": "Image",
"description": "The file name of the image of the ship/vehicle",
"example": "Graculus.jpg",
"type": "string",
"suggested": true
},
"name": {
"label": "Name",
"description": "The name of the ship/vehicle",
"example": "Graculus",
"type": "string",
"required": true
},
"manufacturer": {
"label": "Manufacturer",
"description": "The manufacturer who made the ship/vehicle",
"example": "Enax Industries",
"type": "string",
"suggested": true
},
"size": {
"label": "Size",
"description": "The size of the ship/vehicle (Small grid/Large grid)",
"example": "Small",
"type": "string",
"suggested": true
},
"mincrew": {
"label": "Min crew",
"description": "The minimum crew of the ship/vehicle",
"example": "1",
"type": "number",
"required": true
},
"maxcrew": {
"label": "Max crew",
"description": "The maximum crew of the ship/vehicle",
"example": "2",
"type": "number",
"required": true
},
"series": {
"label": "Ship/vehicle series",
"description": "The ship/vehicle series that this ship/vehicle belongs to",
"example": "Apis",
"type": "string"
},
"cargocapacity": {
"label": "Cargo capacity",
"description": "The cargo capacity of the ship in L (Liters)",
"example": "125",
"type": "number",
"suggested": true
},
"productionstate": {
"label": "Production state",
"description": "The production state of the ship/vehicle",
"example": "In Production/Retired",
"type": "string"
},
"mass": {
"label": "Mass",
"description": "The raw mass of the ship in kg (kilograms) or t (metric tons)",
"example": "700",
"type": "number"
},
"length": {
"label": "Length",
"description": "The length of the ship/vehicle in meters",
"example": "33.5",
"type": "number",
"suggested": true
},
"width": {
"label": "Width",
"description": "The width of the ship/vehicle in meters",
"example": "13.2",
"type": "number",
"suggested": true,
"aliases": [
"beam"
]
},
"height": {
"label": "Height",
"description": "The height of the ship/vehicle in meters",
"example": "4",
"type": "number",
"suggested": true
},
"maxspeed": {
"label": "Maximum speed",
"description": "The maximum speed of the ship/vehicle in m/s (meters/second)",
"example": "170",
"type": "number"
},
"role": {
"label": "Role",
"description": "The role of the ship/vehicle",
"example": "Prospector",
"type": "string",
"suggested": true
},
"uuid": {},
"smwqueryname": {}
},
"description": "Handles data related to vehicles.",
"paramOrder": [
"image",
"name",
"manufacturer",
"role",
"size",
"mincrew",
"maxcrew",
"series",
"cargocapacity",
"productionstate",
"length",
"width",
"height",
"maxspeed",
"mass",
"uuid",
"smwqueryname"
],
"format": "{{_\n| _______________________________ = _\n}}\n"
}
</templatedata>
<includeonly>
<!-- Template catergories go here -->
[[Category:Infobox templates]]
</includeonly>

Revision as of 22:19, 5 March 2024

Template:Documentation This template handles data related to vehicles.

On the vehicle page

  • Saves template parameters and API data as SMW data
  • Set category from SMW data
  • Set short description from SMW data
  • Display infobox from SMW data

On other pages, it can be used to display the infobox of other vehicles.

Usage

The template should fill in data automatically from API even if there are no template parameters.

{{Vehicle}}

Optional parameters: Template:Note

{{Vehicle
| image = <!-- Image name on wiki -->
| manufacturer = <!-- Manufacturer name -->
| productionstate = <!-- In Production/Retired -->
| mincrew = <!-- Minimum crew of the vehicle -->
| maxcrew = <!-- Maximum crew of the vehicle -->
| length = <!-- Length of the vehicle -->
| height = <!-- Height of the vehicle -->
| width = <!-- Width of the vehicle -->
| name = <!-- Name override of the vehicle if different from the page name -->
}}

The following parameters are needed if there are no data in game or on ship matrix.

{{Vehicle
| name = <!-- Vehicle name -->
| size = <!-- Size of the vehicle (e.g. small grid/large grid) -->
| role = <!-- Role of the ship -->
| cargocapacity = <!-- Cargo capacity in L -->
}}

TemplateData

Handles data related to vehicles.

Template parameters[Edit template data]

This template has custom formatting.

ParameterDescriptionTypeStatus
Imageimage

The file name of the image of the ship/vehicle

Example
Graculus.jpg
Stringsuggested
Namename

The name of the ship/vehicle

Example
Graculus
Stringrequired
Manufacturermanufacturer

The manufacturer who made the ship/vehicle

Example
Enax Industries
Stringsuggested
Rolerole

The role of the ship/vehicle

Example
Prospector
Stringsuggested
Sizesize

The size of the ship/vehicle (Small grid/Large grid)

Example
Small
Stringsuggested
Min crewmincrew

The minimum crew of the ship/vehicle

Example
1
Numberrequired
Max crewmaxcrew

The maximum crew of the ship/vehicle

Example
2
Numberrequired
Ship/vehicle seriesseries

The ship/vehicle series that this ship/vehicle belongs to

Example
Apis
Stringoptional
Cargo capacitycargocapacity

The cargo capacity of the ship in L (Liters)

Example
125
Numbersuggested
Production stateproductionstate

The production state of the ship/vehicle

Example
In Production/Retired
Stringoptional
Lengthlength

The length of the ship/vehicle in meters

Example
33.5
Numbersuggested
Widthwidth beam

The width of the ship/vehicle in meters

Example
13.2
Numbersuggested
Heightheight

The height of the ship/vehicle in meters

Example
4
Numbersuggested
Maximum speedmaxspeed

The maximum speed of the ship/vehicle in m/s (meters/second)

Example
170
Numberoptional
Massmass

The raw mass of the ship in kg (kilograms) or t (metric tons)

Example
700
Numberoptional
uuiduuid

no description

Unknownoptional
smwquerynamesmwqueryname

no description

Unknownoptional