Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/butr/bannerlord.uiextenderex
A library that enables multiple mods to alter standard game interface.
https://github.com/butr/bannerlord.uiextenderex
bannerlord bannerlord-mod library mod mount-and-blade-bannerlord
Last synced: 3 months ago
JSON representation
A library that enables multiple mods to alter standard game interface.
- Host: GitHub
- URL: https://github.com/butr/bannerlord.uiextenderex
- Owner: BUTR
- License: lgpl-3.0
- Created: 2020-05-29T13:27:51.000Z (over 4 years ago)
- Default Branch: dev
- Last Pushed: 2024-10-23T18:29:36.000Z (3 months ago)
- Last Synced: 2024-10-24T04:05:29.932Z (3 months ago)
- Topics: bannerlord, bannerlord-mod, library, mod, mount-and-blade-bannerlord
- Language: C#
- Homepage: https://www.nexusmods.com/mountandblade2bannerlord/mods/2102
- Size: 7.64 MB
- Stars: 19
- Watchers: 2
- Forks: 5
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.txt
- License: LICENSE
Awesome Lists containing this project
README
# Bannerlord.UIExtenderEx
A library that enables multiple mods to alter standard game interface.
Previously, a fork of [UIExtenderLib](https://github.com/shdwp/UIExtenderLib) that was de-forked.## Installation
This module should be one of the highest in loading order. Ideally, it should be loaded after ``Bannerlord.Harmony`` or ``Bannerlord.ButterLib``.## For Players
This mod is a dependency mod that does not provide anything by itself. You need to additionally install mods that use it.## Usage
Check the [``Articles``](https://butr.github.io/Bannerlord.UIExtenderEx/articles/v2/Overview.html) section of our documentation!## Current State of AutoGens
The game uses two Prefab systems - static (pre-compiled XML) C# prefabs and dynamically serialized XML prefabs.
The XML prefabs were introduced with the Early Access.
The C# prefabs were introduced in the middle of Early Access. Most likely for Console releases, since they use the `Mono` runtime.We call AutoGens the XML prefabs that are pre-compiled into C# prefabs. The pre-compilation is achieved by using `TaleWorlds.MountAndBlade.GauntletUI.CodeGenerator.exe`.
It generates C# code based on the XML file. The C# code can then be compiled into an assembly (`.dll` file) that can be loaded by the game.
This has the following benefits:
* We have ready-to-use prefabs at the very start of the game, removing the serialization step of the XML prefabs, which reduces the load time.
* We have static (typed) access to anything within the prefab. We do not need to use reflection to get/set data, which, again, speeds up the game. This is particularly noticeable on the `Mono` runtime.In summary, AutoGens are faster than the raw XML prefabs. The most performance is gained on the `Mono` runtime. On .NET (Core) the difference is more or less neglectable.
UIExtenderEx modifies the raw XML prefabs. Since the game does not use XML prefabs and instead relies on the AutoGens, our modifications will not affect the game.
Currently, we just disable AutoGens globally. We are not able to do the pre-compilation at runtime. The issues are mostly not at our side - the `CodeGenerator` that the game provides doesn't support
such scenarios.