Zehs.REPOLib 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Zehs.REPOLib --version 1.0.0
                    
NuGet\Install-Package Zehs.REPOLib -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Zehs.REPOLib" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Zehs.REPOLib" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Zehs.REPOLib" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Zehs.REPOLib --version 1.0.0
                    
#r "nuget: Zehs.REPOLib, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Zehs.REPOLib&version=1.0.0
                    
Install Zehs.REPOLib as a Cake Addin
#tool nuget:?package=Zehs.REPOLib&version=1.0.0
                    
Install Zehs.REPOLib as a Cake Tool

REPOLib

Library for adding content to R.E.P.O.

Download Download

Download REPOLib on Thunderstore.

Features

  • Registering network prefabs.
  • Registering valuables.

Usage

<details><summary>Click to expand</summary><br>

Reference REPOLib in your project's .csproj file.

<ItemGroup>
  <PackageReference Include="Zehs.REPOLib" Version="1.*" />
</ItemGroup>

Add REPOLib as a dependency to your plugin class.

[BepInDependency(REPOLib.MyPluginInfo.PLUGIN_GUID, BepInDependency.DependencyFlags.HardDependency)]
[BepInPlugin("You.YourMod", "YourMod", "1.0.0")]
[BepInDependency(REPOLib.MyPluginInfo.PLUGIN_GUID, BepInDependency.DependencyFlags.HardDependency)]
public class YourMod : BaseUnityPlugin
{
    // ...
}

Registering a network prefab.

[BepInPlugin("You.YourMod", "YourMod", "1.0.0")]
[BepInDependency(REPOLib.MyPluginInfo.PLUGIN_GUID, BepInDependency.DependencyFlags.HardDependency)]
public class YourMod : BaseUnityPlugin
{
    // ...

    private void Awake()
    {
        // ...

        AssetBundle assetBundle = AssetBundle.LoadFromFile("your_assetbundle_file_path");
        GameObject prefab = assetBundle.LoadAsset<GameObject>("your_network_prefab");

        // Register a network prefab.
        REPOLib.Modules.NetworkPrefabs.RegisterNetworkPrefab(prefab);
    }
}

Registering a valuable.

[BepInPlugin("You.YourMod", "YourMod", "1.0.0")]
[BepInDependency(REPOLib.MyPluginInfo.PLUGIN_GUID, BepInDependency.DependencyFlags.HardDependency)]
public class YourMod : BaseUnityPlugin
{
    // ...

    private void Awake()
    {
        // ...

        AssetBundle assetBundle = AssetBundle.LoadFromFile("your_assetbundle_file_path");
        GameObject prefab = assetBundle.LoadAsset<GameObject>("your_valuable_prefab");

        // Register a valuable.
        REPOLib.Modules.Valuables.RegisterValuable(prefab);
    }
}

</details>

[!NOTE] Registering a valuable will automatically register it as a network prefab.

[!IMPORTANT] You should only register network prefabs and valuables in your plugins awake function.

Contribute

Anyone is free to contribute.

https://github.com/ZehsTeam/REPOLib

Developer Contact

Report bugs, suggest features, or provide feedback:

kofi

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Zehs.REPOLib:

Package Downloads
PaintedUtils

Utility Mod for REPO

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.1 383 4/6/2025
2.0.0 186 4/1/2025
1.5.0 630 3/24/2025
1.4.2 126 3/15/2025
1.4.1 52 3/15/2025
1.4.0 46 3/15/2025
1.3.1 126 3/13/2025
1.3.0 138 3/12/2025
1.2.0 144 3/10/2025
1.1.0 171 3/8/2025
1.0.2 237 3/3/2025
1.0.1 154 3/3/2025
1.0.0 108 3/3/2025