# Modding Gauntlet Without C#
# Important
# Mods which plan to "overwrite" Gauntlet UIs from Official Modules MUST be loaded BEFORE that Official Module. For this reason, it is highly recommended that you do not use DependedModules
for these types of mods. Hopefully this will be addressed by TaleWorlds in the future.
# Introduction
The following guide will walk you through step-by-step on how to create a mod that can overwrite any Gauntlet UI without using any C#. For this example, we will be overriding the Quests UI with some custom title text.
# Preparation
# For this tutorial, we will be naming our project _ExampleUIMod
.
Note: The underscore in the name is used to ensure that our mod is loaded first (see issue above).
# Setting up your Module (SubModule.xml)
Go to your game files and locate the
Modules
directory.Create a new folder and name it
_ExampleUIMod
(Must be the same as the Id you use for Step #5).Create a new folder named
GUI
and open it.Now create a new folder in your
GUI
directory calledPrefabs
. We will come back to this folder later in the tutorial.Go back to the module folder you created in Step #2 and create a new
SubModule.xml
file and then paste the following into it:<Module> <Name value="Example UI Mod"/> <Id value="_ExampleUIMod"/> <Version value="v1.0.0"/> <SingleplayerModule value="true"/> <MultiplayerModule value="false"/> <DependedModules/> <SubModules/> <Xmls/> </Module>
Start the launcher and make sure your mod appears under
Singleplayer
>Mods
.
For more information on the Module folder structure, Click Here.
# Overriding a Gauntlet UI
Note: You can override any Gauntlet UI. However, for this tutorial, we will only be overriding the Quests UI.
- Go to
Modules\SandBox\GUI\Prefabs\QuestsScreen
and copy theQuestsScreen.xml
file to your clipboard - Go to the
Prefabs
folder you created in Step 4 ofSetting up your Module
and paste theQuestsScreen.xml
from your clipboard. - Open the pasted file in a text editor.
- Search (Ctrl+F) for a
Text="@QuestTitleText"
and go to this section of the file. - Replace
@QuestTitleText
(including @ symbol) with the text you want the title to be. - Save the file.
- Open the Bannerlord launcher and navigate to
Singleplayer
>Mods
then make sure that your mod is ticked and start the game and load any save. - Open the Quests UI and you should see the text you added in the top middle of the screen.
- You have now successfully created your first Bannerlord Gauntlet mod!
# How To Enable & Use Live UI Editing
Live UI editting is a feature in the game that will make your life a lot easier. Unfortunately though, it isn't something you can enable with just the base game.
To enable it, you will need to download the DeveloperConsole Mod (opens new window).
Once you have downloaded & installed the Developer Console Mod, follow the steps below to enable live editing for your game session.
- Open the game launcher and then make sure
Developer Console
is ticked inSingleplayer
>Mods
along with your Gauntlet UI mod. - The Developer Console mod uses the shortcut
CTRL
+~
(tilde) to enable the console. If this shortcut doesn't work for you, try pressing CTRL and then the key on your keyboard above Tab and below Esc. - Now that you can see the console, you will want to type the command
ui.toggle_debug_mode
to enable the live UI editing feature. - Any changes you make to your UIs should now update automatically in-game.