Adding new technologies to tech tree
Implementation of custom research options into tech tree
To implement new research options , you need to add in data/campaign file called : aotd_tech_options.csv This is where you will specify all fields: Also keep in note! Data should be sorted in csv , by tiers , example you will have in AoTD - Vaults of Knowledge how it looks like. Really recommend reading entire guide before implementation
To implement new research options, you need to add in data/campaign file called: aotd_tech_options.csv. This is where you will specify all fields:
Also keep in note! Data should be sorted in csv, by tiers, example you will have in AoTD - Vaults of Knowledge how it looks like.
id: unique id of your tech.
name: name of your tech displayed
tier: decides in which part of the tech tree your tech will be (one of 3 indicators of position in UI), also it makes tech more costly to research.
timeToResearch: time needed to research technology
reqToResearchFirst: technologies required to be able to start research of this specific tech. If there is no req then field should have value: “none”
itemReqToResearch: items req to research, pattern here looks like this: item_id:amount,item_id2:amount2
iconId: icon that will be displayed on research option for your tech, if not specified then default icon will be shown
rewards: rewards are field, that is used by tooltip to generate information, what this technology unlocks. Separator of entries here is sign of new line: \n. For now two types of rewards are used there, industry and modifiers. You need to specify a category, if its industry, then you use id of industry, if its modifier, then you basically write a description of that modifier instead.
columnNumber and rowNumber: other two indicators that determines position of technology in UI
isResearchedFromStart: determines if this technology is researched for EVERYONE at start.
otherReq: those are other requirements, that uses memory flag, that is being set in global
tags: not yet implemented, for now it does nothing
modId: id of mod. Note! If you specify, that id of mod is aotd_vok, then all research options will be added to this mod’s tech tree, but if you have a different id, then it will create a new tech tree, where techs from your mod can be researched.
You will need to include Vaults of Knowledge jar in your project, as you will need to use one function from this mod , to determine if technology has been researched.
Code: java
if(Global.getSettings().getModManager().isModEnabled("aotd_vok")){
AoTDMainResearchManager.getInstance().isResearchedForPlayer("id_of_tech");
}
This one can be used for things like modifiers, but if you wanna check for industry, let's say , you want Industry A to be available after research tech_3
Code: java
if(Global.getSettings().getModManager().isModEnabled("aotd_vok")){
AoTDMainResearchManager.getInstance().isAvailableForThisMarket("tech_3",market);
}
For implementation of industries with multiple upgrade paths contact me on discord : Kaysaar#1181 as this is something, much more complicated, to be put in guide here.