Modding FAQ

One more thing: casting after attack format is:
SPELL_AFTER_ATTACK
subtype - spell id
value - chance %
additional info - [X, Y]
X - spell level
Y = 0 - all attacks, 1 - shot only, 2 - melee only

So, in your case, percent chance for casting is 1%

Proper configuration should be sth like this:
{
“core:skeleton” :
{
“abilities” :
{
“sorrow” :
{
“type” : “SPELL_AFTER_ATTACK”,
“subtype” : “spell.sorrow”,
“val” : 10,
addInfo [1, 2]
}
}
}
}

It means Sorrow is casted with 10% probability, spell level is 1 - base magic school, and it can be casted after meelle attack (2).

And one more thing:
Code with addInfo in brackets form [ ], is read only with daily builds installed. Old 0.99 version can undestand such format but I don’t remember old format :frowning:

that looks neat! thx for your help.

the game still crashes when entering a battleground so i disabled all mods. Apparently, this happens anyway. It says that it cannot find POTRAITSMALL/CANIMATION. All this on a newly installed VCMI over h3 complete. Is this because of the lack of hero portrait (linked bugs about portraits, be it hero or creature)?

Is 0.99 the latest one?

No, new vcmi versions can be found here: https://builds.vcmi.download/branch/develop/Windows/ (for windows). Install it carefully to your Heroes 3 folder. Sometimes ‘/’ at the end of installation filepath leads to installation one folder deeper and not override files - you must check it.

About missing portraits. I guess you clicked in launcher UPDATE button to update vcmi. This option is bugged and screws whole game. Never do that :slight_smile:
If you did it, reinstall vcmi (with daily build), then install vcmi essential files and play!

Is growing command for artifacts works for heroes?
For commanders artifacts we have for example:

		"growing":
		{
			"bonusesPerLevel":
			[
				{
					"level": 6,
					"bonus": 
					{
						"type" : "PRIMARY_SKILL",
						"subtype" : "primSkill.attack",
						"val" : 1
					}
				}
			]
		},

It means that commander gains +1 attack for every 6 levels. But when I configure artifact for hero to do that, nothing happens…

How do i edit creature abilities correctly. I have this “abilities”: {
“noMorale”: {
“type”: “NO_MORALE”
i found creature abilities website https://wiki.vcmi.eu/List_of_all_bonus_types#Creature_abilities i know that i want to write RETURN_AFTER_STRIKE in ‘‘type’’ section but where can i get info on what to write in ‘‘noMorale’’

NO_MORALE is a bonus with no additional paramiter. Just creature has ‘no morale’ ability. Some bonuses have more paramiters like SPELL_AFTER_ATTACK and some bonuses has no additional paramiters like NO_MORALE, FEAR, THREE_HEADED_ATTAC

yeah but what do i write when i change ability to RETURN AFTER STRIKE. i found the ability list but where is the list for what to write in upper part. “abilities”: {
“noMorale”: {
“type”: “RETURN_AFTER_STRIKE”
cause this looks wrong.

Look in any creature mods what should this be properly made. For example - if you wrote 2 ‘{’ there shoild also be 2 ‘}’.

Can i disable the fort screen in VCMI?

Because when i want to recruit any unit from here VCMI crash.

You can’t disable, but you have three other alternative ways of creature recruiting

You cannot disable it but there are alternatives like clicking on the dwelling/clicking on creatures’ icons on the bottom-left of the town screen. I know how much it’s annoying to click by accident on any fort’s creatures and having the game crash. I hope it will get fixed soon.

Is there any tutorial of how to create a town screen? If I design all the town’s buildings and have all the sprites needed, how do I complete the structure node?

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++.