Okay, so first let me explain my poor understanding of how item spawns/drops work:
- There’s a list of “locations” or maybe “item classes”, like living room, bedroom, fridge, science etc. These contain several items.
- Monsters can define several of the “locations” as their drops with probabilities when they die. One class will be picked randomly, and from the class one item will be picked randomly.
- Likewise, the map generator uses these locations to determine what items can spawn on a tile, or what items can spawn in a container(like a fridge)
To JSONify this stuff, first we need to JSONify the locations. After that, we might be able to JSONify the monster drops.
One thing confusing me is that there’s already a data/raw/item_groups.json. The only difference between these and locations seems to be that they can also define a chance for each item. Was this code meant to replace mapitemsdef.cpp?