Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/butr/bannerlord.moduleloader

Library that provides an universal loader for distributing multiple implementations for different game versions within one module.
https://github.com/butr/bannerlord.moduleloader

bannerlord mount-and-blade-bannerlord roslyn-generator

Last synced: 6 days ago
JSON representation

Library that provides an universal loader for distributing multiple implementations for different game versions within one module.

Awesome Lists containing this project

README

        

# Bannerlord.ModuleLoader








Uses the new C# 9 Source Generator (could have used an MSBuild task) to generate a loader library for the implementation-loader technique.

## Requirements
* Will add a requirement to the `Bannerlord.Harmony` module.
* Requires the `ModuleId` and `ModuleName` MSBuild property widely used in our BUTR stack. Should be the same as the mod's Module Id and Name.
* Requires standard `MSBuildProjectFullPath` and `OutputPath` properties. Tampering with them will break the injector.

## Installation
Install the [Bannerlord.ModuleLoader.Injector](https://github.com/BUTR/Bannerlord.ModuleLoader.Injector) package.

## Usage
Each build will create `Bannerlord.ModuleLoader.$(ModuleId).dll|.pdb` files.

```xml









```

> **ℹ️ NOTE**
> The `$moduleid$` and `$modulename$` properties is from BUTR's [Bannerlord.BuildResources](https://github.com/BUTR/Bannerlord.BuildResources), it injects MSBuild's $(ModuleId) and $(ModuleName) properties.
> Just replace it with the actual Module Id if you don't use the package!

> **⚠️ ATTENTION**
> If the Module Id contains invalid C# identity symbols (like dot '.'), override the `SubModuleClassType` property manually, replacing each invalid char as underscore `_`.