Difference between revisions of "Template:Recipe List Row"
Jump to navigation
Jump to search
(added rudimentary support for bulk recipes) |
(Factor work table efficiency in; take product amount into account; improvements) |
||
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
|- style="text-align:left;" | |- style="text-align:left;" | ||
− | ! style="text-align:left;" | {{Icon Small|{{{?Name}}} }} [[{{{?Name}}}]]{{#ifeq: {{Q|{{{?Name}}}|From DLC}}|Ideology (DLC)|{{IdeologyIcon}}}} {{#ifeq: {{Q|{{{?Name}}}|From DLC}}|Royalty (DLC)|{{RoyaltyIcon}}}} | + | ! style="text-align:left;" | {{#if:{{#vardefineecho:amount|{{Q|{{{?Name}}}|Product Amount}}}}|{{#var:amount}}× }}{{Icon Small|{{{?Name}}} }} [[{{{?Name}}}]]{{#ifeq: {{Q|{{{?Name}}}|From DLC}}|Ideology (DLC)|{{IdeologyIcon}}}} {{#ifeq: {{Q|{{{?Name}}}|From DLC}}|Royalty (DLC)|{{RoyaltyIcon}}}} |
| data-sort-value="{{#expr: {{{?R1a}}} {{#if: {{{?R2a}}} | + {{{?R2a}}} }} {{#if: {{{?R3a}}} | + {{{?R3a}}} }} {{#if: {{{?R4a}}} | + {{{?R4a}}} }} {{#if: {{{?R5a}}} | + {{{?R5a}}} }} {{#if: {{{?R6a}}} | + {{{?R6a}}} }} }}" | {{Required Resources|{{{?Name}}}|sep= +|simple=1}} | | data-sort-value="{{#expr: {{{?R1a}}} {{#if: {{{?R2a}}} | + {{{?R2a}}} }} {{#if: {{{?R3a}}} | + {{{?R3a}}} }} {{#if: {{{?R4a}}} | + {{{?R4a}}} }} {{#if: {{{?R5a}}} | + {{{?R5a}}} }} {{#if: {{{?R6a}}} | + {{{?R6a}}} }} }}" | {{Required Resources|{{{?Name}}}|sep= +|simple=1}} | ||
− | | {{#ifexpr: {{formatnum:{{{?Work}}} | + | | {{#ifexpr: {{#vardefineecho:work|{{#expr:{{formatnum:{{{?Work}}}|R}}}}{{#if:{{Q|{{#var:name}}|Efficiency}}|/{{Q|{{#var:name}}|Efficiency}}}}}} < 10 | {{0|000,00}} | {{#ifexpr: {{#var:work}} < 100 | {{0|000,0}} | {{#ifexpr: {{#var:work}} < 1000 | {{0|000,}} | {{#ifexpr: {{#var:work}} < 10000 | {{0|00}} | {{#ifexpr: {{#var:work}} < 100000 | {{0}} }} }} }} }} }}{{Ticks|{{#var:work}} }} |
| [[{{{?Type}}}]] {{#if:{{{?Type2}}}|- [[{{{?Type2}}}]] }}<!-- | | [[{{{?Type}}}]] {{#if:{{{?Type2}}}|- [[{{{?Type2}}}]] }}<!-- | ||
− | -->{{#if: {{Q|{{{?Name}}}|Bulk Product Amount}} | | + | -->{{#if: {{#vardefineecho:amountBulk|{{Q|{{{?Name}}}|Bulk Product Amount}}}} | |
<tr style="text-align:left;"> | <tr style="text-align:left;"> | ||
− | ! style="text-align:left;" {{!}} {{ | + | ! style="text-align:left;" {{!}} {{#var:amountBulk}}× {{Icon Small|{{{?Name}}} }} [[{{{?Name}}}]]{{#ifeq: {{Q|{{{?Name}}}|From DLC}}|Ideology (DLC)|{{IdeologyIcon}}}} {{#ifeq: {{Q|{{{?Name}}}|From DLC}}|Royalty (DLC)|{{RoyaltyIcon}}}} |
− | {{!}} data-sort-value="{{#expr: {{{?R1a}}} {{#if: {{{?R2a}}} | + {{{?R2a}}} }} {{#if: {{{?R3a}}} | + {{{?R3a}}} }} {{#if: {{{?R4a}}} | + {{{?R4a}}} }} {{#if: {{{?R5a}}} | + {{{?R5a}}} }} {{#if: {{{?R6a}}} | + {{{?R6a}}} }} }}" {{!}} {{ | + | {{!}} data-sort-value="{{#expr: {{{?R1a}}} {{#if: {{{?R2a}}} | + {{{?R2a}}} }} {{#if: {{{?R3a}}} | + {{{?R3a}}} }} {{#if: {{{?R4a}}} | + {{{?R4a}}} }} {{#if: {{{?R5a}}} | + {{{?R5a}}} }} {{#if: {{{?R6a}}} | + {{{?R6a}}} }} }}" {{!}} {{#expr:{{#var:amountBulk}}/{{#var:amount|1}} round 0}}× {{#if: {{{?R2a}}} | ( }}{{Required Resources|{{{?Name}}}|sep= +|simple=1}}{{#if: {{{?R2a}}} | ) }} |
− | {{!}} {{#ifexpr: {{formatnum:{{{?Work}}} | + | {{!}} {{#ifexpr: {{#vardefineecho:work|{{#expr:{{formatnum:{{{?Work}}}|R}}}}{{#if:{{Q|{{#var:name}}|Efficiency}}|/{{Q|{{#var:name}}|Efficiency}}}}*{{#var:amountBulk}}/{{#var:amount|1}} round 0}} < 10 | {{0|000,00}} | {{#ifexpr: {{#var:work}} < 100 | {{0|000,0}} | {{#ifexpr: {{#var:work}} < 1000 | {{0|000,}} | {{#ifexpr: {{#var:work}} < 10000 | {{0|00}} | {{#ifexpr: {{#var:work}} < 100000 | {{0}} }} }} }} }} }}{{Ticks|{{#var:work}} }} |
{{!}} [[{{{?Type}}}]] {{#if:{{{?Type2}}}|- [[{{{?Type2}}}]] }} | {{!}} [[{{{?Type}}}]] {{#if:{{{?Type2}}}|- [[{{{?Type2}}}]] }} | ||
}}</tr> | }}</tr> | ||
</includeonly><noinclude> | </includeonly><noinclude> | ||
− | {{Documentation}}{{Recipe List|Electric stove}}</noinclude> | + | {{Documentation}}{{Recipe List|Electric stove}}{{Recipe List|Campfire}}</noinclude> |
Revision as of 19:23, 19 September 2022
This template is only ever called as part of Template:Recipe List . It uses the variables provided by the different #asks in that template to create sections of the table that the primary template then assembles into one table.
Example usage
This template isn't designed to be used in isolation, so as an example we'll show {{Recipe List|Fabrication bench}}
And {{Recipe List|Fueled smithy}}
Name | Materials | Work to Make | Required Research | Type |
---|---|---|---|---|
Breach axe | 50 (Metallic, 500 for SMVs) | ticks (1.39 mins) | 5,000Equipment - Weapons | |
Club | 40 (Metallic/Woody/Stony, 400 for SMVs) | ticks (20 secs) | 1,200Equipment - Weapons | |
Gladius | 50 (Metallic/Woody, 500 for SMVs) | ticks (3.33 mins) | 12,000Equipment - Weapons | |
Greatbow | 60 | ticks (2.5 mins) | 9,000Equipment - Weapons | |
Ikwa | 50 (Metallic/Woody, 500 for SMVs) | ticks (1.39 mins) | 5,000Equipment - Weapons | |
Knife | 30 (Metallic, 300 for SMVs) | ticks (30 secs) | 1,800Equipment - Weapons | |
Longsword | 100 (Metallic/Woody, 1000 for SMVs) | ticks (5 mins) | 18,000Equipment - Weapons | |
Mace | 50 (Metallic/Woody, 500 for SMVs) | ticks (1.67 mins) | 6,000Equipment - Weapons | |
Pila | 70 | ticks (1.94 mins) | 7,000Equipment - Weapons | |
Recurve bow | 40 | ticks (1.39 mins) | 5,000Equipment - Weapons | |
Short bow | 30 | ticks (40 secs) | 2,400Equipment - Weapons | |
Spear | 75 (Metallic/Woody, 750 for SMVs) | ticks (3.33 mins) | 12,000Equipment - Weapons | |
Plate armor | 170 (Metallic/Woody, 1700 for SMVs) | ticks (10.56 mins) | 38,000Gear - Armor | |
Simple helmet | 40 (Metallic, 400 for SMVs) | ticks (53.33 secs) | 3,200Gear - Armor | |
Kid helmet | 20 (Metallic, 200 for SMVs) | ticks (33.33 secs) | 2,000Gear - Armor | |
Torture crown | 25 (Metallic/Woody, 250 for SMVs) | ticks (20 secs) | 1,200Gear - Clothing | |
Harp | 150 | ticks (5 mins) | 18,000Building - Recreation | |
Harpsichord | 250 | ticks (8.89 mins) | 32,000Building - Recreation | |
Piano | 120 + 220 | ticks (13.89 mins) | 50,000Building - Recreation | |
Axe | 50 (Metallic/Woody, 500 for SMVs) | ticks (1.94 mins) | 7,000Equipment - Weapons | |
Warhammer | 150 (Metallic/Woody, 1500 for SMVs) | ticks (5 mins) | 18,000Equipment - Weapons | |
Coronet | 50 (Metallic, 500 for SMVs) | ticks (2.22 mins) | 8,000Gear - Clothing | |
Crown | 75 (Metallic, 750 for SMVs) | ticks (3.33 mins) | 12,000Gear - Clothing |
The above documentation is transcluded from Template:Recipe List 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. |
Name | Materials | Work to Make | Required Research | Type |
---|---|---|---|---|
Psychite tea | 4 | ticks (6.67 secs) | 400Drug - Social drug | |
4× Psychite tea | 4× ( 4) | ticks (26.67 secs) | 1,600Drug - Social drug | |
Carnivore fine meal | 0.75 Nutrition (meat) | ticks (7.5 secs) | 450Food - Meal | |
4× Carnivore fine meal | 4× (0.75 Nutrition (meat)) | ticks (30 secs) | 1,800Food - Meal | |
Carnivore lavish meal | 1.25 Nutrition (meat) | ticks (13.33 secs) | 800Food - Meal | |
4× Carnivore lavish meal | 4× (1.25 Nutrition (meat)) | ticks (53.33 secs) | 3,200Food - Meal | |
Fine meal | 0.25 Nutrition (non-vegan) + 0.25 Nutrition (vegan) | ticks (7.5 secs) | 450Food - Meal | |
4× Fine meal | 4× (0.25 Nutrition (non-vegan) + 0.25 Nutrition (vegan)) | ticks (30 secs) | 1,800Food - Meal | |
Lavish meal | 0.5 Nutrition (non-vegan) + 0.5 Nutrition (vegan) | ticks (13.33 secs) | 800Food - Meal | |
4× Lavish meal | 4× (0.5 Nutrition (non-vegan) + 0.5 Nutrition (vegan)) | ticks (53.33 secs) | 3,200Food - Meal | |
Packaged survival meal | 0.3 Nutrition (non-vegan) + 0.3 Nutrition (vegan) | ticks (7.5 secs) | 450Food - Meal | |
4× Packaged survival meal | 4× (0.3 Nutrition (non-vegan) + 0.3 Nutrition (vegan)) | ticks (30 secs) | 1,800Food - Meal | |
16× Pemmican | 0.25 Nutrition (meat) + 0.25 Nutrition (vegan) | ticks (11.67 secs) | 700Food - Meal | |
64× Pemmican | 4× (0.25 Nutrition (meat) + 0.25 Nutrition (vegan)) | ticks (46.67 secs) | 2,800Food - Meal | |
Simple meal | 0.5 Nutrition (any) | ticks (5 secs) | 300Food - Meal | |
4× Simple meal | 4× (0.5 Nutrition (any)) | ticks (20 secs) | 1,200Food - Meal | |
Vegetarian fine meal | 0.75 Nutrition (vegetarian) | ticks (7.5 secs) | 450Food - Meal | |
4× Vegetarian fine meal | 4× (0.75 Nutrition (vegetarian)) | ticks (30 secs) | 1,800Food - Meal | |
Vegetarian lavish meal | 1.25 Nutrition (vegetarian) | ticks (13.33 secs) | 800Food - Meal | |
4× Vegetarian lavish meal | 4× (1.25 Nutrition (vegetarian)) | ticks (53.33 secs) | 3,200Food - Meal | |
10× Baby food | 0.25 Nutrition (vegetarian) | ticks (7.5 secs) | 450Food | |
40× Baby food | 4× (0.25 Nutrition (vegetarian)) | ticks (30 secs) | 1,800Food |
Name | Materials | Work to Make | Required Research | Type |
---|---|---|---|---|
Psychite tea | 4 | ticks (6.67 secs) | 400Drug - Social drug | |
4× Psychite tea | 4× ( 4) | ticks (26.67 secs) | 1,600Drug - Social drug | |
16× Pemmican | 0.25 Nutrition (meat) + 0.25 Nutrition (vegan) | ticks (11.67 secs) | 700Food - Meal | |
64× Pemmican | 4× (0.25 Nutrition (meat) + 0.25 Nutrition (vegan)) | ticks (46.67 secs) | 2,800Food - Meal | |
Simple meal | 0.5 Nutrition (any) | ticks (5 secs) | 300Food - Meal | |
4× Simple meal | 4× (0.5 Nutrition (any)) | ticks (20 secs) | 1,200Food - Meal | |
10× Baby food | 0.25 Nutrition (vegetarian) | ticks (7.5 secs) | 450Food | |
40× Baby food | 4× (0.25 Nutrition (vegetarian)) | ticks (30 secs) | 1,800Food |