Greymerk / minecraft-roguelike

This is a mod for minecraft that adds randomly generated dungeon complexes.
GNU General Public License v3.0
130 stars 53 forks source link

add loot cyclic #80

Closed arma258 closed 7 years ago

arma258 commented 7 years ago

I would add cyclic loot but do not know how to do it you could help me?

MiscMC commented 7 years ago

I would add a loot spawning system based on the biome structure spawns in.

Greymerk commented 7 years ago

Kind of a broad question actually. but here's a very basic example of how it's done:

cyclic.txt

This setting just adds a few items to the first level of the dungeon. I added weighting to the air charm just to show that you can do that if you want to. Note that the charms are missing a chest type, this means they're added to any chest on the level regardless of type.

Note that in this case i'm not overriding the loot system, i'm just adding in a few items. You can totally override the loot system and redo it from nothing if you want. But that's a lot more work.

If you're going to do something more complicated than adding a few items, i would suggest splitting your loot settings into multiple files, testing them separately, and then combining them using inheritance.