Difference between revisions of "Template:Comfort Quality Table"

From RimWorld Wiki
Jump to navigation Jump to search
(more details)
Line 1: Line 1:
<includeonly><div><li style="display: inline-table;">{{#vardefine: name | {{{1|{{PAGENAME}}}}} }}{{#vardefine: basecomfort | {{Q|{{#var: name}}|Comfort Base}}}}
+
<includeonly><div><li style="display: inline-table;">
 
{| {{STDT| sortable c_15 text-center}}
 
{| {{STDT| sortable c_15 text-center}}
 
! [[Quality]]
 
! [[Quality]]
!data-sort-type="number"| Awful
+
! Awful
!data-sort-type="number"| Poor
+
! Poor
!data-sort-type="number"| Normal
+
! Normal
!data-sort-type="number"| Good
+
! Good
!data-sort-type="number"| Excellent
+
! Excellent
!data-sort-type="number"| Masterwork
+
! Masterwork
!data-sort-type="number"| Legendary
+
! Legendary
 
|-
 
|-
![[Comfort]]
+
! [[Comfort]]
| {{#expr:{{#var:basecomfort}}*0.76 round 2}}
+
| {{#expr:{{#vardefineecho:basecomfort | {{Q|{{#vardefineecho:name | {{{1|{{PAGENAME}} }}} }}|Comfort Base}} }}*0.76 round 2}}
 
| {{#expr:{{#var:basecomfort}}*0.88 round 2}}
 
| {{#expr:{{#var:basecomfort}}*0.88 round 2}}
 
| {{#expr:{{#var:basecomfort}}*1.00 round 2}}  
 
| {{#expr:{{#var:basecomfort}}*1.00 round 2}}  
Line 18: Line 18:
 
| {{#expr:{{#var:basecomfort}}*1.45 round 2}}
 
| {{#expr:{{#var:basecomfort}}*1.45 round 2}}
 
| {{#expr:{{#var:basecomfort}}*1.70 round 2}}
 
| {{#expr:{{#var:basecomfort}}*1.70 round 2}}
|-
+
{{#if: {{#pos:{{#vardefineecho:facility | {{Q|{{#var:name}}|Facility}} }}|End table}} |
{{#if: {{#pos:{{Q|{{#var: name}}|Facility}}|End table}}|
+
  <tr>
<th><small>+ End Table & Dresser</small>
+
  ! <small>+ End Table</small>
<td> {{#expr:({{#var:basecomfort}}+0.1)*0.76 round 2}}
+
  {{!}} {{#expr:({{#var:basecomfort}}+0.05)*0.76 round 2}}
<td> {{#expr:({{#var:basecomfort}}+0.1)*0.88 round 2}}
+
  {{!}} {{#expr:({{#var:basecomfort}}+0.05)*0.88 round 2}}
<td> {{#expr:({{#var:basecomfort}}+0.1)*1.00 round 2}}  
+
  {{!}} {{#expr:({{#var:basecomfort}}+0.05)*1.00 round 2}}
<td> {{#expr:({{#var:basecomfort}}+0.1)*1.12 round 2}}
+
  {{!}} {{#expr:({{#var:basecomfort}}+0.05)*1.12 round 2}}
<td> {{#expr:({{#var:basecomfort}}+0.1)*1.24 round 2}}
+
  {{!}} {{#expr:({{#var:basecomfort}}+0.05)*1.24 round 2}}
<td> {{#expr:({{#var:basecomfort}}+0.1)*1.45 round 2}}
+
  {{!}} {{#expr:({{#var:basecomfort}}+0.05)*1.45 round 2}}
<td> {{#expr:({{#var:basecomfort}}+0.1)*1.70 round 2}}
+
  {{!}} {{#expr:({{#var:basecomfort}}+0.05)*1.70 round 2}}
}}
+
  </tr>
 +
}} {{#if: {{#pos:{{#var:facility}}|Dresser}} |
 +
  <tr>
 +
  ! <small>+ Dresser</small>
 +
  {{!}} {{#expr:({{#var:basecomfort}}+0.05)*0.76 round 2}}
 +
  {{!}} {{#expr:({{#var:basecomfort}}+0.05)*0.88 round 2}}
 +
  {{!}} {{#expr:({{#var:basecomfort}}+0.05)*1.00 round 2}}
 +
  {{!}} {{#expr:({{#var:basecomfort}}+0.05)*1.12 round 2}}
 +
  {{!}} {{#expr:({{#var:basecomfort}}+0.05)*1.24 round 2}}
 +
  {{!}} {{#expr:({{#var:basecomfort}}+0.05)*1.45 round 2}}
 +
  {{!}} {{#expr:({{#var:basecomfort}}+0.05)*1.70 round 2}}
 +
  </tr>
 +
}} {{#if: {{#pos:{{#var:facility}}|End table}} | {{#if: {{#pos:{{#var:facility}}|Dresser}} |
 +
  <tr>
 +
  ! <small>+ End Table & Dresser</small>
 +
  {{!}} {{#expr:({{#var:basecomfort}}+0.1)*0.76 round 2}}
 +
  {{!}} {{#expr:({{#var:basecomfort}}+0.1)*0.88 round 2}}
 +
  {{!}} {{#expr:({{#var:basecomfort}}+0.1)*1.00 round 2}}  
 +
  {{!}} {{#expr:({{#var:basecomfort}}+0.1)*1.12 round 2}}
 +
  {{!}} {{#expr:({{#var:basecomfort}}+0.1)*1.24 round 2}}
 +
  {{!}} {{#expr:({{#var:basecomfort}}+0.1)*1.45 round 2}}
 +
  {{!}} {{#expr:({{#var:basecomfort}}+0.1)*1.70 round 2}}
 +
  </tr>
 +
}} }}
 
|}
 
|}
</li><div></includeonly><noinclude>
+
</li></div></includeonly><noinclude>
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 09:42, 27 November 2022

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

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

Example usage

{{Comfort Quality Table}}

On the Bed page produces:

  • Quality Awful Poor Normal Good Excellent Masterwork Legendary
    Comfort 0.57 0.66 0.75 0.84 0.93 1.09 1.28
    + End Table 0.61 0.7 0.8 0.9 0.99 1.16 1.36
    + Dresser 0.61 0.7 0.8 0.9 0.99 1.16 1.36
    + End Table & Dresser 0.65 0.75 0.85 0.95 1.05 1.23 1.45
  • {{Comfort Quality Table | Armchair}}

    Produces:

  • Quality Awful Poor Normal Good Excellent Masterwork Legendary
    Comfort 0.61 0.7 0.8 0.9 0.99 1.16 1.36