Editing Template:Trading Value 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>
 
<includeonly>
{{#vardefine:productAmount | {{#if: {{{?Pa}}} | {{{?Pa}}} | 1}} }}
+
{{#vardefine:productAmount | {{#if: {{{?Pa}}} | {{{?Pa}}} | 1 }} }}
  
{{#vardefine:R1a | {{#expr: {{#if: {{{?R1a}}} | {{{?R1a}}} | 0}} / {{#var:productAmount}} }} }}
+
{{#vardefine:R1a | {{#expr: {{{?R1a}}} / {{#var:productAmount}} }} }}
{{#vardefine:R2a | {{#expr: {{#if: {{{?R2a}}} | {{{?R2a}}} | 0}} / {{#var:productAmount}} }} }}
+
{{#vardefine:R2a | {{#expr: {{{?R2a}}} / {{#var:productAmount}} }} }}
{{#vardefine:R3a | {{#expr: {{#if: {{{?R3a}}} | {{{?R3a}}} | 0}} / {{#var:productAmount}} }} }}
+
{{#vardefine:R3a | {{#expr: {{{?R3a}}} / {{#var:productAmount}} }} }}
{{#vardefine:R4a | {{#expr: {{#if: {{{?R4a}}} | {{{?R4a}}} | 0}} / {{#var:productAmount}} }} }}
+
{{#vardefine:R4a | {{#expr: {{{?R4a}}} / {{#var:productAmount}} }} }}
{{#vardefine:R5a | {{#expr: {{#if: {{{?R5a}}} | {{{?R5a}}} | 0}} / {{#var:productAmount}} }} }}
+
{{#vardefine:R5a | {{#expr: {{{?R5a}}} / {{#var:productAmount}} }} }}
{{#vardefine:R6a | {{#expr: {{#if: {{{?R6a}}} | {{{?R6a}}} | 0}} / {{#var:productAmount}} }} }}
+
{{#vardefine:R6a | {{#expr: {{{?R6a}}} / {{#var:productAmount}} }} }}
  
{{#vardefine:isstuff | {{#ifeq: {{{?R1}}} | Stuff | {{#ifeq: {{#var:stuffcat}} | no stuff category | | true}} }} }}
+
{{#vardefine:isstuff | {{#ifeq: {{{?R1}}} | Stuff | {{#ifeq: {{#var:stuffcat}} | no stuff category | | true }} }} }}
  
 
{{#vardefine:skill |
 
{{#vardefine:skill |
Line 26: Line 26:
 
           | #default = –
 
           | #default = –
 
}} }} }} }} }}
 
}} }} }} }} }}
 +
 +
{{#vardefine:multiplier | {{#switch: {{{?Type}}}
 +
  | Art = 1.1
 +
  | Furniture = 0.7
 +
  | Equipment = 0.2
 +
  | #default = 1
 +
}} }}
 +
 +
{{#vardefine:sellable | {{#switch: {{{?Type}}}
 +
  | Structure | Production | Buildings | Building | Security | Misc | Floor | Temperature | Power | Ship =false
 +
  | #default = {{#switch: {{{?Name}}}
 +
    | Peg leg | Wooden foot | Wooden hand | Torch lamp = false
 +
    | #default = true
 +
}} }} }}
  
 
{{#vardefine:amount | {{#expr:
 
{{#vardefine:amount | {{#expr:
Line 32: Line 46:
 
     | {{#ifeq: {{{?R1}}} | {{#var:material}} | {{#var:R1a}} | 0}}
 
     | {{#ifeq: {{{?R1}}} | {{#var:material}} | {{#var:R1a}} | 0}}
 
   }} * {{#var:volume}}
 
   }} * {{#var:volume}}
   + {{#ifeq: {{{?R2}}} | {{#var:material}} | {{#var:R2a}} | 0}}
+
   + {{#ifeq: {{{?R2}}} | {{#var:material}} | {{#var:R2a}} | 0 }}
   + {{#ifeq: {{{?R3}}} | {{#var:material}} | {{#var:R3a}} | 0}}
+
   + {{#ifeq: {{{?R3}}} | {{#var:material}} | {{#var:R3a}} | 0 }}
   + {{#ifeq: {{{?R4}}} | {{#var:material}} | {{#var:R4a}} | 0}}
+
   + {{#ifeq: {{{?R4}}} | {{#var:material}} | {{#var:R4a}} | 0 }}
   + {{#ifeq: {{{?R5}}} | {{#var:material}} | {{#var:R5a}} | 0}}
+
   + {{#ifeq: {{{?R5}}} | {{#var:material}} | {{#var:R5a}} | 0 }}
   + {{#ifeq: {{{?R6}}} | {{#var:material}} | {{#var:R6a}} | 0}}
+
   + {{#ifeq: {{{?R6}}} | {{#var:material}} | {{#var:R6a}} | 0 }}
 
   round 1}}
 
   round 1}}
 
}}
 
}}
Line 52: Line 66:
 
}}
 
}}
  
 
+
{{#vardefine:work | {{#switch: {{{?Type}}}
{{#vardefine:work
+
  | Furniture | Structure | Production | Buildings | Building | Security | Misc | Floor | Temperature | Power | Ship = {{#expr: {{formatnum:{{{?Work}}}|R}} * {{#var:buildfactor}} + {{#var:buildoffset}} round 0}}
  | {{#switch: {{Q|{{{?Name}}}|Production Facility 1}}
+
  | #default = {{#expr: {{formatnum:{{{?Work}}}|R}} * {{#var:makefactor}} / {{#var:productAmount}} round 0}}
    | Large mech gestator | Mech gestator | War queen = false
+
}} }}
    | #default = {{#switch: {{{?Type}}}
 
      | Furniture | Structure | Production | Buildings | Building | Security | Misc | Floor | Temperature | Power | Ship = {{#expr: {{formatnum:{{{?Work}}}|R}} * {{#var:buildfactor}} + {{#var:buildoffset}} round 0}}
 
      | #default = {{#expr: {{formatnum:{{{?Work}}}|R}} * {{#var:makefactor}} / {{#var:productAmount}} round 0}}
 
}} }} }}
 
  
 
{{#vardefine:value | {{formatnum: {{#ifeq: {{{?R1}}} | Stuff | {{#if: {{#var:isstuff}} | {{Market Value Calculator|{{{?Name}}}|{{#var:material}}}} | {{Market Value Calculator|{{{?Name}}}|wood}} }} | {{{?Value}}} }} |R}} }}
 
{{#vardefine:value | {{formatnum: {{#ifeq: {{{?R1}}} | Stuff | {{#if: {{#var:isstuff}} | {{Market Value Calculator|{{{?Name}}}|{{#var:material}}}} | {{Market Value Calculator|{{{?Name}}}|wood}} }} | {{{?Value}}} }} |R}} }}
 
 
{{#vardefine:note | {{#ifeq: {{{?R1}}} | Stuff | {{#if: {{#var:isstuff}} | | &nbsp;<abbr title="This value depends on the material and might therefore not be correct."><sup>[Note]</sup></abbr> }} }} }}
 
{{#vardefine:note | {{#ifeq: {{{?R1}}} | Stuff | {{#if: {{#var:isstuff}} | | &nbsp;<abbr title="This value depends on the material and might therefore not be correct."><sup>[Note]</sup></abbr> }} }} }}
  
{{#ifeq: {{#vardefineecho:sellable | {{#switch: {{{?Type}}}
+
! style="text-align: left" | [[{{{?Name}}}]] {{#switch: {{{?DLC}}} | Royalty (DLC) = {{RoyaltyIcon}} | Ideology (DLC) = {{IdeologyIcon}} }}
    | Structure | Production | Buildings | Building | Security | Misc | Floor | Temperature | Power | Ship = false
+
| style="text-align: left" | {{formatnum: {{#var:amount}} }} {{Icon Small|{{#var:material}} }} {{#if: {{#var:isstuff}} | ({{formatnum: {{#expr: {{#var:R1a}} * {{#var:volume}} }} }} {{Icon Small|Stuff}}) }}
    | #default = {{#switch: {{{?Name}}}
+
| style="text-align: left" | {{#ifeq: {{#var:others}} || | {{#var:others}} }}
      | Peg leg | Wooden foot | Wooden hand | Torch lamp = false
+
| style="text-align: left" | {{#ifexpr: {{formatnum:{{#var:work}} < 10|R}} | {{0|000,00}} | {{#ifexpr: {{formatnum:{{#var:work}} < 100|R}} | {{0|000,0}} | {{#ifexpr: {{formatnum:{{#var:work}} < 1000|R}} | {{0|000,}} | {{#ifexpr: {{formatnum:{{#var:work}} < 10000|R}} | {{0|00}} | {{#ifexpr: {{formatnum:{{#var:work}} < 100000|R}} | {{0}} }} }} }} }} }}{{Ticks | {{#var:work}} }}
      | #default = true
+
| style="text-align: left" | {{#var:skill}}
  }} }} }} | true |
+
| style="text-align: left" | {{#ifexpr: {{formatnum:{{#var:value}} < 10|R}} | {{0|0,00}} | {{#ifexpr: {{formatnum:{{#var:value}} < 100|R}} | {{0|0,0}} | {{#ifexpr: {{formatnum:{{#var:value}} < 1000|R}} | {{0|0,}} }} }} }}{{formatnum: {{#var:value}} }}{{#ifexpr: {{formatnum:{{#var:value}} > 10|R}} | {{0}} }} {{Icon Small|silver}}{{#var:note}}
 
+
| {{#ifeq: {{#var:sellable}} | true | {{#var:multiplier}}{{#ifeq: {{#var:multiplier}} | 1 | {{0}} }} | – }}
  {{#vardefine:multiplier | {{#switch: {{{?Type}}}
+
| {{#ifeq: {{#var:sellable}} | true | {{Ticks | {{#expr: {{#var:work}}/({{#var:multiplier}}*{{#var:value}}) round 2}} }}{{#var:note}} | – }}
    | Art = 1.1
+
| {{#ifeq: {{#var:sellable}} | true | {{#expr: ({{#var:multiplier}}*{{#var:value}})/{{#var:amount}} round 2}} {{Icon Small|silver}}{{#var:note}} | – }}
    | Furniture = 0.7
 
    | Equipment = 0.2
 
    | #default = 1
 
  }} }}
 
 
 
  {{#vardefine:resourceCost | {{#expr:
 
    {{#if: {{#var:isstuff}} | {{#var:materialValue}} | {{Q|{{{?R1}}}|Market Value Base|1}} * {{#switch: {{Q|{{{?R1}}}|Type}} | Art = 1.1 | Furniture = 0.7 | Equipment = 0.2 | #default = 1}} }} * {{#var:R1a}}
 
    + {{Q|{{{?R2}}}|Market Value Base|0}} * {{#var:R2a}} * {{#switch: {{Q|{{{?R1}}}|Type}} | Art = 1.1 | Furniture = 0.7 | Equipment = 0.2 | #default = 1}}
 
    + {{Q|{{{?R3}}}|Market Value Base|0}} * {{#var:R3a}} * {{#switch: {{Q|{{{?R1}}}|Type}} | Art = 1.1 | Furniture = 0.7 | Equipment = 0.2 | #default = 1}}
 
    + {{Q|{{{?R4}}}|Market Value Base|0}} * {{#var:R4a}} * {{#switch: {{Q|{{{?R1}}}|Type}} | Art = 1.1 | Furniture = 0.7 | Equipment = 0.2 | #default = 1}}
 
    + {{Q|{{{?R5}}}|Market Value Base|0}} * {{#var:R5a}} * {{#switch: {{Q|{{{?R1}}}|Type}} | Art = 1.1 | Furniture = 0.7 | Equipment = 0.2 | #default = 1}}
 
    + {{Q|{{{?R6}}}|Market Value Base|0}} * {{#var:R6a}} * {{#switch: {{Q|{{{?R1}}}|Type}} | Art = 1.1 | Furniture = 0.7 | Equipment = 0.2 | #default = 1}}
 
  }} }}
 
}}
 
 
 
! style="text-align: left" | {{DLC Icons|{{{?Name}}}}}
 
| {{formatnum: {{#var:amount}} }} [[{{#show: {{#var:material}}| ?image | link = none }}|16px|{{#var:material}}|link={{#var:material}}]] {{#if: {{#var:isstuff}} | ({{formatnum: {{#expr: {{#var:R1a}} * {{#var:volume}} }} }} [[{{#show: Stuff| ?image | link = none }}|16px|Stuff|link=Stuff]]) }}
 
| {{#ifeq: {{#var:others}} || – | {{#var:others}} }}
 
| {{#ifeq: {{#var:work}} | false | – | {{Align Ticks| {{#var:work}} }} }}
 
| {{#var:skill}}
 
| {{Align Silver| {{#var:value}} }} [[{{#show: Silver| ?image | link = none }}|16px|Silver|link=Silver]]{{#var:note}}
 
| {{#ifeq: {{#var:sellable}} | true | {{#var:multiplier}} | – }}
 
| {{#ifeq: {{#var:sellable}} | true | {{#expr: {{#var:multiplier}}*{{#var:value}}/{{#var:resourceCost}} round 2}}{{#var:note}} | – }}
 
 
|-
 
|-
  
 
</includeonly><noinclude>{{Documentation}}{{Trading Value Table|Psychoid leaves}}{{Trading Value Table|Neutroamine}}{{Trading Value Table|Wort}}{{Trading Value Table|Hops}}</noinclude>
 
</includeonly><noinclude>{{Documentation}}{{Trading Value Table|Psychoid leaves}}{{Trading Value Table|Neutroamine}}{{Trading Value Table|Wort}}{{Trading Value Table|Hops}}</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)