Mount & Blade: Warband

Mount & Blade: Warband

The Last Days of the Third Age
 This topic has been pinned, so it's probably important
Swyter  [developer] Apr 18, 2016 @ 2:11pm
Official macOS install guide
This will show you how to install the Warband version of The Last Days of the Third Age on macOS. There are two ways of doing it; by taking advantage of the Steam Workshop automatic updates, or by installing the mod manually.

If you choose to install the mod *without* using the Steam Workshop, just make sure that the two latest .7z files from https://tldmod.github.io are already in your Downloads folder. Otherwise installing Warband on your Mac and clicking Subscribe should be enough. Let's begin.


Main way: Steam Workshop version

After installing Warband on your Mac, clicking Subscribe, and waiting for the big download to finish, the mod should be technically installed, if the Warband engine worked as intended we shouldn't have to do any of the following steps:

a) FIXING WARBAND
  1. Open the «Go» menu in the Finder and select «Utilities», then click on the «Terminal» icon.
    • We will go line by line, just copy-paste the various commands in the Terminal and press Enter. I will explain what it does first to avoid looking sketchy.

  2. Fix the garbled font and the collision bodies so that you can actually hit baddies. Just paste this in the Terminal window and press Enter:
    sh <<EOF && sh -c "# swy: zsh in catalina+ doesn't support inline comments: apple.stackexchange dot com/a/405317" # swy: needed for sed to stop complaining about the wholy unsupported hexadecimal literals export LANG=C export LC_ALL=C # swy: go into the game's binary folder cd "$HOME/Library/Application Support/Steam/steamapps/common/MountBlade Warband/Mount and Blade"."app/Contents/MacOS" # swy: turn their ../../.. hack into the harmless .//.//./ without changing the length of the string sed -i '' 's|\.\./\.\./\.\.|\.//\.//\./|g' ./'Mount and Blade' # swy: fix the game looking up the correct Data folder via Info.plist bundle manifest; go figure sed -i '' -E 's|(</dict>)| \\ '$'\t''<!-- swy: tell SDL2 to read files out of the .app bundle; and do it properly --> \\ '$'\t''<key>SDL_FILESYSTEM_BASE_DIR_TYPE</key> \\ '$'\t''<string>parent</string> \\ \1|' ../Info.plist # swy: turn GL_LINEAR_MIPMAP_NEAREST (0x2701) into GL_LINEAR_MIPMAP_LINEAR (0x2703) to avoid the harsh mip texture transitions # 100903763 ba 01 27 00 00 MOV EDX,0x2701 # 1009037bd ba 01 27 00 00 MOV EDX,0x2701 # --- # BA 01 27 00 00 -> BA 03 27 00 00 sed -i '' $'s|\xBA\x01\x27|\xBA\x03\x27|g' ./'Mount and Blade' # swy: SDL_GL_DEPTH_SIZE; Improve the depth buffer resolution/quality from 24 to 32 bits # BF 06 00 00 00 BE 18 00 00 00 -> BF 06 00 00 00 BE 20 00 00 00 # absolutely stupid sed workaround to avoid unsupported null bytes via capture group sed -i '' -E 's|'$'\xbf\x06''(...)'$'\xbe\x18''|'$'\xbf\x06''\1'$'\xbe\x20''|g' ./'Mount and Blade' # swy: Note: this old macOS sed adds a harmless carriage return byte (0A) at the end of the file; doesn't matter echo "\n\033[42mDone, hopefully.\033[0m" EOF
  3. Close the Terminal window.

That's it. Open Steam like your normally do and use Warband's Configure utility to change the selected mod to «The Last Days of the Third Age». If you followed this guide properly then the game should launch and reach to the main menu.

Automatic mod updates should work as normal, you only need to repeat these steps whenever the font breaks, so hopefully only when reinstalling the game.

Have fun in Middle-earth!



Alternative way: Manual mod installation

If you choose to install the mod *without* using the Steam Workshop, just make sure that the two latest .7z files from https://tldmod.github.io are already in your Downloads folder.

a) TEMPORARILY INSTALLING THE 7-ZIP EXTRACTOR
  1. Open the «Go» menu in the Finder and select «Utilities», then click on the «Terminal» icon.
    • We will go line by line, just copy-paste the various commands in the Terminal and press Enter. I will explain what it does first to avoid looking sketchy.

  2. This switches your Terminal to your temporary directory (the one that gets flushed every time you reboot), then downloads the 7za command-line utility (right from the 'Homebrew' package manager but without installing anything) and extracts it in that very same folder:
    • Don't worry, it's only a tiny, portable and self-contained program (called 7za) that will go away the next time you shutdown your Mac. They leave no trace behind.
    cd /tmp && curl -L 'ghcr.io''/v2/homebrew/core/p7zip/blobs/sha256:bea86999db7dee5f0cb78d3a72d875d822ec73ebb2a6e7d46cf27ae66243c645' -H 'Authorization: Bearer QQ==' -o p7zip.tar.gz && tar -xzvf p7zip.tar.gz 'p7zip/17.04/lib/p7zip/7za' && mv -f 'p7zip/17.04/lib/p7zip/7za' .

