Total War: MEDIEVAL II - Definitive Edition

Total War: MEDIEVAL II - Definitive Edition

ItsToBeXpected Oct 17, 2016 @ 5:49pm
Modding and Unpacking the game files
For those interested, I use to play/mod this game when it first came out. I have taken a 6 year break from it but decided to come back to it, hopefully to mod it again. So I thought I would put here all the information I have gathered to help people set thier steam version of M2TW up for mods and modding. I have been able to get all mods working with no problems using windows 10. Hopefully this post helps a few people...

The following assumes you have a clean install with no mods messing up the folder structures...

You will want to unpack the game files for modding:

- To do this you need to copy (from the medieval 2 root folder) msvcp71.dll and msvcr71.dll to the tools\unpacker folder. Then run unpack_all.bat from with the unpacker folder, and click yes to each question. For some reason you have to copy these files into the unpacker folder, which was not necessary on the original install. If you find the expansions do not unpack, simply run the individual bat file that corresponds to that specific expansion (americas, british_isles, crusades, teutonic). You will know they have unpacked correctly when you open the data folder of either the main game or any of the expansion pack folders (inside the mod folder) and see a heap of new files/folders. The process can take a while depending on your system specs. Be patient.

For those unaware, the files unpacked are all the text, xml, images, and movies. Which can be edited for modding.

You will need a lot of extra space to unpack all the files. My Medieval 2 installation folder after unpacking was 31.3GB in size! This doesn't include adding any new mods.

- You then need to delete the following two files from the data\ folder. descr_geography_new.txt and descr_geography_new.db. The game will not load otherwise.

Now your Steam M2TW install is ready for modding. If you have any issues up to this point, try starting a game and making a save file, some times initiating the files is necessary on some machines.

I am using windows 10 and this works perfectly.

Happy modding :)
< >
Showing 1-15 of 45 comments
HazardHawk Oct 17, 2016 @ 6:05pm 
Please take no offense. You are a little out of date. Steam no longer provides the tools for unpacking. If you are on Windows 7 or after usng a computer where the OS was factory installed or restored from a factory backup or even upgraded from a factory install you have to preset cmd.exe to run in administrator mode or it will unpack, but not actually write the files. You not longer have to unpack to run mods. And, I think since the gamespy removal patch with the Steam version, after you do find an unpacking tool and unpack, you not longer have to delete any files. Lastly, you must use Steam launch options and only fully foldered mods to be placed in the mods folder independently or you risk breaking your game to the point you must uninstall, leave sitting without reinstalling for 30 days before you can reinstall with it working.
ItsToBeXpected Oct 17, 2016 @ 6:17pm 
No offense taken. However the tools to unpack were provided by steam (i downloaded the game yesterday). But without the files unpacked one can't mod the files. I am running mods from a batch file, which is how most mods were run. No need to run from the steam launch options. That seems a rather messy way to get around it. I merely set the game up how it was done originally, which makes modding the actual game easier. If someone just wants to play mods, then sure, your suggestions are fine.

I have experienced no issues this way. I merely suggested it for anyone still experiencing issues running the game, which from the look of this forum people are still experiencing issues.
HazardHawk Oct 17, 2016 @ 6:31pm 
Most of the issues they experience are from running on computers where they do not have full admin rights or they have installed mods that are not completely foldered. Darthmod causes the most issues.

I have both disk and Steam and the last time I downloaded steam version it did not give me the tools. Others are reporting this too and it has just been recent so that may just be the server you downloaded from has not yet had them removed.

Also, you will note the Kingdoms.exe is now gone. CA deleted the Medieval2.exe and renamed the Kingdoms.exe to be Medieval2.exe. The script to run which game you want is loaded when you click play on steam. Without that background script loading the game it at times suffers random crashes or other performance problems. It shouldnt, but it does. There are other changes in the removal of Gamespy patch that broke many mods and also caused a cache problem that happens randomly if you mod files in a vanilla folder that the only way I have found to work around is to leave Medieval 2 uninstalled for 30 ays to allow the cache to clear
Fixer May 26, 2017 @ 9:47am 
Thank you!

I had to unpack the game files so i could fix the broken diplomacy.

Game works perfectly!
Gigantus May 26, 2017 @ 10:37am 
Wow - that's one hell of an old post\thread. My tutorial still applies: http://www.twcenter.net/forums/showthread.php?t=550619
rhony2 Sep 6, 2017 @ 5:03pm 
Hi. Thanks for your original post as the unpack option originally did not save the unpacked files. However with your instructions, it did. And I also removed the two files you mentioned from the data folder. However modding the unpacked files does not seem to do anything. It looks like the game is still using the info in the packed files. How do I get the game to use the modded unpacked files?
Gigantus Sep 6, 2017 @ 8:05pm 
The game requires a certain CFG file entry to be set. This in turn requires the CFG file to be made read-only - a steady descent into the rabbit hole.

