Megabonk
You are viewing a potentially older version of this package. View Latest Version
Install with App

Details

Date Uploaded
10 months ago
Downloads
3.3K
Size
108KB

ChestLootOverride

A BepInEx mod that allows you to override chest loot based on chest number.

Features

  • Override loot for any chest by its number (1st, 2nd, 3rd, etc.)
  • Unlimited chest configurations
  • Simple configuration file
  • Automatically resets counter for each new game

Installation

  1. Make sure BepInEx is installed
  2. Download the latest release
  3. Copy ToggleEverything.dll to BepInEx\plugins
  4. Launch the game once to generate the config file
  5. Close the game and edit the config

Configuration

After the first launch, you'll find the config at:
BepInEx\config\com.Intacote.ChestLootOverride.cfg

Example Configuration

[General]
EnableMod = true

[ChestOverrides]
Chest1Item = CreditCardGreen
Chest2Item = SuckyMagnet
Chest3Item = Anvil
Chest4Item = SoulHarvester
Chest10Item = Kevin

Note: These are the default values. You can change them or add more chest entries.

How It Works

  • The mod counts chests as you open them (1st, 2nd, 3rd, etc.)
  • When you open a chest that's configured, the specified item is added to your inventory
  • You can configure any chest number - they don't need to be sequential
  • Use None to skip a chest or simply don't add an entry for it

Available Items

Use exact item names from the EItem enum, such as:

  • CreditCardGreen
  • Potion
  • Sword
  • Shield
  • etc.

Note: If you use an incorrect item name, the mod will log a warning and skip that chest.

Examples

Give only a shield in the first chest:

Chest1Item = Shield

Add additional rewards to later chests:

# Keep the defaults and add more
Chest1Item = CreditCardGreen
Chest2Item = SuckyMagnet
Chest3Item = Anvil
Chest4Item = SoulHarvester
Chest10Item = Kevin

# Add custom rewards
Chest20Item = Potion
Chest50Item = Sword
Chest100Item = CreditCardGreen

Building From Source

Requirements

  • .NET 6.0 SDK
  • BepInEx installed in your game directory
  • Set BEPINEX_DIR environment variable to your game folder

Build Steps

# Set environment variable (replace with your path)
$env:BEPINEX_DIR = "C:\Path\To\Your\Game"

# Build the project
dotnet build

# DLL will be automatically copied to BepInEx\plugins

Project Structure

  • ChestLootOverride.cs - Main mod code
  • Uses Harmony to patch InteractableChest.OnChestWindowClose
  • Uses regex to dynamically load Chest<N>Item entries from config
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.