b) UNINSTALLING PREVIOUS TLD VERSIONS
  1. Keep in mind that the paths shown here are for the default Steam Library game folder; so if you are installing Warband into a different disk drive or using the GOG variant you will have to adjust them accordingly.
    • For example, GOG by default installs it under '/Applications/Mount & Blade Warband/Mount and Blade.app' instead.
  2. This opens Warband's «Modules» folder in the Finder so that you can delete any previous versions of the «TLD» folder on your own by right-clicking it and using «Move to Trash». If the folder isn't there let's just skip this step and proceed to the installation:
    open "$HOME/Library/Application Support/Steam/steamapps/common/MountBlade Warband/Modules/"

c) INSTALLING THE MOD
Next up we are going to extract the mod under «{game-root}/Modules/TLD/». Just ensure that the two latest .7z files (the standalone and the latest nightly patch) from https://tldmod.github.io are already conveniently stored in your Downloads folder and this will take care of the rest:

  1. Let's switch to the Downloads folder, where the compressed files are.
    cd ~/Downloads
  2. Extract the standalone TLD 3.6 release for Warband:
    /tmp/7za x -y -bb1 -o"$HOME/Library/Application Support/Steam/steamapps/common/MountBlade Warband/Modules" TLD_3.6_wb.7z
  3. Extract the latest Warband nightly patch (the one that comes with the latest updates) and, you guessed it, overwrite yet again:
    /tmp/7za x -y -bb1 -o"$HOME/Library/Application Support/Steam/steamapps/common/MountBlade Warband/Modules" `find . -name 'TLD_3.6_wb_*' | sort -r -u | head -n 1`

d) FIXING WARBAND
The mod is now technically installed, if the Warband engine worked as intended we shouldn't have to do the following workaround:
  1. Fix the garbled font and the collision bodies so that you can actually hit baddies. Just paste this in the Terminal window and press Enter:
    sh <<EOF && sh -c "# swy: zsh in catalina+ doesn't support inline comments: apple.stackexchange dot com/a/405317" # swy: needed for sed to stop complaining about the wholy unsupported hexadecimal literals export LANG=C export LC_ALL=C # swy: go into the game's binary folder cd "$HOME/Library/Application Support/Steam/steamapps/common/MountBlade Warband/Mount and Blade"."app/Contents/MacOS" # swy: turn their ../../.. hack into the harmless .//.//./ without changing the length of the string sed -i '' 's|\.\./\.\./\.\.|\.//\.//\./|g' ./'Mount and Blade' # swy: fix the game looking up the correct Data folder via Info.plist bundle manifest; go figure sed -i '' -E 's|(</dict>)| \\ '$'\t''<!-- swy: tell SDL2 to read files out of the .app bundle; and do it properly --> \\ '$'\t''<key>SDL_FILESYSTEM_BASE_DIR_TYPE</key> \\ '$'\t''<string>parent</string> \\ \1|' ../Info.plist # swy: turn GL_LINEAR_MIPMAP_NEAREST (0x2701) into GL_LINEAR_MIPMAP_LINEAR (0x2703) to avoid the harsh mip texture transitions # 100903763 ba 01 27 00 00 MOV EDX,0x2701 # 1009037bd ba 01 27 00 00 MOV EDX,0x2701 # --- # BA 01 27 00 00 -> BA 03 27 00 00 sed -i '' $'s|\xBA\x01\x27|\xBA\x03\x27|g' ./'Mount and Blade' # swy: SDL_GL_DEPTH_SIZE; Improve the depth buffer resolution/quality from 24 to 32 bits # BF 06 00 00 00 BE 18 00 00 00 -> BF 06 00 00 00 BE 20 00 00 00 # absolutely stupid sed workaround to avoid unsupported null bytes via capture group sed -i '' -E 's|'$'\xbf\x06''(...)'$'\xbe\x18''|'$'\xbf\x06''\1'$'\xbe\x20''|g' ./'Mount and Blade' # swy: Note: this old macOS sed adds a harmless carriage return byte (0A) at the end of the file; doesn't matter echo "\n\033[42mDone, hopefully.\033[0m" EOF
  2. Close the Terminal window.

That's it. Open Steam like your normally do and use Warband's Configure utility to change the selected mod to «TLD». If you followed this guide properly then the game should launch and reach to the main menu.

Have fun in Middle-earth!



How to roll these changes back if your game breaks / Uninstalling the mod

If you have used previous versions of this guide (or something went wrong and your game no longer works correctly) you will need to verify the integrity of game files to get the original files back, as shown here: https://support.steampowered.com/kb_article.php?ref=2037-QEUH-3335

Also, delete the Data folder we added under SteamApps > Common to fix the garbled fonts in other mods by pasting these lines in your Terminal:
rm "$HOME/Library/Application Support/Steam/steamapps/common/Data" rm "$HOME/Library/Application Support/Steam/steamapps/workshop/Data"

Keep in mind that by using this newer macOS install method you should be able to keep TLD installed without replacing any game files, meaning that you should also be able to play Native and other mods. ¯\_(ツ)_/¯



