I am a novice modder but long term (~10 years) HoMM player. I set upon making my own custom town for my own use and not to be released as I am using the MDT Forge as framework. All I have done currently is successfully change creatures using other .def files, create custom creature and town portraits, implement custom creature sounds, and add an extra unit. I face no issues with any of those modifications. The trouble now lies within creating an extra unit to be recruited in the town via a new added building. I converted an adventure map def I found to one without a flag and created an area and border for it. Implementing it into the town.json file worked fine and I edited the Building Menu to accomodate for an extra building slot, which worked. I also created an image to be displayed in the slot, which again worked fine.
Screenshot of Build Menu (Gyazo)
Unfortunately, I can’t seem to assign the correct unit to be recruited in the building.
Building it returns an error which is the same in both the console AND in-game:
Error ecountered when building dwelling (bid=44):no creature found (upgrade number 2, level 0!
System message: Server encountered a problem: Error ecountered when building dwelling (bid=44):no creature found (upgrade number 2, level 0!
Clicking on it makes me recruit the Level 1 units (changed from Recruits and Militians to Cultists and Assasins):
Screenshot of Recruitment Screen (Gyazo)
I have no idea how to solve this. I’ve spent a few hours messing around with the .json file for the unit that I have added - Evil Sorceress (which works fine, it’s just trying to get it to be placed in the generator is the issue) -, the town.json file and I even used a text scanning tool to look through the entire \Content\ directory to look for anything that may give me a hint as to how to solve this.
Here is a link to the full .zip file on Dropbox: Dropbox
Please do note that I will NOT be releasing this town as it contains content created by the Mod Design Team. This is simply a project I am working on myself to build skill and experience in modding for VCMI. All help is appreciated!
UPDATE 15/4/17 @ 21:17
Proof the unit works in combat with new hero added: Combat Example (Gyazo)
UPDATE 23/5/17 @ 17:13
I got it working! Well, kinda. I left this for a bit but recently downloaded the Amethyst Chinese town and dug around the files. I changed the building ID from 43 or 44 to 50, added a few placeholder spaces in the townhall.def file and I could recruit my Sorceresses! Only issue now is that their building is always built in the town and they are recruited from the Doomknight/Dreadlord Pit (Juggernaut Pit). So glad it’s working, just need to see if I can get them to be recruited separately!