Skip to content

Configuration

Markus Bordihn edited this page Dec 13, 2025 · 6 revisions

⚙️ Configuration (since v4.0.0)

Starting with version 4.0.0, the Mods Optimizer uses a new and more flexible configuration system. Instead of listing mods directly in the config.toml, the classification is now handled via a separate, auto-managed JSON database.

🕰️ Before v4.0.0, mod classifications like ding = "client" were added directly to mods.toml. That approach has now been replaced by a smarter system that updates automatically.

📂 Structure Overview

🔸 mods-database.json

This file is located at:

config/mods_optimizer/mods-database.json

It contains categorized mod IDs based on their intended usage:

{
  "description": "Automatically updated database. Please make changes only in mods-database-override.json",
  "lastUpdated": "2025-05-09T18:00:01Z",
  "server": [
    "server_side_mod_id"
  ],
  "client": [
    "client_side_mod_id"
  ],
  "both": [
    "default_side_mod_id"
  ]
}

⚠️ Important: Do not manually edit this file! Your changes will be overwritten during the next automatic update. Use mods-database-override.json instead for custom classifications.

🔸 mods-database-override.json

This file is located at:

config/mods_optimizer/mods-database-override.json

Use this file to override or add custom mod classifications:

{
  "description": "Override entries from mods-database.json. This file is never modified automatically.",
  "server": [
    "my-custom-server-mod"
  ],
  "client": [
    "my-custom-client-mod"
  ],
  "both": [
    "my-custom-both-mod"
  ]
}

This file is never modified automatically - your changes are safe!

🔄 Override behavior:

  • Entries in this file take priority over mods-database.json
  • If a mod is listed in both files, the override wins
  • Changes are logged on startup for transparency

🧩 Categories:

  • client: Mods used only on the client (e.g. graphics, HUD).
  • server: Mods required only on the server (e.g. admin tools).
  • both: Mods needed on both sides (e.g. gameplay logic).

✅ This helps avoid side mismatches and makes your modpack cleaner and more efficient!

🔄 Auto-Update System

The mods-database.json file is:

  • 🗓️ Automatically updated every 48 hours
  • 🔐 Not overwritten if you modify it manually (hash-based detection)
  • 📦 Fallback to built-in version if no valid file is available

The mods-database-override.json file is:

  • 🛡️ Never modified automatically - completely safe for your custom changes
  • 🎯 Takes priority over entries in mods-database.json
  • 📝 Auto-created with examples on first run

✨ Thanks to this system, your modpack can stay up to date without needing a full mod update! No more waiting for a new release just to fix mod compatibility!

💡 Best Practice: Always use the override file for custom classifications instead of editing the main database.

🛠️ Configuration File: config.toml

The simplified config/mods_optimizer/config.toml only contains general and debug settings:

# This file was auto-generated by Mods Optimizer
# Last update: 2025-05-09T02:54:07.469792

[Database]
allowRemoteDatabase = "true"

[Debug]
debugForceSide = "default"
debugEnabled = "false"

📁 [Database]

[Database]
allowRemoteDatabase = "true"
  • allowRemoteDatabase = "true": Allows periodic download of the latest mod classification database.

🐞 [Debug]

Enable debug output and test mod behavior:

[Debug]
debugEnabled = "true"
debugForceSide = "client"
  • debugEnabled: Enables detailed logging.
  • debugForceSide: Force classification:
    • "client": Classification behave as loaded on the client-side.
    • "server": Classification behave as loaded on the server-side.
    • "default": Use normal classification from the database.

🔍 How to Find a Mod ID

Need to manually classify a mod? Here's how to find its ID:

🔧 Forge mods / NeoForge mods → Check META-INF/mods.toml

modId = "examplemod"

🧵 Fabric mods → Check fabric.mod.json

"id": "examplemod"

📜 Other locations

  • gradle.properties: mod_id=examplemod
  • build.gradle: id = 'examplemod'

💡 Tip: If you see ${mod_id}, look it up in gradle.properties.

🎮 In-game

  • Use Mod Menu (Fabric) or the Mods screen (Forge)
  • Use commands like /mods or /mod list if supported

🧺 Or inspect the mod JAR (as ZIP) to find metadata