Difference between revisions of "Module:Rank/doc"
(Created page with "This is a module to make getting ranks out of XP values easier. == toRank == You can do <pre>{{#invoke:Rank|toRank|<xp value>|[<options>]}}</pre> to generate a rank. The opti...") |
m (typo) |
||
Line 7: | Line 7: | ||
=== Options === | === Options === | ||
− | The options are a string | + | The options are a string of 1 to 3 width, consisting entirely out of "y" (denoting yes) and "n" (denoting no) characters. The first character controls whether the icon appears, the second controls whether the major rank appears, and the last character controls whether the minor rank appears. For any ommited or invalid characters, the default of "yyy" is used. |
Latest revision as of 06:45, 10 April 2024
This is a module to make getting ranks out of XP values easier.
toRank
You can do
{{#invoke:Rank|toRank|<xp value>|[<options>]}}
to generate a rank. The options are not required, but they allow some customization.
Example: Cobble God -> rank with 1234 xp
Options
The options are a string of 1 to 3 width, consisting entirely out of "y" (denoting yes) and "n" (denoting no) characters. The first character controls whether the icon appears, the second controls whether the major rank appears, and the last character controls whether the minor rank appears. For any ommited or invalid characters, the default of "yyy" is used.
Example: Gold Peasant -> rank with 314159 xp, and no icon (options are n
, but effectively is nyy
)
Example: -> rank with 123456 xp, but only icon (options are ynn
)
Example: Lord -> rank with 44444 xp, but no major rank (options are yn
, but effectively is yny
)
toMajorRank
You can do
{{#invoke:Rank|toMajorRank|<xp value>}}
to generate a rank without a minor rank. This is only used as an alias to
{{#invoke:Rank|toRank|<xp value>|yyn}}
Example: Uranium -> rank with 17363925 xp, icon and major only