AllenSeitz / DimDungeons

A Minecraft mod which adds proceedurally generated dungeons.
15 stars 13 forks source link

[Feature Request] Unique Loot Tables for Chests w/ Forge tags #19

Open UnseenAcademical opened 3 years ago

UnseenAcademical commented 3 years ago

Hi! Loving this mod, it's doing exactly what I hoped it would do.

If convenient, it would be great if the various chests could draw on Forge tags to generate loot. This would allow for easy integrations with any mod properly using the Forge tagging system. There's a lot of map options (including skyblock!) that would open up if the loot you found in dungeons could be from multiple mods.

The chests could then call the appropriate loot tables for vanilla chests within the unique loot table. They'd still generate vanilla loot, just with a good chance of also generating modded loot.

Thanks!

AllenSeitz commented 3 years ago

I don't understand what you mean by using Forge tags for generating loot. Do you mean something like putting "forge:any_ingot" in the loot table? (Which I don't think that works.)

You can override the loot tables with a datapack which is what other modpack developers are doing. I don't hardcode the loot. If you look in data/dimdungeons/loot_tables/chests you can copy the loot tables I made. Then you can change them and put them in your own datapack and they'll override mine. But I could be misunderstanding what you're asking for?

UnseenAcademical commented 3 years ago

Ah, completely didn't understand it was already set up for datapack overwriting. In which case, I can definitely make it work on my end!

For reference, I've had some luck putting in things like "forge:ore" in the various datapacks, and what it will do is pick a block at random from all the ones under that tag. This is useful if you want to create an open-ended system that automatically incorporates other tagged items from other mods, without relying on the end user to specifically create anything.

Winddbourne commented 3 years ago

Very interesting. Looking at the wiki page on loot I was assuming that I'd have to edit the vanilla loot tables for things like the pyramid to change the loot and I had been about to suggest a loot configuration option. Perhaps a loot guide for pack makers could be added to the wiki?

I actually am working on a skyblock pack and while I enjoy the dungeons the loot from my test runs was slightly disappointing. I ran into one special seed from botania, but everything else was vanilla items, and often enchantment books that other mods make a lot less useful.

I definitely plan to open up the jar file and see what I can do about some custom loot tables. I've made a custom dimension, and custom recipes but this will be my first time messing with that particular mechanic . . . it should be interesting.

AllenSeitz commented 3 years ago

Yeah noted. Especially since I'm changing the loot tables again for 1.1. I need to document that, again.

Winddbourne commented 3 years ago

I'll look forward to what you come up with, this is a very impressive mod so far. :)

AllenSeitz commented 3 years ago

I'll post it here for now, but I do need to add it to the wiki.

chestloot_basic_easy - chests in plain sight in basic dungeons chestloot_basic_hard - chests that require a puzzle to solve, in basic dungeons chestloot_advanced_easy - see above chestloot_advanced_hard - see above chestloot_lucky - for lucky chests in basic dungeons (generally in plain sight, but only 30% likely to appear) chestloot_crazy - for lucky chests in advanced dungeons

And that's it! Those are the only 6 loot tables that I use directly. However, those 6 loot tables don't contain any treasure. But instead, references to other loot tables.

chestloot_1 - 80% of chestloot_basic_easy chests chestloot_2 - 20% of chestloot_basic_easy chests and 100% of chestloot_basic_hard chests! chestloot_3 - same as chestloot_1, but for advanced dungeons chestloot_4 - same as chestloot_2, but for advacned dungeons

And then there are additional loot tables as well. For example chestbooks_1 - chestbooks_4 and the various 'kits' that fill a 27 slot chest with one type of item. If you are using Forge to inject into loot tables instead of using vanilla datapacks to outright replace them those might be worth a look too.

AllenSeitz commented 3 years ago

And this is a change from 1.09, the current version. In previous versions chestloot_1/2 and 3/4 were used directly. But adding the easy/hard layer on top allows me to better control how luck affects the quality of the loot. (It's also easier for modpack designers to understand than '1' '2' '3' '4'.)

Winddbourne commented 3 years ago

Are we able to replace the chest books and kits with regular loot tables via a data pack? I was hoping to get rid of the enchanted books completely because my pack has 8 big magic mods in it and vanilla enchanted books are probably going to be seen by players as being extremely bad loot. lol

I think, from looking at the file, these are indeed just more loot tables you are referencing but its best to make sure before I touch them.

AllenSeitz commented 3 years ago

Yeah of course. Just look at the main 4 loot tables, find the places where chestbooks_1-3 are being referenced, and then remove them.

I always intended DimDungeons to be used this way. You can play it on its own but it's supposed to be part of a modpack, really. But the thing is, by default, in vanilla, if you do load it by itself, I have to do something with the loot tables. It's actually very hard to give meaningful-but-balanced vanilla loot. Maybe since you have 8 magic mods installed there are items from those mods that would make sense to be included instead?