{"id":18484815,"url":"https://github.com/butr/bannerlord.module.template","last_synced_at":"2025-10-19T13:02:01.473Z","repository":{"id":37014706,"uuid":"310883955","full_name":"BUTR/Bannerlord.Module.Template","owner":"BUTR","description":"Template extension for dotnet, eases the process of creating new mods for M\u0026B 2: Bannerlord ","archived":false,"fork":false,"pushed_at":"2025-02-18T10:08:09.000Z","size":514,"stargazers_count":68,"open_issues_count":6,"forks_count":9,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-13T05:07:16.998Z","etag":null,"topics":["bannerlord","bannerlord-mod","dotnet","dotnet-template","mount-and-blade-bannerlord","template"],"latest_commit_sha":null,"homepage":"https://forums.taleworlds.com/index.php?threads/module-template-for-visual-studio-and-dotnet.444482/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BUTR.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-07T16:18:39.000Z","updated_at":"2025-03-20T08:22:07.000Z","dependencies_parsed_at":"2023-12-19T00:48:49.406Z","dependency_job_id":"aa9a1ab4-8ee6-4c22-bfe5-fb3add5f4d90","html_url":"https://github.com/BUTR/Bannerlord.Module.Template","commit_stats":{"total_commits":105,"total_committers":5,"mean_commits":21.0,"dds":0.2666666666666667,"last_synced_commit":"b428127c793f282305458cb032211a544a886e95"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BUTR%2FBannerlord.Module.Template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BUTR%2FBannerlord.Module.Template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BUTR%2FBannerlord.Module.Template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BUTR%2FBannerlord.Module.Template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BUTR","download_url":"https://codeload.github.com/BUTR/Bannerlord.Module.Template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248665747,"owners_count":21142123,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bannerlord","bannerlord-mod","dotnet","dotnet-template","mount-and-blade-bannerlord","template"],"created_at":"2024-11-06T12:43:06.253Z","updated_at":"2025-10-19T13:02:01.389Z","avatar_url":"https://github.com/BUTR.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bannerlord Module Template\r\n\u003cp align=\"center\"\u003e\r\n   \u003ca href=\"https://www.nuget.org/packages/Bannerlord.Templates\" alt=\"NuGet Bannerlord.MCM\"\u003e\r\n   \u003cimg src=\"https://img.shields.io/nuget/v/Bannerlord.Templates.svg?label=NuGet%20Bannerlord.Templates\u0026colorB=blue\" /\u003e\u003c/a\u003e\r\n\u003c/p\u003e\r\n\u003cp\u003e\r\n   \u003cimg src=\"https://raw.githubusercontent.com/BUTR/Bannerlord.Module.Template/master/resources/installation.png\" alt=\"Installation\" style=\"width: 800px\" /\u003e\r\n\u003c/p\u003e\r\n\r\n## Installation\r\n1. Install the latest [.NET Core SDK](https://dot.net).\r\n2. Run `dotnet new --install Bannerlord.Templates` to install the project templates.\r\n\r\n## Updating\r\n1. Run `dotnet new --install Bannerlord.Templates` to update the project templates.\r\n\r\n## Creating a new Module\r\n\r\n### Creating from command line:\r\n1. Choose a project template i.e. `blmodfx` or `blmodsdk`.\r\n2. Run `dotnet new blmodfx --help` to see how to select the feature of the project.\r\n3. Run `dotnet new blmodfx --name \"Bannerlord.MyModule\"` along with any other custom options to create a project from the template.\r\n\r\n### Creating via Visual Studio\r\nYou need to have at least an 16.8.x version to create the template!  \r\n\r\n### Creating via Rider\r\nTechnically you can create the project from Rider, but Rider does not provide the configuration like Visual Studio does.  \r\nWe recommend to either create the project from VS or the dotnet CLI and then use it in Rider.\r\n\r\n## FAQ\r\n### What are the differences between 'soft-dependency' and 'hard-dependency?\r\n**Hard dependency** means that an entry will be added to `SubModules.xml`. Your Module will not include the dependency inside it's `/bin` folder (the .dll). It won't allow the game to run your mod without the dependency installed as a separate Module. This is an important feature to prevent having multiple versions of the same dependency running within the game.  \r\n**Soft dependency** means that nothing will be added to `SubModules.xml`. Your Module will include the dependency inside it's `/bin` folder (the .dll).\r\n\r\n### What is this variable 'Bannerlord Game Folder Location'?\r\n`$(BANNERLORD_GAME_DIR)` is an environment variable. We think that it would be best to set it once on the system instead of hardcoding the game path in the project.  \r\nFeel free to replace it with a full folder path like `C:\\Program Files (x86)\\Steam\\steamapps\\common\\Mount \u0026 Blade II Bannerlord` if you don't want to use the environment variable.  \r\n\r\n### What is this variable 'Module Name'?\r\n`$(MSBuildProjectName)` is a MSBuild built-in variable that returns the file name of the project file without the file name extension; for example, `Bannerlord.Module1`. \r\n\r\n### What is this variable 'Module Url'?\r\nIf you plan to host your mod on NexusMods or Steam Workshop, we recommend to create a page there and the set the url for this variable!  \r\nIf you don't plan on keeping the Module folder name the same as the project that is being created, override it.  \r\n\r\n### What is this variable 'Install Community Module Loader'?\r\nSee [Bannerlord.ModuleLoader](https://github.com/BUTR/Bannerlord.ModuleLoader).\r\n\r\n### What is this variable 'Require BLSE Features'?\r\nSee [Bannerlord.BLSE](https://github.com/BUTR/Bannerlord.BLSE#features).\r\n\r\n### What is this variable 'Language Version'?\r\nThe version of C# that is used. By default, the value is `9.0`, which is the latest currently.  \r\n\r\n### Should I set 'Use Nullable Feature'?\r\nRead the [docs](https://docs.microsoft.com/en-us/dotnet/csharp/nullable-references) on Nullable reference types to decide if you need this feature!  \r\n\r\n### What are those '$SOMETHING$' variables inside SubModules.xml?\r\nThose are variables that will be replaced with real values when the project is built.  \r\n* **$modulename$** is the varible you passed in `Module Name` when creating the Module. It is the `\u003cModuleName\u003e` property used in your project file (`.csproj`)\r\n* **$version$** is the `\u003cVersion\u003e` property used in your project file (`.csproj`)\r\n\r\n### What is the '\\_Module' folder inside the project?\r\nIt is the root Module folder that copies everything that is placed there inside the output.\r\n\r\n### I build my project and a folder with my Module was created in `GAMEPATH/Modules`!\r\nThis is one of the features that this project template provides.  \r\nIf the `\u003cModuleName\u003e` and `\u003cGameFolder\u003e` properties are valid, your Module will be copied in the game's `/Modules` folder automatically. You can test your Module without the need of creating a script that will move everything inside the game's Modules folder.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbutr%2Fbannerlord.module.template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbutr%2Fbannerlord.module.template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbutr%2Fbannerlord.module.template/lists"}