It should work - this sounds like some unusual formatting issue with your files.
Hey this editor looks great but I can't get it to work. I did a fresh install of mtw and tatw and I keep getting an error. Possibly a unit attribute but it never adds it to the error log so I can see what the problem is. Also if I just let it sit I get this error.
Error Message
In the error it mentions Microsoft .NET Framework and that "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
Any ideas?
So, I am trying to get it to read the unpacked main data folder for the game, but it tells me it is unable to find an edu. Though there is one there, the same thing happens when I try to run the vanilla folder that came with the download.
You might be pointing to the wrong directory when loading the set up:
In the app choose 'file\load' and click 'new'
browse to your mod's folder and select\highlight it - eg M2TW\mods\mymod, click 'OK'
now select your mod folder's name in the list and click 'load'
For the unpacked main game select the M2TW folder (containing the executables)
I can't even seem to get this tool to run. It reads descr_cultures fine, then freezes on descr_sm_factions. Heres the error:
Spoiler Alert, click show to read:
Maybe my formatting in the file is weird so I'll upload it.descr_sm_factions.txt
After messing around a bit the problem is definitely my battle_models.modeldb file. I removed all entries except for mount_pony and the unit editor opened up just fine. I guess the formatting of all my units is just that messed up, so I decided to add them all back in using the Unit Editor 1 by 1.
However another problem seems to be happening. I add in new units fine, but when I export the mdb.txt file and copy it into my modeldb file, the Unit Editor wont open again. Looking at mdb.txt and examining it... it's exporting really strange things. There's a "5 blank 0 0 0 0 0 0 0" model entry at the top and the counts are not matching the the total models.
Best to run your original modelDB through the checker. I have a tutorial page here that explains how to edit the checker to include custom factions. It also includes tools by Hex35, discussion about his tools start here.
Running the checker this way helps greatly in chasing down undocumented errors.
Well I'm an idiot. I needed to do run EOL conversion >Windows Format in notepad ++. Even though everything looked fine I didn't have CR-LF's at the end of each line like I should have. I guess the Unit Editor is more sensitive to that formatting then Medieval 2 itself is. My original modeldb file opens just fine now!
A small problem I've noticed with the editor, most of the time when I click on the faction list nothing seems to happen and the list of factions will not pop up. Occasionally it works and I can select factions for my models, but I would say 9 times out of 10 it just remains blank. It seems to fail to work more often on models that I've already finished and want to add a new faction entry for. Is this normal or have I perhaps done something to cause this problem?
That seems to work, another problem I've run into though...
Is there a limit to how many mounts the Unit Editor can load? If I go over 50 mounts in my descr_mount file, the Unit Editor will not start up. The hardcoded limit for mounts in Medieval 2 is 100, so I'm not sure what might be going on here.
Last edited by UndyingNephalim; May 03, 2017 at 09:39 PM.
Yup, I ran into that limit when I tried to use the editor on Rage of dark Gods.
Indeed it is - it helped a lot with 1648 and Rise of three Kingdoms.
And you're welcome![]()