Modding FAQ

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

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?