You are viewing a potentially older version of this package. View all versions.
Omniscye-Empress_ArenaLoaderAPI-1.0.1 icon

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.

Date uploaded 8 hours ago
Version 1.0.1
Download link Omniscye-Empress_ArenaLoaderAPI-1.0.1.zip
Downloads 61
Dependency string Omniscye-Empress_ArenaLoaderAPI-1.0.1

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2100 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2100
nickklmao-REPOConfig-1.2.3 icon
nickklmao-REPOConfig

Edit mod configs in-game!

Preferred version: 1.2.3

README

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:

  1. Base Template: Use the vanilla Arena Start Room as your base.
  2. Spawn Points: Ensure valid player spawn points exist in the prefab.
  3. Auto-Cleanup: The API automatically strips ItemVolume components that aren't children of an ItemAttributes parent to prevent runtime errors.
  4. One at a Time: The API forces a single Arena selection per run via RNG.

Implementation Guide

  1. Add Empress_ArenaLoaderAPI.dll as a reference in your project.
  2. Add the dependency attribute: [BepInDependency("com.Empress.ArenaAPI")].
  3. 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<GameObject>("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