User:FCSplayz/sandbox/4: Difference between revisions
< User:FCSplayz | sandbox
No edit summary |
Testing |
||
Line 4: | Line 4: | ||
{{#iferror:{{#expr:{{#switch:{{{1|}}}|X=1|x=1|?=2|{{{1|}}}}}}}|{{#ifeq:{{padleft:|2|{{{1|}}}}}|{{{1|}}}|{{padleft:|1|{{{1|}}}}}|{{padleft:|2|{{{1|}}}}}}}|{{{1|}}}}} | {{#iferror:{{#expr:{{#switch:{{{1|}}}|X=1|x=1|?=2|{{{1|}}}}}}}|{{#ifeq:{{padleft:|2|{{{1|}}}}}|{{{1|}}}|{{padleft:|1|{{{1|}}}}}|{{padleft:|2|{{{1|}}}}}}}|{{{1|}}}}} | ||
{{#iferror:{{#expr:{{#switch:{{{1|}}}|X=1|x=1|?=2|{{{1|}}}}}}}|{{#ifeq:{{padleft:|2|{{{1|}}}}}|{{{1|}}}|{{padleft:|1|{{{1|}}}}}|{{padleft:|2|{{{1|}}}}}}}|{{#ifeq:{{{1|}}}|-||{{{1|}}}}}}} | {{#iferror:{{#expr:{{#switch:{{{1|}}}|X=1|x=1|?=2|{{{1|}}}}}}}|{{#ifeq:{{padleft:|2|{{{1|}}}}}|{{{1|}}}|{{padleft:|1|{{{1|}}}}}|{{padleft:|2|{{{1|}}}}}}}|{{#ifeq:{{{1|}}}|--||{{{1|}}}}}}} |
Revision as of 21:43, 5 June 2024
Template documentation [edit]
This template allows translating text cost into graphical cost.
Usage
- {{Cost}} →
- {{Cost|3}} →
- {{Cost|0*}} →
- {{Cost|?}} →
- {{Cost|x}} →
- {{Cost|P}} →
- {{Cost|6P}} →
- {{Cost|||8}} →
- {{Cost|6||8}} →
- {{Cost|6P||8}} →
- {{Cost|5|l}} →
- {{Cost|P|l}} →
- {{Cost||l|8}} →
- {{Cost|6P|l|8}} →
- {{Cost|5|xl}} →
New Syntax
The old "P" syntax where P is found within the first parameter is being made obsolete in lieu of the new parameterized syntax where the P is separated into a new fourth parameter.
Henceforth, any instances of the "P" syntax found should be replaced with the respective parameterized syntax.
- {{Cost|6P}} → {{Cost|6|||P}}
- {{Cost|6P||8}} → {{Cost|6||8|P}}
- {{Cost|P|l}} → {{Cost||l||P}}
- {{Cost|6P|l|8}} → {{Cost|6|l|8|P}}
The syntactical changes also allow for new functionality with the ability to put "-" in the Coin and Debt parameters, allowing the empty Coin and Debt images to be displayed.
- {{Cost|-|||P}} →
- {{Cost|||-|P}} →
- {{Cost|-||-}} →
- {{Cost|-||-|P}} →