Modding FAQ

The best way to learn structure nodes is… downloading any existing new town mod and browse jsons. For specific question - ask here.

I’m asking here because I already did that! I’m actually working with Cathedral Town as a base and fully-replacing the creatures/heroes was funny and easy. However, studying the structure.json didn’t give me any answer as well as the VCMI Wiki.

So how that really works? If I create a Photoshop.psd with a 800x374px resolution (like NWC’s Forge Composition), does the Photoshop’s x & y valors will be coherent with the .json formula?

Yes, x=0 and y=0 are first pixel in left-top corner of the screen.

1 Like

Where can I find information about how to define any building property? For example:

  1. If I want my Town’s Special1 building to work the same way as Rampart’s Mystic Pond, what do I need to do? Do I need to change the “id”?

  2. If I want my Special2 to work as Castle’s Stables, will it be the “same” manipulation as for my special1?

  3. This time, I do not want my Special3 to work the same as an already-existing building. While Castle’s Brotherhood of the Sword gives +2 moral bonus to any defending creatures, I want my Special3 to gives -1 moral to attacking creatures. Is it possible? If it is, how do I do this?

I didn’t found any precise information about that on the VCMI Wiki and I’d really appreciate help on this. Thanks for reading!

Such information can be found at forum. You can’t because sich features are not implemented. In every town mods special buildings do nothing (despite description).

1 Like

That’s sad but I hope special buildings support will be implemented someday. Thanks for your fast answer!

I want to conform that this is complete code on a function of game i like it can you explain it so that
i edit it and get some different result…? I also want to ask that this code is wirtten in which language
if possibel explain it.

It’s not any language. There are commands written in json file using object format as described in wiki: https://wiki.vcmi.eu/Object_Format

And yes, I think it is complete code. But VCMI itself is buggy in this area. And VCMI - open source project - is written in C++.

Few years ago when i still remembered c++, i made commit to allow to add to towns custom boats. But it was considered not good and rejected. So its about five or so years and no custom boats support in towns.

Is there any possibility to remove BLOCKS_RETALIATION ability from creature via spell, artifacts, skill? I mean, for example Naga’s attack blocks retaliation - I seek a way to temporarily block blocks_retaliation bonus :slight_smile:

This is known meta bug. There is no way to remove inherited/propagated bonus (DISPEL and such are explicitly implemented)

Is it possible to give any visiting hero a specific spell if a specific building is built (such as the grail)?

Probably not.

1 Like

I am actually importing my townscreen’s visuals into the game in PNG but the game slows down inside the town (framerate). Is there a way to optimize this or should I just go with .DEF files?

For now .def is most efficent format.

1 Like

In the heroes.JSON format there’s a “tooltip” section where you could have big icon of the specialty when you right click on any heroes’ specialty during a game. I can’t seems to find any informations about how it works. How can I manage to make custom tooltip? Or how can I find a list of already-existing tooltips?

Someone someday said this tooltip is for hoovering cursor over icon. But I can’t find where tooltip text is shown. Just type there sth like: Creature bonus: Peasant or Skill bonus: Archery or Spell bonus: Slow.

Gonna try that, thanks! The tooltip is shown when you right-click on any hero specialty (not during the scenario selection but after the game has begun).

EDIT: By the way I have a question about the HD remastered version of Heroes III released in 2015. Is there a reason why we never saw an HD mod that port the remaked visuals?

EDIT2: Is it possible to make a creature uses randomly an adventure icon (.DEF) on the map? It could be useful to add alternate adventure icon but I personally need this for a special creature project.

EDIT3: I am trying to give my hero the ability to upgrade the neutral creatures from the game into my town’s creatures. I can’t manage to find the correct identifier for WoG’s creatures. I tried a lot of different combinaisons : “wog:nightmare”, “wog.nightmare”, “wog:creature.nightmare”, “wog.creature.nightmare”, “creature.wog.nightmare”, “creature.wog:nightmare”, “creature.wog:nightmare”, “creature:wog:nightmare”, “::wog:nightmare”, “:wog:nightmare”, "wog:nightmare(172), “172”, etc.

Code
{
"rfgLeyla" :{
	"specialty" :{
		"bonuses" :{
			"conversionRogue":{
				"type" :	"SPECIAL_UPGRADE",
				"subtype":	"creature.rogue",
				"addInfo":	"creature.rfgRogue"},
			"conversionBoar":{
				"type" :	"SPECIAL_UPGRADE",
				"subtype":	"creature.boar",
				"addInfo":	"creature.rfgBoar"},
			"conversionNomad":{
				"type" :	"SPECIAL_UPGRADE",
				"subtype":	"creature.nomad",
				"addInfo":	"creature.rfgNomad"},
			"conversionSharpshooter":{
				"type" :	"SPECIAL_UPGRADE",
				"subtype":	"creature.sharpshooter",
				"addInfo":	"creature.rfgSharp"},
			"conversionSorceress":{
				"type" :	"SPECIAL_UPGRADE",
				"subtype":	"wog:sorceress",
				"addInfo":	"creature.rfgSorceress"},
			"conversionEnchanter":{
				"type" :	"SPECIAL_UPGRADE",
				"subtype":	"creature.enchanter",
				"addInfo":	"creature.rfgEnchanter"},
			"conversionGoldGolem":{
				"type" :	"SPECIAL_UPGRADE",
				"subtype":	"creature.goldGolem",
				"addInfo":	"creature.rfgGoldGolem"},
			"conversionDiamondGolem":{
				"type" :	"SPECIAL_UPGRADE",
				"subtype":	"creature.diamondGolem",
				"addInfo":	"creature.rfgDiamondGolem"},
			"conversionHellSteed":{
				"type" :	"SPECIAL_UPGRADE",
				"subtype":	"wog:hellSteed(195)",
				"addInfo":	"creature.rfgHorseFire"},
			"conversionNightmare":{
				"type" :	"SPECIAL_UPGRADE",
				"subtype":	"wog:nightmare",
				"addInfo":	"creature.rfgHorseBlack"}
	}}}
}

What should I type in the "subtype" section to make it work for WoG’s creatures?

Because resizing HD remastered graphic into standard h3 resolution looses many details. Check Ghost Necro mod for example.

Check Neutral Heroes mod. Inside it you’ll find working hero (Unrish) with upgrade wog messengers specialty.

1 Like

@misiokles Thanks, looks like the correct format was "creature.[id]" but I needed to add this line inside my mod.json to make it works: "depends" :[ "wog" ],.

Any idea about the possibility to have a creature uses randomly a .DEF in the adventure map among specified files?

Also, do you know if it’s technically possible right now to make a dwelling works the same way as the Refugee Camp (meaning it would have a random creature each week).