[FabledRealms] Geodes

Crack open rare geodes while mining! Drops scale with depth, rewards are fully configurable, and loot is weighted for exciting finds—simple to install, lightweight, and perfect for survival or RPG servers.

Geodes is a lightweight mod that adds an extra drop when mining stone. The drop tables are easily configured, and the mod is actively being updated and worked on.

This mod introduces depth-based drop scaling, weighted loot tables, and configurable mining conditions to give players a rewarding mining experience.


Configuration Options:

If you're using a hosted server, the config file location is in your root directory/config/geodes/geodes.json

If you're using a singleplayer world, it will be in your UserData/Saves/<World Name>/config/geodes/geodes.json


========================
CONFIG FIELD BREAKDOWN
========================

geodeItemId (string)
- The item that drops when a geode is triggered.
- Example: "Geode"

cooldownSeconds (number)
- Minimum time between geode drops per player.
- Prevents rapid farming with fast tools or AOE mining.
- Example: 0.25 = 1 geode every 0.25 seconds max

requiredBlockIds (string[])
- List of block IDs that are allowed to drop geodes.
- Players must mine one of these blocks for a geode to roll.
- Example: ["rock_stone"]

surfaceDropChance (number 0–1)
- Base chance to drop a geode near the surface.
- Example: 0.0025 = 0.25% chance

deepDropChance (number 0–1)
- Maximum chance to drop a geode at the deepest levels.
- Example: 0.02 = 2% chance

chanceStartDepthY (integer)
- The Y level where scaling begins.
- Above this height → always uses surfaceDropChance

minDepthY (integer)
- The Y level where the drop chance reaches its maximum.
- At or below this → always uses deepDropChance

depthExponent (number)
- Controls how quickly drop chance increases as you go deeper.

  Internally:
  normalizedDepth = (startDepth - currentY) / (startDepth - minDepth)
  finalChance = surfaceChance + (deepChance - surfaceChance) * pow(normalizedDepth, depthExponent)

  Lower values (~1.0) = linear scaling
  Higher values (>2.0) = rare near surface, spikes at deep levels

gems (weighted list)
- Defines what items come out of a geode when opened.
- Each entry has an itemId and a weight.

  Example entry:
  {
    "itemId": "Rock_Gem_Diamond",
    "weight": 8
  }

- All weights are summed together.
- Each item’s drop chance = weight / totalWeight.

Higher weight = more common  
Lower weight = rarer


========================
DEFAULT LOOT TIERS
========================

Small crystals (weight 20 each)
→ Common rewards

Gems (weight 8 each)
→ Uncommon rewards

Ores (weight 3 each)
→ Rare rewards

Note: You can modify drop tables by adding, modifying, or removing the drop item id


========================
GEODE INTERACTION (CUSTOM ITEMS)
========================

By default, geodes use the interaction ID:

geodes:open_geode

This interaction is what allows a player to right-click (or interact) with a geode item to open it and roll the loot table.

If you are creating custom items, you can enable them to open geodes by adding this interaction ID to the item’s interaction list.

Example (pseudo item config):

{
  "itemId": "My_Custom_Geode",
  "interactions": [
    "geodes:open_geode"
  ]
}

Any item with this interaction will:
- Trigger the geode opening logic
- Roll from the configured loot table
- Consume the item (unless overridden in your own logic)

This allows you to:
• Create custom geodes (e.g. Ice Geode, Volcanic Geode, Void Geode)
• Create tiered geodes tied to progression
• Hook geode opening into custom tools or mechanics


========================
TUNING TIPS
========================

Make geodes more common:
- Increase surfaceDropChance and/or deepDropChance

Make deep mining more rewarding:
- Increase depthExponent

Make geodes rarer overall:
- Lower both drop chances

Make better loot more frequent:
- Increase weights of gem entries
- Decrease the weights of crystal entries

Make the mod work on more blocks:
- Add more IDs to requiredBlockIds

The [FabledRealms] Geodes Team

profile avatar
Owner
  • 1
    Projects
  • 336
    Downloads