Electroblob's Wizardry

Electroblob's Wizardry

18M Downloads

[feature request] more control over loot spawning

Zygus42 opened this issue ยท 6 comments

commented

Minecraft version: 1.12.2
Wizardry version: Electroblob's+Wizardry+-+4.1.1+-+MC+1.12.2

I'm building a modpack, and am finding lots of your loot in every single chest - is going to devalue this mod a lot, as everyone is going to have chests full of the mod's loot.

You have this in your config:

# Whether to generate wizardry loot in dungeon chests.
     B:generateLoot=true

but no way to set the amount of loot. Is there any chance that you could add this ?

Is particularly important in modded minecraft, as the more mods you have adding chests, the lower you need to set the chance of a particular type of loot, otherwise the game just gets flooded with free loot and players have less of a good time.

I could obviously turn off all the loot from this mod, but am not sure what that would do to the mod in terms of playability. I notice that many of the items have no recipes, so presumably have to be found in chests or drop as loot off mobs.

commented

Minecraft 1.10+ has loot tables, meaning you can customise loot precisely with a resource pack. Normally, wizardry injects loot into vanilla loot tables automatically; setting the generateLoot option to false prevents this from happening. The loot that gets injected is specified in loot_tables/chests/dungeon_additions.json. The best way to achieve what you're looking for is to alter the dungeon_additions loot table by changing the following lines:

{
    "pools": [
        {
			"name": "wizardry",
            "rolls": {
                "min": 3,
                "max": 7
            },
...

Change 3 and 7 to smaller numbers to reduce the overall amount of wizardry loot that spawns in dungeon chests. If it is still too much, you can add a random chance condition to the loot pool. Have a look at the minecraft wiki page on loot tables for more information.

I am in the process of adding more stuff like this to the wizardry wiki, so you might like to have a look there as well.

commented

Ok, I was only trying to help. Sorry if you knew already, I just think it's better to explain things to people in case they don't know.

Here's the technical answer: if I was to add something like this to the config file, it would mean having the config code go into the loot table and set those values directly. This completely defeats the point of having a loot table, because then you can't specify those values using resource packs, loot tweaker or whatever since they'll just get overwritten when the game loads. (The loot table system isn't perfect, I know, but I didn't make it.)

Wizardry is not the only mod that works this way: if you go into the github repo for Botania, for example, you'll see that it injects loot tables in exactly the same way as wizardry, and does not have any loot-related options in its config file.

Injected loot tables: https://github.com/Vazkii/Botania/tree/master/src/main/resources/assets/botania/loot_tables/inject
Config options:
https://github.com/Vazkii/Botania/blob/master/src/main/java/vazkii/botania/common/core/handler/ConfigHandler.java

commented

I perfectly understand the editing of loot tables, and am using LootTweaker to do so for those mods which provide inadequate control over their items.

Changing the actual files manually is a mugs game, as I would need to redo it constantly as mods update and change.

I just thought I ought to find out if you were prepared to add controls in to your mod which ought to be there anyway.

commented

I can see the problem, but the example you used is a very good example to illustrate the problem.

You don't find much Botania stuff in chests, so it doesn't depreciate the mod - you might find a bit of manasteel or somesuch and get a wee boost at the start, but it's not a big deal.

With this mod, my testing is finding so many items from the mod that it's way over the top. If that's the way the mod needs to work - ie is totally chest loot based, then that's fine and you don't need to make any changes. But if that's not the idea, and instead you're meant to explore the world looking for wizard towers and hunt mobs for a small percentage chance of a drop, then the mod is being spoilt by having access to such a huge pool of free (and powerful) stuff, in which case you ought to provide a means to change the amount, if only for different sorts of modpacks.

In the loot table above, you have the number of rolls on the loot table for wizardry set from 3 to 7. Could those figures be exposed in the config file so that you could set them to 1 and 2 instead ?

commented

With a bit of work, I could expose those values in the config, yes. However, for reasons explained in my previous comment, I'm not going to because that would end up causing problems for people who want to customise the loot tables. If this was 1.7.10 when loot tables didn't exist, then I would add the config option because it wouldn't interfere with anything.

Wizardry relies quite heavily on loot, that's part of how the mod works. What should happen is that between 3 and 7 stacks of wizardry items should generate in each dungeon chest. Those numbers were chosen because they give the right amount of items when the rarity of dungeons is around the same as in vanilla Minecraft. It sounds like you have a lot more dungeons than that in your modpack, so it makes sense to reduce the amount of wizardry loot in dungeons. This is exactly what loot tables and loot tweaker are for.

Of course, if you're finding more than 7 stacks of wizardry loot in chests, then that is a bug.

commented

Ah well, easier to remove the mod. Shame, as it's one of the very few mods that actually encourages exploration as part of it's progression.