Template:Infobox Card/doc: Difference between revisions

From Descent-Community Wiki 1.2
Jump to navigation Jump to search
(Document the now optional name argument)
(Add onlyinclude and includeonly tags. Describe longterm goal.)
Line 12: Line 12:
:*Travel Cards
:*Travel Cards
:*?
:*?
;Other uses
:The longterm idea is to be able transclude pages which use the Infobox card template and specify an section-argument to get a specific piece of information.
:E.g. if someone want to know the buy cost of an the lucky charm he/she can just add: <nowiki>{{:Lucky Charm|section=buy}}</nowiki>
:For this to work the actual template has to be enclosed in <nowiki><onlyinclude></nowiki> tags and the section argument within the parameters in <nowiki><includeonly></nowiki> tags. See the below examples.
;Syntax, all possible arguments in alphabetical order:
;Syntax, all possible arguments in alphabetical order:
<pre>
<pre>
{{Infobox card
<onlyinclude>{{Infobox card
  |act =
  |act =
  |archetype =
  |archetype =
Line 31: Line 35:
  |range =
  |range =
  |reliccounterpart =
  |reliccounterpart =
<includeonly>|section={{{section|synopsis}}}</includeonly>
  |text =
  |text =
  |threatcost =
  |threatcost =
Line 37: Line 42:
  |worn =
  |worn =
  |xpcost =
  |xpcost =
}}</pre>
}}</onlyinclude>
</pre>


;Usage for an overlord card:
;Usage for an overlord card:
<pre>
<pre>
{{Infobox card
<onlyinclude>{{Infobox card
  |archetype    = Overlord
  |archetype    = Overlord
  |cardtype      = Overlord Card
  |cardtype      = Overlord Card
Line 48: Line 54:
  |name          = <optional, used to override the name if it is different than what <nowiki>{{PAGENAME}}</nowiki> returns>
  |name          = <optional, used to override the name if it is different than what <nowiki>{{PAGENAME}}</nowiki> returns>
  |overlordclass = <required>
  |overlordclass = <required>
<includeonly>|section={{{section|synopsis}}}</includeonly>
  |text          = <optional, but highly recommended>
  |text          = <optional, but highly recommended>
  |xpcost        = <required>
  |xpcost        = <required>
}}</pre>
}}</onlyinclude>
</pre>


;Usage for a plot card:
;Usage for a plot card:
<pre>
<pre>
{{Infobox card
<onlyinclude>{{Infobox card
  |archetype      = Overlord
  |archetype      = Overlord
  |cardtype      = Plot Card
  |cardtype      = Plot Card
Line 63: Line 71:
  |plotcardnumber = <required>
  |plotcardnumber = <required>
  |plotdeck      = <required>
  |plotdeck      = <required>
<includeonly>|section={{{section|synopsis}}}</includeonly>
  |text          = <optional, but highly recommended>
  |text          = <optional, but highly recommended>
  |threatcost    = <required>
  |threatcost    = <required>
}}</pre>
}}</onlyinclude>
</pre>


;Usage for a skill:
;Usage for a skill:
<pre>
<pre>
{{Infobox card
<onlyinclude>{{Infobox card
  |archetype  = <required: Healer, Mage, Warrior, Scout>
  |archetype  = <required: Healer, Mage, Warrior, Scout>
  |cardtype  = Skill
  |cardtype  = Skill
Line 77: Line 87:
  |name      = <optional, used to override the name if it is different than what <nowiki>{{PAGENAME}}</nowiki> returns>
  |name      = <optional, used to override the name if it is different than what <nowiki>{{PAGENAME}}</nowiki> returns>
  |playcost  = <required>
  |playcost  = <required>
<includeonly>|section={{{section|synopsis}}}</includeonly>
  |text      = <optional, but highly recommended>
  |text      = <optional, but highly recommended>
  |xpcost    = <required>
  |xpcost    = <required>
}}
}}</onlyinclude>
</pre>
</pre>


;Usage for starting gear:
;Usage for starting gear:
<pre>
<pre>
{{Infobox card
<onlyinclude>{{Infobox card
  |archetype  = <required, Healer, Mage, Warrior, Scout>
  |archetype  = <required, Healer, Mage, Warrior, Scout>
  |cardtype  = Item
  |cardtype  = Item
Line 93: Line 104:
  |name      = <optional, used to override the name if it is different than what <nowiki>{{PAGENAME}}</nowiki> returns>
  |name      = <optional, used to override the name if it is different than what <nowiki>{{PAGENAME}}</nowiki> returns>
  |range      = <optional, if applicable>
  |range      = <optional, if applicable>
<includeonly>|section={{{section|synopsis}}}</includeonly>
  |text      = <optional, but highly recommended>
  |text      = <optional, but highly recommended>
  |trait      = <optional, if applicable>
  |trait      = <optional, if applicable>
  |trait2    = <optional, if applicable>
  |trait2    = <optional, if applicable>
  |worn      = <required>
  |worn      = <required>
}}
}}</onlyinclude>
</pre>
</pre>


