Stardew Valley

File information

Last updated

Original upload

Created by

aedenthorn

Uploaded by

aedenthorn

Virus scan

Safe to use

Tags for this mod

About this mod

This customizable mod greatly expands the range of items received in underground treasure chests, allows for multiple items per chest, and adds coins to chest rewards.

Requirements
Permissions and credits
Changelogs
Note: This mod requires the Advanced Loot Framework mod to be installed.

This mod makes Skull Cave treasure chest loot fully customizable, via the config.json file created when you first run the mod. Here is the default config.json created:

{
  "EnableMod": true,
  "MaxItems": 5,
  "ItemsBaseMaxValue": 100,
  "MinItemValue": 20,
  "MaxItemValue": -1,
  "CoinBaseMin": 20,
  "CoinBaseMax": 100,
  "IncreaseRate": 0.2,
  "ItemListChances": {
    "MeleeWeapon": 100,
    "Shirt": 0,
    "Pants": 0,
    "Hat": 0,
    "Boots": 100,
    "BigCraftable": 100,
    "Ring": 100,
    "Seed": 100,
    "Mineral": 100,
    "Relic": 100,
    "Cooking": 0,
    "Fish": 0,
    "BasicObject": 0
  }
}

This mod doesn't increase the number of treasure chests you encounter in the mines. If you want to add more treasure chests to the Skull Cave, try Custom Dungeon Floors.


Config Variables

An item list is created when the game starts, containing all the types in ItemListTypes. It will only add items that have a value between the MinItemValue and MaxItemValue.

If you set MinItemValue or MaxItemValue to 0 or less, they are disabled.

When the player enters a treasure chest floor in Skull Cave, this mod determines the chest's total item value based on the formula:

ItemsBaseMaxValue * (mineLevel - 120)^IncreaseRate


Basically, ItemsBaseMaxValue is the maximum gold the treasure can be worth at the first Skull Cave floor (mine floor 121). IncreaseRate determines how fast this ceiling scales per floor.

Coin rewards are determined similarly, but their base value is first randomized based on the min and max above.

Items are chosen for the chest randomly until a) the number of items in the chest reaches MaxItemsb) the items' total value reaches the chest's calculated max value minus MinItemValue (making another addition impossible), or c) the list of all possible items has been exhausted.

ItemListChances determines the chance that an item type can be placed in the chest once it is selected at random as a potential item. The number is a percent chance, so 0 means that type of item will never be allowed to be in a chest, and 100 means it will always be added.


Other Chest Mods



Other Underground Mods



Technical

Requires SMAPI and Advanced Loot Framework, uses Harmony.

Compatible with Mod Updater for automatic updates.

Code is at https://github.com/aedenthorn/StardewValleyMods.

If you want to complain or ask for help or help me test my mods, you can visit my Discord server.

A list of all my mods for Stardew Valley is available at https://www.nexusmods.com/stardewvalley/articles/895.