见 Terraria Wiki:项目/1.4.5 获取 wiki 状态与更新指南
Template:Buffduration
This template displays a standardized sentence with the duration of a buff along with the methods to cancel the buff on the different game platforms.
Usage
{{ buffduration | <buff duration> | eversions = no/<page name> | nomaintext = y/yes }}
- First unnamed parameter
Duration of the buff, preferably using the {{duration}} template. If omitted, the template will attempt to determine the buff duration automatically via {{iteminfo}}.
- eversions
Disables the automatic exclusivity discovery if set to no. Otherwise, uses the specified page name (if set) as a base for the exclusivity discovery. See below for a detailed description.
- nomaintext
Suppresses the display of the first part of the text. Therefore, the first unnamed parameter has no effect if this parameter is set.
Game platforms
The standard behavior of the template is to display information about how to cancel the buff on all different platforms. This is not always sensible, as some buffs are not available on all game platforms.
The template takes these steps to determine the proper game platforms for which the info should be displayed:
- Assume the buff is available on all platforms. Display the info for all platforms.
- If the page is a mainspace page with a corresponding Legacy page, then do not display the legacy platforms (as those belong on the Legacy counterpart page).
Similarly, if the page is a Legacy page with a corresponding mainspace page, then do not display the modern platforms.- For example, the page Gills Potion has a corresponding Legacy page (Legacy:Gills Potion). Display only the modern platforms on the page Gills Potion and only the legacy platforms on the page Legacy:Gills Potion.
- Check if the buff item is exclusive to any platforms via {{eversions}}. If so, disregard the previous steps and display the info for the platforms reported by {{eversions}}.
- For example, the Bewitching Table is exclusive to
desktop/console/mobile. Only display the info for those platforms on that page.
- For example, the Bewitching Table is exclusive to
These heuristics can be overridden manually:
|eversions=nodisables the exclusivity check (step 3).- For example, the transclusion
{{buffduration|eversions=no}}on the page Bewitching Table would display the info for all platforms (provided that no Legacy counterpart exists for the page – step 2).
- For example, the transclusion
|eversions=<entity>displays the info for the exact platforms that the specified entity is available on.- For example, the transclusion
{{buffduration|eversions=Moon Lord}}on any page would display the info fordesktop/console/mobile, i.e. exactly the platforms that the Moon Lord is available on.
- For example, the transclusion
- Finally, each platform can forcibly be displayed or hidden via individual parameters (
desktop=yes/no,console=yes/no,old-gen=yes/no,mobile=yes/no,3ds=yes/no). This always takes precedence over everything else.