Custom creature crashes the game

I’ve made a creature mod and for some reason it keep crashing the game and I can’t find why does it do that.

Here is the creature’s code:

{
	"lostsoul" : 
	{
		"name" : { "singular" : "Lost Soul", "plural" : "Lost Souls" },
		
		"level" : 1,
		
		"faction" : "neutral", 
		
		"cost" : { "gold" : 120 },
		
		"fightValue" : 95,
		
		"aiValue" : 95,
		
		"growth" : 20,
		
		"hordeGrowth" : 5,
	
		"attack" : 1,
		
		"defence" : 3,
		
		"hitPoints" : 5,
		
		"speed" : 10,
		
		"damage" : { "min" : 1, "max" : 2 },
		"advMapAmount" :{ "min" : 20, "max" : 15 },

		"abilities" :{ "canFly" : { "type" : "FLYING" } },

		"hasDoubleWeek": true,
		
		"graphics" :
		{
			"animation" : "doom/battle/lostsoul.def",

			"map" : "doom/map/lostsoul.def",

			"iconSmall" : "doom/iconssmall/lostsoul.png",

			"iconLarge" : "doom/iconsbig/lostsoul.png",

			"timeBetweenFidgets" : 10,

			"animationTime" : {	"walk" : 1.00, "idle" : 10.00, "attack" : 1.00,"flight" : 1.00 }
		},

		"sound" : 
		{
			"attack": "doom/lostSoul/attack.wav",
			
			"defend": "doom/lostSoul/defend.wav",

			"killed": "doom/lostSoul/kill.wav",

			"move": "doom/lostSoul/move.wav",

			"wince": "doom/lostSoul/wince.wav"
		}
	}
}

Can you please upload full mod on forum?

Allright, I’ve included the file.
DoomMod.zip (72.8 KB)

When does it crash? At launch, at map load, during fight?

Two bugs:

“defense” not “defence”
“horde” not “hordeGrowth” (note that you may skip “horde” command because it is indicator for creature rowth in horde building inside the town, and your creature is neutral).

Cool unit btw :slight_smile:


Allright, thanks for helping!

Well I did tried that, it’s working in the editor, but still crashing the game on startup.

So please try this version. I have no problem with your mod after these two fixes…
DoomMod.rar (64.7 KB)

It’s weird, the game still crash on start up, but I managed to get a message from the console

“Assertion failed: cre->ammMin, file CCreatureHandler.cpp, line 646”

So, it’s not your mod fault. Please attach following files here: VCMI_Client_log.txt, VCMI_Launcher_log.txt, VCMI_Server_log.txt

Here you go:
VCMI_Server_log.txt (59.6 KB)
VCMI_Launcher_log.txt (4.94 KB)
VCMI_Client_log.txt (60 KB)

All I can see from the logs that your game crashes when trying to read game original files. So maybe your vcmi instaloation is wrong (you’ve copied vcmi files in wrong directory but it’s not likely) or maybe your Homm3 instalation went wrong and maybe your are using cracked h3 copy.

Or maybe you’ve tried to update VCMI essential files in launcher. If you did, don’t do that. Copy unpacked files once again into your vcmi folder.

Allright, I think I know now what is the problem, thanks for helping.

What was the cause of problem then?

Well, I have cracked homm3 :T
But when I get some money I’ll buy it.

Well, I just bought the game form GOG and I reinstalled the game, but still crashing for some reason. I added the logs as well.
VCMI_Server_log.txt (58.9 KB)
VCMI_Launcher_log.txt (4.95 KB)
VCMI_Client_log.txt (60.5 KB)

That’s really strange.

  1. Did you click UPDATE like at this picture (I hope, you didn’t do that).
  2. Have you open32.dll in your H3 directory? If yes, delete it.
  3. Try disable your antyvir software.

Well, it’s still crashing, but I don’t get it, I have mods installed they are working just fine.

Well, I just found the issue. I set the max to 15 and min to 20 at “advMapAmount”. I was dumb XD, anyways thanks for helping.