Allowing custom fonts / Going back to the Native font

If you find the mod's font hard to read you can paste this into the Terminal window and press Enter, it will switch any installed versions of TLD to the basic font shader:
sh <<EOF && sh -c "# swy: zsh in catalina+ doesn't support inline comments: apple.stackexchange dot com/a/405317" modfolders=("\$HOME/Library/Application Support/Steam/steamapps/common/MountBlade Warband/Modules/TLD/GLShadersOptimized" "\$HOME/Library/Application Support/Steam/steamapps/workshop/content/48700/299974223/GLShadersOptimized") for curfolder in "\${modfolders[@]}"; do if [[ ! -d "\$curfolder" ]]; then continue; fi # swy: skip if that folder is missing cd "\$curfolder" && echo "{i} overwriting font shaders in \$curfolder" curl -LO raw.githubusercontent.c''om/tldmod/tldmod/no-custom-font/_wb/GLShaders/fs_font_outline.glsl curl -LO raw.githubusercontent.c''om/tldmod/tldmod/no-custom-font/_wb/GLShaders/fs_font_outline_mtarini.glsl done EOF

You can then delete or replace the mod's Data/font_data.xml and Textures/font.dds as with any other normal mod.
Last edited by Swyter; Feb 16 @ 2:18am
< >
Showing 1-15 of 266 comments
Woder Aug 20, 2015 @ 6:09am 
Originally posted by Kham:
Hi all,

Here is a potential fix for those playing on Mac or Linux:

  1. Download the zip here[drive.google.com]
  2. Go to your Steam Workshop Folder (Steam --> SteamApps --> Workshop --> Content --> 48700 --> 299974223)
  3. Unzip the Contents of that zip file (GLShaders folder) within that folder. [/li]
  4. So you should see a Folder named GLShaders copied over
  5. Play

Please test it out and see if it fixes your issues.
Good sir Khan, After we unzip the files and such where do we put the GL Shaders. Do we put in textures? Or just the whole mods Folder?
Kham  [developer] Aug 20, 2015 @ 6:14am 
Put the folder, GLShaders into the Mod folder.

So, /299974223/GLShaders
Hymeros Aug 20, 2015 @ 6:21am 
i really dont have that in my steam content, i dont have steam in any library at all. not on mac.
Kham  [developer] Aug 20, 2015 @ 7:08am 
You have to help me out then, I don't have a mac.

Try to look for where you installed Steam. Once you found the folder, let me know what folders are inside.
It Broke all my modules.
Kham  [developer] Aug 20, 2015 @ 10:06am 
You have to put the GLShadess only WITHIN the TLD directory, not your Mount & Blade Warband Directory.

Like I said here:

Go to your Steam Workshop Folder (Steam --> SteamApps --> Workshop --> Content --> 48700 --> 299974223)
dikky_papran Aug 20, 2015 @ 11:32am 
The addition of the GLShaders folder makes the game crash upon opening it. I played around a little and it starts without the "techniques.xml" but is missing a ton of textures, and crashes upon attempting to play. maybe it is something specifically in the "techniques.xml"?
Jormundgand Aug 20, 2015 @ 2:47pm 
On Linux: before adding the shaders, the main menu would load and I would be able to pick "new game", after which the game would just crash. After adding the shaders, the game spawns a black windows, which stays black. No crash on the black screen; couldn't interact with anything though.
Last edited by Jormundgand; Aug 20, 2015 @ 2:48pm
jankmaster98 Aug 20, 2015 @ 3:44pm 
DId exactly that for my mac copy, the mod crashes when I try to open it
File path Library-application support- steam-steam apps-workshop-content-48700-299974223. I'm prrey sure i did it right, as I downloaded the file and placed in the last numbered folder.
Kham  [developer] Aug 20, 2015 @ 3:53pm 
It looks like this potential fix is really not a fix :(

I apologise, just wanted to try it out.

So for those with Mac / Linux, Steam Workshop won't be an option until Taleworlds decides to whitelist these shaders.

You can play on Mac / Linux by performing the steps here[tldmod.github.io]
Jormundgand Aug 20, 2015 @ 4:15pm 
No complains from my side -- hard work should always be appreciated.

The instructions doesn't appear to fix anything though -- unless I messed up, it's exactly the same as subscribing + installing the shaders (i.e. black screen).
Last edited by Jormundgand; Aug 20, 2015 @ 4:24pm
not working :( i cannot open the game my friend
Valar Melkor Aug 20, 2015 @ 6:52pm 
It's alright, guys. There's a fix that works for Mac/Linux, but the best part is that it works with every Warband mod. Kham spread the word. Basically, go into that same TLD directory, then go to textures and move the file font.dds to trash. This is a guaranteed working fix that helps the font show up
Captain Von Baron Aug 21, 2015 @ 8:29pm 
sirpukington your a genius
Captain Von Baron Aug 21, 2015 @ 8:29pm 
oh never mind
< >
Showing 1-15 of 266 comments
Per page: 1530 50