v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Difference between revisions of "Template:PVm"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
m
m (might need some help here)
Line 1: Line 1:
<includeonly>{{#ifexpr: 1 > (( {{{1}}} / 100 ) - ( floor ( {{{1}}} / 100 )) *2 ) | {{Raw Tile|■|#bb0}} }}</includeonly>
+
<includeonly>
 +
{{#switch:{{#expr:floor({{{1}}}/100)}}
 +
|100={{Raw Tile|■|0:0:1}}
 +
{{#ifexpr: 1 > (({{{1}}}/100)-({{#expr:floor({{{1}}}/100)}}*2)) | {{Raw Tile|■|#bb0}} }}
 +
</includeonly>
 
<noinclude>
 
<noinclude>
 
{{PVm|650}}
 
{{PVm|650}}

Revision as of 23:59, 9 April 2011


{{#switch:6 |100=



<span title="(pet value)"> {{Raw Tile|(■ * (floor (pet value / 100)))|0:0:1}} {{Raw Tile|(■ * (1 if pet value / 100 = non-integer, 0 if not))|#bb0}} {{Raw Tile|(■ * (100 - ((floor (pet value / 100)) + (1 if pet value / 100 = non-integer, 0 if not)))|6:0:1}} </span>

Pet value = x
{{PVm|x}} = cool output


Ex:

Pet value = 650 -> {{PVm|650}}
Pet value = 2500 -> {{PVm|2500}}
Pet value = 10000 -> {{PVm|10000}}

Name? Pet Value
Template:L 650 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
Template:L 2500 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
Template:L 10000 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■

100 tiles, each representing 100 pet value.
= not filled
= not completely filled
= completely filled