|
|
| Line 1: |
Line 1: |
| {{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.
| |
| | |
| <syntaxhighlight lang="wikitext">
| |
| {{Vehicle}}
| |
| </syntaxhighlight>
| |
| | |
| 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 -->
| |
| }}
| |
| </syntaxhighlight>
| |
| | |
| == TemplateData ==
| |
| <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>
| |