Completed research providing stat effect

Started by Zwibby, September 25, 2018, 07:15:35 AM

Previous topic - Next topic

Zwibby

Hi, I'm new to RimWorld modding but have experience with C,C++ and C#.

I want to include a new research project in my mod called "Basic Mining". Before researching it, mining rocks is possible but yields no resources. After completion, mining steel, silver and jade yields normal loot.

My idea to implement this was to have the research project change the mining yield of said resource-rocks seperately from 0 to their respective default values. But I don't really know how to accomplish this since there is not a single existing research in RimWorld that changes stats, they only enable new buildings or sowing new plants.

I've tried referencing the mining yields for the resource rocks from ThingDefs_Buildings_Natural in my ResearchDef but I can't find the correct Syntax. Since research projects having a permanent global stat effect is not an existing mechanic in the game is this even possible by just using XML?