Difference between revisions of "Template:Weapon Stats Table"

From RimWorld Wiki
Jump to navigation Jump to search
(updated recoding reason and suggested move)
(Recoding is partially done)
Line 3: Line 3:
 
{{Weapon Quality Table/Ranged|{{#var:name}}}}
 
{{Weapon Quality Table/Ranged|{{#var:name}}}}
 
=== Melee ===
 
=== Melee ===
{{Weapon Quality Table/Melee|{{#var:name}}}}|{{Weapon Quality Table/Ranged|{{#var:name}}}}}}}}</includeonly><noinclude>{{Recode|reason = 1) Option to suppress quality (not just via collapsing) to outmode [[Template:Weapon No Quality Table]] ([[Charge blaster turret]]) 2) Remove automatic headers or at least make them optional}}
+
{{Weapon Quality Table/Melee|{{#var:name}}}}|{{Weapon Quality Table/Ranged|{{#var:name}}}}}}}}</includeonly><noinclude>{{Recode|reason = Remove automatic headers or at least make them optional}}
 
{{Move|destination=Template:Weapon Attacks Table|reason=This template handles all weapons. Whether they have quality and/or materials or not}}
 
{{Move|destination=Template:Weapon Attacks Table|reason=This template handles all weapons. Whether they have quality and/or materials or not}}
  
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 21:50, 17 April 2023

Documentation icon Template documentation[view] [edit] [history] [purge]

Description

This template generates a table summarizing stats for an given weapon, including average damage per second, armor piercing and Market Value, for each quality tier (if applicable) and every stuff option (if applicable).

Note that at the time of writing, weapons with no quality are hardcoded into the template, rather than pulled from the page properties. New no-quality weapons must be manually excepted from the template.

Property:Mode must be set to properly display melee weapons, otherwise it will default to the ranged format.

This template is part of the following system generating tables for all weapons:

Parameters

The first parameter (if present) will specify which weapon to generate the template for. If absent, {{PAGENAME}} will be used.

The no header parameter will disable the top heading, but not the subheadings for ranged and melee attacks, when set to true.

The header level parameter takes numbers and sets the size of the headings - note that top heading is sized by the number directly, with subheading one size smaller. Default value is 2. It can be used with or without no header.

Example usage

{{Weapon Stats Table | Persona monosword}}

Produces:

Attack table

Template:Weapon Quality Table/Melee

{{Weapon Stats Table | Assault rifle|}}

Produces:

Attack table

Ranged

Template:Weapon Quality Table/Ranged

Melee

Template:Weapon Quality Table/Melee

{{Weapon Stats Table | Incendiary launcher|}}

Produces:

Attack table

Ranged

Template:Weapon Quality Table/Ranged

Melee

Template:Weapon Quality Table/Melee