Template:Infobox vehicle: Difference between revisions
(added 'Types' as translatable) |
m (Automated Formatting) |
||
(One intermediate revision by one other user not shown) | |||
Line 3: | Line 3: | ||
==Usage== | ==Usage== | ||
Copy and paste the below into an article, filling in the blanks. | Copy and paste the below into an article, filling in the blanks. | ||
{{Infobox vehicle | {{Infobox vehicle | ||
|name=name | |name=name | ||
Line 32: | Line 32: | ||
|vehicle_id=vehicle_id | |vehicle_id=vehicle_id | ||
}} | }} | ||
<syntaxhighlight lang="html"> | <syntaxhighlight lang="html"> | ||
{{Infobox vehicle | {{Infobox vehicle | ||
Line 66: | Line 65: | ||
|vehicle_id = | |vehicle_id = | ||
}} | }} | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{clear}} | {{clear}} | ||
Line 75: | Line 73: | ||
:Name of the vehicle. Defaults to the page title | :Name of the vehicle. Defaults to the page title | ||
;<code>image</code> | ;<code>image</code> | ||
:Image to be displayed. For multiple images, add an id to the parameter, from 2 to 5, e.g., <code>image2</code>. If there are at least 2 images, an icon will be displayed (or defined with <code>icon</code>). When clicked, the image with the same id will be displayed. | :Image to be displayed. For multiple images, add an id to the parameter, from 2 to 5, e.g., <code>image2</code>. If there are at least 2 images, an icon will be displayed (or defined with <code>icon</code>). When clicked, the image with the same id will be displayed. | ||
;<code>image_name</code> | ;<code>image_name</code> | ||
:Text to display when hovering over the image. Text will be shown for the image with the same id, e.g., <code>image_name2</code> for <code>image2</code>. | :Text to display when hovering over the image. Text will be shown for the image with the same id, e.g., <code>image_name2</code> for <code>image2</code>. | ||
Line 83: | Line 81: | ||
:Caption to be displayed beneath the image. | :Caption to be displayed beneath the image. | ||
;<code>icon</code> | ;<code>icon</code> | ||
:Icon for the image. For multiple icons, add an id to the parameter, from 2 to 5, e.g., <code>icon2</code>. Clicking the icon will display the image with the same id. | :Icon for the image. For multiple icons, add an id to the parameter, from 2 to 5, e.g., <code>icon2</code>. Clicking the icon will display the image with the same id. | ||
;<code>icon_name</code> | ;<code>icon_name</code> | ||
:Text to display when hovering over the icon. Text will be shown for the icon with the same id, e.g., <code>icon_name2</code> for <code>icon2</code>. | :Text to display when hovering over the icon. Text will be shown for the icon with the same id, e.g., <code>icon_name2</code> for <code>icon2</code>. | ||
===General=== | ===General=== | ||
;<code>manufacturer</code> | ;<code>manufacturer</code> | ||
:Vehicle manufacturer. Include a link if a page exists, e.g., {{code|[[Chevalier]]}}. | :Vehicle manufacturer. Include a link if a page exists, e.g., {{code|[[Chevalier]]}}. | ||
;<code>vehicle_type</code> | ;<code>vehicle_type</code> | ||
:Type of the vehicle, e.g., "Standard", "Commercial", "Performance". This will automatically link to [[Vehicles#Types]]. | :Type of the vehicle, e.g., "Standard", "Commercial", "Performance". This will automatically link to [[Vehicles#Types]]. | ||
;<code>weight</code> | ;<code>weight</code> | ||
:Weight of the vehicle. <code>mass</code> attribute found in the vehicle script file (media\scripts\vehicle_...). | :Weight of the vehicle. <code>mass</code> attribute found in the vehicle script file (media\scripts\vehicle_...). | ||
Line 97: | Line 96: | ||
;<code>engine_loudness</code> | ;<code>engine_loudness</code> | ||
:Loudness of the engine. <code>engineLoudness</code> attribute found in the vehicle script file (media\scripts\vehicle_...). | :Loudness of the engine. <code>engineLoudness</code> attribute found in the vehicle script file (media\scripts\vehicle_...). | ||
===Body=== | ===Body=== | ||
;<code>seats</code> | ;<code>seats</code> | ||
:Number of seats in the vehicle. <code>seats</code> attribute found in the vehicle script file (media\scripts\vehicle_...). | :Number of seats in the vehicle. <code>seats</code> attribute found in the vehicle script file (media\scripts\vehicle_...). | ||
;<code>doors</code> | ;<code>doors</code> | ||
:Number of doors in the vehicle. | :Number of doors in the vehicle. | ||
;<code>trunk_storage</code> | ;<code>trunk_storage</code> | ||
:Encumbrance capacity of the trunk. <code>TruckBed</code> > <code>container</code> > <code>capacity</code> attribute found in the vehicle script file (media\scripts\vehicle_...). | :Encumbrance capacity of the trunk. <code>TruckBed</code> > <code>container</code> > <code>capacity</code> attribute found in the vehicle script file (media\scripts\vehicle_...). | ||
;<code>glove_box</code> | ;<code>glove_box</code> | ||
:Encumbrance capacity of the glove box. <code>GloveBox</code> > <code>container</code> > <code>capacity</code> attribute found in the vehicle script file (media\scripts\vehicle_...). | :Encumbrance capacity of the glove box. <code>GloveBox</code> > <code>container</code> > <code>capacity</code> attribute found in the vehicle script file (media\scripts\vehicle_...). | ||
===Variants=== | ===Variants=== | ||
;<code>service</code> | ;<code>service</code> | ||
Line 112: | Line 113: | ||
:Style variant of the vehicle. E.g., Wood Siding. | :Style variant of the vehicle. E.g., Wood Siding. | ||
;<code>color</code> | ;<code>color</code> | ||
:Color variant of the vehicle. E.g., Yellow, Green. Only include if there are unique color variants, e.g., taxi. | :Color variant of the vehicle. E.g., Yellow, Green. Only include if there are unique color variants, e.g., taxi. | ||
===Technical=== | ===Technical=== | ||
;<code>model</code> | ;<code>model</code> | ||
Line 119: | Line 121: | ||
:The ID of the vehicle. The format is <code>[module].[vehicle]</code>. This can be found in-game with debug in the vehicle list. Otherwise, in the vehicle scripts where <code>[module]</code> is the name of the module block (usually <code>Base</code>), and <code>[vehicle]</code> is the vehicle block. <br>Multiple vehicle IDs can be set by either: separating with {{code|<br>}} or adding a 'suffix id' to the end (up to 10), e.g., <code>vehicle_id2</code>. | :The ID of the vehicle. The format is <code>[module].[vehicle]</code>. This can be found in-game with debug in the vehicle list. Otherwise, in the vehicle scripts where <code>[module]</code> is the name of the module block (usually <code>Base</code>), and <code>[vehicle]</code> is the vehicle block. <br>Multiple vehicle IDs can be set by either: separating with {{code|<br>}} or adding a 'suffix id' to the end (up to 10), e.g., <code>vehicle_id2</code>. | ||
;<code>vehicle_id_more</code> | ;<code>vehicle_id_more</code> | ||
:Adds a "See all" link, linking to the section named in the parameter. E.g., {{code|vehicle_id_more{{=}}Vehicle IDs}} will link to a section called "Vehicle IDs". This is useful for multiple IDs, or where more information is required to distinguish between each ID, as the ID itself is generally not very descriptive. | :Adds a "See all" link, linking to the section named in the parameter. E.g., {{code|vehicle_id_more{{=}}Vehicle IDs}} will link to a section called "Vehicle IDs". This is useful for multiple IDs, or where more information is required to distinguish between each ID, as the ID itself is generally not very descriptive. | ||
==Example== | ==Example== | ||
Line 143: | Line 145: | ||
|vehicle_id=Base.CarStationWagon<br>Base.CarStationWagon2 | |vehicle_id=Base.CarStationWagon<br>Base.CarStationWagon2 | ||
}} | }} | ||
This example is the [[Chevalier Cerise Wagon]]. | This example is the [[Chevalier Cerise Wagon]]. | ||
<syntaxhighlight lang="html"> | <syntaxhighlight lang="html"> | ||
Line 167: | Line 168: | ||
|vehicle_id=Base.CarStationWagon<br>Base.CarStationWagon2 | |vehicle_id=Base.CarStationWagon<br>Base.CarStationWagon2 | ||
}} | }} | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{clear}} | {{clear}} | ||
Line 203: | Line 203: | ||
| vehicle_id = Vehicle ID | | vehicle_id = Vehicle ID | ||
| see_all = See all | | see_all = See all | ||
| #default = | | #default = {{Error|translation}} | ||
}} | }} | ||
</syntaxhighlight>}} | </syntaxhighlight>}} |
Latest revision as of 14:16, 14 April 2024
Infobox used for vehicles.
Usage
Copy and paste the below into an article, filling in the blanks.
{{Infobox vehicle
|name=
|image=
|image2=
|image3=
|image4=
|image5=
|image_name=
|image_name2=
|image_name3=
|image_name4=
|image_name5=
|image_caption=
<!--GENERAL-->
|manufacturer=
|vehicle_type=
|weight=
|engine_power=
|engine_loudness=
<!--BODY-->
|seats=
|doors=
|trunk_storage=
|glove_box =
<!--VARIANTS-->
|service=
|style=
|color =
<!--TECHNICAL-->
|model=
|vehicle_id =
}}
Parameters
Name and image
name
- Name of the vehicle. Defaults to the page title
image
- Image to be displayed. For multiple images, add an id to the parameter, from 2 to 5, e.g.,
image2
. If there are at least 2 images, an icon will be displayed (or defined withicon
). When clicked, the image with the same id will be displayed. image_name
- Text to display when hovering over the image. Text will be shown for the image with the same id, e.g.,
image_name2
forimage2
. image_width
- Width of the image. The maximum image size is 200px. Will change the width of the image with the same id, e.g.,
image_width2
forimage2
. image_caption
- Caption to be displayed beneath the image.
icon
- Icon for the image. For multiple icons, add an id to the parameter, from 2 to 5, e.g.,
icon2
. Clicking the icon will display the image with the same id. icon_name
- Text to display when hovering over the icon. Text will be shown for the icon with the same id, e.g.,
icon_name2
foricon2
.
General
manufacturer
- Vehicle manufacturer. Include a link if a page exists, e.g.,
[[Chevalier]]
. vehicle_type
- Type of the vehicle, e.g., "Standard", "Commercial", "Performance". This will automatically link to Vehicles.
weight
- Weight of the vehicle.
mass
attribute found in the vehicle script file (media\scripts\vehicle_...). engine_power
- Power of the engine.
engineForce
attribute found in the vehicle script file (media\scripts\vehicle_...). engine_loudness
- Loudness of the engine.
engineLoudness
attribute found in the vehicle script file (media\scripts\vehicle_...).
Body
seats
- Number of seats in the vehicle.
seats
attribute found in the vehicle script file (media\scripts\vehicle_...). doors
- Number of doors in the vehicle.
trunk_storage
- Encumbrance capacity of the trunk.
TruckBed
>container
>capacity
attribute found in the vehicle script file (media\scripts\vehicle_...). glove_box
- Encumbrance capacity of the glove box.
GloveBox
>container
>capacity
attribute found in the vehicle script file (media\scripts\vehicle_...).
Variants
service
- Service variant of the vehicle. E.g., Police, Ambulance, Postal.
style
- Style variant of the vehicle. E.g., Wood Siding.
color
- Color variant of the vehicle. E.g., Yellow, Green. Only include if there are unique color variants, e.g., taxi.
Technical
model
- Model used for the vehicle.
vehicle
>model
>file
attribute found in the vehicle script file (media\scripts\vehicle_...). vehicle_id
- The ID of the vehicle. The format is
[module].[vehicle]
. This can be found in-game with debug in the vehicle list. Otherwise, in the vehicle scripts where[module]
is the name of the module block (usuallyBase
), and[vehicle]
is the vehicle block.
Multiple vehicle IDs can be set by either: separating with<br>
or adding a 'suffix id' to the end (up to 10), e.g.,vehicle_id2
. vehicle_id_more
- Adds a "See all" link, linking to the section named in the parameter. E.g.,
vehicle_id_more=Vehicle IDs
will link to a section called "Vehicle IDs". This is useful for multiple IDs, or where more information is required to distinguish between each ID, as the ID itself is generally not very descriptive.
Example
Base.CarStationWagon2
This example is the Chevalier Cerise Wagon.
{{Infobox vehicle
|name=Chevalier Cerise Wagon
|image=Base.CarStationWagon.png
|image2=Chevalier Cerise Wagon.png
|image_name2=Chevalier Cerise Wagon (Wood Siding)
<!--GENERAL-->
|manufacturer=[[Chevalier]]
|vehicle_type=Standard
|weight=900
|engine_power=4200
|engine_loudness=80
<!--BODY-->
|seats=4
|doors=4
|trunk_storage=60
|glove_box=5
|style=Wood Siding
<!--TECHNICAL-->
|model=Vehicles_CarStationWagon
|vehicle_id=Base.CarStationWagon<br>Base.CarStationWagon2
}}
How to translate
This template is translatable.
Template code
Paste the following code into the <includeonly>
tag of the translated template and translate the text after each =
sign (except for #default =
).
{{#switch: {{{1|}}}
<!--GENERAL-->
| general = General
| manufacturer = Manufacturer
| vehicle_type = Vehicle type
| types = Types <!-- this should be the same as the section title on the Vehicles page -->
| weight = Weight
| weight_desc = Dependent on the contents, parts, and variant
| engine_power = Engine power
| condition_desc = Dependent on the condition
| engine_loudness = Engine loudness
<!--BODY-->
| body = Body
| seats = Seats
| variant_desc = Dependent on the variant
| doors = Doors
| trunk = Trunk storage
| trunk_tooltip = Maximum encumbrance stored in the trunk
| trunk_desc = Dependent on the part, condition, and variant
| glove_box = Glove box
| glove_box_tooltip = Maximum encumbrance stored in the glove box
<!--VARIANTS-->
| variants = Variants
| service = Service
| style = Style
| available_colors = Available colors
<!--TECHNICAL-->
| technical = Technical
| model = Model
| vehicle_id = Vehicle ID
| see_all = See all
| #default = {{Error|translation}}
}}
Template documentation
Copy the code wrapped in the <noinclude>
tag in this template and translate the text after doc =
in the {{Documentation}}
template.
{{Translation guide}}
template should be removed from the translated documentation.