Editing Template:Building Stats Table
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><!-- | <includeonly><!-- | ||
− | VARIABLES | + | --><!-- VARIABLES --><!-- |
− | -->{{#vardefine:name | + | -->{{#vardefine:name | {{{1| {{PAGENAME}} }}} }}<!-- |
− | -->{{#vardefine:beauty | + | -->{{#vardefine:beauty | {{formatnum:{{Q|{{#var:name}}|Beauty Base|0}}|R}} }}<!-- |
− | -->{{#vardefine:comfort | + | -->{{#vardefine:comfort | {{Q|{{#var:name}}|Comfort Base}} }}<!-- |
− | -->{{#vardefine:flammability | + | -->{{#vardefine:flammability | {{formatnum:{{Q|{{#var:name}}|Flammability Base}}|R}} }}<!-- |
− | -->{{#vardefine:hasQuality | + | -->{{#vardefine:hasQuality | {{#ifeq: {{Q|{{#var:name}}|Has Quality}} | true | true}} }}<!-- True if the building has quality |
− | -->{{#vardefine:HP | + | -->{{#vardefine:HP | {{formatnum:{{Q|{{#var:name}}|Max Hit Points Base}}|R}} }}<!-- |
− | -->{{#vardefine: | + | -->{{#vardefine:stuffAmount | {{Q|{{#var:name}}|Resource 1 Amount}} }}<!-- |
− | -->{{#vardefine: | + | -->{{#vardefine:stufftags | {{lc:{{Q|{{#var:name}}|Stuff Tags}} }} }}<!-- |
− | -->{{#vardefine: | + | -->{{#vardefine:value | {{formatnum:{{Q|{{#var:name}}|Market Value Base}}|R}} }}<!-- |
− | -->{{#vardefine: | + | -->{{#vardefine:work | {{formatnum:{{Q|{{#var:name}}|Work To Make}}|R}} }}<!-- |
− | -->{{#vardefine:useTerrainAffordance | {{# | + | -->{{#vardefine:useTerrainAffordance | {{#if: {{{3|}}} | 1}} }}<!-- |
− | -->{{#vardefine:useWorkToMake | {{#if: {{Q|{{#var:name}}|Production Facility 1}} | | + | -->{{#vardefine:useWorkToMake | {{#if: {{Q|{{#var:name}}|Production Facility 1}} | 1}} }}<!-- |
− | --> | + | --><!-- |
− | --> | + | --><!-- HEADER and CONTROL PANEL --><!-- |
− | + | -->{{#if: {{{2|}}}||== Material table ==}} | |
− | HEADER | + | {{#if: {{#var:hasQuality}} | {{#if: {{#var:stufftags}} |<table class=wikitable> |
− | -->{{# | ||
− | |||
− | |||
− | |||
<tr><th> Feature </th><th> Toggle </th></tr> | <tr><th> Feature </th><th> Toggle </th></tr> | ||
− | {{Control Panel| | + | {{#if:{{#var:stufftags}} | {{Control Panel|Material{{#replace:{{#var:name}}|<nowiki> </nowiki>}}|label = Material|invert = true}} }} |
+ | {{#if:{{#var:hasQuality}} | {{Control Panel|Quality{{#replace:{{#var:name}} |<nowiki> </nowiki>}}|label = Quality}} }} | ||
</table>}} }}<!-- | </table>}} }}<!-- | ||
− | + | --><!-- | |
− | MAIN TABLE | + | --><!-- MAIN TABLE --><!-- |
--><div><li style="display: inline-table;"> | --><div><li style="display: inline-table;"> | ||
{| {{STDT|sortable c_01 text-right}} | {| {{STDT|sortable c_01 text-right}} | ||
− | ! colspan="{{#if:{{#var:hasQuality | + | ! colspan="{{#if:{{#var:hasQuality}}|2|1}}" | {{Icon Small|{{#var:name}}|32}} {{#var:name}} |
! rowspan="2" data-sort-type="number" | Beauty<!-- | ! rowspan="2" data-sort-type="number" | Beauty<!-- | ||
-->{{#if: {{#var:comfort}} | | -->{{#if: {{#var:comfort}} | | ||
− | !! rowspan="2" data-sort-type="number" {{!}} Comfort | + | !! rowspan="2" data-sort-type="number" {{!}} Comfort}} |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
! rowspan="2" data-sort-type="number" | Work to Build | ! rowspan="2" data-sort-type="number" | Work to Build | ||
! rowspan="2" data-sort-type="number" | HP | ! rowspan="2" data-sort-type="number" | HP | ||
! rowspan="2" data-sort-type="number" | Flamma­bility<!-- | ! rowspan="2" data-sort-type="number" | Flamma­bility<!-- | ||
-->{{#switch: {{#var:name}} | -->{{#switch: {{#var:name}} | ||
− | | Door | Autodoor | Fence gate | Animal flap = !! rowspan="2" {{!}} Door | + | | Door | Autodoor | Fence gate | Animal flap = !! rowspan="2" {{!}} Door Speed |
− | | Spike trap = !! rowspan="2" {{!}} Total | + | | Spike trap = !! rowspan="2" {{!}} Total Damage !! rowspan="2" {{!}} Attack Damage !! rowspan="2" {{!}} Armor Penetration |
}}<!-- | }}<!-- | ||
− | -->{{#if: {{#var:useTerrainAffordance}} | !! rowspan="2" {{!}} Terrain | + | -->{{#if: {{#var:useTerrainAffordance}} | !! rowspan="2" {{!}} Terrain Affordance}} |
− | ! rowspan="2" data-sort-type="number" | Market | + | ! rowspan="2" data-sort-type="number" | Market Value |
|- | |- | ||
{{#if: {{#var:hasQuality}} |<th style="background-color:#72c1d9; border:#5b9aae 1px; border-style: none none solid solid;"> Quality </th>}}<!-- | {{#if: {{#var:hasQuality}} |<th style="background-color:#72c1d9; border:#5b9aae 1px; border-style: none none solid solid;"> Quality </th>}}<!-- | ||
-->{{#if: {{#var:stufftags}} |<th style="background-color:#72c1d9; border:#5b9aae 1px; border-style: none none solid {{#if:{{#var:hasQuality}}|none|solid}};"> Material </th>}}<!-- | -->{{#if: {{#var:stufftags}} |<th style="background-color:#72c1d9; border:#5b9aae 1px; border-style: none none solid {{#if:{{#var:hasQuality}}|none|solid}};"> Material </th>}}<!-- | ||
− | + | --><!-- #pos returns 0 if its at the first place in the string, thus an {{#if:{{#pos:{{#var:stufftags}}|Leathery|}} fails to detect leathery if its the first vs a null response. This just tests that it doesn't return nothing essentially. --> | |
− | + | {{#ifeq: | {{#pos:{{#var:stufftags}}|leathery|}} || | |
− | --> | + | {{#ask: [[Stuff Category::Leathery]] |
− | + | | format = template | |
− | + | | template = Building Material Table Row | |
− | + | | link = none | |
− | + | }} }}<!-- | |
− | + | -->{{#ifeq: | {{#pos:{{#var:stufftags}}|fabric|}} || | |
− | + | {{#ask: [[Stuff Category::Fabric]] | |
− | + | | format = template | |
− | + | | template = Building Material Table Row | |
− | + | | link = none | |
− | + | }} }}<!-- | |
− | + | -->{{#ifeq: | {{#pos:{{#var:stufftags}}|woody|}} || | |
− | + | {{#ask: [[Stuff Category::Woody]] | |
− | + | | format = template | |
− | + | | template = Building Material Table Row | |
− | + | | link = none | |
− | + | }} }}<!-- | |
− | + | -->{{#ifeq: | {{#pos:{{#var:stufftags}}|stony|}} || | |
− | + | {{#ask: [[Stuff Category::Stony]] | |
− | + | | format = template | |
− | + | | template = Building Material Table Row | |
− | + | | link = none | |
− | + | }} }}<!-- | |
− | + | -->{{#ifeq: | {{#pos:{{#var:stufftags}}|metallic|}} || | |
− | + | {{#ask: [[Stuff Category::Metallic]] | |
− | }}<!-- | ||
− | |||
− | |||
− | -->{{# | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
| format = template | | format = template | ||
− | | template = Building | + | | template = Building Material Table Row |
− | | link = none | + | | link = none |
− | + | }} }} | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | }} | ||
|} | |} | ||
− | </li></div> | + | </li></div><sup>Assuming Normal quality, for the effect of other qualities, see [[Quality]].</sup></includeonly><noinclude>{{Move|destination=Template:Building Stats Table|reason=Standardization with [[Template: Weapon Stats Table]]}}{{Merge|destination=Template talk:Building Material Table{{!}}See talk page|reason=When quality is implemented, overlaps with other templates. See talk page.}} |
− | |||
− | |||
− | : | ||
− | }} | ||
{{Documentation}} | {{Documentation}} | ||
</noinclude> | </noinclude> |