Difference between revisions of "Template:Condition/doc"

From Stoneshard wiki
Jump to navigation Jump to search
old>Realpsojed
(Created page with "{{Doc/start}} This is condition template created for use together with the Template:Tooltip hover box template on a specific condition's page or condition's tooltip page....")
 
m
 
(6 intermediate revisions by 3 users not shown)
Line 5: Line 5:


  <nowiki><includeonly>{{#switch: {{{1}}}
  <nowiki><includeonly>{{#switch: {{{1}}}
|ConditionType = {{neg|Physical}}
|ConditionType = Physical
|Properties1 = Deals Damage
|Properties1 = Deals Damage
|Values1 = {{neg|+2}}
|Values1 = {{c|+|+2}}
|Properties2 = Energy Restoration
|Properties2 = Energy Restoration
|Values2 = {{neg|-5%}}
|Values2 = {{c|-|-5%}}
|Properties3 = Healing Efficiency
|Properties3 = Healing Efficiency
|Values3 = {{neg|-30%}}
|Values3 = {{c|-|-30%}}
|PropertyText = Each turn reduces the affected Body Part's condition by {{neg|1%}}.
|PropertyText = Each turn reduces the affected Body Part's condition by {{c|-|1%}}.
|Description =
|Description =
|#default =  
|#default =  
Line 18: Line 18:
This data is invisible on the page itself, thanks to the includeonly tags.
This data is invisible on the page itself, thanks to the includeonly tags.


Next, copy this code to [[Bleeding]] or [[Bleeding/Tooltip]] or [[Bleeding/anything]] page:
<nowiki>
{{ {{{1|Tooltip hover box}}}
|title= {{Condition}}
}}</nowiki>
It will automatically load the condition's data and fill them into this format. Go to [[Bleeding]] to see the result.


Next, copy this code to [[Bleeding]] or [[Bleeding/Tooltip]] or [[Bleeding/anything]] page:
If you want to you can specify from which page to load the data from:
<nowiki>
{{ {{{1|Tooltip hover box}}}
|title= {{Condition|Daze}}
}}</nowiki>
 
Condition pages also display icons for conditions that have them, but this doesn't work for tooltips.
For this case, you can define a tooltip=1 parameter to not show the condition image.
  <nowiki>
  <nowiki>
{{ {{{1|Tooltip hover box}}}
{{ {{{1|Tooltip hover box}}}
|title= {{Consumable}}
|title= {{Condition|Daze|tooltip=1}}
}}</nowiki>
}}</nowiki>
It will automatically load the consumable's data and fill them into this format. Go to [[Bleeding]] to see the result.
 
=== Custom Title and Image ===
In addition to the data structure above, the Condition template accepts two optional parameters "Title" and "Image". These can be used for conditions that share their name with a skill (like [[Elusiveness]] and [[Elusiveness (Condition)]]).<br>To use them, simply add them to the data structure:
<nowiki>
|Title = Elusiveness
|Image = Elusiveness.png</nowiki>
Then the produced tooltip will use the Title and Image name you provided instead of automatically using the page name.
{{Doc/end}}
{{Doc/end}}

Latest revision as of 03:18, 20 April 2023

Template-info.png Documentation

This is condition template created for use together with the Template:Tooltip hover box template on a specific condition's page or condition's tooltip page.

Usage: The page itself must contain the condition's data before this Template works. For example, if I wanted to create the Bleeding page, I'll add this code to the start of the page and fill in the values:

<includeonly>{{#switch: {{{1}}}
|ConditionType = Physical
|Properties1 = Deals Damage
|Values1 = {{c|+|+2}}
|Properties2 = Energy Restoration
|Values2 = {{c|-|-5%}}
|Properties3 = Healing Efficiency
|Values3 = {{c|-|-30%}}
|PropertyText = Each turn reduces the affected Body Part's condition by {{c|-|1%}}.
|Description =
|#default = 
}}</includeonly>

This data is invisible on the page itself, thanks to the includeonly tags.

Next, copy this code to Bleeding or Bleeding/Tooltip or Bleeding/anything page:

{{ {{{1|Tooltip hover box}}}
|title= {{Condition}}
}}

It will automatically load the condition's data and fill them into this format. Go to Bleeding to see the result.

If you want to you can specify from which page to load the data from:

{{ {{{1|Tooltip hover box}}}
|title= {{Condition|Daze}}
}}

Condition pages also display icons for conditions that have them, but this doesn't work for tooltips. For this case, you can define a tooltip=1 parameter to not show the condition image.

{{ {{{1|Tooltip hover box}}}
|title= {{Condition|Daze|tooltip=1}}
}}

Custom Title and Image

In addition to the data structure above, the Condition template accepts two optional parameters "Title" and "Image". These can be used for conditions that share their name with a skill (like Elusiveness and Elusiveness (Condition)).
To use them, simply add them to the data structure:

|Title = Elusiveness
|Image = Elusiveness.png

Then the produced tooltip will use the Title and Image name you provided instead of automatically using the page name.