Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Empress ShopLoaderAPI
A developer focused API for R.E.P.O. that simplifies custom shop loading with automatic networking, RNG selection, and BepInEx config integration.
| Last updated | 5 hours ago |
| Total downloads | 108177 |
| Total rating | 4 |
| Categories | Tools Libraries Client-side Server-side |
| Dependency string | Omniscye-Empress_ShopLoaderAPI-2.0.1 |
| Dependants | 34 other packages depend on this package |
This mod requires the following mods to function
BepInEx-BepInExPack
BepInEx pack for Mono Unity games. Preconfigured and ready to use.
Preferred version: 5.4.2305README
Empress ShopLoaderAPI v2.0.1
- A developer focused API for R.E.P.O. that simplifies custom shop loading with automatic networking, shop level registration, and BepInEx config integration.
Changelog
2.0.0
- Added backwards compatibility for older shops while keeping support for new shops.
- Updated custom shop injection for the current REPO shop level structure.
Discord
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.
Features & Configuration
- Automatic Config Generation: My API automatically generates a configuration entry for ALL shops that use it. Users can find these under
[Registered Shops]in thecom.Empress.ShopAPI.cfgfile. - Shop Level Registration: Custom shops are registered as shop level entries so compatible level toggle tools can enable or disable them.
- Seamless Integration: My API automatically injects your shop into the
LevelGeneratorand handles theResourceCachefor both singleplayer and multiplayer pools.
Dependencies
- BepInEx is required.
- REPOLib is not required by this API.
For Developers
Critical Requirement: The Truck, Spawn Points, Screens, and Vehicle Charger
Since version 1.1.0, this API overrides the default Shop Start Room. Because of this, you must follow these rules to prevent the game from crashing:
- Use the Module Shop as your Base: When creating your shop, use the Module Shop prefab as your foundation. It contains the working shop interior, extractor components, items ect.
- COPY THE CURRENT TRUCK: The Module Shop prefab does not include a truck by default. You MUST open a current standard Shop Start Room, copy the Truck parent object, and paste it into your custom shop prefab.
- Why? The Truck handles the game's Spawn Points, Truck Screens, vehicle charging station, and critical level logic. If you do not have the current Truck object in your prefab, the game will find zero spawn points or missing shop systems and can crash.
Implementation Guide
- Add EmpressShopAPI.dll as a reference in your IDE project.
- Add
[BepInDependency("com.Empress.ShopAPI")]to your plugin metadata. - Call
ShopAPI.RegisterShopin yourAwakemethod.
using BepInEx;
using UnityEngine;
using Empress_ShopLoaderAPI;
using System.IO;
[BepInPlugin("com.YourName.MyCoolShop", "My Cool Shop", "1.0.0")]
[BepInDependency("com.Empress.ShopAPI")]
public class MyShopPlugin : BaseUnityPlugin
{
private void Awake()
{
string bundlePath = Path.Combine(Path.GetDirectoryName(Info.Location), "my_shop_bundle");
AssetBundle bundle = AssetBundle.LoadFromFile(bundlePath);
if (bundle != null)
{
GameObject myShopPrefab = bundle.LoadAsset<GameObject>("MyShopPrefabName");
if (myShopPrefab != null)
{
ShopAPI.RegisterShop(myShopPrefab, "YourName/MyCoolShop");
}
}
}
}
Credits
- Omniscye / Empress