bigpharma

Back to modding

The research.data file is used for creating the research tree. You are able to create new researchs or modify existant ones, and also reorganize how they are interconected to each other.

Structure

"Bridge" research

   {
       "x":2,
       "y":0,
       "id":"research_start",
       "duration":100,
       "projectSize":1,
       "connections":[
           {"id":"research_pill_maker","start":"left","end":"right"},
           {"id":"research_dissolver","start":"left","end":"right"},
           {"id":"research_evaporator","start":"right","end":"left"},
           {"id":"research_unlock_forest","start":"right","end":"left"},
           {"id":"research_alternate_delivery_methods","start":"top","end":"left"},
           {"id":"research_basic_auxiliary","start":"top","end":"right"},
           {"id":"research_infrastructure1","start":"bottom","end":"left"}
       ]
   },

NOTE: The comma at the end of the structure is required if the research is not at the end of the file, and the last one can't have it. Your file will be invalid if you don't place properly the commas, resulting in your mod not being loaded.

The example above is the central node of the research tree (Basic Pharma). This research structure is used for "bridge" researchs, which have no effect but lead to another researchs.

Upgradable research

   {
       "x":1,
       "y":1,
       "id":"research_pill_maker",
       "duration":30,
       "yields":[
           {"stringValue":"unlock_machine.pill_maker"}
       ],
       "upgrades":[
           [{"intValue":{"id":"pillBonus","change":3}}],
           [{"intValue":{"id":"pillBonus","change":3}}],
           [{"intValue":{"id":"pillBonus","change":3}}],
           [{"intValue":{"id":"pillBonus","change":3}}],
           [{"intValue":{"id":"pillBonus","change":3}}]
       ],
       "connections":[
           {"id":"research_start","start":"right","end":"left","receive":true}
       ]
   },

The example above unlocks a machine (the pill maker), and it's upgradable. It incorporates the fields "yields" and "upgrades". They hold which "bonuses" will be granted when researching or upgrading a project.

Possible Upgrades include:






Modded example

   "yields":[
           {"stringValue":"unlock_machine.pill_maker"},
           {"stringValue":"unlock_machine.evaporator"}
       ],
       "upgrades":[
           [{"intValue":{"id":"pillBonus","change":1}}],
           [{"intValue":{"id":"pillBonus","change":2}}],
           [{"intValue":{"id":"pillBonus","change":3}}],
           [{"intValue":{"id":"pillBonus","change":4}}],
           [{"intValue":{"id":"pillBonus","change":5}}]
       ],

If we set the "yields" and "upgrades" fields as above, we'll get the following:

The Research Grid

The Research grid is an in-game resource used for displaying each research project where they must be placed. It allows to easily reorganize the research tree as desired when modding. Both "x" and "y" labels are used in order to place the project on the research grid. Note that decimal numbers can be used.

Research Tree Grid