;Usage for shop gear:
;Usage for shop gear:
<pre>
<pre>
{{Infobox card
<onlyinclude>{{Infobox card
  |act        = <required>
  |act        = <required>
  |buy        = <required>
  |buy        = <required>
Line 111: Line 123:
  |name      = <optional, used to override the name if it is different than what <nowiki>{{PAGENAME}}</nowiki> returns>
  |name      = <optional, used to override the name if it is different than what <nowiki>{{PAGENAME}}</nowiki> returns>
  |range      = <optional, if applicable>
  |range      = <optional, if applicable>
<includeonly>|section={{{section|synopsis}}}</includeonly>
  |text      = <optional, but highly recommended>
  |text      = <optional, but highly recommended>
  |trait      = <optional, if applicable>
  |trait      = <optional, if applicable>
  |trait2    = <optional, if applicable>
  |trait2    = <optional, if applicable>
  |worn      = <required>
  |worn      = <required>
}}
}}</onlyinclude>
</pre>
</pre>


;Usage for Hero relics:
;Usage for Hero relics:
<pre>
<pre>
{{Infobox card
<onlyinclude>{{Infobox card
  |cardtype        = Item
  |cardtype        = Item
  |dice            = <optional, if applicable>
  |dice            = <optional, if applicable>
Line 129: Line 142:
  |range            = <optional, if applicable>
  |range            = <optional, if applicable>
  |reliccounterpart = <required>
  |reliccounterpart = <required>
<includeonly>|section={{{section|synopsis}}}</includeonly>
  |text            = <optional, but highly recommended>
  |text            = <optional, but highly recommended>
  |trait            = <optional, if applicable>
  |trait            = <optional, if applicable>
  |trait2          = <optional, if applicable>
  |trait2          = <optional, if applicable>
  |worn            = <optional, if applicable>
  |worn            = <optional, if applicable>
}}
}}</onlyinclude>
</pre>
</pre>


;Usage for Overlord relics:
;Usage for Overlord relics:
<pre>
<pre>
{{Infobox card
<onlyinclude>{{Infobox card
  |archetype        = <required> Overlord
  |archetype        = <required> Overlord
  |cardtype        = Overlord Relic
  |cardtype        = Overlord Relic
Line 146: Line 160:
  |questreward      = <required, link to the quest where the relic can be gained>
  |questreward      = <required, link to the quest where the relic can be gained>
  |reliccounterpart = <required>
  |reliccounterpart = <required>
<includeonly>|section={{{section|synopsis}}}</includeonly>
  |text            = <optional, but highly recommended>
  |text            = <optional, but highly recommended>
}}
}}</onlyinclude>
</pre>
</pre>

Revision as of 17:36, 28 June 2016

Description
This template is display an infobox about a game card.
Currently the template supports the following cards:
  • Skills
  • Items (Starting Gear, Shop, Relic)
  • Overlord Cards
  • Plot Cards
Not supported yet are:
  • Monster Cards
  • Lieutenant Cards
  • Search Cards
  • Travel Cards
  • ?
