Quick Nav


Back To Top

Overview

LootTweaks uses the LuaBlock system I developed for CondensedOres - and which now is used in many other mods - to specify changes to the loot tables present in the game.

Configuration

To define changes to the loot tables, look in Reika/LootTweaksChanges in your config folder. There will be autogenerated .tweaks files in this folder, one for each recognized loot table. There are also two folders for "tiers" and "batches" (see below).

The mod also supports dynamic configuration reloading with the /reloadloot command.

Tweaks

Tweaks are specified as a series of LuaBlock nodes - one change per node - defined sequentially in the appropriate file.

Operations

The following operations are supported, accessed by supplying the appropriate value for the operation key on the block: Which other parameters are required depends on the operation; most at least require an item type. Adding new items also requires defining the min and max counts and the spawn weight. Changing weights requires either a new weight or a multiplier - ie weight or relative_weight - and changing bounds needs new bounds specified with min_size and max_size respectively. Tier and batch operations simply require a tier/batch value to point to the correct tier or batch. To change NBT, create a nested subblock nbt and define a NBT tag in the standard LuaBlock format.

Sample Blocks

{
type = "removestuff"
operation = "removetier"
tier = "stuff"
}
{
type = "moreobsidian"
operation = "changeweight"
item = "minecraft:obsidian"
relative_weight = 3.5
}
{
type = "nobook"
operation = "remove"
item = "Botania:lexicon"
}
{
type = "redheart"
operation = "add"
item = "TConstruct:heartCanister:1"
min_size = 1
max_size = 3
weight = 1.5
}
{
type = "enchantingots"
operation = "changenbt"
item = "minecraft:gold_ingot"
nbt = {
ench = {
0 = {
id = 23
level = 2
}
1 = {
id = 17
level = 1
}
}
}
}

Tiers and Batches

To simplify large-scale changes, LootTweaks allows for the definition of "change batches" which can be applied as a unit, so that if you have the same, say, 48 changes you wish to make to 7 tables, you only need to define those 48 changes in a batch, and then apply that batch to the 7 tables.

It also allows defining groups of items as a "tier", so you can set groups of items by rarity for spawning, rather than defining a bunch of item types as functionally equivalent. You can also remove or add those tiers to tables with a single operation. Within a tier, each item can be given a relative_weight property to allow for further fine-tuning.

Sample files

The mod's GitHub repository contains some sample files:
Example Scripts

Source Code

The source code for LootTweaks can be found here:GitHub

Downloads

Via CurseForge