How to add crop based on biome, not on kingdom

So, I added a palm tree crop to the farmer, it worked ok.

Then I moved all the logic of adding the crop into the biome manifest (that loads only when the specific biome is used). Now it does not work.

I’m not sure why, as looking into the code seems like the creation of the crop list is done much later, after the biome is already done generating.
(I’m saying this because my first thought was that it was creating the crops lists earlier, so when the biome was activated it was too late, the list was already made and could not be affected by its manifest anymore)

Right now, I’m going to (try) add it through an encounter. This still requires a new script, cause there is none to unlock crops through encounters (only to unlock recipes)

I’m missing something here? Is there other way besides creating a new encounter script?

Edit:
It worked using a gm encounter+script. I wonder if this was overkill and I failed to see the correct way to implement it…

2 Likes

For anyone reading this in the future: I made a mod changing the source of initial crop data which actually allows both biome-specific and kingdom-specific crops. You need to mix into the mod’s JSON, not vanilla one for it to work. Far less tedious than the GM encounters which were needed so far.

Scroll until you see Biome Crops mod: my modding corner

1 Like