Multiple resources when harvesting/mining

Started by Bergamoth, May 30, 2023, 08:17:45 AM

Previous topic - Next topic

Bergamoth

Hello friends!

As the title says, i'm trying to mod the game files to make something like Rice, when harvested to drop rice + some other resource, same for steel ores and etc, is it possible? Has any1 done something similar?

Thanks in advance for the atention!

Bergamoth

Quick update, since no1 responded and maybe one day someone may have the same questions i'll post what i found out so far...

I haven't found a way for 2 or more resources to drop at the same time, BUT for crops i managed to make the crop become a "Dying, harvested Potato"(for exemple) which in turn can be "harvested" for plant matter to be turned into straw or fertilizer. Did the same thing if the plant is burned which can be harvested for fertilizer...

Did so by creating a new thingy in Plants_Special.xml and added it in the code for each plant with

<burnedThingDef>BurnedCrop</burnedThingDef>
<choppedThingDef>Leftovercrops</choppedThingDef>


Anyway, i'm in no means a programmer or anything, probly there's a better and smarter way... This is how i did it. Hope it helps someone one day.