Difference between revisions of "Template:Rest Effectiveness Quality Table"

From RimWorld Wiki
Jump to navigation Jump to search
(context was lost when sorted. Simplification)
Line 1: Line 1:
<includeonly><div><li style="display: inline-table;">{{#vardefine: name | {{{1|{{PAGENAME}}}}} }}{{#vardefine: baseresteffectiveness | {{Q|{{#var: name}}|Rest Effectiveness}}}}
+
<includeonly><div><li style="display: inline-table;">{{#vardefine:restRate|{{#expr:(((1/(150/60000)*(24/10.5<!-- is 10.5 really a constant? -->))*150)/2500)}} }}<!-- See [[Rest#Positive]] for an explanation of the formula -->
 
{| {{STDT| sortable c_08 text-center}}
 
{| {{STDT| sortable c_08 text-center}}
! {{#if: {{#pos:{{Q|{{#var: name}}|Stuff Tags}}|Stony}}|Material|Quality}}
+
! {{#if: {{#pos:{{Q|{{#vardefineecho:name | {{{1|{{PAGENAME}} }}} }}|Stuff Tags}}|Stony}}|Material|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
 
|-
 
|-
! {{#if: {{#pos:{{Q|{{#var: name}}|Stuff Tags}}|Stony}}|Non-Stone and Jade|[[Rest effectiveness]]}}
+
! {{#if: {{#vardefineecho: stony | {{#pos:{{Q|{{#var: name}}|Stuff Tags}}|Stony}} }}|Non-Stone and Jade|[[Rest effectiveness]]}}
| {{#expr:{{#var:baseresteffectiveness}}*0.86*100 round 0}}% ({{#expr:(((1/0.005714286)*150)/2500)/({{#var:baseresteffectiveness}}*0.86) round 2}} hr)
+
| {{%|{{#vardefineecho: baseresteffectiveness | {{Q|{{#var: name}}|Rest Effectiveness}} }}*0.86|0}} ({{#expr:{{#var:restRate}}/({{#var:baseresteffectiveness}}*0.86) round 2}}&nbsp;h)
| {{#expr:{{#var:baseresteffectiveness}}*0.92*100 round 0}}% ({{#expr:(((1/0.005714286)*150)/2500)/({{#var:baseresteffectiveness}}*0.92) round 2}} hr)
+
| {{%|{{#var:baseresteffectiveness}}*0.92|0}} ({{#expr:{{#var:restRate}}/({{#var:baseresteffectiveness}}*0.92) round 2}}&nbsp;h)
| {{#expr:{{#var:baseresteffectiveness}}*1.00*100 round 0}}% ({{#expr:(((1/0.005714286)*150)/2500)/({{#var:baseresteffectiveness}}*1.00) round 2}} hr)
+
| {{%|{{#var:baseresteffectiveness}}     |0}} ({{#expr:{{#var:restRate}}/({{#var:baseresteffectiveness}}     ) round 2}}&nbsp;h)
| {{#expr:{{#var:baseresteffectiveness}}*1.08*100 round 0}}% ({{#expr:(((1/0.005714286)*150)/2500)/({{#var:baseresteffectiveness}}*1.08) round 2}} hr)
+
| {{%|{{#var:baseresteffectiveness}}*1.08|0}} ({{#expr:{{#var:restRate}}/({{#var:baseresteffectiveness}}*1.08) round 2}}&nbsp;h)
| {{#expr:{{#var:baseresteffectiveness}}*1.14*100 round 0}}% ({{#expr:(((1/0.005714286)*150)/2500)/({{#var:baseresteffectiveness}}*1.14) round 2}} hr)
+
| {{%|{{#var:baseresteffectiveness}}*1.14|0}} ({{#expr:{{#var:restRate}}/({{#var:baseresteffectiveness}}*1.14) round 2}}&nbsp;h)
| {{#expr:{{#var:baseresteffectiveness}}*1.25*100 round 0}}% ({{#expr:(((1/0.005714286)*150)/2500)/({{#var:baseresteffectiveness}}*1.25) round 2}} hr)
+
| {{%|{{#var:baseresteffectiveness}}*1.25|0}} ({{#expr:{{#var:restRate}}/({{#var:baseresteffectiveness}}*1.25) round 2}}&nbsp;h)
| {{#expr:{{#var:baseresteffectiveness}}*1.60*100 round 0}}% ({{#expr:(((1/0.005714286)*150)/2500)/({{#var:baseresteffectiveness}}*1.60) round 2}} hr)
+
| {{%|{{#var:baseresteffectiveness}}*1.6 |0}} ({{#expr:{{#var:restRate}}/({{#var:baseresteffectiveness}}*1.6 ) round 2}}&nbsp;h)
 
{{#if: {{#pos:{{Q|{{#var: name}}|Facility}}|Sleep accelerator}}|
 
{{#if: {{#pos:{{Q|{{#var: name}}|Facility}}|Sleep accelerator}}|
 
<tr>
 
<tr>
<th> <small>+ [[Sleep accelerator]]{{IdeologyIcon}}</small>
+
<th> <small>{{#if: {{#var:stony}}|Non-Stone and Jade +<br/>}}[[Sleep accelerator]]{{IdeologyIcon}}</small> </th>
<td> {{#expr:({{#var:baseresteffectiveness}}+0.35)*0.86*100 round 0}}% ({{#expr:(((1/0.005714286)*150)/2500)/(({{#var:baseresteffectiveness}}+0.35)*0.86) round 2}} hr)
+
<td> {{%|({{#var:baseresteffectiveness}}+0.35)*0.86|0}} ({{#expr:{{#var:restRate}}/(({{#var:baseresteffectiveness}}+0.35)*0.86) round 2}}&nbsp;h) </td>
<td> {{#expr:({{#var:baseresteffectiveness}}+0.35)*0.92*100 round 0}}% ({{#expr:(((1/0.005714286)*150)/2500)/(({{#var:baseresteffectiveness}}+0.35)*0.92) round 2}} hr)
+
<td> {{%|({{#var:baseresteffectiveness}}+0.35)*0.92|0}} ({{#expr:{{#var:restRate}}/(({{#var:baseresteffectiveness}}+0.35)*0.92) round 2}}&nbsp;h) </td>
<td> {{#expr:({{#var:baseresteffectiveness}}+0.35)*1.00*100 round 0}}% ({{#expr:(((1/0.005714286)*150)/2500)/(({{#var:baseresteffectiveness}}+0.35)*1.00) round 2}} hr)
+
<td> {{%| {{#var:baseresteffectiveness}}+0.35     |0}} ({{#expr:{{#var:restRate}}/( {{#var:baseresteffectiveness}}+0.35     ) round 2}}&nbsp;h) </td>
<td> {{#expr:({{#var:baseresteffectiveness}}+0.35)*1.08*100 round 0}}% ({{#expr:(((1/0.005714286)*150)/2500)/(({{#var:baseresteffectiveness}}+0.35)*1.08) round 2}} hr)
+
<td> {{%|({{#var:baseresteffectiveness}}+0.35)*1.08|0}} ({{#expr:{{#var:restRate}}/(({{#var:baseresteffectiveness}}+0.35)*1.08) round 2}}&nbsp;h) </td>
<td> {{#expr:({{#var:baseresteffectiveness}}+0.35)*1.14*100 round 0}}% ({{#expr:(((1/0.005714286)*150)/2500)/(({{#var:baseresteffectiveness}}+0.35)*1.14) round 2}} hr)
+
<td> {{%|({{#var:baseresteffectiveness}}+0.35)*1.14|0}} ({{#expr:{{#var:restRate}}/(({{#var:baseresteffectiveness}}+0.35)*1.14) round 2}}&nbsp;h) </td>
<td> {{#expr:({{#var:baseresteffectiveness}}+0.35)*1.25*100 round 0}}% ({{#expr:(((1/0.005714286)*150)/2500)/(({{#var:baseresteffectiveness}}+0.35)*1.25) round 2}} hr)
+
<td> {{%|({{#var:baseresteffectiveness}}+0.35)*1.25|0}} ({{#expr:{{#var:restRate}}/(({{#var:baseresteffectiveness}}+0.35)*1.25) round 2}}&nbsp;h) </td>
<td> {{#expr:({{#var:baseresteffectiveness}}+0.35)*1.60*100 round 0}}% ({{#expr:(((1/0.005714286)*150)/2500)/(({{#var:baseresteffectiveness}}+0.35)*1.60) round 2}} hr)
+
<td> {{%|({{#var:baseresteffectiveness}}+0.35)*1.6 |0}} ({{#expr:{{#var:restRate}}/(({{#var:baseresteffectiveness}}+0.35)*1.6 ) round 2}}&nbsp;h) </td>
 
</tr>
 
</tr>
 
}}
 
}}
{{#if: {{#pos:{{Q|{{#var: name}}|Stuff Tags}}|Stony}}|
+
{{#if: {{#var:stony}}|
 
<tr>
 
<tr>
<th> Stone except Jade
+
<th> Stone except Jade </th>
<td> {{#expr:{{#var:baseresteffectiveness}}*0.86*0.9*100 round 0}}% ({{#expr:(((1/0.005714286)*150)/2500)/({{#var:baseresteffectiveness}}*0.9*0.86) round 2}} hr)
+
<td> {{%|{{#var:baseresteffectiveness}}*0.9*0.86|0}} ({{#expr:{{#var:restRate}}/({{#var:baseresteffectiveness}}*0.9*0.86) round 2}}&nbsp;h) </td>
<td> {{#expr:{{#var:baseresteffectiveness}}*0.92*0.9*100 round 0}}% ({{#expr:(((1/0.005714286)*150)/2500)/({{#var:baseresteffectiveness}}*0.9*0.92) round 2}} hr)
+
<td> {{%|{{#var:baseresteffectiveness}}*0.9*0.92|0}} ({{#expr:{{#var:restRate}}/({{#var:baseresteffectiveness}}*0.9*0.92) round 2}}&nbsp;h) </td>
<td> {{#expr:{{#var:baseresteffectiveness}}*1.00*0.9*100 round 0}}% ({{#expr:(((1/0.005714286)*150)/2500)/({{#var:baseresteffectiveness}}*0.9*1.00) round 2}} hr)
+
<td> {{%|{{#var:baseresteffectiveness}}*0.9     |0}} ({{#expr:{{#var:restRate}}/({{#var:baseresteffectiveness}}*0.9     ) round 2}}&nbsp;h) </td>
<td> {{#expr:{{#var:baseresteffectiveness}}*1.08*0.9*100 round 0}}% ({{#expr:(((1/0.005714286)*150)/2500)/({{#var:baseresteffectiveness}}*0.9*1.08) round 2}} hr)
+
<td> {{%|{{#var:baseresteffectiveness}}*0.9*1.08|0}} ({{#expr:{{#var:restRate}}/({{#var:baseresteffectiveness}}*0.9*1.08) round 2}}&nbsp;h) </td>
<td> {{#expr:{{#var:baseresteffectiveness}}*1.14*0.9*100 round 0}}% ({{#expr:(((1/0.005714286)*150)/2500)/({{#var:baseresteffectiveness}}*0.9*1.14) round 2}} hr)
+
<td> {{%|{{#var:baseresteffectiveness}}*0.9*1.14|0}} ({{#expr:{{#var:restRate}}/({{#var:baseresteffectiveness}}*0.9*1.14) round 2}}&nbsp;h) </td>
<td> {{#expr:{{#var:baseresteffectiveness}}*1.25*0.9*100 round 0}}% ({{#expr:(((1/0.005714286)*150)/2500)/({{#var:baseresteffectiveness}}*0.9*1.25) round 2}} hr)
+
<td> {{%|{{#var:baseresteffectiveness}}*0.9*1.25|0}} ({{#expr:{{#var:restRate}}/({{#var:baseresteffectiveness}}*0.9*1.25) round 2}}&nbsp;h) </td>
<td> {{#expr:{{#var:baseresteffectiveness}}*1.60*0.9*100 round 0}}% ({{#expr:(((1/0.005714286)*150)/2500)/({{#var:baseresteffectiveness}}*0.9*1.60) round 2}} hr)
+
<td> {{%|{{#var:baseresteffectiveness}}*0.9*1.6 |0}} ({{#expr:{{#var:restRate}}/({{#var:baseresteffectiveness}}*0.9*1.6 ) round 2}}&nbsp;h) </td>
 
</tr>
 
</tr>
 
}}
 
}}
{{#if: {{#pos:{{Q|{{#var: name}}|Stuff Tags}}|Stony}}|{{#if: {{#pos:{{Q|{{#var: name}}|Facility}}|Sleep accelerator}}|
+
{{#if: {{#var:stony}}|{{#if: {{#pos:{{Q|{{#var: name}}|Facility}}|Sleep accelerator}}|
 
<tr>
 
<tr>
<th> <small>+ [[Sleep accelerator]]{{IdeologyIcon}}</small>
+
<th> <small>Stone except Jade +<br/>[[Sleep accelerator]]{{IdeologyIcon}}</small> </th>
<td> {{#expr:({{#var:baseresteffectiveness}}*0.9+0.35)*0.86*100 round 0}}% ({{#expr:(((1/0.005714286)*150)/2500)/(({{#var:baseresteffectiveness}}*0.9+0.35)*0.86) round 2}} hr)
+
<td> {{%|({{#var:baseresteffectiveness}}*0.9+0.35)*0.86|0}} ({{#expr:{{#var:restRate}}/(({{#var:baseresteffectiveness}}*0.9+0.35)*0.86) round 2}}&nbsp;h) </td>
<td> {{#expr:({{#var:baseresteffectiveness}}*0.9+0.35)*0.92*100 round 0}}% ({{#expr:(((1/0.005714286)*150)/2500)/(({{#var:baseresteffectiveness}}*0.9+0.35)*0.92) round 2}} hr)
+
<td> {{%|({{#var:baseresteffectiveness}}*0.9+0.35)*0.92|0}} ({{#expr:{{#var:restRate}}/(({{#var:baseresteffectiveness}}*0.9+0.35)*0.92) round 2}}&nbsp;h) </td>
<td> {{#expr:({{#var:baseresteffectiveness}}*0.9+0.35)*1.00*100 round 0}}% ({{#expr:(((1/0.005714286)*150)/2500)/(({{#var:baseresteffectiveness}}*0.9+0.35)*1.00) round 2}} hr)
+
<td> {{%| {{#var:baseresteffectiveness}}*0.9+0.35     |0}} ({{#expr:{{#var:restRate}}/( {{#var:baseresteffectiveness}}*0.9+0.35     ) round 2}}&nbsp;h) </td>
<td> {{#expr:({{#var:baseresteffectiveness}}*0.9+0.35)*1.08*100 round 0}}% ({{#expr:(((1/0.005714286)*150)/2500)/(({{#var:baseresteffectiveness}}*0.9+0.35)*1.08) round 2}} hr)
+
<td> {{%|({{#var:baseresteffectiveness}}*0.9+0.35)*1.08|0}} ({{#expr:{{#var:restRate}}/(({{#var:baseresteffectiveness}}*0.9+0.35)*1.08) round 2}}&nbsp;h) </td>
<td> {{#expr:({{#var:baseresteffectiveness}}*0.9+0.35)*1.14*100 round 0}}% ({{#expr:(((1/0.005714286)*150)/2500)/(({{#var:baseresteffectiveness}}*0.9+0.35)*1.14) round 2}} hr)
+
<td> {{%|({{#var:baseresteffectiveness}}*0.9+0.35)*1.14|0}} ({{#expr:{{#var:restRate}}/(({{#var:baseresteffectiveness}}*0.9+0.35)*1.14) round 2}}&nbsp;h) </td>
<td> {{#expr:({{#var:baseresteffectiveness}}*0.9+0.35)*1.25*100 round 0}}% ({{#expr:(((1/0.005714286)*150)/2500)/(({{#var:baseresteffectiveness}}*0.9+0.35)*1.25) round 2}} hr)
+
<td> {{%|({{#var:baseresteffectiveness}}*0.9+0.35)*1.25|0}} ({{#expr:{{#var:restRate}}/(({{#var:baseresteffectiveness}}*0.9+0.35)*1.25) round 2}}&nbsp;h) </td>
<td> {{#expr:({{#var:baseresteffectiveness}}*0.9+0.35)*1.60*100 round 0}}% ({{#expr:(((1/0.005714286)*150)/2500)/(({{#var:baseresteffectiveness}}*0.9+0.35)*1.60) round 2}} hr)
+
<td> {{%|({{#var:baseresteffectiveness}}*0.9+0.35)*1.6 |0}} ({{#expr:{{#var:restRate}}/(({{#var:baseresteffectiveness}}*0.9+0.35)*1.6 ) round 2}}&nbsp;h) </td>
 
</tr>
 
</tr>
}}}}
+
}} }}
 
|}
 
|}
</li><div><sup>Bracketed times are time to refill [[rest]] to 100% from 0% at the given rest effectiveness.</sup></includeonly><noinclude>
+
</li></div><sup>Bracketed numbers are in-game hours to refill [[rest]] to 100% from 0% at the given rest effectiveness.</sup></includeonly><noinclude>
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 15:52, 21 January 2023

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

Summary

This template generates a table summarizing the rest effectiveness for each quality tier. If the object in question is has an option to use stone as a construction material, 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

Bed

{{Rest Effectiveness Quality Table}}

On the Bed page produces:

  • Material Awful Poor Normal Good Excellent Masterwork Legendary
    Non-Stone and Jade 86% (63.79 h) 92% (59.63 h) 100% (54.86 h) 108% (50.79 h) 114% (48.12 h) 125% (43.89 h) 160% (34.29 h)
    Non-Stone and Jade +
    Sleep acceleratorContent added by the Ideology DLC
    116% (47.25 h) 124% (44.17 h) 135% (40.63 h) 146% (37.62 h) 154% (35.64 h) 169% (32.51 h) 216% (25.4 h)
    Stone except Jade 77% (70.87 h) 83% (66.25 h) 90% (60.95 h) 97% (56.44 h) 103% (53.47 h) 113% (48.76 h) 144% (38.1 h)
    Stone except Jade +
    Sleep acceleratorContent added by the Ideology DLC
    108% (51.03 h) 115% (47.7 h) 125% (43.89 h) 135% (40.63 h) 143% (38.5 h) 156% (35.11 h) 200% (27.43 h)
  • Bracketed numbers are in-game hours to refill rest to 100% from 0% at the given rest effectiveness.

    Hospital bed

    {{Rest Effectiveness Quality Table | Hospital bed}}

    Produces:

  • Quality Awful Poor Normal Good Excellent Masterwork Legendary
    Rest effectiveness 86% (63.79 h) 92% (59.63 h) 100% (54.86 h) 108% (50.79 h) 114% (48.12 h) 125% (43.89 h) 160% (34.29 h)
    Sleep acceleratorContent added by the Ideology DLC 116% (47.25 h) 124% (44.17 h) 135% (40.63 h) 146% (37.62 h) 154% (35.64 h) 169% (32.51 h) 216% (25.4 h)
  • Bracketed numbers are in-game hours to refill rest to 100% from 0% at the given rest effectiveness.

    Animal bed

    {{Rest Effectiveness Quality Table | Animal bed}}

    Produces:

  • Quality Awful Poor Normal Good Excellent Masterwork Legendary
    Rest effectiveness 86% (63.79 h) 92% (59.63 h) 100% (54.86 h) 108% (50.79 h) 114% (48.12 h) 125% (43.89 h) 160% (34.29 h)


  • Bracketed numbers are in-game hours to refill rest to 100% from 0% at the given rest effectiveness.

    Sleeping spot

    {{Rest Effectiveness Quality Table | Sleeping spot}}

    Produces:

  • Quality Awful Poor Normal Good Excellent Masterwork Legendary
    Rest effectiveness 69% (79.73 h) 74% (74.53 h) 80% (68.57 h) 86% (63.49 h) 91% (60.15 h) 100% (54.86 h) 128% (42.86 h)


  • Bracketed numbers are in-game hours to refill rest to 100% from 0% at the given rest effectiveness.