Template:Container weight: Difference between revisions

From PZwiki
m (Automated {{Languages}} removal.)
m (Encumbrance)
Line 1: Line 1:
<noinclude>
<noinclude>
{{Documentation/sandbox|doc=
{{Documentation/sandbox|doc=
This is a simple template to simplify calculating the weight of a container when full and with either the organized or disorganized trait.  
This is a simple template to simplify calculating the encumbrance (previously named ''weight'', which is still referred to in game files) of a container when full and with either the organized or disorganized trait.


==Usage==
==Usage==
Line 19: Line 19:
:Capacity of the container. The item property is <code>Capacity</code>.  
:Capacity of the container. The item property is <code>Capacity</code>.  
;<code>weight_reduction</code>{{sup|required}}
;<code>weight_reduction</code>{{sup|required}}
:Weight reduction of the container. The item property is <code>WeightReduction</code>.  
:Encumbrance reduction of the container. The item property is <code>WeightReduction</code>.  
;<code>weight</code>
;<code>weight</code>
:Weight of the container. The item property is <code>Weight</code>.  
:Encumbrance of the container. The item property is <code>Weight</code>.  
;<code>1</code> or <code>trait</code>
;<code>1</code> or <code>trait</code>
:Add <code>organized</code> or <code>disorganized</code> to calculate the weight for that trait.  
:Add <code>organized</code> or <code>disorganized</code> to calculate the encumbrance for that trait.  


==Example==
==Example==
Line 51: Line 51:
{{ll|Category:Templates}}
{{ll|Category:Templates}}
</noinclude><includeonly>{{#expr:<!--
</noinclude><includeonly>{{#expr:<!--
-->{{{weight|1}}} * 0.3<!-- Comment: weight is 30% when equipped. Weight reduction only takes effect when equipped
-->{{{weight|1}}} * 0.3<!-- Comment: encumbrance is 30% when equipped. Encumbrance reduction only takes effect when equipped
--> + ({{{capacity|1}}} * {{#switch:{{{1|{{{trait|}}}}}}
--> + ({{{capacity|1}}} * {{#switch:{{{1|{{{trait|}}}}}}
   | organized = 1.3
   | organized = 1.3

Revision as of 14:48, 23 March 2024

Notebook.pngTemplate Documentation

This is a simple template to simplify calculating the encumbrance (previously named weight, which is still referred to in game files) of a container when full and with either the organized or disorganized trait.

Usage

Copy the below and paste to the required page, replacing X, Y and Z.

{{Container weight|capacity=X|weight_reduction=Y|weight=Z}}

default
4.65
organized
5.87
disorganized
3.44

Parameters

capacity
Capacity of the container. The item property is Capacity.
weight_reductionRequired
Encumbrance reduction of the container. The item property is WeightReduction.
weight
Encumbrance of the container. The item property is Weight.
1 or trait
Add organized or disorganized to calculate the encumbrance for that trait.

Example

default
{{Container weight|capacity=27|weight_reduction=85|weight=2}}
4.65
organized
{{Container weight|organized|capacity=27|weight_reduction=85|weight=2}}
5.87
disorganized
{{Container weight|disorganized|capacity=27|weight_reduction=85|weight=2}}
3.44

Technical

This template uses the following equation:

weight * 0.3 + (capacity * trait) * (weight_reduction / 100)

Note: if weight_reduction is already a decimal, it will not be divided by 100.

How to translate

This template doesn't need to/shouldn't be translated, but you can translate the documentation of this template with the following steps:

  1. Create a subpage of this template with the language code of the language you want to translate to.
  2. Copy the code wrapped in the <noinclude> tag in this template into the page you created.
    {{Translation guide}} template should be removed from the translated documentation.
  3. Translate the page according to the translation requirements of normal pages.

See also

Editors can experiment in this template's sandbox.