Difference between revisions of "Template:Trading Value Table Row"
m (Undo revision 92548 by Ickputzdirwech (talk)) Tag: Undo |
m (Undo revision 92546 by Ickputzdirwech (talk)) Tag: Undo |
||
Line 6: | Line 6: | ||
}} | }} | ||
{{#if: {{#pos: {{Q | {{{?Name}}} | Stuff Tags}} | {{#var:stuff}} }} | | {{#if: {{#pos: {{Q | {{{?Name}}} | Stuff Tags}} | {{#var:stuff}} }} | | ||
+ | |||
{{#vardefine:sellable | false }} | {{#vardefine:sellable | false }} | ||
+ | |||
{{#ifeq: {{{?Type}}} | Structure | | | {{#ifeq: {{{?Type}}} | Structure | | | ||
{{#ifeq: {{{?Type}}} | Production | | | {{#ifeq: {{{?Type}}} | Production | | | ||
Line 24: | Line 26: | ||
}} }} }} }} | }} }} }} }} | ||
}} }} }} }} }} }} }} }} }} }} | }} }} }} }} }} }} }} }} }} }} | ||
+ | |||
{{#ifeq: {{{?Type}}} | Furniture | {{#vardefine:multiplier | 0.7}} {{#vardefine:skill | [[Construction]]}} | {{#vardefine:multiplier | 1}} {{#vardefine:skill | -}} }} | {{#ifeq: {{{?Type}}} | Furniture | {{#vardefine:multiplier | 0.7}} {{#vardefine:skill | [[Construction]]}} | {{#vardefine:multiplier | 1}} {{#vardefine:skill | -}} }} | ||
{{#ifeq: {{{?Type}}} | Art | {{#vardefine:multiplier | 1.1}} {{#vardefine:skill | [[Skills#Artistic|Artistic]]}} }} | {{#ifeq: {{{?Type}}} | Art | {{#vardefine:multiplier | 1.1}} {{#vardefine:skill | [[Skills#Artistic|Artistic]]}} }} | ||
Line 39: | Line 42: | ||
{{#ifeq: {{{?Type}}} | Power| {{#vardefine:skill | [[Construction]]}} }} | {{#ifeq: {{{?Type}}} | Power| {{#vardefine:skill | [[Construction]]}} }} | ||
{{#ifeq: {{{?Type}}} | Ship| {{#vardefine:skill | [[Construction]]}} }} | {{#ifeq: {{{?Type}}} | Ship| {{#vardefine:skill | [[Construction]]}} }} | ||
+ | |||
{{#vardefine:amount | {{#expr: | {{#vardefine:amount | {{#expr: | ||
{{#ifeq: {{{?Stuff}}} | true | {{#ifeq: {{{?Stuff}}} | true | ||
Line 53: | Line 57: | ||
+ {{#ifeq: {{Q|{{{?Name}}}|Resource 6}}|{{#var:material}}|{{Q|{{{?Name}}}|Resource 6 Amount}}|0}} | + {{#ifeq: {{Q|{{{?Name}}}|Resource 6}}|{{#var:material}}|{{Q|{{{?Name}}}|Resource 6 Amount}}|0}} | ||
}} }} | }} }} | ||
+ | |||
{{#vardefine:others | | {{#vardefine:others | | ||
{{#ifeq: {{Q|{{{?Name}}}|Resource 1}} | Stuff | {{#ifeq: {{Q|{{{?Name}}}|Resource 1}} | Stuff | ||
Line 64: | Line 69: | ||
--->{{#if: {{Q|{{{?Name}}}|Resource 6}} | {{#ifeq: {{Q|{{{?Name}}}|Resource 6}} | {{#var:material}} || {{Q|{{{?Name}}}| Resource 6 Amount || {{Icon Small|{{Q|{{{?Name}}}|Resource 6}} }} }} }} }} | --->{{#if: {{Q|{{{?Name}}}|Resource 6}} | {{#ifeq: {{Q|{{{?Name}}}|Resource 6}} | {{#var:material}} || {{Q|{{{?Name}}}| Resource 6 Amount || {{Icon Small|{{Q|{{{?Name}}}|Resource 6}} }} }} }} }} | ||
}} | }} | ||
+ | |||
{{#vardefine:workfactor | {{#if: {{Q|{{#var:material}}|Work To Build Factor}} | {{Q|{{#var:material}}|Work To Build Factor}} | 1 }} }} | {{#vardefine:workfactor | {{#if: {{Q|{{#var:material}}|Work To Build Factor}} | {{Q|{{#var:material}}|Work To Build Factor}} | 1 }} }} | ||
+ | |||
! style="text-align: left" | [[{{{?Name}}}]] {{#ifeq: {{Q|{{{?Name}}}|From DLC}} | Royalty (DLC) |{{RoyaltyIcon}} }}{{#ifeq: {{Q|{{{?Name}}}|From DLC}} | Ideology (DLC) |{{IdeologyIcon}} }} | ! style="text-align: left" | [[{{{?Name}}}]] {{#ifeq: {{Q|{{{?Name}}}|From DLC}} | Royalty (DLC) |{{RoyaltyIcon}} }}{{#ifeq: {{Q|{{{?Name}}}|From DLC}} | Ideology (DLC) |{{IdeologyIcon}} }} | ||
| {{#var:amount}} {{Icon Small|{{#var:material}}}} {{#ifeq: {{{?Stuff}}} | true | ({{Q|{{{?Name}}}|Resource 1 Amount}} {{Icon Small|Stuff}}) }} | | {{#var:amount}} {{Icon Small|{{#var:material}}}} {{#ifeq: {{{?Stuff}}} | true | ({{Q|{{{?Name}}}|Resource 1 Amount}} {{Icon Small|Stuff}}) }} | ||
Line 77: | Line 84: | ||
|- | |- | ||
− | + | }} | |
</includeonly> | </includeonly> | ||
Revision as of 09:18, 19 September 2021
See Template:Trading Value Table for the full documentation.
Example
Item | Amount of wood | Other ingredients | Work to make | Relevant skill | Market value | Sell price multiplier |
Profitability | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Wood | 1 | – | ticks (0 secs) | 0– | 1.2 | 1 | 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
style="text-align: left"
|
The above documentation is transcluded from Template:Trading Value Table Row/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |
{{#vardefine:material | {{SUBPAGENAME}} }} {{#ifeq: {{{?Type}}} | Furniture | {{#vardefine:multiplier | 0.7}} {{#vardefine:skill | [[Construction]]}} | {{#vardefine:multiplier | 1}} {{#vardefine:skill | -}} }} {{#ifeq: {{{?Type}}} | Art | {{#vardefine:multiplier | 1.1}} {{#vardefine:skill | [[Skills#Artistic|Artistic]]}} }} {{#ifeq: {{{?Type}}} | Medical Items | {{#vardefine:skill | [[Crafting]]}} }} {{#ifeq: {{{?Type}}} | Gear | {{#vardefine:multiplier | 0.7}} {{#vardefine:skill | [[Crafting]]}} }} {{#ifeq: {{{?Type}}} | Equipment | {{#vardefine:multiplier | 0.2}} {{#vardefine:skill | [[Crafting]]}} }} {{#ifeq: {{{?Type}}} | Crafted Resources | {{#vardefine:multiplier | 0.6}} {{#vardefine:skill | [[Crafting]]}} }} {{#ifeq: {{{?Type}}} | Floor | {{#vardefine:skill | [[Construction]]}} }} {{#ifeq: {{{?Type}}} | Buildings | {{#vardefine:skill | [[Construction]]}} }} {{#ifeq: {{{?Type}}} | Structure | {{#vardefine:skill | [[Construction]]}} }} {{#ifeq: {{{?Type}}} | Misc | {{#vardefine:skill | [[Construction]]}} }} {{#ifeq: {{{?Type}}} | Security | {{#vardefine:skill | [[Construction]]}} }} {{#ifeq: {{{?Type}}} | Temperature | {{#vardefine:skill | [[Construction]]}} }} {{#ifeq: {{{?Type}}} | Production | {{#vardefine:skill | [[Construction]]}} }} {{#ifeq: {{{?Type}}} | Power| {{#vardefine:skill | [[Construction]]}} }} {{#ifeq: {{{?Type}}} | Ship| {{#vardefine:skill | [[Construction]]}} }} {{#vardefine:amount | {{#expr: {{#ifeq: {{{?Stuff}}} | true | {{Q|{{{?Name}}}|Resource 1 Amount}} | {{#ifeq: {{Q|{{{?Name}}}|Resource 1}}|{{#var:material}}|{{Q|{{{?Name}}}|Resource 1 Amount}}|0}} }} * {{#ifeq: {{#var:material}} | Gold | 10 | {{#ifeq: {{#var:material}} | Silver | 10 | 1 }} }} + {{#ifeq: {{Q|{{{?Name}}}|Resource 2}}|{{#var:material}}|{{Q|{{{?Name}}}|Resource 2 Amount}}|0}} + {{#ifeq: {{Q|{{{?Name}}}|Resource 3}}|{{#var:material}}|{{Q|{{{?Name}}}|Resource 3 Amount}}|0}} + {{#ifeq: {{Q|{{{?Name}}}|Resource 4}}|{{#var:material}}|{{Q|{{{?Name}}}|Resource 4 Amount}}|0}} + {{#ifeq: {{Q|{{{?Name}}}|Resource 5}}|{{#var:material}}|{{Q|{{{?Name}}}|Resource 5 Amount}}|0}} + {{#ifeq: {{Q|{{{?Name}}}|Resource 6}}|{{#var:material}}|{{Q|{{{?Name}}}|Resource 6 Amount}}|0}} }} }} {{#vardefine:others | {{#ifeq: {{Q|{{{?Name}}}|Resource 1}} | Stuff | {{#ifeq: {{{?Stuff}}} | true || {{Q|{{{?Name}}}|Resource 1 Amount || {{Icon Small|Stuff}} }} }} | {{#ifeq: {{Q|{{{?Name}}}|Resource 1}} | {{#var:material}} ||{{Q|{{{?Name}}}| Resource 1 Amount || {{Icon Small|{{Q|{{{?Name}}}|Resource 1}} }} }} }} }}<!--- --->{{#if: {{Q|{{{?Name}}}|Resource 2}} | {{#ifeq: {{Q|{{{?Name}}}|Resource 2}} | {{#var:material}} || {{Q|{{{?Name}}}| Resource 2 Amount || {{Icon Small|{{Q|{{{?Name}}}|Resource 2}} }} }} }} }}<!--- --->{{#if: {{Q|{{{?Name}}}|Resource 3}} | {{#ifeq: {{Q|{{{?Name}}}|Resource 3}} | {{#var:material}} || {{Q|{{{?Name}}}| Resource 3 Amount || {{Icon Small|{{Q|{{{?Name}}}|Resource 3}} }} }} }} }}<!--- --->{{#if: {{Q|{{{?Name}}}|Resource 4}} | {{#ifeq: {{Q|{{{?Name}}}|Resource 4}} | {{#var:material}} || {{Q|{{{?Name}}}| Resource 4 Amount || {{Icon Small|{{Q|{{{?Name}}}|Resource 4}} }} }} }} }}<!--- --->{{#if: {{Q|{{{?Name}}}|Resource 5}} | {{#ifeq: {{Q|{{{?Name}}}|Resource 5}} | {{#var:material}} || {{Q|{{{?Name}}}| Resource 5 Amount || {{Icon Small|{{Q|{{{?Name}}}|Resource 5}} }} }} }} }}<!--- --->{{#if: {{Q|{{{?Name}}}|Resource 6}} | {{#ifeq: {{Q|{{{?Name}}}|Resource 6}} | {{#var:material}} || {{Q|{{{?Name}}}| Resource 6 Amount || {{Icon Small|{{Q|{{{?Name}}}|Resource 6}} }} }} }} }} }} {{#vardefine:workfactor | {{#if: {{Q|{{#var:material}}|Work To Build Factor}} | {{Q|{{#var:material}}|Work To Build Factor}} | 1 }} }} ! style="text-align: left" | [[{{{?Name}}}]] {{#ifeq: {{Q|{{{?Name}}}|From DLC}} | Royalty (DLC) |{{RoyaltyIcon}} }}{{#ifeq: {{Q|{{{?Name}}}|From DLC}} | Ideology (DLC) |{{IdeologyIcon}} }} | {{#var:amount}} {{Icon Small|{{#var:material}}}} {{#ifeq: {{{?Stuff}}} | true | ({{Q|{{{?Name}}}|Resource 1 Amount}} {{Icon Small|Stuff}}) }} | {{#ifeq: {{#var:others}} || - | {{#var:others}} }} | {{ticks/minutes|{{Q|{{{?Name}}}|Work To Make}}*{{#var:workfactor}} }} | {{#var:skill}} | {{#ifeq: {{{?Stuff}}} | true | {{Market Value Calculator|{{{?Name}}}|{{#var:material}}}} | {{Q|{{{?Name}}}|Market Value Base}} }} {{Icon Small|silver}} | {{#var:multiplier}} | {{ticks/seconds|{{#expr:{{formatnum:{{Q|{{{?Name}}}|Work To Make}}|R}}*{{#var:workfactor}}/({{#var:multiplier}}*{{Market Value Calculator|{{{?Name}}}|{{#var:material}}}})round2}}}} | {{#expr:{{Q|{{{?Name}}}|Resource 1 Amount}}/({{#var:multiplier}}*{{Market Value Calculator|{{{?Name}}}|{{#var:material}}}})round2}} | {{#ifeq: {{{?Sellable}}} | true | [[File:check.png|16px]] | [[File:ex.png|16px]] }} |-