Difference between revisions of "Template:Comfort Quality Table"

From RimWorld Wiki
Jump to navigation Jump to search
m
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><div><li style="display: inline-table;">{{#vardefine: name | {{{1|{{PAGENAME}}}}} }}{{#vardefine: basecomfort | {{Q|{{#var: name}}|Comfort Base}}}}
+
<includeonly><!--
{| {{STDT| sortable c_15 text-center}}
+
 
! [[Quality]]
+
VARIABLES
!data-sort-type="number"| Awful
+
-->{{#vardefine:name       | {{{1| {{PAGENAME}} }}} }}<!--
!data-sort-type="number"| Poor
+
-->{{#vardefine:basecomfort | {{Q|{{#var:name}}|Comfort Base}} }}<!--
!data-sort-type="number"| Normal
+
-->{{#vardefine:hasQuality  | {{Q|{{#var:name}}|Has Quality}} }}<!--
!data-sort-type="number"| Good
+
-->{{#vardefine:facility    | {{Q|{{#var:name}}|Facility}} }}<!--
!data-sort-type="number"| Excellent
+
 
!data-sort-type="number"| Masterwork
+
TABLE
!data-sort-type="number"| Legendary
+
--><div><li style="display:inline-table;">
 +
{| {{STDT|c_15 text-center}}
 +
{{#ifeq: {{#var:hasQuality}} | true |
 +
  ! [[Quality]]
 +
  ! Awful
 +
  ! Poor
 +
  ! Normal
 +
  ! Good
 +
  ! Excellent
 +
  ! Masterwork
 +
  ! Legendary
 +
| ! colspan="2" {{!}} {{#var:name}} }}
 
|-
 
|-
![[Comfort]]
+
! [[Comfort]]
| {{#expr:{{#var:basecomfort}}*0.76 round 2}}
+
{{#ifeq: {{#var:hasQuality}} | true |
| {{#expr:{{#var:basecomfort}}*0.88 round 2}}
+
  {{!}} {{%|{{#var:basecomfort}}*0.76|0}}
| {{#expr:{{#var:basecomfort}}*1.00 round 2}}  
+
  {{!}} {{%|{{#var:basecomfort}}*0.88|0}}
| {{#expr:{{#var:basecomfort}}*1.12 round 2}}
+
  {{!}} {{%|{{#var:basecomfort}}    |0}}
| {{#expr:{{#var:basecomfort}}*1.24 round 2}}
+
  {{!}} {{%|{{#var:basecomfort}}*1.12|0}}
| {{#expr:{{#var:basecomfort}}*1.45 round 2}}
+
  {{!}} {{%|{{#var:basecomfort}}*1.24|0}}
| {{#expr:{{#var:basecomfort}}*1.70 round 2}}
+
  {{!}} {{%|{{#var:basecomfort}}*1.45|0}}
|-
+
  {{!}} {{%|{{#var:basecomfort}}*1.7 |0}}
{{#if: {{#pos:{{Q|{{#var: name}}|Facility}}|End table}}|
+
| {{!}} {{%|{{#var:basecomfort}}    |0}} }}
<th><small>+ End Table & Dresser</small>
+
{{#if: {{#pos:{{#var:facility}}|End table}} |
<td> {{#expr:({{#var:basecomfort}}+0.1)*0.76 round 2}}
+
<tr>
<td> {{#expr:({{#var:basecomfort}}+0.1)*0.88 round 2}}
+
! <small>+ End Table</small>
<td> {{#expr:({{#var:basecomfort}}+0.1)*1.00 round 2}}  
+
{{#ifeq: {{#var:hasQuality}} | true |
<td> {{#expr:({{#var:basecomfort}}+0.1)*1.12 round 2}}
+
  {{!}} {{%|({{#var:basecomfort}}+0.05)*0.76|0}}
<td> {{#expr:({{#var:basecomfort}}+0.1)*1.24 round 2}}
+
  {{!}} {{%|({{#var:basecomfort}}+0.05)*0.88|0}}
<td> {{#expr:({{#var:basecomfort}}+0.1)*1.45 round 2}}
+
  {{!}} {{%| {{#var:basecomfort}}+0.05      |0}}
<td> {{#expr:({{#var:basecomfort}}+0.1)*1.70 round 2}}
+
  {{!}} {{%|({{#var:basecomfort}}+0.05)*1.12|0}}
}}
+
  {{!}} {{%|({{#var:basecomfort}}+0.05)*1.24|0}}
 +
  {{!}} {{%|({{#var:basecomfort}}+0.05)*1.45|0}}
 +
  {{!}} {{%|({{#var:basecomfort}}+0.05)*1.7 |0}}
 +
| {{!}} {{%| {{#var:basecomfort}}+0.05      |0}} }}
 +
</tr>
 +
}} {{#if: {{#pos:{{#var:facility}}|Dresser}} |
 +
<tr>
 +
! <small>+ Dresser</small>
 +
{{#ifeq: {{#var:hasQuality}} | true |
 +
  {{!}} {{%|({{#var:basecomfort}}+0.05)*0.76|0}}
 +
  {{!}} {{%|({{#var:basecomfort}}+0.05)*0.88|0}}
 +
  {{!}} {{%| {{#var:basecomfort}}+0.05      |0}}
 +
  {{!}} {{%|({{#var:basecomfort}}+0.05)*1.12|0}}
 +
  {{!}} {{%|({{#var:basecomfort}}+0.05)*1.24|0}}
 +
  {{!}} {{%|({{#var:basecomfort}}+0.05)*1.45|0}}
 +
  {{!}} {{%|({{#var:basecomfort}}+0.05)*1.7 |0}}
 +
| {{!}} {{%| {{#var:basecomfort}}+0.05      |0}} }}
 +
</tr>
 +
}} {{#if: {{#pos:{{#var:facility}}|End table}} | {{#if: {{#pos:{{#var:facility}}|Dresser}} |
 +
<tr>
 +
! <small>+ End Table & Dresser</small>
 +
{{#ifeq: {{#var:hasQuality}} | true |
 +
  {{!}} {{%|({{#var:basecomfort}}+0.1)*0.76|0}}
 +
  {{!}} {{%|({{#var:basecomfort}}+0.1)*0.88|0}}
 +
  {{!}} {{%| {{#var:basecomfort}}+0.1     |0}}
 +
  {{!}} {{%|({{#var:basecomfort}}+0.1)*1.12|0}}
 +
  {{!}} {{%|({{#var:basecomfort}}+0.1)*1.24|0}}
 +
  {{!}} {{%|({{#var:basecomfort}}+0.1)*1.45|0}}
 +
  {{!}} {{%|({{#var:basecomfort}}+0.1)*1.7 |0}}
 +
| {{!}} {{%| {{#var:basecomfort}}+0.1      |0}} }}
 +
</tr>
 +
}} }}
 
|}
 
|}
</li><div></includeonly><noinclude>
+
</li></div></includeonly><noinclude>
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 10:26, 16 December 2023

Documentation icon Template documentation[view] [edit] [history] [purge]

This template generates a table summarizing the comfort for each quality tier. If the object in question is has the end table and dresser as facilities, it will add a row to that effect.

Parameters[edit]

The first parameter, if present, will specify which object to generate the template for. If absent, {{PAGENAME}} will be used.

Example usage[edit]

{{Comfort Quality Table}}

On the Bed page produces:

  • Quality Awful Poor Normal Good Excellent Masterwork Legendary
    Comfort 57% 66% 75% 84% 93% 109% 128%
    + End Table 61% 70% 80% 90% 99% 116% 136%
    + Dresser 61% 70% 80% 90% 99% 116% 136%
    + End Table & Dresser 65% 75% 85% 95% 105% 123% 145%
  • {{Comfort Quality Table | Armchair}}

    Produces:

  • Quality Awful Poor Normal Good Excellent Masterwork Legendary
    Comfort 61% 70% 80% 90% 99% 116% 136%