Template:Affliction: Difference between revisions

From Official Barotrauma Wiki
Jump to: navigation, search
(also added total onFailure)
(made it so we can use total values (6&7) without displaying the over-time values (2&3) outside of the tooltip. I also had to move previous 6&7 to 8&9 so as to not have specified but empty parameters there when using the new parameters, in other words they have to be last if we want to be able to not specify them to use default values for icon size and anchor. I'm dealing with all "what links here" right now to fix all broken template usages, I'm also adding a doc for this template)
Line 1: Line 1:
<includeonly>[[File:affliction_{{{1}}}.png|{{{6|35}}}px|link=Afflictions#{{{7|{{{1}}}}}}]]{{Space}}[[Afflictions#{{{7|{{{1}}}}}}|{{{1}}}]]{{Space}}<!--
<includeonly>[[File:affliction_{{{1}}}.png|{{{8|35}}}px|link=Afflictions#{{{9|{{{1}}}}}}]]{{Space}}[[Afflictions#{{{9|{{{1}}}}}}|{{{1}}}]]{{Space}}<!--


/// Over-time increase
/// Over-time increase
Line 6: Line 6:
-->{{#ifeq:{{#if:{{{2|}}}|y|nn}}|{{#if:{{{3|}}}|y|n}}|<span style="cursor:help;" title="Affliction strength change per second">'''({{{2}}} '''</span><span style="color:#c90c0c;cursor:help;" title="Affliction strength change per second if skill requirement isn't met">'''{{!}} {{{3}}})*'''</span>|<!--
-->{{#ifeq:{{#if:{{{2|}}}|y|nn}}|{{#if:{{{3|}}}|y|n}}|<span style="cursor:help;" title="Affliction strength change per second">'''({{{2}}} '''</span><span style="color:#c90c0c;cursor:help;" title="Affliction strength change per second if skill requirement isn't met">'''{{!}} {{{3}}})*'''</span>|<!--


// If there's only a normal value
// If there's a total value onUse (parameter 6) and an over-time onUse (parameter 2) value, OR just an over-time onUse value (and no over-time onFailure value in both cases)
-->{{#if:{{{2|}}}|<span style="cursor:help;" title="Affliction strength change per second">'''({{{2}}})*'''</span>|}}<!--
-->{{#if:{{{6|}}}|<span style="cursor:help;color:#ba7000;" title="Total Affliction strength change when successful {{#if:{{{2|}}}|({{{2|}}}/s)|}}">'''({{{6|}}})*'''</span>|{{#if:{{{2|}}}|<span style="cursor:help;" title="Affliction strength change per second">'''({{{2}}})*'''</span>|}}}}<!--


// If there's only a onFailure value
// If there's only a total value onFailure (parameter 7) and an over-time onFailure (parameter 3) value, OR just an over-time onFailure value (and no over-time onUse value in both cases)
-->{{#if:{{{3|}}}|<span style="color:#c90c0c;cursor:help;" title="Affliction strength change per second if skill requirement isn't met">'''({{{3|}}})*'''</span>|}}}}<!--
-->{{#if:{{{7|}}}|<span style="cursor:help;color:#ba3200;" title="Total Affliction strength change when failed {{#if:{{{3|}}}|({{{3|}}}/s)|}}">'''({{{7|}}})*'''</span>|{{#if:{{{3|}}}|<span style="color:#c90c0c;cursor:help;" title="Affliction strength change per second if skill requirement isn't met">'''({{{3|}}})*'''</span>|}}}}}}<!--
 
// If there's only a total value onUse
-->{{#if:{{{8|}}}|<span style="cursor:help;color:#ba7000;" title="Total Affliction strength change when successful {{#if:{{{2|}}}|({{{2|}}}/s)|}}">'''({{{8|}}})*'''</span>|}}<!--
 
// If there's only a total value onFailure
-->{{#if:{{{9|}}}|<span style="cursor:help;color:#ba3200;" title="Total Affliction strength change when failed {{#if:{{{3|}}}|({{{3|}}}/s)|}}">'''({{{9|}}})*'''</span>|}}<!--


/// Instantly gained
/// Instantly gained

Revision as of 12:39, 8 January 2021

Documentation

Syntax

{{Affliction| Affliction name | Affliction strength change per second | idem but onFailure | strength instantly gained | idem but onFailure | Total affliction strength change | idem but onFailure | icon size override (default = 30) | linktext = <custom text> | showpersec = yes | icon = <custom icon> | talent = yes }}

Examples

{{Affliction|Internal Damage|2|4|||||60}}
gives: Internal Damage (2 | 4)*


{{Affliction|Psychosis Resistance|||600|300}}
gives: Psychosis Resistance (600 | 300)*


{{Affliction|Internal Damage|5||||50}}
gives: Internal Damage (50)* (per second change is in the tooltip on hover)


{{Affliction|Internal Damage||2.5||||25}}
gives: Internal Damage (25)* (per second change is in the tooltip on hover)


{{Affliction|Internal Damage|-5||||-50|showpersec=yes}}
gives: Internal Damage (-50)*


{{Affliction|Internal Damage|-5||||-50|showpersec=yes|linktext=Any Internal Damage}}
gives: Internal Damage (-50)*
{{Affliction|talent=yes|Evasive Maneuvers}}
gives: File:Affliction Evasive Maneuvers.png Evasive Maneuvers (for use with talent afflictions)