
R.E.P.O.
You are viewing a potentially older version of this package. View Latest Version

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.
[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.LevelGenerator and handles the ResourceCache for both singleplayer and multiplayer pools.To create your own custom shop mod, follow these steps:
[BepInDependency("com.Empress.ShopAPI")] to your plugin metadata.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!
*/
### Credits
**Made by Omniscye/Empress**