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

From RimWorld Wiki
Jump to navigation Jump to search
(changed color to the color of the tables on the individual pages)
m (Easy way to avoid a/an testing)
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
<includeonly><!--
 
<includeonly><!--
 +
 
VARIABLES
 
VARIABLES
-->{{#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| sortable 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>
 
}}
 
}}
 
|}
 
|}
</li></div><sup>This table assumes the {{lc: {{#var:name}} }} is inside a clean, properly lit room. For the full effects of light, cleanliness and placing a {{lc: {{#var:name}} }} outside see [[Surgery Success Chance Factor]].</sup></includeonly><noinclude>
+
</li></div><sup>This table assumes the {{lc: {{#var:name}} }} is inside a clean, properly lit room. For the full effects of light, cleanliness and placing the {{lc: {{#var:name}} }} outside see [[Surgery Success Chance Factor]].</sup></includeonly><noinclude>
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 13:34, 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[edit]

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

Example usage[edit]

{{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 the 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 the 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 the ancient bed outside see Surgery Success Chance Factor.