Template:Armor: Difference between revisions

From Vintage Story Wiki
m (bug fix and example template)
No edit summary
Line 1: Line 1:
<includeonly>
<noinclude><languages/><noinclude><includeonly>
{|border="1" cellpadding="2" cellspacing="0" class="screwTemplatesMan" style="position:relative; border-radius:7px; font-size:90%; width:200px; float:{{#if:{{{FloatLeft|}}}|left;margin-right:2em|right}};"
{|border="1" cellpadding="2" cellspacing="0" class="screwTemplatesMan" style="position:relative; border-radius:7px; font-size:90%; width:200px; float:{{#if:{{{FloatLeft|}}}|left;margin-right:2em|right}};"
|-
|-
|bgcolor="#000000" colspan="2" style="border-top-right-radius:7px; border-top-left-radius:7px; text-align:center; font-size:13.5px;"|<font color="white">'''{{{Name}}}'''</font>
|bgcolor="#000000" colspan="2" style="border-top-right-radius:7px; border-top-left-radius:7px; text-align:center; font-size:13.5px;"|<font color="white">'''{{{Name}}}'''</font>
|-
|-
|bgcolor="#d3ab92" colspan=2 style="text-align: center"| {{{Image}}}
|bgcolor="#d3ab92" colspan=2 style="text-align: center"| [[{{{Image}}}|100px]]
|-
|-
| '''Durability''' || {{{Durability}}}
| '''Durability''' || {{{Durability}}}
|-
|-
|bgcolor="#000000" colspan="2" style="text-align:center; font-size:13.5px;"|<font color="white">'''Protection'''</font>
{{#if: {{{Temp|}}} | {{#!:
{{Item/Fuel
|Temp={{{Temp}}}
|Duration={{{Duration}}}
}}
}} }}
|-
|bgcolor="#000000" colspan="2" style="text-align:center; font-size:13.5px;"|<font color="white">'''<translate>Protection</translate>'''</font>
|-
|-
| '''Relative''' || {{{RelativeProtection}}}
| '''<translate>Relative</translate>''' || {{{RelativeProtection}}}
|-
|-
| '''Flat''' || {{{FlatDamageReduction}}}
| '''<translate>Flat</translate>''' || {{{FlatDamageReduction}}}
|-
|-
| '''Protection Tier''' || {{{ProtectionTier}}}
| '''<translate>Protection Tier</translate>''' || {{{ProtectionTier}}}
{{#if: {{{HighDamageTierResistant|}}} | {{#!:
{{#if: {{{HighDamageTierResistant|}}} | {{#!:
|-
|-
|colspan="2"| High Damage Tier Resistant
|colspan="2"| <translate>High Damage Tier Resistant</translate>
}} }}
}} }}
|-
|-
|bgcolor="#000000" colspan="2" style="text-align:center; font-size:13.5px;" |<font color="white">'''Protection Losses'''</font>
|bgcolor="#000000" colspan="2" style="text-align:center; font-size:13.5px;" |<font color="white">'''<translate>Protection Losses</translate>'''</font>
|-
|-
| '''Relative''' || {{{PerTierRelativeProtectionLossZero|0.03}}}, {{{PerTierRelativeProtectionLossOne|0.15}}}
| '''<translate>Relative</translate>''' || {{{PerTierRelativeProtectionLossZero|0.03}}}, {{{PerTierRelativeProtectionLossOne|0.15}}}
|-
|-
| '''Flat''' || {{{PerTierFlatDamageReductionLossZero|0.1}}}, {{{PerTierFlatDamageReductionLossOne|0.2}}}
| '''<translate>Flat</translate>''' || {{{PerTierFlatDamageReductionLossZero|0.1}}}, {{{PerTierFlatDamageReductionLossOne|0.2}}}
<!-- This sucks -->
<!-- This sucks -->
{{#if: {{{RangedWeaponsAcc|}}}{{{RangedWeaponsSpeed|}}}{{{WalkSpeed|}}}{{{HealingEffectivness|}}}{{{HungerRate|}}} |
{{#if: {{{RangedWeaponsAcc|}}}{{{RangedWeaponsSpeed|}}}{{{WalkSpeed|}}}{{{HealingEffectivness|}}}{{{HungerRate|}}} |
{{#!:
{{#!:
|-
|-
|bgcolor="#000000" colspan="2" style="text-align:center; font-size:13.5px;" |<font color="white">'''Stat Modifiers'''</font>
|bgcolor="#000000" colspan="2" style="text-align:center; font-size:13.5px;" |<font color="white">'''<translate>Stat Modifiers</translate>'''</font>
{{#if: {{{RangedWeaponsAcc|}}} | {{#!:
{{#if: {{{RangedWeaponsAcc|}}} | {{#!:
|-
|-
| '''Ranged Weapons Accuracy''' || {{{RangedWeaponsAcc}}}
| '''<translate>Ranged Weapons Accuracy</translate>''' || {{{RangedWeaponsAcc}}}
}} }}
}} }}
{{#if: {{{RangedWeaponsSpeed|}}} | {{#!:
{{#if: {{{RangedWeaponsSpeed|}}} | {{#!:
|-
|-
| '''Ranged Weapons Speed''' || {{{RangedWeaponsSpeed}}}
| '''<translate>Ranged Weapons Speed</translate>''' || {{{RangedWeaponsSpeed}}}
}} }}
}} }}
{{#if: {{{WalkSpeed|}}} | {{#!:
{{#if: {{{WalkSpeed|}}} | {{#!:
|-
|-
| '''Walk Speed''' || {{{WalkSpeed}}}
| '''<translate>Walk Speed</translate>''' || {{{WalkSpeed}}}
}} }}
}} }}
{{#if: {{{HealingEffectivness|}}} | {{#!:
{{#if: {{{HealingEffectivness|}}} | {{#!:
|-
|-
| '''Healing Effectivness''' || {{{HealingEffectivness}}}
| '''<translate>Healing Effectivness</translate>''' || {{{HealingEffectivness}}}
}} }}
}} }}
{{#if: {{{HungerRate|}}} | {{#!:
{{#if: {{{HungerRate|}}} | {{#!:
|-
|-
| '''Hunger Rate''' || {{{HungerRate}}}
| '''<translate>Hunger Rate</translate>''' || {{{HungerRate}}}
}} }}
}} }}
}} }}
}} }}
|-
|-
|bgcolor="#000000" colspan="2" class="Bloba" style="text-align:center; font-size:13.5px; border-bottom-right-radius:7px; border-bottom-left-radius:7px;"|
|bgcolor="#000000" colspan="2" class="Bloba" style="text-align:center; font-size:13.5px; border-bottom-right-radius:7px; border-bottom-left-radius:7px;"|[[Armors|<font color="white">'''<translate>Armors</translate>'''</font>]]
|}{{#if:{{{NoBreak|}}}||{{-}} }}
|}{{#if:{{{NoBreak|}}}||{{-}} }}
</includeonly>
[[Category:Armors{{#translation:}}]]</includeonly>
<noinclude>
<noinclude>
Template for armors. More or less a value copy from the armors.json in the assets.
Template for armors. More or less a value copy from the armors.json in the assets.

Revision as of 12:35, 6 August 2023

Other languages:

Template for armors. More or less a value copy from the armors.json in the assets.

Test
100px
Durability 100
Protection
Percent protection {{{PercentProtection}}}%
Flat Damage Reduction (HP) 0.6
Protection Tier 0
Protection Losses
Relative 0.03, 0.15
Flat 0.1, 0.2
Armors


Parameter Required or Optional, default if applicable Example
Name Required Sewn Linen
Image Required [[File:Grid Sewn Linen Armor.png]]
Durability Required 100
RelativeProtection Required 0.6
FlatDamageReduction Required 0.6
ProtectionTier Required 0
HighDamageTierResistant Optional true
PerTierRelativeProtectionLossZero Optional, 0.03 0.15
PerTierRelativeProtectionLossOne Optional, 0.15 0.03
PerTierFlatDamageReductionLossZero Optional, 0.1 0.4
PerTierFlatDamageReductionLossOne Optional, 0.2 0.5
RangedWeaponsAcc Optional -0.03
RangedWeaponsSpeed Optional -0.07
WalkSpeed Optional -0.5
HealingEffectivness Optional -0.5
HungerRate Optional -0.07