Rather use my mod set up: http://www.twcenter.net/forums/showthread.php?t=352216

It has numerous fixes and is essential the Grand Campaign. Simply copy the files that you want to edit into the mod's folder and then run the set up via it's desktop short cut to test.

Note: since the last steam update you will get a message if you want to run additional CFG file entries for any mod, that's normal.
Last edited by Gigantus; Sep 6, 2017 @ 8:07pm
rhony2 Sep 7, 2017 @ 9:38am 
Thanks for your reply but in the meantime I found a thread about the non-Steam version that requires you to create a batch file with the --io.file_first extension when running medieval2.exe file. Since the Steam game uses a URL I wasn't sure how to make the adjustment for Steam and tried various things that did not work, but then within the Steam app itself when I right clicked the game in the library there was a properties selection and when selecting that there was a Launch Options button which when I clicked in on, I added the --io.file_first command extension. That worked so now the game takes my modded unpacked files. I will say that modding the Medieval 2 txt files is a lot more complicated than either Medieval or orginal Rome Total War games,
Gigantus Sep 7, 2017 @ 7:07pm 
Your way is rather complicated :p

It also predates the dinosaurs and the mod folder method. Unless you are a sucker for pain (like re-installing the game completely if you can't find an error) I would suggest that you proceed as I suggested - don't forget to remove the launcher options you created if you do.
rhony2 Sep 8, 2017 @ 8:24am 
Thanks again, but I always save the original txt files in another location before I mod them so I've never had to reinstall a game. I used to mod the original Medieval game extensively since I could never get my kings and heirs married off in the later part of the game as no one wanted to deal with me since I was too powerful. That I never solved. So the only way to win that game was to play as a Muslim where getting your royalty married off to foreign princesses wasn't an issue. I will say that Medieval 2 has some issues - it seems to break when I try to limit a unit to a certain faction. It may have something to do with the buildings file which determines what the prerequisites for creating a unit are - I may need to mod that file as well, which I did not need to do in the original Medieval.
Gigantus Sep 9, 2017 @ 5:03am 
Glad to hear that you already have some experience with modding the game.
The recruitment crash will be related to some formatting issue I would think. More likely however: if you change the ownership in the export_descr_units file but do not adjust the recruitment (faction allocation) in the export_descr_buildings file then you are bound to end up with a crash.
rhony2 Sep 9, 2017 @ 12:27pm 
Yeah that is new since it didn't crash in Medieval I. Of course Medieval I used the original Shogun Total War engine although they added more depth. Medieval II seems to use the Rome TW engine and in Rome I, I could limit which factions could recruit certain units without having to change the buildings file. I've been modding TW games since Shogun I when I decided to create a scenario akin to Seven Samurai (7 Kensai and a couple of Ashigaru units - amazingly effective at the start of the game but a lot more difficult later on since I limited myself to recruiting Ashigaru and Kensai and it takes a while before you can recruit Kensai).
There seems to be limits to what units you can create in the descr_strat file as well. Game will not start if you gave any faction an assassin. It's been over a decade since I bought any new TW games (Rome I was the last since RL interfered) so I'm catching up. Shogun II is up next since I'm not sure I'm going to like Empire or Napoleon.
Gigantus Sep 9, 2017 @ 8:17pm 
I just added an assassin to my mod's descr_strat - no problem whatsoever. Maybe a typo or formatting issue? Here is what I used:

character Samuel Blacke, assassin, male, age 25, x 110, y 134

As to modding after M2TW - the options are very restricted for anything other then units and start positions.
Last edited by Gigantus; Sep 9, 2017 @ 8:19pm
rhony2 Sep 10, 2017 @ 12:17am 
Hmm, I just copied the English spy name, changed spy to assassin and moved him to a different location. The English spy only has a given name so I wonder if that was the problem. I see all the other spies have both a given and family name. I'll try using the merchant Samuel Blacke as a template like you did rather than the spy Richard. But I wonder why the single name Richard works.
Gigantus Sep 10, 2017 @ 12:45am 
Surname is optional, but the formatting has to be right - maybe you used SPACE instead of TAB between character and name?
< >
Showing 1-15 of 45 comments
Per page: 1530 50

Date Posted: Oct 17, 2016 @ 5:49pm
Posts: 45