Details

Last Updated
3 weeks ago
First Uploaded
3 weeks ago
Downloads
16K
Likes
2
Size
41KB
Dependency string
D1GQ-MageConfigurationAPI-1.3.1
Dependants

MageConfigurationAPI

This BepInEx mod provides a centralized configuration system for Mage Arena mods, allowing all registered BepInEx configurations to appear in the game's settings menu automatically.

Features

  • Automatic UI Integration: Registered configurations appear in-game without additional GUI work
  • Mod Configuration Access: Safely access configurations from other mods
  • Change Notification: Subscribe to events when configurations change
  • Type-Safe Access: Get configuration values with proper type handling
  • BepInEx Config Description Tags: Settings GUI will automatically check BepInEx Config Description Tag validation

Installation

  1. Prerequisites:

    • Mage Arena with BepInEx 5.4.21
  2. Installation:

    MageArena/
    └── BepInEx/
        └── plugins/
            ├── MageConfigurationAPI.dll
    

Usage for Mod Developers

Basic Configuration Registration

using BepInEx;
using BepInEx.Configuration;
using MageConfigurationAPI.Data;

[BepInPlugin(PluginGuid, PluginName, PluginVersion)]
public class YourPlugin : BaseUnityPlugin
{
 private const string PluginGuid = "your.mod.guid";
 
 private ConfigEntry<float> ExampleSetting;
 
 private void Awake()
 {
	 // Create standard BepInEx config entry
	 ExampleSetting = Config.Bind(
		 "Section Name",
		 "Setting Name",
		 0.5f,
		 "Description of this setting"
	 );
	 
	 // Register with MageConfigurationAPI
	 var registeredConfig = new ModConfig(this, ExampleSetting);
 }
}

Advanced Features

// Accessing other mods' configurations
var otherModConfig = ConfigManager.GetConfigByGUIDAndName(
	"other.mod.guid",
	"TheirSettingName"
);

// Subscribing to configuration changes
registeredConfig.SettingChanged += (sender, args) => 
{
	Logger.LogInfo($"Setting changed to: {args.ChangedSetting.BoxedValue}");
};

Configuration Support

  1. Types:
    • (bool, int, float, string, Enums)
  2. Tags:
    • BepInEx Config Description Tags

Changelog

v1.3.1

  • Fixed issues with settings positioning.

v1.3.0

  • Fixed issues with subscribing to OnSettingChanged in ModConfig.

v1.2.0

  • Remove testing configs.

v1.1.0

  • Added settings flag to choose when the option is visible.

v1.0.0

  • Initial public release.
  • Core configuration registration system.
  • Basic in-game UI integration.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.