Research
Contents
- The Basics
- Removing Research
- Research Tabs
- Removing Tabs
- Creating Tabs
- Creating Research
- Adding Pages to Research
- Connecting Research
- Modifying Research
The Basics
Each research is identified by a unique string called its Key. The general naming scheme is for the Key to be in all caps. Exceptions to this are wand parts, which tend to come in the ROD_blah or CAP_blahblah format.
If you want to alter an existing research, you’ll need to know its key. When adding a new Thaumcraft recipe, you’ll need to supply a research Key as the first argument. The recipe will be uncraftable until the player completes the research that identifies by that key.
You can get a list of research keys in a category by using the in-game command /minetweaker research (category) to output all research keys in that category to the MineTweaker log. For example, /minetweaker research BASICS will output all research keys in the Basics tab.
Removing Research
Research can be removed with the removeResearch() method. However, if the research was used as prerequisite for anything, the Thaumonomicon will cause the game to crash when opened to that research’s tab. You can use orphanResearch() to cut all ties to a research to make it safe to remove, or use clearPrereqs() to clear the prerequisites off of specific researches.
Example:
Research Tabs
Each research tab is also identified with its own unique string. These are important to know if you want to remove a tab or place a new research in one.
Known Tab Keys:
You can get a list of all research category keys in the game by typing /minetweaker research to output all the keys into the log.
Removing Tabs
Removing a research tab also removes all research in the tab, which can cause crashes if they’re prerequisites for anything. Use orphanResearch() to cut all ties to researches in the tab, move all researches to a different tab, or stick to removing small tabs with nothing in them like Traheremagy.
Example:
Creating Tabs Creating a research tab requires a sprite to supply for the tab icon. You’ll need the domain and file path for the texture. You’ll also need to create a localization for the tab name either through a resource pack or by using ModTweaker’s localization changer. The localization key will always be “tc.research_category.” followed by the tab key.
For example, if you wanted a tab with the zombie brain icon from Thaumcraft 4:
Tabs can also be created with custom backgrounds if you supply a texture:
Creating Research
Research is created with a unique Key, a research tab key, a list of aspects, coordinates, a complexity rating, and either a texture path or an ItemStack to give it an icon. Like with creating a research tab, creating a new research requires a new localization.
If a research is added through ModTweaker, its name is localized as “tc.research_name.” followed by the research Key. Its tooltip is localized as “tc.research_text.” followed by the Key.
Aspects are entered as a single string with a list of aspects and values separated by commas. If you plan on making a research auto-unlock, it’s okay to leave it without aspects and just enter a null as the aspect list.
Aspect coordinates are different from standard mathematical coordinates. Decreasing Y moves the research up, while increasing Y moves it down. Increasing X moves the research further to the right as one would expect.
Example:
Adding Pages to Research
Just creating the base research isn’t enough. The base research starts out without pages and crashes the game if you try to open it. Once a research has been created, you can use addPage() to add new pages. Just entering the Key and a localization key will add a normal text page that can be filled in with localization.
Example:
//ResearchKey, LocalizationKey
mods.thaumcraft.Research.addPage(“WTFPLANTS”, “derp.research_page.WTFPLANTS”);
game.setLocalization(“en_US”, “derp.research_page.WTFPLANTS”, “Plants! What are they?
The Thaumometer doesn’t know!”);
When localizing text for research pages, the following markup can be used:
For adding pages displaying recipes, the following methods can be used. Each one takes a Key and an ItemStack as an argument and will add a page displaying the first recipe for that item it can find. Make sure to add a recipe for an item before trying to add a page for the recipe.
Make sure the recipe uses that research’s key as its own key or the recipe will not actually be craftable when the research is unlocked.
Connecting Research
Research has three types of connections, Parents, Hidden Parents, and Siblings.
Parents are the prerequisite researches you need to unlock before you can research a particular research. For example, ROD_silverwood has INFUSION and ROD_greatwood as its parents. You cannot research Silverwood Wand without first researching Infusion and Greatwood Wand. If a research is on the same page as its parents, the Thaumonomicon will draw a line from parent to child to indicate which leads to which.
Hidden Parents are like Parents, except that the Thaumonomicon will not draw a line between them even if they’re on the same page. Use this if you’re trying to reduce clutter on a research tab.
To add parents or hidden parents to a research:
Siblings are researches that are auto-unlocked when a particular research is. For example, DISTILLESSENTIA has JARLABEL as a sibling. When you research Essentia Distillation, you automatically unlock the Jar Label research. When siblings are on the same tab, the Thaumonomicon will draw a line between them.
To add a sibling to a research:
To change parents or siblings for an existing research, you’ll need to use the following commands to clear those values and then add your own.
Modifying Research
There are many tags and extra commands for adding more features to your created research or modifying existing ones.
Some standard research tags are:
ROUND - Research has a round icon in the Thaumonomicon. Usually for non-recipe researches or auto-unlocked researches. SPIKY - Research has spikes around its icon. Generally for indicating that a research is important. STUB - Research cannot be researched by the player. Generally for researches that are unlocked other ways such as Siblings or auto-unlock. SECONDARY - Research has an octagonal icon in the Thaumonomicon and is purchased with points instead of researched. VIRTUAL - Research does not really exist and cannot be researched. Used as “parent” research that cannot normally be unlocked. AUTO-UNLOCK - Research starts out already unlocked. CONCEALED - Research does not appear in the Thaumonomicon until its parent researches are completed. Used for most researches by default. They can be set with the following commands:
You can modify what Aspects an existing research has. Aspects determine what and how many research points you need to purchase a research in EASY research mode or if it is a Secondary research. They also determine what aspects you will need to connect during the research mini-game for non-secondary research or in HARD research mode.
Complexity is what determines the difficulty level of a research. The higher the Complexity level of a research, the more annoying challenging it will be in the research mini-game.
If you’re trying to change pages for an existing research, you’ll first need to clear the research of pages with this:
Once you’ve cleared all the pages, you can manually add pages back in whatever format you want.
Normally, when you change a Thaumcraft recipe, the research page for it will still show the original recipe. You can manually change this by clearing all the pages and adding them back, or you can use this to try and force it to refresh the recipe:
Refreshing the research will only work if the recipe is still the same type (Arcane Worktable, Infusion, etc…) Otherwise, you’ll need to clear the research pages and add them back with the new recipe type.
Finally, if you want to move an existing research to a different location and/or different tab, you can use this: