Skip to content

Adding a research

Overview

Adding a research is even easier than adding a recipe. All of an addon's researches are stored in resources/researches.yml. For example, here is the 'improved drilling techniques' research:

researches.yml
1
2
3
4
5
6
7
8
...
improved_drilling_techniques:
  material: iron_pickaxe
  cost: 15
  unlocks:
  - pylonbase:improved_manual_core_drill
  - pylonbase:subsurface_core_chunk
...

Each research needs a corresponding language entry:

en.yml
1
2
3
4
5
...
research:
  ...
  improved_drilling_techniques: "<#4f4641>Improved drilling techniques"
  ...


Adding a research for the baguette

Let's create a research called 'Baguette Supremacy' that unlocks the baguette.

First, create a file resources/researches.yml. Inside the file, paste the following (and change myaddon to your addon's key):

researches.yml
1
2
3
4
5
baguette_supremacy:
  material: bread
  cost: 3
  unlocks:
  - myaddon:baguette

Next, create a researches section in en.yml and add an entry for the research as follows:

en.yml
researches:
  baguette_supremacy: "<#ff0000>BAGUETTE SUPREMACY"

What's this <#ff0000> business?

This is hex color code inside a minimessage tag. You can find out more in the advanced lore section.

That's it!

From now on, researches will not be provided for any item examples for the sake of brevity.