Template:AfflictionParser/doc: Difference between revisions

From Official Barotrauma Wiki
Jump to: navigation, search
mNo edit summary
Line 102: Line 102:
}}
}}
|}
|}
== Test 1 ==
<pre style="width:50em>
{{AfflictionDisplayTest|afflictions =
burn, 10;
burn, 20, chance = 0.5;
burn, 30;
burn, 40, chance = 0.01;
burn, 50;
</pre>
{|
! Table Cell
|-
|
{{AfflictionDisplayTest|afflictions =
burn, 10, chance = 0.5, fail = 5, duration = 15, delay = 3, instant = yes; 
}}
|}
{{clr}}
----


{{doc/end}}
{{doc/end}}

Revision as of 10:20, 14 April 2023

Documentation
Main article: Boilerplate:Gear


WORK IN PROGRESS Template that will hopefully replace the current way afflictions are inserted into the Template:Items Infobox and how they are displayed there and in all other templates that display afflictions.

Instructions

Field Note Example Expected Default
afflictions Afflictions are separated by ;
Values are separated by ,
Supported values:
  • identifier (first value)
  • strength (second value)
  • chance

burn, 10;
burn, 20, chance = 0.5;
burn, 30;
burn, 40, chance = 0.01;
burn, 50;

projectiles projectiles 8
weapondamagemodifier weapondamagemodifier 1.1

Sub Templates

Template in use

Simulations of how this would work when displayd in table cells in the infobox or table templates.

Test 1

{{AfflictionDisplayTest|afflictions = 
burn, 10; 
burn, 20, chance = 0.5; 
burn, 30; 
burn, 40, chance = 0.01;
burn, 50;
Table Cell

Template:AfflictionDisplayTest



Test 2

{{AfflictionDisplayTest|afflictions = 
explosiondamage, 100;
burn, 100;
bleeding, 50;
stun, 5;
}}

<div style="text-align:center">Explosion (5m):</div>

{{AfflictionDisplayTest|afflictions = 
explosiondamage, 200;
burn, 200;
bleeding, 40, chance = 0.05;
stun, 10;
radiationsickness, 30;
}}
Table Cell

Template:AfflictionDisplayTest

Explosion (5m):

Template:AfflictionDisplayTest


Test 1

{{AfflictionDisplayTest|afflictions = 
burn, 10; 
burn, 20, chance = 0.5; 
burn, 30; 
burn, 40, chance = 0.01;
burn, 50;
Table Cell

Template:AfflictionDisplayTest



This is the documentation page, it should be transcluded into the main template page. See Template:Doc for more information.