Talk:Loot table

luck_multiplier
Looking through the code, it appears that the variable is supposed to vary the weight of the item based on some input variable (which we may as well call "luck"): the formula is. But it looks like in all cases the "luck" input is currently zero. Anomie x (talk) 12:40, 23 October 2015 (UTC)


 * I would assume that is related to the Potion of Luck Dinnerbone mentioned. The idea is things like potions and enchantments could affect loot even from chests. – KnightMiner  t/c 13:28, 23 October 2015 (UTC)

set_damage
The information on the page is true, tested in 15w43c. 84.10.230.247 11:57, 24 October 2015 (UTC)


 * Thanks for testing that. I removed the verify tag. – KnightMiner  t/c 15:22, 24 October 2015 (UTC)

"Modded/Custom Maps"
Just wanted to point out that custom namespaces ("thaumcraft" from the example) will work. Loot tables are already set up for mods and custom maps. However, I'm not sure how to rewrite it since there's a lot of redundancy or false information; there probably doesn't need to be two separate sections. We are expected to not use the "minecraft" namespace unless we're specifically overwriting the default tables. As such, we should not be adding new tables inside "minecraft", but rather inside our own namespace ("thaumcraft", "custom_vanilla_map", "skylinerw_tests", etc). I have examples of usage here if needed. Skylinerw (talk) 07:39, 28 October 2015 (UTC)
 * If we need to mention mods at all (IMO we probably don't, we don't mention mods in most other places on the "main" wiki), something like this should do: Loot tables for mods will similarly go into paths under the data/loot_tables/ directory, e.g. the loot table for a "Scary dude" in "MyCoolMod" might go in data/loot_tables/mycoolmod/scarydude.json with LootTable set to "mycoolmod:scarydude". See each mod's documentation to determine which loot table names are used by default. Anomie x (talk) 10:36, 28 October 2015 (UTC)


 * I mean more in general terms, since custom loot tables are not restricted to mods. As it stands, the page implies you have to use the "minecraft" namespace to add new table, which is incorrect (and it's not recommended to do that). But there's still usage with the "minecraft" namespace to replace default tables, so the current "Custom maps" section does mention it correctly. I'm just not particularly good at wording something for a wiki! Skylinerw (talk) 11:02, 28 October 2015 (UTC)


 * I wrote the original "custom maps" section. I moved all the content into the Usage section and changed it to talk about namespaces. I'm new at this, though, so tell me if I did anything wrong. Update: I also just noticed I can't remove the old section because I'm a new user. --Kittycat3141 (talk) 11:16, 28 October 2015 (UTC)

What's the difference?
I don't know the difference between LootTable and LootTableSeed. I assume that LootTable lets you input your table right then and there, and LootTableSeed would be the pre-existing table you wish to use. However, a useful site tells that LootTable would be a pre-existing table, mainly tables that exist in that world. Could someone please tell me which one is which? The site is minecraft.tools. Fyreboy5 (talk) 20:41, 2 December 2015 (UTC)
 * LootTable is which loot table should generate the random loot, and LootTableSeed is a seed in the sense that it seeds the random number generator (see also wikipedia:Random_seed), much the same idea as the seed of a minecraft world. Each different seed will generate different loot from a given table. Make more sense? – Sealbudsman talk/contr 20:57, 2 December 2015 (UTC)
 * No. I want to know if it is possible to set a chest with a loot table without going into the file, so I think that LootTableSeed would let me create one exactly, as to minecraft:diamond_chestplate. Fyreboy5 (talk) 13:17, 4 January 2016 (UTC)
 * If you define LootTableSeed, then that chest and any with the same seed will always have the same contents, the main point is to make sure Minecraft world and custom maps always have the same loot.
 * So you can add a chest with the loot table using, though if you want specific contents all the time (rather than starting with random ones) it might be easier to just a filled chest. – KnightMiner  t/c 15:31, 4 January 2016 (UTC)
 * I want it to be random every time I open the chest, but I have a new idea how. RawLootTable and RawDeathLootTable will allow you to make a loot table for that mob or container in the command itself. If applied to a mob or container with another LootTable or DeathLootTable, it will roll so that 50% would be LootTable, and 50% would be RawLootTable. The way to put it in is to do it the same way as adding it to maps, but with the setblock or summon command in front, and no quotations. Fyreboy5 (talk) 18:09, 14 January 2016 (UTC)
 * This isn't the place for suggestions. For that, you want https://www.reddit.com/r/minecraftsuggestions. Anomie x (talk) 22:55, 14 January 2016 (UTC)
 * Thank you. I will suggest. Fyreboy5 (talk) 15:15, 28 January 2016 (UTC)

It is unclear that what is the order of application of functions.
111.194.108.33 12:28, 23 February 2016 (UTC)

List of loot tables link dead
There is a list in the "data packs" section to a list of loot tables. That takes you back to this page. Where is that list now?

5.71.59.57 14:07, 4 May 2019 (UTC)


 * It's collapsed (click the "Show" button to see it) in the section directly above. --AttemptToCallNil (report bug, view backtrace) 14:24, 4 May 2019 (UTC)

Ore Drops Formula
I can't seem to understand what the ore drops formula is. It says. However, this doesn't make sense. What I understand is. Wouldn't this always result in just the count? I'd love if someone could help me out, and I also think the formula needs rewriting on the main page to make it more easily understood. -PancakeIdentity (talk) 17:34, 9 June 2019 (UTC)

tool_enchantment
is under conditions, but from the description of how it works, it sounds like it belongs under functions. I can't find it used anywhere in the vanilla datapack for comparison. Can someone check where this belongs? --NickNackGus (talk) 00:11, 13 July 2019 (UTC)

I've read it over again, and now it makes sense as a conditional and as a function.

The part that confused me was "List of enchantments that need to be applied to the tool." This can be read as: Can anyone think of a less ambiguous, but not too verbose way of writing this? --NickNackGus (talk) 03:14, 13 July 2019 (UTC)
 * Stating an action that is to be taken: "List of enchantments that need to be applied to the tool by this function." This makes sense if the loot table contains a tool, and we are trying to enchant it.
 * Stating a description that must be true: "List of enchantments that need to be applied to the tool used to generate this loot table." This makes sense if we're using a tool to get items from a loot table, such as killing a mob with a sword, or breaking a block with a tool.


 * Seems like you've written it yourself, "List of enchantments that need to be applied to the tool to generate this loot table". -PancakeIdentity (talk) 03:18, 13 July 2019 (UTC)

Binomial distribution of rolls
I found in a loot table generator that rolls can also have binomial distribution. I haven't tested in game yet. Should I add that to the JSON format?--ManosSef (talk) 08:14, 26 April 2020 (UTC) Now I just found that all min-max values can also have binomial distribution. I will test in game.--ManosSef (talk) 08:25, 26 April 2020 (UTC)