Thread Rating:
  • 8 Vote(s) - 4.38 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mysha's Recipe Manager + Telesci Utilities
#12
The program is designed to easily add new recipes. Let's look at a sample recipe in the wiki.txt recipe list:
Code:
- name: Synthflesh
    ingredients:
      - Blood
      - Carbon
      - Styptic Powder
    info:
      depletion_rate: 0.4
      per_cycle: Does nothing in the bloodstream currently.
      application_effect: |
                          -TOUCH: Heals 1.5 BRUTE and 1.5 BURN per unit applied.
      notes: Splashing a beaker of synthflesh on someone is very, very effective. The medics will love chemistry a whole lot if you provide them with synthflesh patches or beakers.

Indentation is important, and the formatting has to be valid YAML, but it's trivial. Adding a new reagent named for example "Unobtainium" would be as simple as adding:
Code:
- name: Unobtainium

Adding the ingredients that you need to add to make it is also simple:
Code:
- name: Unobtainium
    ingredients:
      - Impossibrium
      - Phlebotinum
      - Hardtofindium
    heat_to: 1000

heat_to just shows you that you need to heat the ingredients to the specified temperature (here 1000) to make the reagent.

If you want to add some information, just add the 'info' section:
Code:
- name: Unobtainium
    ingredients:
      - Impossibrium
      - Phlebotinum
      - Hardtofindium
    heat_to: 1000
    info:
      notes: This is very hard to obtain
      per_cycle: Does something completely random.
      weight: Infinity kg

All the fields in the info section are just names that will show up as labels, the standard ones as proper capitalized labels (that were defined in the translation file), the non-standard (here: weight) will be just as you tped them in the file (so 'weight' in this example).

Adding new recipe lists is also as easy. Just create a new text file, and include:
Code:
name: New recipe list
recipes:


'name' defines what the recipe list will be called. Under 'recipes' you will add the reagent definitions (so the ' - name: Somethingium').

So a new recipe list with one recipe could look like this:
Code:
name: New recipe list
recipes:
  - name: Unobtainium
    ingredients:
      - Impossibrium
      - Phlebotinum
      - Hardtofindium
    heat_to: 1000
    info:
      notes: This is very hard to obtain
      per_cycle: Does something completely random.
      weight: Infinity kg

Or maybe as simple as:
Code:
name: New recipe list
recipes:
  - name: Unobtainium

Just remember that indentation (use spaces, not tabs) is important, and if you need the YAML syntax, it's here: https://en.wikipedia.org/wiki/YAML

Overall I tried to make the recipe list format as simple as possible for manual editing.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 11 Guest(s)