Empress ArenaLoaderAPI
A developer focused API for R.E.P.O. that enables custom Arena loading with automatic RNG selection, networking support, and BepInEx config integration.
About this mod Author’s original text
Empress ArenaLoaderAPI 1.0.1
A developer-focused API for R.E.P.O. that enables custom Arena loading with automatic RNG selection, networking support, and BepInEx config integration.
Developers Only
This is an API for loading custom Arenas. You still need to create your own Arena prefab. This API handles selection, injection, and multiplayer-safe loading for you.
Features
- Automatic Config: Every Arena registered through the API automatically gets a toggle in com.Empress.ArenaAPI.cfg under [Registered Arenas].
- Built-in RNG Selection: If multiple Arenas are enabled, the API safely selects one per run to avoid conflicts.
- Seamless Level Injection: Replaces default start rooms and clears normal modules automatically.
- Multiplayer Ready: Handles singleplayerPool and ResourceCache (Photon) so your custom prefab syncs across the network.
- Music Override: Disables vanilla Arena music logic by default, letting you use your own audio triggers without interference.
For Developers: Critical Requirements
Your Arena prefab must be built correctly to avoid softlocks:
- Base Template: Use the vanilla Arena Start Room as your base.
- Spawn Points: Ensure valid player spawn points exist in the prefab.
- Auto-Cleanup: The API automatically strips ItemVolume components that aren't children of an ItemAttributes parent to prevent runtime errors.
- One at a Time: The API forces a single Arena selection per run via RNG.
Implementation Guide
- Add Empress_ArenaLoaderAPI.dll as a reference in your project.
- Add the dependency attribute: [BepInDependency("com.Empress.ArenaAPI")].
- Register your prefab in Awake().
Example Mod Implementation
using BepInEx;
using UnityEngine;
using Empress_ArenaLoaderAPI;
using System.IO;
[BepInPlugin("com.YourName.MyArena", "My Custom Arena", "1.0.0")]
[BepInDependency("com.Empress.ArenaAPI")]
public class MyArenaPlugin: BaseUnityPlugin
{
private void Awake()
{
string bundlePath = Path.Combine(Path.GetDirectoryName(Info.Location), "myarena_bundle");
AssetBundle bundle = AssetBundle.LoadFromFile(bundlePath);
if (bundle!= null)
{
GameObject arenaPrefab = bundle.LoadAsset("MyArenaPrefab");
if (arenaPrefab!= null)
{
// Unique resource path is required for networking!
ArenaAPI.RegisterArena(arenaPrefab, "YourName/MyArena");
}
}
}
}
Example Mod Template
The above code is included as a reference. This serves as a working code and prefab template for you to use when creating your own Arena mods to work with my ArenaAPI. Check its structure to see how to properly register and load your assets!
Credits:
- Omniscye/Empress: ArenaLoaderAPI
- @Jettcodey + Skript: Testing support
- @ThatDRW: For creating cool stuff with my APIs
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.
Install these first, or the mod will not work: