Difference between revisions of "Template:Surgery Success Chance Factor Quality Table"

From RimWorld Wiki
Jump to navigation Jump to search
(no point sorting it)
(make it work for non-quality things)
Line 4: Line 4:
 
-->{{#vardefine:name              | {{{1| {{PAGENAME}} }}} }}<!--
 
-->{{#vardefine:name              | {{{1| {{PAGENAME}} }}} }}<!--
 
-->{{#vardefine:baseSurgerySuccess | {{Q|{{#var:name}}|Surgery Success Chance Factor}} }}<!--
 
-->{{#vardefine:baseSurgerySuccess | {{Q|{{#var:name}}|Surgery Success Chance Factor}} }}<!--
 +
-->{{#vardefine:hasQuality        | {{Q|{{#var:name}}|Has Quality}} }}<!--
  
 
TABLE
 
TABLE
 
--><div><li style="display: inline-table;">
 
--><div><li style="display: inline-table;">
 
{| {{STDT|c_10 text-center}}
 
{| {{STDT|c_10 text-center}}
! [[Quality]]
+
{{#ifeq: {{#var:hasQuality}} | true |
! Awful
+
  ! [[Quality]]
! Poor
+
  ! Awful
! Normal
+
  ! Poor
! Good
+
  ! Normal
! Excellent
+
  ! Good
! Masterwork
+
  ! Excellent
! Legendary
+
  ! Masterwork
 +
  ! Legendary
 +
| ! colspan="2" {{!}} {{#var:name}} }}
 
|-
 
|-
 
! [[Surgery Success Chance Factor]]
 
! [[Surgery Success Chance Factor]]
| {{%|{{#var:baseSurgerySuccess}}*0.9 |0}}
+
{{#ifeq: {{#var:hasQuality}} | true |
| {{%|{{#var:baseSurgerySuccess}}*0.95|0}}
+
  {{!}} {{%|{{#var:baseSurgerySuccess}}*0.9 |0}}
| {{%|{{#var:baseSurgerySuccess}}    |0}}
+
  {{!}} {{%|{{#var:baseSurgerySuccess}}*0.95|0}}
| {{%|{{#var:baseSurgerySuccess}}*1.05|0}}
+
  {{!}} {{%|{{#var:baseSurgerySuccess}}    |0}}
| {{%|{{#var:baseSurgerySuccess}}*1.1 |0}}
+
  {{!}} {{%|{{#var:baseSurgerySuccess}}*1.05|0}}
| {{%|{{#var:baseSurgerySuccess}}*1.15|0}}
+
  {{!}} {{%|{{#var:baseSurgerySuccess}}*1.1 |0}}
| {{%|{{#var:baseSurgerySuccess}}*1.3 |0}}
+
  {{!}} {{%|{{#var:baseSurgerySuccess}}*1.15|0}}
 +
  {{!}} {{%|{{#var:baseSurgerySuccess}}*1.3 |0}}
 +
| {{!}} {{%|{{#var:baseSurgerySuccess}}    |0}} }}
 
{{#if: {{#pos:{{Q|{{#var:name}}|Facility}}|Vitals monitor}} |
 
{{#if: {{#pos:{{Q|{{#var:name}}|Facility}}|Vitals monitor}} |
 
<tr>
 
<tr>
<th> <small>+ [[Vitals monitor]]</small> </th>
+
! <small>+ [[Vitals monitor]]</small>
<td> {{%|({{#var:baseSurgerySuccess}}+0.05)*0.9 |0}} </td>
+
{{#ifeq: {{#var:hasQuality}} | true |
<td> {{%|({{#var:baseSurgerySuccess}}+0.05)*0.95|0}} </td>
+
  {{!}} {{%|({{#var:baseSurgerySuccess}}+0.05)*0.9 |0}}
<td> {{%| {{#var:baseSurgerySuccess}}+0.05      |0}} </td>
+
  {{!}} {{%|({{#var:baseSurgerySuccess}}+0.05)*0.95|0}}
<td> {{%|({{#var:baseSurgerySuccess}}+0.05)*1.05|0}} </td>
+
  {{!}} {{%| {{#var:baseSurgerySuccess}}+0.05      |0}}
<td> {{%|({{#var:baseSurgerySuccess}}+0.05)*1.1 |0}} </td>
+
  {{!}} {{%|({{#var:baseSurgerySuccess}}+0.05)*1.05|0}}
<td> {{%|({{#var:baseSurgerySuccess}}+0.05)*1.15|0}} </td>
+
  {{!}} {{%|({{#var:baseSurgerySuccess}}+0.05)*1.1 |0}}
<td> {{%|({{#var:baseSurgerySuccess}}+0.05)*1.3 |0}} </td>
+
  {{!}} {{%|({{#var:baseSurgerySuccess}}+0.05)*1.15|0}}
 +
  {{!}} {{%|({{#var:baseSurgerySuccess}}+0.05)*1.3 |0}}
 +
| {{!}} {{%| {{#var:baseSurgerySuccess}}+0.05      |0}} }}
 
</tr>
 
</tr>
 
}}
 
}}

Revision as of 10:02, 16 December 2023

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

This template generates a table summarizing the Surgery Success Chance Factor for each quality tier. If the object in question is has the vitals monitor as a facility, 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

{{Surgery Success Chance Factor Quality Table}}

On the Bed page produces:

  • Quality Awful Poor Normal Good Excellent Masterwork Legendary
    Surgery Success Chance Factor 90% 95% 100% 105% 110% 115% 130%
  • This table assumes the bed is inside a clean, properly lit room. For the full effects of light, cleanliness and placing a bed outside see Surgery Success Chance Factor.
    {{Surgery Success Chance Factor Quality Table | Hospital bed}}

    Produces:

  • Quality Awful Poor Normal Good Excellent Masterwork Legendary
    Surgery Success Chance Factor 99% 105% 110% 116% 121% 127% 143%
    + Vitals monitor 104% 109% 115% 121% 127% 132% 150%
  • This table assumes the hospital bed is inside a clean, properly lit room. For the full effects of light, cleanliness and placing a hospital bed outside see Surgery Success Chance Factor.
    {{Surgery Success Chance Factor Quality Table | Ancient bed}}

    Produces:

    This table assumes the ancient bed is inside a clean, properly lit room. For the full effects of light, cleanliness and placing a ancient bed outside see Surgery Success Chance Factor.