Modding - Research

Research
Research is defined in two files -  and. The former file defines the costs and benefits of the research, while the latter defines the research subject's location in the graph, and its prerequisites. When modding, you can put all your modifications and additions in a single file, it will work just as well.

Format
Research subjects are defined using the standard Entity Format.

Research Parameters
Research subjects do not have too many parameters, mostly the cost of research, the effects of completing the research, and the research graph layout.

Costs
"time": 20 We use the "time" parameter to define how many research points are required to complete the research.

Research Effects
"modifiers": { "unlocks": { "ConstructionType": { "workshop": true }, 		"ProductionType": { "upgradeparts1": true } 	} } The "modifiers" parameter defines all the effects of completing the research. As soon as the research is complete, all these modifiers will be permanently added. In research, we usually use modifiers to unlock new blueprints/recipes, but occasionally they are used for other effects, such as bonus to specific productions, or granting free skill points. See Modding - Modifiers for more informaiton on the different possible effects.

Prerequisites
prereqs: { drepprocessing-wood: true splitter: true } This optional parameter defines one or more prerequisite research subjects that need to be researched before this subject can be learned.

Position
position: "2,7" The position of the research subject in the research graph. The format is "x, y" where the first column and the first row are 0. Make sure that the position is set in a way that it can be connected to its prerequisites.

Repeating Research
"bonus-research": { "time": 1500, "modifiers": { ... 	}, 	"repeating": true, "repeat-extra": 125 }, A research can be a repeating research if you want the player to research it again and again to receive additional bonuses. The modifiers will be applied for every time the research is complete.

To make the research repeating simply set the "repeating" parameter to true. The additional "repeat-extra" parameter defines how much more each subsequent research of the same subject will cost. In the example above, the first time the subject is researched it will cost 1500 research points, and every time it is researched the price will increase by an additional 125 points.