Template:StatBox: Difference between revisions

From Deadlock Wiki
Jump to navigation Jump to search
Sur (talk | contribs)
m example changed for 0.5% for testing
Sur (talk | contribs)
m require unlocalized again, and force icon image to english
 
(6 intermediate revisions by the same user not shown)
Line 6: Line 6:
     ">
     ">
         <!-- Centered Icon and Label -->
         <!-- Centered Icon and Label -->
         [[File:{{{box_name}}}_icon.png|40px|center|class=stat-box-icon|link=]]
         [[File:{{Lang|key={{{box_name}}}|lang_code=en}}_icon.png|40px|center|class=stat-box-icon|link=]]
         <div class="stat-box-label">{{{box_name}}}</div>
         <div class="stat-box-label">{{Lang|key={{{box_name}}}}}</div>
     </div>
     </div>
     <div class="stat-box-hover" style="
     <div class="stat-box-hover" style="
Line 18: Line 18:
     </div>
     </div>
</div></includeonly><noinclude>
</div></includeonly><noinclude>
Copy content from [[User:Sur/vector.css]] to your [[User:name/vector.css]] before viewing
{{Documentation}}
 
</noinclude>
Example
 
{{StatBox
|box_name=Weapon
|box_rgb=213, 144, 63
|num_cols=2
|cell_values=<!--
-->[[File:Bullet_damage.png|15px]] 4.675 BulletDamage,<!--
-->[[File:Damage.png|15px]] 0% BaseWeaponDamageIncrease,<!--
-->[[File:Bullets per sec icon.png|15px]] 1.67 RoundsPerSecond,<!--
-->IC 0% FireRate,<!--
-->[[File:Clip size icon.png|15px]] 9 ClipSize,<!--
-->IC 0.5% ClipSizeIncrease,<!--
-->IC .3525s ReloadTime,<!--
-->IC 0% ReloadSpeed,<!--
-->IC ?m/s BulletSpeed,<!--
-->IC 0% BulletSpeedIncrease,<!--
-->[[File:Melee damage.png|15px]] 63 LightMeleeDamage,<!--
-->[[File:Melee damage.png|15px]] 116 HeavyMeleeDamage,<!--
-->IC 0% BulletLifesteal<!--
-->}}<!--No spaces between each statbox call is ideal so that they are flush
 
 
 
-->{{StatBox
|box_name=Vitality
|box_rgb=116, 176, 28
|num_cols=3
|cell_values=<!--
-->MaxHealth 600,<!--
-->BaseHealthRegen 1,<!--
-->BulletArmorDamageReduction 0,<!--
-->TechArmorDamageReduction 0,<!--
-->BulletShieldHealth 1,<!--
-->TechShieldHealth 1,<!--
-->HealingOutput 1,<!--
-->DebuffResist 0,<!--
-->CritDamageReceivedScale 1,<!--
-->MaxMoveSpeed 6.5,<!--
-->SprintSpeed 0,<!--
-->StaminaCooldown 5,<!--
-->StaminaRegenIncrease 0,<!--
-->Stamina 3,<!--
-->}}<!--
 
 
-->{{StatBox
|box_name=Spirit
|box_rgb=194, 136, 240
|num_cols=3
|cell_values=<!--
-->TechCooldown 0,<!--
-->TechDuration 0,<!--
-->TechRange 0,<!--
-->TechLifesteal 0,<!--
-->MaxChargesIncrease 0,<!--
-->TechCooldownBetweenChargeUses 0,<!--
-->}}
 
 
 
 
 
 
 
<!--Several newlines after the last statbox to allow space for a larger table to extend downwards a few hundred pixels without overlapping nearby content-->
<templatedata>
{
"params": {
"box_name": {},
"box_rgb": {},
"num_cols": {},
"cell_values": {}
}
}
</templatedata></noinclude>

Latest revision as of 19:53, 15 September 2024

Template documentation [view] [edit] [purge]

Overview[edit source]

A stat box is created similar to the display seen in the shop when hovering over each stat category (Weapon, Vitality, Spirit).

When hovered, a box appears to the right that contains a table with specified cell values, preferably containing an icon, stat prefix, value, postfix, and name.

Examples[edit source]

{{StatBox
|box_name = CitadelCategoryWeapon
|box_rgb = 213, 144, 63
|num_cols = 2
|cell_values = 800 MaxHealth,2 BaseHealthRegen,10 DPS
}}


Outputs


Weapon
800 MaxHealth 2 BaseHealthRegen
10 DPS


See Template:StatBoxes which creates all 3 for a given hero dynamically using their stats and scalings

Parameters[edit source]

box_name: See Data:Lang_en.json for all english localization keys; ensure the box_name is a key that can be localized

No description.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
box_namebox_name

Unlocalized name of the StatBox which will be localized to both the label and the image.

Example
CitadelCategoryWeapon
Stringoptional
box_rgbbox_rgb

RGB values for the box, comma separated. RGBA is not supported, as the alpha channel is modified by the template.

Example
255,255,255
Stringoptional
num_colsnum_cols

Number of columns in the table.

Default
3
Example
3
Numberoptional
cell_valuescell_values

Number of cell values, comma separated (no space after comma). Rows are added automatically based on the number of cell values and columns.

Example
800 MaxHealth,2 BaseHealthRegen,10 DPS
Stringoptional