Skip to content

Repository files navigation

Power Scale

Java 17 Environment: Server Mod loader: Fabric Discord

🔧 = this mod | 🔩 = entity & loot attributes

📦 Features

  • Per player difficulty
  • Dimension and biome specific ruleset
  • Each ruleset can adjust entities and looted items
  • Entities attributes and spawner settings can be adjusted (for example: more health, armor, etc...)
  • Looted item attributes can be adjusted (for example: more damage on weapons)
  • Fully data-driven (using the configuration file)

❓ How it works

This mod assigns difficulty to a locations, in order to apply attribute modifiers to entities spawned there, and items looted there.

Difficulty consists of:

  • type: which attributes get scaled (and by what ratio)
    • for example: Dungeon
  • level: is the general multiplier used when applying attribute modifiers
    • for example: 2

Difficulty can be assigned to various zone types, (resolved in the following priority):

  • structures - for example: minecraft:fortress
  • biomes - for example: minecraft:desert
  • dimensions - for example: minecraft:the_nether

When an entity spawns difficulty is resolved based on its location (checking structures first, than biomes, than dimensions), if difficulty is resolved successfully, a certain set of attribute modifiers (with level multiplied value) get applied onto it, making it stronger. Same logic applies to loot spawned (chest/drop location is checked to apply multipliers).

All of this location-difficulty assignment is specified by one gigantic config file.

🔧 Configuration

The configuration is meant to be used by modpack developers, hence no in-game (client-side) settings are available. It is a server-side only configuration, can be found at config/dungeon_difficulty_v2.json.

Config file is parsed into Config object. You can find it here. Config file is sanitized upon reloading, meaning every non-parsable data is removed.

Editing the config usually involves the steps below:

  1. Open the config file
  2. Define difficulty types (in difficulty_types array), which describe scaling of entities
  3. Define scaling of looted items (in loot_scaling array)
  4. Assign difficulty to locations referencing a difficulty type by its name, and an arbitrary level.
  5. Relaunch the game or use the command /dungeon_difficulty_config_reload to apply changes. Warning: upon reloading, config file get sanitized, meaning every non-parsable data is removed.

Fields that reference some kind of in-game ID (like entity_type, biome, dimension, structure etc...) support universal pattern matching:

  • # prefix matches for tags (for example: #minecraft:undead)
  • ~ prefix matches for regex (for example: ~zombie)
  • no prefix matches for exact match (for example: minecraft:skeleton)
  • ! prefix negates the match (for example: !minecraft:skeleton, !#minecraft:undead, !~zombie)
  • * matches everything (wildcard)

Tips

  • Check out the default configuration to see specific examples.
  • Regex fields in the configuration are interpreted as fully featured regex. If you are unfamiliar with regex, first make sure to learn about it (start for example here). It is recommended to test out your regex patterns using tool: regex101.com
  • Prefer tag matching instead of regex matching, whenever possible. Regex matching in general hurts server performance.