Template:SkillCraft
Please DO NOT CHANGE this template without checking the result on the recipe page!
This template is used to provide the functions for the SkillCraft portion of the Normal Crafting Table in the Template:Recipe. By using only 2 parameters |skill=
& |skillmod=
applied to fixed #switch functions in the recipe template the code is simplified to make easy changes in the future as well as reducing the amount of repetitive code required.
Exceptions
Item recipes that have their crafting cost reduced by a certain skill have a standard or alternative multiplier (e.g. Steel & Electrical items with Advanced Engineering) applied to them per skill level. There are some exceptions to which no multiplier is applied OR the multiplier is non-standard:
- All skills
- Any ingredient with count=1 unaffected (for Master Chef count<=2)
- Advanced Engineering
- Glue recipes (-1 Bone or Ear of Super Corn at lvl 1)
- Grease Monkey
- Master Chef
- Hobo Stew recipe (-2 at lvl 1, -4 at lvl 3)
- Grandpa's Awesome Sauce recipe (x0.8 at lvl 1, x0.6 at lvl 3)
- Living Off The Land
These are hardcoded in the template, no user input is required.
Future Changes
If the need arises to update the template, consider that the code is roughly build up in 2 parts:
Part 1: Column Span + Values
If the column span or the data (level bundles) displayed need to be different you may edit the values that exist or add a new value to the #switch function. Note the column span is the first number and the cell data is whatever follows the , resulting from the switch function so a new value should be written as EXCEPTION= [Desired Columnspan], !style="padding:4px"{{!}}[Desired Lvl] !!style="padding:4px"{{!}}[Desired Lvl]....
Part 2: Multipliers
If the multipliers change you may edit the values that exist or add a new value to the #switch function. Exceptions in the #switch function where no multiplier is applied should result in EXCEPTION={{!}}colspan="{{#explode: {{#var:skillcolspan}}|}}"{{!}}{{{itemcount|}}} (to display the associated item's count and make it span the set column width) OR when a non-standard/new multiplier is applied ALT MULTIPLIER={{!}}[multiplier1] {{!}}{{!}}[multiplier2] {{!}}{{!}}[multiplier#]....
If you add a new exception please update the list in Exceptions above to inform other editors of this page.
If you need help editing or wish to contribute or have questions about this template join our 7 Days to Die Editors Discord and have access to the Admins and makes of this template!