Difference between revisions of "Module:Rank/doc"

From Pandorabox
Jump to navigation Jump to search
(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 with 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.
+
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: 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