promotional bannermobile promotional banner
premium banner
Extend the loot pool for mobs, chests and blocks - for mod creators and players

Description

Migrating from 1.0.0 -> 1.1.0+


ItemDropList's must now start with "Drop_LootExtender_" instead of "Drop_ChestLootExtender_".

 

About


This mod is aimed for

  • Mod pack creators who wants to make their items appear in the loot pool from chests, mobs and blocks
  • Players who want to adjust the loot pool for drops

How it works

The plugin is able to extend the loot pool through the use of ItemDropLists, which can be configured in the built-in Asset Editor.

The ItemDropList just need a name that starts with "Drop_LootExtender_" as well as some added metadata in order to specify when the ItemDropList should be used.

There can be any number of ItemDropLists from any number of mods. The plugin will simply randomize the ItemDropList to use if there are multiple that can be used for a given scenario.

Why not override the existing ItemDropLists?

1. There is currently no native way to configure what items appear in world chests in the Asset Editor.

2. For other drops from mobs and blocks, (as far as I can tell) it's not possible for multiple mods to extend the same ItemDropList. Only one mod is able to decide how that ItemDropList should be overriden.

With Loot Extender, any number of mods can add extra items to the drops from the same chest, mob or block without conflicts.

Precausion

By default, this plugin will extend the loot for any existing chest, which includes any chests you have placed before installing the plugin.

To prevent it from adding extra items to your own chests, you can use the /le-exclude-nearby command while in your base, to make the plugin ignore any chests in a 100 block radius.

 

Creating the ItemDropList


Accessing the Asset Editor

  1. Open the chat with Enter, then type /op self
  2. Press the 'O' key to switch to Creative mode
  3. Press tab to open the inventory
  4. Click on Creative Tools > Assets > Assets Editor

 

Creating the ItemDropList

  1. In the Asset Editor, click '...' and select Add Pack (or use an existing one if you have one)
  2. Click '+' to open the create item menu
  3. Set Asset Type to Item Drop List and use an ID that starts with "Drop_LootExtender_", such as "Drop_LootExtender_YourMod_Chests"
  4. Click Create
  5. In the Source tab, replace everything with the following: 
    {
      "Container": {
        "Type": "Choice",
        "Containers": [
          {
            "Type": "Single",
            "Weight": 0,
            "Item": {
              "Metadata": {
                "ChestIds": [
                  "Furniture.*Chest.*"
                ]
              }
            }
          },
          {
            "Type": "Empty",
            "Weight": 10
          },
          {
            "Type": "Single",
            "Item": {
              "ItemId": "Fish_Salmon_Item"
            },
            "Weight": 1
          }
        ]
      }
    }

     

 

Container 0 - Used for metadata, specifying which chests, mobs or blocks your Item Drop List will be used for.

Container 1 - Used for specifying how likely it is for no additional item to be added to the chest.

The remaining containers can be used for adding any items that you want.

 

Metadata


The metadata can include one or more filters.

You need at least ChestIds, BlockIds or NPCIds for your ItemDropList to be used.

 

ChestIds

This is a list of IDs that the Item Drop List will be used for.

IDs can include RegEx, such as "Furniture.*Chest.*" to select all chests.

"Furniture.*Chest.*" - All IDs that starts with the word "Furniture" and includes the word "Chest".

If you want to target 2 specific chests:

"ChestIds": [
  "Furniture_Ancient_Chest_Small",
  "Furniture_Temple_Dark_Chest_Small"
]

 

BlockIds

Similar to ChestIds, but instead specifies which blocks will use this ItemDropList when destroyed.

NPCIds

Similar to ChestIds, but instead specifies which mobs will use this ItemDropList when defeated.

ZoneNames

Similar to ChestIds, but instead specifies which zones this ItemDropList should be used for.

BiomeNames

Similar to ChestIds, but instead specifies which biomes this ItemDropList should be used for.

MinY

The minimum Y coordinate for the player, when the ItemDropList should be used.

MaxY

The maximum Y coordinate for the player, when the ItemDropList should be used.

 

Example

"Metadata": {
    "ChestIds": [
        "Furniture.*Chest.*"
    ],
    "BlockIds": [
        "Soil_.*"
    ],
    "NPCIds": [
        "Skeleton_.*"
    ],
    "ZoneNames": [
        "Zone1_.*"
    ],
    "BiomeNames": [
        ".*_Tier2"
    ],
    "MaxY": 130,
    "MinY": 90
}
With this example, the item drop list will be used when opening any chest, breaking any Soil block or killing any Skeleton mob, in Zone1, biome Tier2 when the player is near water level.

 

Commands


The commands are optional, as you don't need to use any commands to use the plugin.

/le-reset-chests - Resets the state of all chests, allowing the plugin to extend the loot of any chest that is opened.

/le-exclude-nearby - Prevents chest within a 100 block radius from getting extended loot.

/le-clear-cache - Clears the cache for selecting ItemDropList based on scenario.

/le-location - Gives you the current zone, biome and y coordinate for the player.

 

Testing your ItemDropList


After making any changes to your ItemDropList's metadata, it's recommend to use the /le-clear-cache command.

Also, while testing your drop list, it can help to reduce the weight for the second container to 0, so an item always drops. Just remember to change it again once done.

 

Testing blocks

Make sure that you are not in Creative mode, then break the block that you specified in the BlockIds metadata.

If the item drops, then it works as intended.

 

Testing Mobs

Kill the mob that you specfied in the NPCIds metadata.

If the item drops, then it works as intended.

 

Testing chests

  1. Place down a bunch of chests
  2. Use the /le-reset-chests command (to clear the player placed state from the chests)
  3. Open the chests

 

If the ItemDropList was created correctly, you should see items from your ItemDropList appear in the chests.

To test again, you should first break the chests, as otherwise the loot will be extended twice.

 

Testing Zone, Biome and Y coordinate

Use the /le-location command to get your current zone, biome and Y coordinate.

If you are currently in the correct zone, biome and Y coordinate and the item drops, then it works as intended.

 

Featured mods


Hytaria - Terraria 3D - Hytale Mods - CurseForge by Markebarca_Mods

Uses LootExtender 1.0.0 for configuring chest loot.