Other uses
The longterm idea is to be able transclude pages which use the Infobox card template and specify an section-argument to get a specific piece of information.
E.g. if someone want to know the buy cost of an the lucky charm he/she can just add: {{:Lucky Charm|section=buy}}
For this to work the actual template has to be enclosed in <onlyinclude> tags and the section argument within the parameters in <includeonly> tags. See the below examples.
Syntax, all possible arguments in alphabetical order
<onlyinclude>{{Infobox card
 |act =
 |archetype =
 |buy =
 |cardtype =
 |dice =
 |expansion =
 |heroclass =
 |image =
 |name =
 |overlordclass =
 |playcost =
 |plotcardnumber =
 |plotdeck =
 |questreward =
 |range =
 |reliccounterpart =
<includeonly>|section={{{section|synopsis}}}</includeonly>
 |text =
 |threatcost =
 |trait =
 |trait2 =
 |worn =
 |xpcost =
}}</onlyinclude>
Usage for an overlord card
<onlyinclude>{{Infobox card
 |archetype     = Overlord
 |cardtype      = Overlord Card
 |expansion     = <required>
 |image         = <optional, only used when image to show has a different name than {{{name|}}}.png or {{PAGENAME}}.png
 |name          = <optional, used to override the name if it is different than what {{PAGENAME}} returns>
 |overlordclass = <required>
<includeonly>|section={{{section|synopsis}}}</includeonly>
 |text          = <optional, but highly recommended>
 |xpcost        = <required>
}}</onlyinclude>
Usage for a plot card
<onlyinclude>{{Infobox card
 |archetype      = Overlord
 |cardtype       = Plot Card
 |expansion      = <required>
 |image          = <optional, only used when image to show has a different name than {{{name|}}}.png or {{PAGENAME}}.png
 |name           = <optional, used to override the name if it is different than what {{PAGENAME}} returns>
 |playcost       = <required>
 |plotcardnumber = <required>
 |plotdeck       = <required>
<includeonly>|section={{{section|synopsis}}}</includeonly>
 |text           = <optional, but highly recommended>
 |threatcost     = <required>
}}</onlyinclude>
Usage for a skill
<onlyinclude>{{Infobox card
 |archetype  = <required: Healer, Mage, Warrior, Scout>
 |cardtype   = Skill
 |expansion  = <required>
 |heroclass  = <required>
 |image      = <optional, only used when image to show has a different name than {{{name|}}}.png or {{PAGENAME}}.png
 |name       = <optional, used to override the name if it is different than what {{PAGENAME}} returns>
 |playcost   = <required>
<includeonly>|section={{{section|synopsis}}}</includeonly>
 |text       = <optional, but highly recommended>
 |xpcost     = <required>
}}</onlyinclude>
Usage for starting gear
<onlyinclude>{{Infobox card
 |archetype  = <required, Healer, Mage, Warrior, Scout>
 |cardtype   = Item
 |dice       = <required>
 |expansion  = <required>
 |heroclass  = <required>
 |image      = <optional, only used when image to show has a different name than {{{name|}}}.png or {{PAGENAME}}.png
 |name       = <optional, used to override the name if it is different than what {{PAGENAME}} returns>
 |range      = <optional, if applicable>
<includeonly>|section={{{section|synopsis}}}</includeonly>
 |text       = <optional, but highly recommended>
 |trait      = <optional, if applicable>
 |trait2     = <optional, if applicable>
 |worn       = <required>
}}</onlyinclude>
Usage for shop gear
<onlyinclude>{{Infobox card
 |act        = <required>
 |buy        = <required>
 |cardtype   = Item
 |dice       = <optional, if applicable>
 |expansion  = <required>
 |image      = <optional, only used when image to show has a different name than {{{name|}}}.png or {{PAGENAME}}.png
 |name       = <optional, used to override the name if it is different than what {{PAGENAME}} returns>
 |range      = <optional, if applicable>
<includeonly>|section={{{section|synopsis}}}</includeonly>
 |text       = <optional, but highly recommended>
 |trait      = <optional, if applicable>
 |trait2     = <optional, if applicable>
 |worn       = <required>
}}</onlyinclude>
Usage for Hero relics
<onlyinclude>{{Infobox card
 |cardtype         = Item
 |dice             = <optional, if applicable>
 |expansion        = <required>
 |image            = <optional, only used when image to show has a different name than {{{name|}}}.png or {{PAGENAME}}.png
 |name             = <optional, used to override the name if it is different than what {{PAGENAME}} returns>
 |questreward      = <required, link to the quest where the relic can be gained>
 |range            = <optional, if applicable>
 |reliccounterpart = <required>
<includeonly>|section={{{section|synopsis}}}</includeonly>
 |text             = <optional, but highly recommended>
 |trait            = <optional, if applicable>
 |trait2           = <optional, if applicable>
 |worn             = <optional, if applicable>
}}</onlyinclude>
Usage for Overlord relics
<onlyinclude>{{Infobox card
 |archetype        = <required> Overlord
 |cardtype         = Overlord Relic
 |expansion        = <required>
 |image            = <optional, only used when image to show has a different name than {{{name|}}}.png or {{PAGENAME}}.png
 |name             = <optional, used to override the name if it is different than what {{PAGENAME}} returns>
 |questreward      = <required, link to the quest where the relic can be gained>
 |reliccounterpart = <required>
<includeonly>|section={{{section|synopsis}}}</includeonly>
 |text             = <optional, but highly recommended>
}}</onlyinclude>