Template:Card/doc: Difference between revisions

From Coral Island Wiki
Jump to navigation Jump to search
(Created page with "{{Lua}} Returns a card based on the input. ==Syntax== {{T|Card|v1=filename|v2=size=image size|v3=link=mage link|v4=q=item quality|v5=note=appended note|v6=x=item amount|v7=ext=file extension}} ==Examples== *{{T|Card|Carrot|30|Crops|_Ybr_=1}} *{{T|Card|Carrot|30|Crops|mini=1|_Ybr_=1}} *{{T|Card|Carrot|p2=link=Carrot|show_caption=1|_Ybr_=1}} *{{T|Card|Carrot|q=1|_Ybr_=1}} *{{T|Card|Carrot|p2=text=blue carrot|q=4|x=5|note=this is not a potato|_Ybr_=1}} ==Template Data==...")
 
No edit summary
 
Line 73: Line 73:
"label": "Card caption",
"label": "Card caption",
"description": "Show default card caption",
"description": "Show default card caption",
"type": "boolean"
},
"mini": {
"label": "Mini card",
"description": "Mini version of card",
"example": "1",
"type": "boolean"
"type": "boolean"
}
}
Line 86: Line 92:
"ext",
"ext",
"text",
"text",
"show_caption"
"show_caption",
"mini"
]
]
}</templatedata>
}</templatedata>

Latest revision as of 03:39, 18 January 2024

Lua logo.png
This template uses Module:Card (edit|hist), a script written in Lua.

Returns a card based on the input.

Syntax

{{Card|filename|size = image size|link = mage link|q = item quality|note = appended note|x = item amount|ext = file extension}}

Examples

  • {{Card|Carrot|30|Crops}} yields:
    Carrot.png
    30

    Crops
  • {{Card|Carrot|30|Crops|mini = 1}} yields:
    Carrot.png
    30

    Crops
  • {{Card|Carrot|link = Carrot|show_caption = 1}} yields:
  • {{Card|Carrot|q = 1}} yields:
    Carrot.png
  • {{Card|Carrot|text = blue carrot|q = 4|note = this is not a potato|x = 5}} yields:
    Carrot.png
    5

    blue carrot
    (this is not a potato)

Template Data

Template to automate and standardize formatting of icons.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Card1 name

Item or character name

Stringrequired
Qualityq

Item's quality, accepted values are "1" or "bronze", "2" or "silver", "3" or "gold", and "4" or "osmium"

Stringsuggested
Amount2 x amount

Amount of items

Example
1656846
Numbersuggested
Linklink

Link of a page

Stringoptional
Notenote

Text appended inside parenthesis

Stringsuggested
Extensionext

File extension if not "png"

Default
png
Example
jpg
Stringoptional
Caption texttext 3

Card caption's custom text

Example
Potato
Stringsuggested
Card captionshow_caption

Show default card caption

Booleanoptional
Mini cardmini

Mini version of card

Example
1
Booleanoptional