Template:Effect: Difference between revisions

1,512 bytes added ,  15:52, 24 November 2021
m
no edit summary
(add type classification infobox row)
mNo edit summary
 
(25 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>{{#cargo_declare:_table=Effects|DisplayName=Wikitext|PlainName=String|Description=Wikitext|EffectID=String|Type=String}}
<noinclude>{{#cargo_declare:_table=Effects|DisplayName=Wikitext|PlainName=String|Description=Wikitext|EffectID=String|Type=String|DamageTypes=String|DontIndex=Boolean}}
</noinclude><includeonly>{{#cargo_store:_table=Effects|DisplayName={{qud text|{{{1|}}}|notxml}}
</noinclude><includeonly>{{#cargo_store:_table=Effects|DisplayName={{{title|{{qud text|{{{1|}}}|notxml}} }}}
|PlainName={{#titleparts:{{strip color|{{{1|}}}|notxml}}}}
|PlainName={{#titleparts:{{#if:{{{1|}}}|{{strip color|{{{name|{{{1|}}}}}}|notxml}}|{{StripFormatting|1={{{title|{{#titleparts:{{PAGENAME}}}} }}} }} }} }}
|Description={{qud text|{{{2|}}}|notxml|unbolded}}
|Description={{qud text|{{{desc|{{{2|}}}}}}|notxml|unbolded}}
|EffectID={{{3|}}}
|EffectID={{#ifeq:{{{dontindex|0}}}|0|{{{idoverride|{{{id|{{{3|}}}}}}}}} }}
|Type = {{{4|0000000000000000000000000001}}} }}<!--
|Type = {{{type|{{{4|0000000000000000000000000001}}}}}}
|DamageTypes = {{{damagetypes|}}}
|DontIndex={{{dontindex|0}}}}}<!--


   variable definitions
   variable definitions


-->{{#vardefine:name|{{qud text|{{{1|}}}|notxml}}}}<!--
-->{{#vardefine:name|{{{title|{{qud text|{{{1|}}}|notxml}}}}}}}<!--


   infobox
   infobox


-->{{#invoke: infobox| infobox |
-->{{#invoke: infobox | infobox  
title= {{qud text|{{{1|}}}|notxml}}
| title = {{qud text|{{{1|}}}|notxml}}
| image = none
| image = none
| class = qud-effect-infobox
| class = qud-effect-infobox
| rows =
| rows =
{{infobox row|ID|{{{3|}}} }} }}
{{infobox row|ID|{{{id|{{{3|}}}}}} }}
{{#if:{{{3|}}} | {{infobox row|Type|{{#invoke:EffectTypes|getTypes|{{{3}}}}} }} }}
{{#if:{{{4|}}}{{{type|}}} | {{infobox row|Effect Type|{{#invoke:EffectType|getTypes|{{{4|{{{type}}}}}} }} }}|[[Category:Effects]]}}
{{qud look|text={{{2|}}}|title={{{1|}}}
{{#if:{{{damagetypes|}}} | {{infobox row|[[Damage Type]]|{{{damagetypes}}}}} }}
|bottomtext=none}}[[Category:Effects]]
}}
</includeonly><noinclude>[[Category:Cargo Store Templates]]
{{qud look|text={{{desc|{{{2|}}}}}}|title={{{title|{{{1|}}} }}}|bottomtext=none|bordercolor=y }}</includeonly><noinclude>[[Category:Cargo Store Templates]]
 
for use in a table. 1st argument is the name of the effect, and the second argument is the description. third is id. fourth is effect type in base 2.
for use in a table. 1st argument is the name of the effect, and the second argument is the description. third is id.</noinclude>
You can also used named parameters.
{| class="wikitable"
! Parameter name
! Description
|-
| title
| title. unlike unnamed parameters, this is not automatically parsed and you must use qud text or qud shader.
|-
| desc
| effect description.
|-
| id
| the cs class name
|-
| idoverride
| an override ID for the wiki that is stored in cargo instead of the real ID. Should be used only rarely (example: Power Skating shares ID with Sprinting, but we want to treat them separately)
|-
| type
| a string of binary numbers that denotes the type of effect. this is from GetEffectType but converted into binary.
|-
| damagetypes
| a list (<nowiki></br></nowiki> delimited) of damage types caused by this effect, if applicable.
|-
| dontindex
| 'yes' if this effect should not be indexed (usually because it is a variant of a similar effect that shares the same effect ID). Non-indexed effects do not appear in the effects navbox.
|}
<pre>
{{Effect
| title =
| desc =
| id =
| type =
| damagetypes =
| gameversion =
}}
</pre>
</noinclude>