MapHexApi
A mod that enhances procedural map generation by adding customizable hex types, dynamic spawning, and networked interaction support.
About this mod Author’s original text
Map Hex API
This mod enhances the game by adding custom hexes to the map generation system. It includes features such as adding custom Hexes (Map parts). Adding Components doesnt work rn
Installation
Requirements
- BepInEx 5.4.21
- ModSync
Hierachy
MageArena/
└── BepInEx/
└── plugins/
└── MapHexAPI
└── MapHexAPI.dll
Usage
To integrate the custom hexes into your game, follow the setup provided below:
[BepInDependency("com.user.MapHexAPI")]
[BepInPlugin("com.othermodder.smt", "Custom Hex Mod", "1.0.0")]
public class CustomHexMod: BaseUnityPlugin
{
private void Awake()
{
// 1. Load assets
string modPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
// Load prefab
var prefab1 = AssetLoader.LoadPrefabFromBundle(
Path.Combine(modPath, "customhex"),
"HexPrefab"
);
var iconTex1 = AssetLoader.LoadTexture(
Path.Combine(modPath, "Icons", "CustomHexIcon.png")
);
var iconMat1 = AssetLoader.CreateDecalMaterial(iconTex1);
// 2. Add components to the prefab
List components = new List();
List netcomponents = new List();
// Add custom components
FlagControllerCustom flagController = prefab1.AddComponent();
components.Add(flagController);
netcomponents.Add(flagController);
MoutainWindCustom mountainWind = prefab1.AddComponent();
components.Add(mountainWind);
netcomponents.Add(mountainWind);
// 3. Register the custom hex type
int hexType = HexRegistry.RegisterHex(
prefab: prefab1,
mapIcon: iconMat1,
components: components,
netcomponents: netcomponents,
displayName: "CustomHex"
);
Logger.LogInfo($"Successfully registered custom hex with type: {hexType}");
}
}
Your Mod Hierarchy
MageArena/
└── BepInEx/
└── plugins/
└── YourModFolder
└── Icons
| └── icon.png
└── customhex (Assetbundle)
Prefab Creation
- N/A
Change Log
v1.0.0
- Release
Install & use Install: follow the bundled instructions
- Unzip the archive from playbuff and read the bundled readme / instructions first.
- Most mods rely on the game's mod loader — the usual route is a community mod manager (such as r2modman): pick this game, install, and it handles the loader and dependencies.
- For a manual install, put the mod files into the matching Mod / plugins folder inside the game directory.
- Launch the game to confirm it loaded; mods with listed dependencies need those installed as well.
Install locations vary a lot between mods — the bundled readme is the most reliable guide.
Install these first, or the mod will not work: