Empress ArenaLoaderAPI

版本 v1.0.1·更新於 2026-01-31

A developer focused API for R.E.P.O. that enables custom Arena loading with automatic RNG selection, networking support, and BepInEx config integration.

模組介紹 作者原文

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

安裝與使用 安裝:BepInEx 外掛

  1. 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
  2. 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
  3. 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
  4. 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

BepInEx-BepInExPacknickklmao-REPOConfig

檔案與校驗

檔案名稱
Empress_ArenaLoaderAPI-1.0.1.zip
檔案大小
58.6 KiB