


A developer focused API for R.E.P.O. that simplifies custom shop loading with automatic networking, RNG selection, and BepInEx config integration.
Developers Only: This is an API for loading your custom shops. You still need to create your own shop Prefab. This API handles the loading, networking, and integration for you.
Automatic Config Generation: My API automatically generates a configuration entry for
ALL shops that use it. Users can find these under [Registered Shops] in the com.Empress.ShopAPI.cfg file to toggle them ON or OFF or use RepoConfig and use the button on the games main menu for ease of access to toggle.
Built-in RNG Failsafe: To prevent game-breaking overlaps, my API ensures only one custom shop is loaded per level. If a user has multiple shops enabled, the API uses Random Number Generation to select one.
Seamless Integration: My API automatically injects your shop into the LevelGenerator and handles the ResourceCache for both singleplayer and multiplayer pools.
To create your own custom shop mod, follow these steps:
Add EmpressShopAPI.dll as a reference in your project in your IDE.
Add [BepInDependency("com.Empress.ShopAPI")] to your plugin metadata.
Call ShopAPI.RegisterShop in your Awake method.
using BepInEx;
using UnityEngine;
using Empress_ShopLoaderAPI; // Reference my API namespace
using System.IO;
[BepInPlugin("com.YourName.MyCoolShop", "My Cool Shop", "1.0.0")]
[BepInDependency("com.Empress.ShopAPI")] // Declare my API dependency
public class MyShopPlugin : BaseUnityPlugin
{
private void Awake()
{
// 1. Load your AssetBundle
// After compiling, place your asset bundle next to the .dll in your plugins folder.
string bundlePath = Path.Combine(Path.GetDirectoryName(Info.Location), "my_shop_bundle");
AssetBundle bundle = AssetBundle.LoadFromFile(bundlePath);
if (bundle != null)
{
// 2. Load your Shop Prefab from the bundle
GameObject myShopPrefab = bundle.LoadAsset<GameObject>("MyShopPrefabName");
if (myShopPrefab != null)
{
// 3. Register it with my API
// The second string must be a unique ID for your shop (Author/ShopName)
ShopAPI.RegisterShop(myShopPrefab, "YourName/MyCoolShop");
}
}
}
}
/* DEPLOYMENT INSTRUCTIONS: Once your mod is compiled, put your Asset Bundle file directly next to your mod's .dll file inside your mod folder (inside the BepInEx plugins folder). The code above will find it automatically using the Empress API! */
Made by Omniscye/Empress