Module:Cards/doc: Difference between revisions

From Wildfrost Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 13: Line 13:
Returns a table based on the given paramenters.
Returns a table based on the given paramenters.
<code><entry></code> is either a card name or type.<br>
<code><entry></code> is either a card name or type.<br>
Types include: <code>Boss Pet NonPetCompanion Companion Item Shade Clunker EnemyClunker Enemy Miniboss Boss ShopItem</code>
Types include: <code>Boss Pet NonPetCompanion Companion Item Shade Clunker EnemyClunker Enemy Miniboss Boss ShopItem InventorsHut HotSpring</code>


<code><entry_list></code> is a list of valid <code><entry></code> values, input as multiple parameters, i.e. <code><entry1>|<entry2>|... etc.</code>.
<code><entry_list></code> is a list of valid <code><entry></code> values, input as multiple parameters, i.e. <code><entry1>|<entry2>|... etc.</code>.


<code><header_list></code> is a list of valid stats, input as multiple parameters, i.e. <code><stat1>|<stat2>|... etc.</code>.<br>
<code><header_list></code> is a list of valid stats, input as multiple parameters, i.e. <code><stat1>|<stat2>|... etc.</code>.<br>
Stats include: <code>name health scrap attack counter other desc summoncon tribes price</code>  
Stats include: <code>name health scrap attack counter other desc summoncon tribes price challenge</code>  


The first usage option is used when only 1 entry is needed, e.g. the only entry is a type category. Otherwise, use the second option.
The first usage option is used when only 1 entry is needed, e.g. the only entry is a type category. Otherwise, use the second option.
If <code>challenge</code> is among the header stats, the table will be sorted based off the entry's <code>ChallengeOrder</code> value, if it exists.


==CardInfobox==
==CardInfobox==
Line 36: Line 38:
Returns a list of links for cards of a certain type, for use in [[Template:NavboxCards]].
Returns a list of links for cards of a certain type, for use in [[Template:NavboxCards]].


possible values for <code><type></code>: <code>Boss Pet NonPetCompanion Companion Item Shade Clunker EnemyClunker Enemy Miniboss Boss ShopItem</code>
suggested values for <code><type></code>: <code>Boss Pet NonPetCompanion Item Shade Clunker EnemyClunker Enemy Miniboss Boss</code>

Revision as of 18:24, 12 February 2024

To edit card information, see Module:Cards/data

GetStat

Usage: {{#invoke:Cards|GetStat|<card>|<stat>}}

Returns the respective stat of the card.
Possible values for <stat>: name health scrap attack counter other desc summoncon tribes price challenge

Table

Usage: {{#invoke:Cards|Table|<entry>|<header_list>}} OR
{{#invoke:Cards|Table|<entry_list>|*|<header_list>}}

Returns a table based on the given paramenters. <entry> is either a card name or type.
Types include: Boss Pet NonPetCompanion Companion Item Shade Clunker EnemyClunker Enemy Miniboss Boss ShopItem InventorsHut HotSpring

<entry_list> is a list of valid <entry> values, input as multiple parameters, i.e. <entry1>|<entry2>|... etc..

<header_list> is a list of valid stats, input as multiple parameters, i.e. <stat1>|<stat2>|... etc..
Stats include: name health scrap attack counter other desc summoncon tribes price challenge

The first usage option is used when only 1 entry is needed, e.g. the only entry is a type category. Otherwise, use the second option.

If challenge is among the header stats, the table will be sorted based off the entry's ChallengeOrder value, if it exists.

CardInfobox

Usage: {{#invoke:Cards|CardInfobox|<card>|<template_params>}}

Returns the infobox of the card.

<template_params> is a list of template parameters input as multiple parameters, i.e. <p1>=<data1>|<p2>=<data2>|... etc.. These parameters are the same parameters used by Template:Infobox. Parameters without inputs are autofilled with fitting module data, to the best of its ability.

NavBoxSection

Usage: {{#invoke:Cards|NavBoxSection|<type>}}

Returns a list of links for cards of a certain type, for use in Template:NavboxCards.

suggested values for <type>: Boss Pet NonPetCompanion Item Shade Clunker EnemyClunker Enemy Miniboss Boss