Module:Rank/doc

From Pandorabox
< Module:Rank
Revision as of 06:45, 10 April 2024 by Birdlover32767 (talk | contribs) (typo)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This is the documentation page for Module:Rank

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: Xp cobble.png 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: Xp copper block.png -> rank with 123456 xp, but only icon (options are ynn)

Example: Xp steel block.png 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: Xp uranium.png Uranium -> rank with 17363925 xp, icon and major only