Template:Cost/doc
Werothegreat (Talk | contribs) |
(Switching Template:Cost's documentation for a new version.) |
||
Line 1: | Line 1: | ||
− | This template allows translating text cost into graphical cost | + | {{Large Edits|to clean up its wikitext, fix issues, and add new functionality.}} |
+ | This template allows translating text cost into graphical cost. | ||
==Usage== | ==Usage== | ||
Line 17: | Line 18: | ||
* <tt><nowiki>{{Cost|6P|l|8}}</nowiki> → {{Cost|6P|l|8}}</tt> | * <tt><nowiki>{{Cost|6P|l|8}}</nowiki> → {{Cost|6P|l|8}}</tt> | ||
* <tt><nowiki>{{Cost|5|xl}}</nowiki> → {{Cost|5|xl}}</tt> | * <tt><nowiki>{{Cost|5|xl}}</nowiki> → {{Cost|5|xl}}</tt> | ||
+ | |||
+ | ==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.<br/> | ||
+ | Henceforth, any instances of the "P" syntax found should be replaced with the respective parameterized syntax. | ||
+ | * <tt><nowiki>{{Cost|6P}}</nowiki> → <nowiki>{{Cost|6|||P}}</nowiki></tt> | ||
+ | * <tt><nowiki>{{Cost|6P||8}}</nowiki> → <nowiki>{{Cost|6||8|P}}</nowiki></tt> | ||
+ | * <tt><nowiki>{{Cost|P|l}}</nowiki> → <nowiki>{{Cost||l||P}}</nowiki></tt> | ||
+ | * <tt><nowiki>{{Cost|6P|l|8}}</nowiki> → <nowiki>{{Cost|6|l|8|P}}</nowiki></tt> | ||
+ | |||
+ | If an instance of <tt><nowiki>{{Cost}}</nowiki></tt> uses the "P" syntax, it will display the following warning.<br/><p style="color:red; display:inline;"><b>[Warning: This Cost Template uses the old "P" syntax, please convert it to the [[Template:Cost#New_Syntax|new parameterized syntax]].]</b></p><p>An instance of the "P" syntax will also file the page it is in under the category titled {{Category:Pages with old "P" syntax}}.</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. | ||
+ | * <tt><nowiki>{{Cost|-|||P}}</nowiki> → {{Cost|-|||P}}</tt> | ||
+ | * <tt><nowiki>{{Cost|||-|P}}</nowiki> → {{Cost|||-|P}}</tt> | ||
+ | * <tt><nowiki>{{Cost|-||-}}</nowiki> → {{Cost|-||-}}</tt> | ||
+ | * <tt><nowiki>{{Cost|-||-|P}}</nowiki> → {{Cost|-||-|P}}</tt> |
Revision as of 01:02, 10 June 2024
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}}
[Warning: This Cost Template uses the old "P" syntax, please convert it to the new parameterized syntax.]
An instance of the "P" syntax will also file the page it is in under the category titled All the articles that contain the old "P" syntax for Template:Cost on the Dominion Wiki..
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}} →