Difference between revisions of "Template:Boiler"

From Pathfinder Wiki
m (Jomegat moved page Template:NumberToLetter to Template:Boiler)
m (Jomegat moved page Template:Boiler to Template:Boiler)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<includeonly>{{#vardefine:a2t|a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t}}{{#vardefine:u2nn|u/v/w/x/y/z/aa/bb/cc/dd/ee/ff/gg/hh/ii/jj/kk/ll/mm/nn}}{{#vardefine:i2xx|i/ii/iii/iv/v/vi/vii/viii/ix/x/xi/xii/xiii/xiv/xv/xvi/xvii/xviii/xix/xx}}{{#vardefine:groupno|{{#expr:floor(({{{1}}}-1)/20)}}}}{{#vardefine:memberno|{{#expr:({{{1}}}-1)mod20+1}}}}{{#vardefine:alphabet|{{#switch:{{#var:groupno}}
+
<includeonly>{{{1}}}{{#if:{{{2|}}}
|0={{#var:a2t}}
+
|{{lc:{{#explode:a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/aa/bb/cc/dd/ee/ff/gg/hh/ii/jj/kk/ll/mm/nn/oo/pp/qq/rr/ss/tt/uu/vv/ww/xx/yy/zz|/ |{{#expr:{{{2}}}-1}}}}}}}}{{#if:{{{3|}}}
|1={{#var:u2nn}}
+
|{{lc:{{#explode:i/ii/iii/iv/v/vi/vii/viii/ix/x/xi/xii/xiii/xiv/xv/xvi/xvii/xviii/xix/xx|/|{{#expr:{{{3}}}-1}}}}}}}}</includeonly><noinclude>
|2={{#var:i2xx}}
+
Returns the boilerplate version of a requirement number given in numeric parts:
}}}}{{lc:{{#titleparts:{{#var:alphabet}}|1|{{#var:memberno}}}}}}</includeonly><noinclude>
 
Returns the letter associated with the numeric argument.
 
  
*1-26 yeilds a-z
+
*<nowiki>{{</nowiki>{{PAGENAME}}|12|3|8}}&rarr;{{{{FULLPAGENAME}}|12|3|8}}
*27-40 yields aa-nn
 
*41-60 yields roman numerals i-xx
 
<nowiki>{{</nowiki>{{PAGENAME}}|59}}
 
 
 
{{{{FULLPAGENAME}}|59}}
 
  
 
</noinclude>
 
</noinclude>

Latest revision as of 02:51, 6 March 2021

Returns the boilerplate version of a requirement number given in numeric parts:

  • {{Boiler|12|3|8}}→12cviii