User:Beerbelott/Recipes

From No Man's Sky Wiki
Jump to: navigation, search

Recipes revamp project[edit | edit source]

Motivation[edit | edit source]

Following the addition of the cooking mechanism to the game in Beyond, a process very similar to refining (ingredients using a machine, transformed with a recipe having a name with a time/unit output rate), I digged into existing templates to represent those.

At first, I duplicated Template:Refine but found it suboptimal, as its parameters are hardcoded, making it hardly readable, hardly maintainable & not scalable.

Then, I realized Template:Craft was displaying recipes in a different fashion, and that its code was very different from Template:Refine while semantically supposed to be close.

All those oddities, being most probably the result of iterative additions by multiple people over a long period of time without liaising, are absolutely normal. This seeded the idea of revamping the existing mechanisms under a common banner, to:

  1. Ease readability, which also
  2. Ease maintainability, and
  3. Ease scalability (by copy-pasting with minimal modifications), if another looking-alike in-game mechanism was to be detected

Creation of the PoC- templates[edit | edit source]

Resources
Use Crafting Refining Cooking Repairing Dismantling
Recipe definition Template:PoC-Craft Template:PoC-Refine Template:PoC-Cook Template:PoC-Repair Template:PoC-Dismantle
Cargo table Special:CargoTables/PoC Crafting Special:CargoTables/PoC Refining Special:CargoTables/PoC Cooking - -
Recipes query template Template:PoC-Query Crafting Template:PoC-Query Refining Template:PoC-Query Cooking - -
Recipes query module Module:PoC-Crafting Module:PoC-Refining Module:PoC-Cooking - -

Ingredients are being defined with the help from Template:PoC-Ingredient.

As of 2019-09-30, the following templates/modules are now not used anymore:

Considering that the old cargo table has been emptied and all old templates/modules are not being used anymore, a next step would be that all PoC--prefixed templates/modules need to be stripped from their prefix (copied or moved) and all Wiki pages referencing those need to be bulk-edited for search/replace of the called templates. User:Ddfairchild acknowledged this and will get in touch with Gamepedia staff if/when deemed necessary.

Transition to production names (aka The Big PoC- removal)[edit | edit source]

Starting 2020-07-28, non-PoC-prefixed variants of the aforementioned templates have been (re)created.

The following table tracks their status (unlinked templates are either not existing or old versions, not part of this project):

Resources
Use Crafting Refining Cooking Repairing Dismantling
Recipe definition Template:Craft Template:Refine Template:Cook Template:Repair Template:Dismantle
Cargo table Special:CargoTables/Crafting Special:CargoTables/Refining Special:CargoTables/Cooking - -
Recipes query template Template:Query Crafting Template:Query Refining Template:Query Cooking - -
Recipes query module Module:Crafting Module:Refining Module:Cooking - -

Ingredients are being defined with the help from Template:Ingredient.

Potential needs[edit | edit source]

Notes[edit | edit source]