Template:Manual Chem Box

From Space Station 14 Wiki
Revision as of 07:44, 14 September 2024 by Aliser (talk | contribs) (formatted template body)
Template documentation
view or edit this documentation about template documentation

This page will contain a basic overview of how manual chem boxes work, and also how auto chem boxes should work.

Data fields

  • {{id}}
    This is the ID used for the chembox div ID. The current standard according to the JSON is PascalCase. The ID is almost always the same text as the name, except for when it isn't (looking at you, copper blood)
  • {{name}}
    This is the name used in the display. It should be in Title Case. However, the data itself comes in lower case, as that's how the localisation files display it.
  • {{color}}
    This is the colour used in the header. It should be the colour taken from the game's files. It can be any CSS accepted color name, but hex must be proceeded by a hash.
  • {{textcolor}}
    This should be either black or white, depending on which contrasts more. The chem data does not contain this tag, so must be created on demand by any Modules.
  • {{recipes}}
    This should contain a joined list of all the relevant recipes used to make the chemical. Each recipe should be inputted as a Template:Recipe Box, where in each item follows Template:Recipe Component. For standard chemicals, the
    {{transformer}}
    component should take Template:Beaker. If the chemical requires a certain temperature, it can be passed into the Beaker component as
    |temperature=999k
    (replacing 999k with whatever temperature is required)
  • {{metabolisms}}
    is the effects list component. It should be listed in this format:
'''Subheading'''
* Effect Description
* Effect Description
In the data, there are three alternative forms of the effects data, but only effectLine should be needed.
  • {{desc}}
    This should be ended by a full stop.
  • {{physicalDesc}}
    This is a short descriptor. Use lower case and no full stop

Auto Chem Boxes (How they should work)

  1. An ID should be passed to a Module
  2. The Module should read User:UpAndLeaves/chemData.json
  3. The Module should return the following items, either with one function returning the entire template, or the individual functions returning seperate components:
    1. The name
    2. The color and text color
    3. The recipes (as stated above, should be parsed as a Template:Recipe Box with various components
    4. The effects (which can just be taken from effectLine)
    5. The description
    6. The physical description

Implementation Questions

  • Do we want to replace Template:Chembox or make a new one?
  • Do we want to have the template be a single function that returns a template or multiple functions inserted into a template?
  • Can we make the chemData expand outside of just medicines?
  • Can we actually just make anyone create new chemData using a program? (for User:UpAndLeaves to answer
No name
Recipes
No info
Effects
No info
No info
Seems to be ???.

TODO documentation