Difference between revisions of "ModTweaker:Thaumcraft 4 Support:Research"

From MineTweaker 3
Jump to: navigation, search
Line 27: Line 27:
 
  * RAILCRAFT (Traheremagy)
 
  * RAILCRAFT (Traheremagy)
  
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, or stick to removing small tabs with nothing in them like Traheremagy.
+
===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:
 
Example:
Line 33: Line 34:
 
  mods.thaumcraft.Research.removeTab("RAILCRAFT");
 
  mods.thaumcraft.Research.removeTab("RAILCRAFT");
  
 +
===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.
 
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.
  
Line 40: Line 42:
 
  mods.thaumcraft.Research.addTab("DEMENTIA", "thaumcraft", "textures/items/brain.png");
 
  mods.thaumcraft.Research.addTab("DEMENTIA", "thaumcraft", "textures/items/brain.png");
 
  mods.modtweaker.setLocalization("en_US", "tc.research_category.DEMENTIA", "Dementia");
 
  mods.modtweaker.setLocalization("en_US", "tc.research_category.DEMENTIA", "Dementia");
 +
 +
Tabs can also be created with custom backgrounds if you supply a texture:
 +
 +
//TabKey, IconDomain, IconPath, BackgroundDomain, BackgroundPath
 +
mods.thaumcraft.Research.addTab("AHPYRCOPA", "forbidden", "textures/items/spork.png", "forbidden", "textures/misc/runecircle.png");
 +
mods.modtweaker.setLocalization("en_US", "tc.research_category.AHPYRCOPA", "Not Apocrypha");
  
 
== Creating Research ==
 
== Creating Research ==

Revision as of 11:46, 17 July 2014

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.

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:

//ResearchKey
mods.thaumcraft.Research.orphanResearch("ROD_greatwood");
mods.thaumcraft.Research.removeResearch("ROD_greatwood");

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:

* BASICS
* THAUMATURGY
* ALCHEMY
* ARTIFICE
* GOLEMANCY
* FORBIDDEN (Apocrypha)
* TT_CATEGORY (Thaumic Tinkering)
* TX (Thaumic Esoterica)
* RAILCRAFT (Traheremagy)

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:

//TabKey
mods.thaumcraft.Research.removeTab("RAILCRAFT");

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:

//TabKey, Domain, Path
mods.thaumcraft.Research.addTab("DEMENTIA", "thaumcraft", "textures/items/brain.png");
mods.modtweaker.setLocalization("en_US", "tc.research_category.DEMENTIA", "Dementia");

Tabs can also be created with custom backgrounds if you supply a texture:

//TabKey, IconDomain, IconPath, BackgroundDomain, BackgroundPath
mods.thaumcraft.Research.addTab("AHPYRCOPA", "forbidden", "textures/items/spork.png", "forbidden", "textures/misc/runecircle.png");
mods.modtweaker.setLocalization("en_US", "tc.research_category.AHPYRCOPA", "Not Apocrypha");

Creating Research

Research can be created



ModTweaker Supported Mods

Applied Energistics 2 | Aura Cascade | Botania | Chisel 2 | Ex Nihilo | Extra Utilities | Factorization | Flaxbeard's Steam Power Support | Forestry | Mariculture | Mekanism | Metallurgy 4 | PneumaticCraft | Railcraft | Thaumcraft 4 | Thermal Expansion | Tinker's Construct