Announcing changes to how Gain templates work
Update 30 December 2021
{{Increase}} and {{Item Gain}} now are wrappers for {{Gain}}, and editors are encouraged to only use {{Gain}} when creating new pages. At some point in the future a bot will replace all uses of {{Increase}} and {{Item Gain}}, after which they'll be deprecated.
Original text
Hi everybody, today I'm pleased to announce a major change in how the gain templates work.
Right now there are three major templates responsible for documenting gains: {{Gain}}, {{Item Gain}}, and {{Increase}}. Over the past few weeks I've put in some work to consolidate these three into one template, which can now be viewed at User:Asarta/Gain. This template uses SMW to autoselect which of the templates it needs, meaning you can now use a single template for item gain, pyramidal qualities gain, and discrete qualities gain. As part of this I have also standardised the parameters of each of these, which means there is now one set of parameters (included below).
As I said before a demo version is live now at User:Asarta/Gain and can be used to test the new template; a few test cases are at User:Asarta/Sandbox.
Barring any major bugs I'll implement this in the current life template tomorrow; while at first I'll alias the old ones to the new ones expect {{Item Gain}} and {{Increase}} to be deleted at some point ({{Gain}} of course will be where the new templates lives).
Parameter list
- image, this parameter is used to set a custom image. Its value is the image name to be used, including the .png postfix but without the File: prefix. Please note that this should be the small version of the file (so ending in small.png). Also note that this will now only apply to the image at the front; changing the image of later {{IL}}'s is no longer supported.
- {{{1}}}, ie the first unnamed parameter defines the quality or item that is being increased, with its value being the full pagename of this quality.
- {{{2}}}, ie the second unnamed parameter defines the amount by which the first unnamed parameter. Its value is the numerical increase, including either the x or the CP postfix. Do not use this template if one of the following two parameters are used.
- occurence, this parameter is used when the quality change starts with An occurence. Its value is the new numerical value of the quality. Note that some of the templates allowed the use of |occurence=yes with the |now parameter having the numerical value, but that this behavior is now deprecated.
- to, this parameter is used when the quality change looks like x has increased to y. Its value is the new numerical value of the quality.
- message, this parameter is used to define a custom message for the quality/item increase. Note that this will not work if either occurence or to are set.
- now, this parameter is used to when the action sets a quality/item to a specific level, but doesn't use either occurence or now. Note that unlike those {{{2}}} and {{{message}}} do work with this one.
- hidden, this parameter is used to define whether the change is hidden or not. If the change is hidden set this to yes, otherwise don't include it.
- nocat, this parameter is used to disable categorisation. If set to yes it will not include Category:X Gain, otherwise don't include it. Note that the SMW Property:Gains will always be set.
- Cap, if a action can only raise a quality/item to a specified amount set this parameter to that value.
- Note: global caps (such as 15 on notability, are automatically included by the template.