Difference between revisions of "Template:Recipe List Row"

From RimWorld Wiki
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}}×&nbsp;}}{{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=&nbsp;+|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=&nbsp;+|simple=1}}  
| {{#ifexpr: {{formatnum:{{{?Work}}} < 10|R}} | {{0|000,00}} | {{#ifexpr: {{formatnum:{{{?Work}}} < 100|R}} | {{0|000,0}} | {{#ifexpr: {{formatnum:{{{?Work}}} < 1000|R}} | {{0|000,}} | {{#ifexpr: {{formatnum:{{{?Work}}} < 10000|R}} | {{0|00}} | {{#ifexpr: {{formatnum:{{{?Work}}} < 100000|R}} | {{0}} }} }} }} }} }}{{Ticks|{{{?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;" {{!}} {{Q|{{{?Name}}}|Bulk Product Amount}}× {{Icon Small|{{{?Name}}} }} [[{{{?Name}}}]]{{#ifeq: {{Q|{{{?Name}}}|From DLC}}|Ideology (DLC)|{{IdeologyIcon}}}} {{#ifeq: {{Q|{{{?Name}}}|From DLC}}|Royalty (DLC)|{{RoyaltyIcon}}}}
+
! 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}}} }} }}" {{!}} {{Q|{{{?Name}}}|Bulk Product Amount}}× {{#if: {{{?R2a}}} | ( }}{{Required Resources|{{{?Name}}}|sep=&nbsp;+|simple=1}}{{#if: {{{?R2a}}} | ) }}
+
{{!}} 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=&nbsp;+|simple=1}}{{#if: {{{?R2a}}} | ) }}
{{!}} {{#ifexpr: {{formatnum:{{{?Work}}} < 10|R}} | {{0|000,00}} | {{#ifexpr: {{formatnum:{{{?Work}}} < 100|R}} | {{0|000,0}} | {{#ifexpr: {{formatnum:{{{?Work}}} < 1000|R}} | {{0|000,}} | {{#ifexpr: {{formatnum:{{{?Work}}} < 10000|R}} | {{0|00}} | {{#ifexpr: {{formatnum:{{{?Work}}} < 100000|R}} | {{0}} }} }} }} }} }}{{Q|{{{?Name}}}|Bulk Product Amount}}× {{Ticks|{{{?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

Documentation icon Template documentation[view] [edit] [history] [purge]

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}}

  • Name Materials Work to Make Required Research Type
    Advanced component Advanced component Component 1 + Steel 20 + Plasteel 10 + Gold 3 010,000 ticks (2.78 mins) Crafted resources
    Component Component Steel 12 005,000 ticks (1.39 mins) Crafted resources
    Charge lance Charge lance Plasteel 60 + Advanced component 3 060,000 ticks (16.67 mins) Equipment - Weapons
    Charge rifle Charge rifle Plasteel 50 + Advanced component 2 045,000 ticks (12.5 mins) Equipment - Weapons
    Marine armor Marine armor Plasteel 100 + Uranium 20 + Advanced component 4 060,000 ticks (16.67 mins) Gear - Armor
    Marine helmet Marine helmet Plasteel 40 + Advanced component 1 021,000 ticks (5.83 mins) Gear - Armor
    Recon armor Recon armor Plasteel 80 + Uranium 10 + Advanced component 3 045,000 ticks (12.5 mins) Gear - Armor
    Recon helmet Recon helmet Plasteel 30 + Advanced component 1 015,750 ticks (4.38 mins) Gear - Armor
    Bionic arm Bionic arm Plasteel 15 + Advanced component 4 026,000 ticks (7.22 mins) Medical Items - Body Parts
    Bionic ear Bionic ear Plasteel 10 + Advanced component 3 026,000 ticks (7.22 mins) Medical Items - Body Parts
    Bionic eye Bionic eye Plasteel 15 + Advanced component 4 026,000 ticks (7.22 mins) Medical Items - Body Parts
    Bionic heart Bionic heart Plasteel 15 + Advanced component 4 026,000 ticks (7.22 mins) Medical Items - Body Parts
    Bionic leg Bionic leg Plasteel 15 + Advanced component 4 026,000 ticks (7.22 mins) Medical Items - Body Parts
    Bionic spine Bionic spine Plasteel 15 + Advanced component 4 026,000 ticks (7.22 mins) Medical Items - Body Parts
    Bionic stomach Bionic stomach Plasteel 10 + Advanced component 3 026,000 ticks (7.22 mins) Medical Items - Body Parts
    Bionic tongue Bionic tongue Plasteel 8 + Advanced component 2 026,000 ticks (7.22 mins) Medical Items - Body Parts
    Integrator headset Integrator headset Plasteel 50 + Component 4 + Advanced component 4 + Powerfocus chip 1 015,750 ticks (4.38 mins) Gear - Armor
    Mechlord helmet Mechlord helmet Plasteel 120 + Advanced component 6 + Nano structuring chip 2 015,750 ticks (4.38 mins) Gear - Armor
    Mechlord suit Mechlord suit Plasteel 120 + Advanced component 8 + Nano structuring chip 2 + Powerfocus chip 1 060,000 ticks (16.67 mins) Gear - Armor
    Detoxifier kidney Detoxifier kidney Plasteel 15 + Advanced component 2 026,000 ticks (7.22 mins) Medical Items - Body Parts
    Detoxifier lung Detoxifier lung Plasteel 15 + Advanced component 4 026,000 ticks (7.22 mins) Medical Items - Body Parts
    Cataphract armor Cataphract armor Content added by the Royalty DLC Plasteel 150 + Uranium 50 + Advanced component 6 075,000 ticks (20.83 mins) Gear - Armor
    Cataphract helmet Cataphract helmet Content added by the Royalty DLC Plasteel 50 + Advanced component 1 026,250 ticks (7.29 mins) Gear - Armor
    Grenadier armor Grenadier armor Content added by the Royalty DLC Plasteel 100 + Uranium 20 + Advanced component 4 + Steel 75 + Component 4 060,000 ticks (16.67 mins) Gear - Armor
    Gunlink Gunlink Content added by the Royalty DLC Plasteel 10 + Advanced component 1 015,750 ticks (4.38 mins) Gear - Armor
    Locust armor Locust armor Content added by the Royalty DLC Plasteel 120 + Uranium 10 + Advanced component 3 + Component 3 + Chemfuel 100 045,000 ticks (12.5 mins) Gear - Armor
    Phoenix armor Phoenix armor Content added by the Royalty DLC Plasteel 150 + Uranium 50 + Advanced component 6 + Steel 75 + Component 4 + Chemfuel 40 075,000 ticks (20.83 mins) Gear - Armor
    Prestige cataphract armor Prestige cataphract armor Content added by the Royalty DLC Plasteel 190 + Uranium 50 + Advanced component 6 + Gold 180 150,000 ticks (41.67 mins) Gear - Armor
    Prestige cataphract helmet Prestige cataphract helmet Content added by the Royalty DLC Plasteel 75 + Advanced component 1 + Gold 90 052,500 ticks (14.58 mins) Gear - Armor
    Prestige marine armor Prestige marine armor Content added by the Royalty DLC Plasteel 120 + Uranium 20 + Advanced component 4 + Gold 100 120,000 ticks (33.33 mins) Gear - Armor
    Prestige marine helmet Prestige marine helmet Content added by the Royalty DLC Plasteel 50 + Advanced component 1 + Gold 50 042,000 ticks (11.67 mins) Gear - Armor
    Prestige recon armor Prestige recon armor Content added by the Royalty DLC Plasteel 100 + Uranium 10 + Advanced component 3 + Gold 90 090,000 ticks (25 mins) Gear - Armor
    Prestige recon helmet Prestige recon helmet Content added by the Royalty DLC Plasteel 40 + Advanced component 1 + Gold 40 015,750 ticks (4.38 mins) Gear - Armor
    Aesthetic nose Aesthetic nose Content added by the Royalty DLC Plasteel 10 + Advanced component 2 026,000 ticks (7.22 mins) Medical Items - Body Parts
    Aesthetic shaper Aesthetic shaper Content added by the Royalty DLC Plasteel 15 + Advanced component 3 026,000 ticks (7.22 mins) Medical Items - Body Parts
    Armorskin gland Armorskin gland Content added by the Royalty DLC Plasteel 20 + Advanced component 6 026,000 ticks (7.22 mins) Medical Items - Body Parts
    Circadian assistant Circadian assistant Content added by the Royalty DLC Plasteel 15 + Advanced component 4 026,000 ticks (7.22 mins) Medical Items - Body Parts
    Circadian half-cycler Circadian half-cycler Content added by the Royalty DLC Plasteel 15 + Advanced component 4 026,000 ticks (7.22 mins) Medical Items - Body Parts
    Coagulator Coagulator Content added by the Royalty DLC Plasteel 15 + Advanced component 4 026,000 ticks (7.22 mins) Medical Items - Body Parts
    Gastro-analyzer Gastro-analyzer Content added by the Royalty DLC Plasteel 15 + Advanced component 3 026,000 ticks (7.22 mins) Medical Items - Body Parts
    Healing enhancer Healing enhancer Content added by the Royalty DLC Plasteel 15 + Advanced component 4 026,000 ticks (7.22 mins) Medical Items - Body Parts
    Immunoenhancer Immunoenhancer Content added by the Royalty DLC Plasteel 15 + Advanced component 4 026,000 ticks (7.22 mins) Medical Items - Body Parts
    Learning assistant Learning assistant Content added by the Royalty DLC Plasteel 15 + Advanced component 4 026,000 ticks (7.22 mins) Medical Items - Body Parts
    Love enhancer Love enhancer Content added by the Royalty DLC Plasteel 15 + Advanced component 4 026,000 ticks (7.22 mins) Medical Items - Body Parts
    Neurocalculator Neurocalculator Content added by the Royalty DLC Plasteel 15 + Advanced component 4 026,000 ticks (7.22 mins) Medical Items - Body Parts
    Nuclear stomach Nuclear stomach Content added by the Royalty DLC Plasteel 15 + Advanced component 4 026,000 ticks (7.22 mins) Medical Items - Body Parts
    Reprocessor stomach Reprocessor stomach Content added by the Royalty DLC Plasteel 15 + Advanced component 4 026,000 ticks (7.22 mins) Medical Items - Body Parts
    Sterilizing stomach Sterilizing stomach Content added by the Royalty DLC Plasteel 15 + Advanced component 4 026,000 ticks (7.22 mins) Medical Items - Body Parts
    Stoneskin gland Stoneskin gland Content added by the Royalty DLC Plasteel 25 + Advanced component 8 026,000 ticks (7.22 mins) Medical Items - Body Parts
    Toughskin gland Toughskin gland Content added by the Royalty DLC Plasteel 15 + Advanced component 4 026,000 ticks (7.22 mins) Medical Items - Body Parts
  • And {{Recipe List|Fueled smithy}}

  • Name Materials Work to Make Required Research Type
    Breach axe Breach axe Stuff 50 (Metallic) 005,000 ticks (1.39 mins) Equipment - Weapons
    Club Club Stuff 40 (Metallic/Woody/Stony) 001,200 ticks (20 secs) Equipment - Weapons
    Gladius Gladius Stuff 50 (Metallic/Woody) 012,000 ticks (3.33 mins) Equipment - Weapons
    Greatbow Greatbow Wood 60 009,000 ticks (2.5 mins) Equipment - Weapons
    Ikwa Ikwa Stuff 50 (Metallic/Woody) 005,000 ticks (1.39 mins) Equipment - Weapons
    Knife Knife Stuff 30 (Metallic) 001,800 ticks (30 secs) Equipment - Weapons
    Longsword Longsword Stuff 100 (Metallic/Woody) 018,000 ticks (5 mins) Equipment - Weapons
    Mace Mace Stuff 50 (Metallic/Woody) 006,000 ticks (1.67 mins) Equipment - Weapons
    Pila Pila Wood 70 007,000 ticks (1.94 mins) Equipment - Weapons
    Recurve bow Recurve bow Wood 40 005,000 ticks (1.39 mins) Equipment - Weapons
    Short bow Short bow Wood 30 002,400 ticks (40 secs) Equipment - Weapons
    Spear Spear Stuff 75 (Metallic/Woody) 012,000 ticks (3.33 mins) Equipment - Weapons
    Plate armor Plate armor Stuff 170 (Metallic/Woody) 038,000 ticks (10.56 mins) Gear - Armor
    Simple helmet Simple helmet Stuff 40 (Metallic) 003,200 ticks (53.33 secs) Gear - Armor
    Kid helmet Kid helmet Stuff 20 (Metallic) 002,000 ticks (33.33 secs) Gear - Armor
    Torture crown Torture crownContent added by the Ideology DLC Stuff 25 (Metallic/Woody) 001,200 ticks (20 secs) Gear - Clothing
    Harp Harp Content added by the Royalty DLC Wood 150 018,000 ticks (5 mins) Building - Recreation
    Harpsichord Harpsichord Content added by the Royalty DLC Wood 250 032,000 ticks (8.89 mins) Building - Recreation
    Piano Piano Content added by the Royalty DLC Steel 120 + Wood 220 050,000 ticks (13.89 mins) Building - Recreation
    Axe Axe Content added by the Royalty DLC Stuff 50 (Metallic/Woody) 007,000 ticks (1.94 mins) Equipment - Weapons
    Warhammer Warhammer Content added by the Royalty DLC Stuff 150 (Metallic/Woody) 018,000 ticks (5 mins) Equipment - Weapons
    Coronet Coronet Content added by the Royalty DLC Stuff 50 (Metallic) 008,000 ticks (2.22 mins) Gear - Clothing
    Crown Crown Content added by the Royalty DLC Stuff 75 (Metallic) 012,000 ticks (3.33 mins) Gear - Clothing
  • Name Materials Work to Make Required Research Type
    Psychite tea Psychite tea Psychoid leaves 4 000,400 ticks (6.67 secs) Drug - Social drug
    Psychite tea Psychite tea 4× (Psychoid leaves 4) 001,600 ticks (26.67 secs) Drug - Social drug
    Carnivore fine meal Carnivore fine meal 0.75 Nutrition (meat) 000,450 ticks (7.5 secs) Food - Meal
    Carnivore fine meal Carnivore fine meal 4× (0.75 Nutrition (meat)) 001,800 ticks (30 secs) Food - Meal
    Carnivore lavish meal Carnivore lavish meal 1.25 Nutrition (meat) 000,800 ticks (13.33 secs) Food - Meal
    Carnivore lavish meal Carnivore lavish meal 4× (1.25 Nutrition (meat)) 003,200 ticks (53.33 secs) Food - Meal
    Fine meal Fine meal 0.25 Nutrition (non-vegan) + 0.25 Nutrition (vegan) 000,450 ticks (7.5 secs) Food - Meal
    Fine meal Fine meal 4× (0.25 Nutrition (non-vegan) + 0.25 Nutrition (vegan)) 001,800 ticks (30 secs) Food - Meal
    Lavish meal Lavish meal 0.5 Nutrition (non-vegan) + 0.5 Nutrition (vegan) 000,800 ticks (13.33 secs) Food - Meal
    Lavish meal Lavish meal 4× (0.5 Nutrition (non-vegan) + 0.5 Nutrition (vegan)) 003,200 ticks (53.33 secs) Food - Meal
    Packaged survival meal Packaged survival meal 0.3 Nutrition (non-vegan) + 0.3 Nutrition (vegan) 000,450 ticks (7.5 secs) Food - Meal
    Packaged survival meal Packaged survival meal 4× (0.3 Nutrition (non-vegan) + 0.3 Nutrition (vegan)) 001,800 ticks (30 secs) Food - Meal
    16× Pemmican Pemmican 0.25 Nutrition (meat) + 0.25 Nutrition (vegan) 000,700 ticks (11.67 secs) Food - Meal
    64× Pemmican Pemmican 4× (0.25 Nutrition (meat) + 0.25 Nutrition (vegan)) 002,800 ticks (46.67 secs) Food - Meal
    Simple meal Simple meal 0.5 Nutrition (any) 000,300 ticks (5 secs) Food - Meal
    Simple meal Simple meal 4× (0.5 Nutrition (any)) 001,200 ticks (20 secs) Food - Meal
    Vegetarian fine meal Vegetarian fine meal 0.75 Nutrition (vegetarian) 000,450 ticks (7.5 secs) Food - Meal
    Vegetarian fine meal Vegetarian fine meal 4× (0.75 Nutrition (vegetarian)) 001,800 ticks (30 secs) Food - Meal
    Vegetarian lavish meal Vegetarian lavish meal 1.25 Nutrition (vegetarian) 000,800 ticks (13.33 secs) Food - Meal
    Vegetarian lavish meal Vegetarian lavish meal 4× (1.25 Nutrition (vegetarian)) 003,200 ticks (53.33 secs) Food - Meal
    10× Baby food Baby food 0.25 Nutrition (vegetarian) 000,450 ticks (7.5 secs) Food
    40× Baby food Baby food 4× (0.25 Nutrition (vegetarian)) 001,800 ticks (30 secs) Food
  • Name Materials Work to Make Required Research Type
    Psychite tea Psychite tea Psychoid leaves 4 000,400 ticks (6.67 secs) Drug - Social drug
    Psychite tea Psychite tea 4× (Psychoid leaves 4) 001,600 ticks (26.67 secs) Drug - Social drug
    16× Pemmican Pemmican 0.25 Nutrition (meat) + 0.25 Nutrition (vegan) 000,700 ticks (11.67 secs) Food - Meal
    64× Pemmican Pemmican 4× (0.25 Nutrition (meat) + 0.25 Nutrition (vegan)) 002,800 ticks (46.67 secs) Food - Meal
    Simple meal Simple meal 0.5 Nutrition (any) 000,300 ticks (5 secs) Food - Meal
    Simple meal Simple meal 4× (0.5 Nutrition (any)) 001,200 ticks (20 secs) Food - Meal
    10× Baby food Baby food 0.25 Nutrition (vegetarian) 000,450 ticks (7.5 secs) Food
    40× Baby food Baby food 4× (0.25 Nutrition (vegetarian)) 001,800 ticks (30 secs) Food