Template:WeaponCard/doc: Difference between revisions

From The Deadlock Wiki
Jump to navigation Jump to search
Sur (talk | contribs)
m updated to include using key param
No edit summary
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{TS}}
==Usage==
==Usage==
This template displays weapon stats.
This template displays weapon stats.
Line 7: Line 8:
<pre>
<pre>
{{WeaponCard|Dynamo}}
{{WeaponCard|Dynamo}}
{{WeaponCard|key=hero_atlas}}
</pre>
</pre>
{{WeaponCard|Dynamo}}
{{WeaponCard|Dynamo}}
{{WeaponCard|key=hero_atlas}}
<pre>
{{WeaponCard|key=hero_forge}}
</pre>
{{WeaponCard|key=hero_forge}}
<pre>
{{WeaponCard|key=hero_forge|weapon_name=Test Weapon}}
</pre>
{{WeaponCard|key=hero_forge|weapon_name=Test Weapon}}
<pre>
{{WeaponCard|key=hero_forge|weapon_name=Test Weapon|no_description=true}}
</pre>
{{WeaponCard|key=hero_forge|weapon_name=Test Weapon|no_description=true}}
<templatedata>
<templatedata>
{
{
"params": {
"params": {
"1": {},
"1": {},
        "key": {},
"key": {},
"ph": {}
"ph": {},
"weapon_name": {
"description": "In case the weapon name is different from the files"
},
"no_description": {
"description": "Remove description",
"type": "boolean",
"default": "true"
},
"no_falloff": {
"description": "Weapons with no damage falloff (Celeste)",
"type": "boolean",
"default": "true"
}
},
},
"format": "inline"
"format": "inline"

Latest revision as of 19:33, 11 April 2026

CSS3 logo.svg
This template uses CSS found at WeaponCard/styles.css.

This template displays weapon stats.

Recommended to use key parameter for hero key instead of an unnamed 1st parameter of the english hero name. This allows localizing it to the current language in O(1) time complexity, as opposed to O(N).

Examples

[edit source]
{{WeaponCard|Dynamo}}
The Vonnegun
Medium Range
Heavy Hitter
Projectile
48 Damage Per Second
Falloff Range
20m ➞ 58m
{{WeaponCard|key=hero_forge}}
Services Rendered
Rapid Fire
Medium Range
72 Damage Per Second
Falloff Range
20m ➞ 58m
Increases fire rate as the guns spins up
{{WeaponCard|key=hero_forge|weapon_name=Test Weapon}}
Test Weapon
Rapid Fire
Medium Range
72 Damage Per Second
Falloff Range
20m ➞ 58m
Increases fire rate as the guns spins up
{{WeaponCard|key=hero_forge|weapon_name=Test Weapon|no_description=true}}
Test Weapon
Rapid Fire
Medium Range
72 Damage Per Second
Falloff Range
20m ➞ 58m

No description.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
11

no description

Unknownoptional
keykey

no description

Unknownoptional
phph

no description

Unknownoptional
weapon_nameweapon_name

In case the weapon name is different from the files

Unknownoptional
no_descriptionno_description

Remove description

Default
true
Booleanoptional
no_falloffno_falloff

Weapons with no damage falloff (Celeste)

Default
true
Booleanoptional