Editing Template:Building Stats Table Row

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
<includeonly><tr {{#ifeq: {{#var:quality}} | Normal || {{#if: {{#var:stufftags}}|{{#if:{{#var:hasQuality}}|class="mw-collapsible mw-collapsed" id="mw-customcollapsible-collapseQuality{{#replace:{{#replace:{{#replace:{{#var:name}}|<nowiki> </nowiki>}}|(}}|)}}"}} }} }}><!--
+
<includeonly>|-
 
+
! '''{{#if:{{Q|{{{1|Cloth}}}|Stuff Adjective}}|[[{{{1|Cloth}}}|{{ucfirst:{{Q|{{{1|Cloth}}}|Stuff Adjective}}}}]]|[[{{{1|Cloth}}}]]}} {{#var:name}}'''
Headers
+
| {{icon small|{{{1|Cloth}}}}} {{ #expr: {{#var: stuffAmount}} {{#if: {{Q|{{{1|Cloth}}}|Small Volume}}|*10|}} }}
-->{{#if: {{#var:multipleBuildings}} |
+
| {{ #expr: {{ #expr: {{Q|{{{1|Cloth}}}|Beauty Offset}} + {{#ifexpr: {{#var:beauty|}} < 0 | 1 | {{Q|{{{1|Cloth}}}|Beauty Factor}}}}*{{#var:beauty|}} - 0.000000001 round 0}} round 0}}
  <th style="text-align:left;"> {{#var:name}} </th>
+
| {{ticks|{{ #expr: {{Q|{{{1|Cloth}}}|Work To Build Factor}}*{{#var:work|}} round 0}}}}
}}
+
| {{#if: {{#var:mass|}} | {{#var:mass|}} | - }}
{{#if: {{#var:hasQuality}} |
+
| {{ #expr: {{Q|{{{1|Cloth}}}|Max Hit Points Factor}}*{{#var:HP|}} round 0}}
  <th style="text-align:left;" data-sort-value="{{#var:qualitySort}}"> {{#var:quality}} </th>
+
| {{#ifexpr: {{ #expr: {{Q|{{{1|Cloth}}}|Flammability Factor}}*{{#var:flammability|}}}} > 1 | 100 | {{ #expr: {{Q|{{{1|Cloth}}}|Flammability Factor}}*{{#var:flammability|}}*100}} }}%<!--
}}
+
-->{{#ifeq: | {{#pos:{{lc:{{#var:name}}}}|door|}}||<br><td> {{#expr: 100*{{Q|{{{1|Cloth}}}|Door Opening Speed Factor}}}}%}}
{{#if: {{#var:stufftags}}  |
+
| {{#if: {{#var:useTerrainAffordance}}| {{#switch: {{lc:{{Q|{{{1|Cloth}}}|Terrain Affordance Needed}}}}
  <th style="text-align:left;" data-sort-value="{{{1}}}"> {{Icon Small|{{{1}}} }} {{DLC Icons|{{{1}}} }} </th>
+
| heavy = data-sort-value="3"
}}<!--
+
| medium = data-sort-value="2"
 
+
| #default = data-sort-value="1"
Beauty
+
}} }} | {{#if: {{#var:useTerrainAffordance}}|{{#if: {{Q|{{{1|Cloth}}}|Terrain Affordance Needed}}|{{Q|{{{1|Cloth}}}|Terrain Affordance Needed}} | Light}} <br><td> }}<!--
-->{{#vardefine:preBeauty | {{#expr: {{#var:beauty}} <!-- base beauty of the building -->
+
-->{{Market Value Calculator|{{#var:name}}|{{{1|Cloth}}}}}{{icon|silver|}}</includeonly>
  * {{#ifexpr: {{#var:beauty}} < 0 | 1 | {{#if:{{#var:stufftags}}|{{Q|{{{1}}}|Beauty Factor}}|1}} }} <!-- beauty factor provided by the material. Set to 1 if base beauty of the building is negative -->
+
<noinclude>
  + {{Q|{{{1}}}|Beauty Offset|0}} <!-- beauty offset provided by the material -->
+
{{documentation}}
}} }}<!--
 
-->{{#vardefine:tempBeauty |
 
  {{#expr: {{#ifexpr: {{#var:preBeauty}} > 0
 
    | {{#var:preBeauty}} * {{#var:beautyFactor}} {{#ifexpr: {{#var:beautyFactor}} > 0 | - | +}} 0.000000001 <!-- beauty factor provided by quality. apply small offset so 0.5 is rounded down/up depending on sign -->
 
    | {{#var:preBeauty}} }}
 
  round 0}}
 
}}
 
<td> {{#vardefineecho:finalBeauty |
 
  {{#ifeq: {{#var:tempBeauty}} | -0 | 0 | {{#var:tempBeauty}} }}
 
}} </td><!--
 
 
 
Comfort
 
-->{{#if: {{#var:comfort}} |
 
  <td> {{#expr: {{#var:comfort}} * {{#var:comfortFactor}} round 2}} </td>
 
}}<!--
 
 
 
Rest effectiveness
 
-->{{#if: {{#var:restEffectiveness}} | {{#vardefine:restRate|{{#expr:(((1/((150/60000)*(24/10.5)))*150)/2500)}} }}<!-- See [[Rest#Positive]] for an explanation of the formula -->
 
  <td> {{%|{{#vardefineecho:finalRestEffectiveness | {{#var:restEffectiveness}}*{{#var:restFactor}}*{{#if:{{#var:stufftags}}|{{Q|{{{1}}}|Rest Effectiveness Factor|1}}|1}} }}|0}} ({{#expr:{{#var:restRate}}/({{#var:finalRestEffectiveness}}) round 2}}&nbsp;h) </td>
 
}}<!--
 
 
 
Surgery Success Chance Factor
 
-->{{#if: {{#var:surgerySuccess}} |
 
  <td> {{%|{{#var:surgerySuccess}}*{{#var:surgeryFactor}}|0}} </td>
 
}}<!--
 
 
 
Recreation Power
 
-->{{#if: {{#var:recreation}} |
 
  <td> {{#expr: {{#var:recreation}} * {{#var:recreationFactor}} round 2}} </td>
 
}}<!--
 
 
 
Work
 
--><td style="text-align:left;"> {{Align Ticks| {{#vardefineecho:tempWorkTicks|{{#if:{{#var:useWorkToMake}} | {{#expr: {{#if:{{#var:stufftags}}|{{Q|{{{1}}}|Work To Make Factor}}|1}} * {{#var:work|}} + {{#if:{{#var:stufftags}}|{{Q|{{{1}}}|Work To Make Offset|0}}|0}} round 0}}| {{#expr: {{#if:{{#var:stufftags}}|{{Q|{{{1}}}|Work To Build Factor}}|1}} * {{#var:work|}} + {{#if:{{#var:stufftags}}|{{Q|{{{1}}}|Work To Build Offset|0}}|0}} round 0}} }} }} }} </td><!--
 
 
 
HP
 
--><td> {{#expr: {{#if:{{#var:stufftags}}|{{Q|{{{1}}}|Max Hit Points Factor}}|1}}*{{#var:HP|}} round 0}} </td><!--
 
 
 
Flammability
 
--><td> {{#ifexpr: {{#vardefineecho:finalFlammability| {{#if:{{#var:stufftags}}|{{Q|{{{1}}}|Flammability Factor}}|1}}*{{#var:flammability|1}} }} > 1 | 100% | {{%|{{#var:finalFlammability}} }} }} </td><!--
 
 
 
Door and Spike trap stats
 
-->{{#switch: {{#var:name}}
 
  | Autodoor =
 
    <td> {{%|{{Q|{{{1}}}|Door Opening Speed Factor|1}} * 4}} </td>
 
  | Door | Fence gate | Animal flap =
 
    <td> {{%|{{Q|{{{1}}}|Door Opening Speed Factor|1}} }} </td>
 
  | Spike trap =
 
    <td> {{#vardefineecho:damage|{{#expr: {{Q|{{{1}}}|Melee Sharp Damage Factor}}*100}} }} </td>
 
    <td> {{#expr: {{#var:damage}}/5}} </td>
 
    <td> {{%|{{#var:damage}}/5*0.015}} </td>
 
}}<!--
 
 
 
Terrain affordance
 
-->{{#if: {{#var:useTerrainAffordance}} | {{#vardefine:terrainAffordance|{{Q|{{{1}}}|Terrain Affordance|Light}} }}
 
  <td style="text-align:center;" data-sort-value="{{#switch: {{#var:terrainAffordance}} | Heavy = 3 | Medium = 2 | #default = 1}}"> {{#var:terrainAffordance}} }} </td><!--
 
 
 
Market value
 
--><td> {{formatnum: {{#vardefineecho:tempMarketValue| {{Market Value Calculator|{{#var:name}}|{{#if:{{#var:stufftags}}|{{{1}}} }}|{{#var:quality}} }} }} }} {{Icon Small|silver}} </td><!--
 
 
 
Ratios
 
-->{{#if: {{#var:workValueRatios}} |
 
  <td> {{#expr: {{#var:finalBeauty}}/{{#var:tempWorkTicks}} round 3}} </td>
 
  <td> {{#expr: {{#var:finalBeauty}}/{{#var:tempMarketValue}} round 3}} </td>
 
  <td> {{#expr: {{#var:tempMarketValue}}/{{#var:tempWorkTicks}} round 3}} </td>
 
  <td> {{#expr: {{#var:tempMarketValue}}/({{#var:stuffAmount}}{{#if: {{Q|{{{1}}}|Small Volume}}|*10}}) round 3}} }} </td>
 
</tr></includeonly><noinclude>
 
{{Documentation}}
 
 
</noinclude>
 
</noinclude>

Please note that all contributions to RimWorld Wiki are considered to be released under the CC BY-SA 3.0 (see RimWorld Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)