Mount & Blade II: Bannerlord
0 of 0

File information

Last updated

Original upload

Created by

echoreccon - reworked by ClearDarkz

Uploaded by

ClearDarkz

Virus scan

Safe to use

About this mod

This is a remake of the popular mod "Horn On Orders". This mod will sound a horn every time an order is given to a formation. Used all of the original mod assets.
Made compatible for e1.6.4, e1.6.5 and e1.7.0

Permissions and credits
Changelogs
FIXES IMPLEMENTED TO THIS MOD BY ME:
- Added config file (Modules\BattleHorns\bin\Win64_Client_Shipping\config.json), this config files allows you to change the horns volume. The default value is 0.3.


ORIGINAL MOD DESCRIPTION:

While fighting for some lords faction, i would often hear some horns playing when orders were given to the troops, i'm not sure if its only in my game, but i never heard these horns when i was leading a army. With that in mind i built this simple mod that add a horn sound on every movement order that you give to your troops.

Manual Installation:
 Simply copy the HornOnOrders folder to "Mount & Blade II Bannerlord/Modules".
- Your folder structure should look like this "Mount & Blade II Bannerlord/Modules/HornOnOrders/SubModules.xml"

Loading External Files:

Unfortunately, i haven't managed to play the external files from the way i wanted, using SoundEvent.CreateEventsFromExternalFiles(), so to get the mod to play 2D sounds, while i still try to figure out why this isn't working, i did a workaround. What i did was use a external library to play the .ogg files, the libraries i used are the NVorbis and NAudio (Details Below).

To load external files, you just need to follow a few steps, sticking to the planned file structure. The sounds folder can be found at Mount & Blade II Bannerlord\Modules\HornOnOrders\Sounds. There you will have already one folder called "Default", inside this folder there are a few default horn sounds for the mod.

How to add more sounds:
All you need to do is add the .ogg files to the desired folder, but for them to work properly they have a few requirements.
- The file needs to be .ogg, otherwise the game will crash when it tries to play it.
- The file name must be the name of the order, followed by a "_" and the sequence number. (For example: charge_01, charge_02, etc). You can add how many sounds you want for the same order, the code will run through them, and play one randomly when the order is given.
- For now the only possible orders are: advance, charge, fallback, follow, hold, retreat, stop.

To change a sound simply overwrite them, and to remove, simply delete the file from the folder.

How to add sounds for a specific Faction:
To do that you'll need to add a new folder at Mount & Blade II Bannerlord\Modules\HornOnOrders\Sounds, with the name of the faction that you want to add the custom sounds. For Example Mount & Blade II Bannerlord\Modules\HornOnOrders\Southern Empire. Inside the folder you'll add the files following the requirements that were stated above.

Have in mind that, if the faction folder does not exist, the "Default" will be used, if the faction folder exists but there is no file for a specific order, then no sound will play when this same order is given.

Vanilla Factions Names: Northern Empire, Southern Empire, Western Empire, Battania, Vlandia, Sturgia, Aserai, Khuzait

What are those extra .dll's inside the mod?

They are what makes my workaround works, at least until i manage to play the 2D sounds from external files, using the functions from the game. You can find the documentation for each at:
NVorbis - Github Link
NAudio - Github Link
NAudio.Vorbis - Github Link
System.Buffers - Microsoft Docs Link
System.Memory - NuGet Link
System.Runtime.CompilerServices.Unsafe - Microsoft Docs Link

Requirements for the mod to work:
- Just have more than 40 units, without counting the player, and it should work.

About ModLib

Since ModLib caused a few issues with the use of the mod, i decided to remove it from the code. Because of that, for now the mod doesn't have custom configs.

Known Issues:
Unnecessarily loud - Trying to find a way to use in-game configs to set the mod audio volume - Fixed by ClearDarkz