Modding FAQ

Hmm, IMO the range should be just set as absolute value and their total should be calculated by engine - not neccessarily sum up to 100%.

What dice should i set to get minimum 25% chance?

If you want 4 rewards with 25% probability each (only 1 reward at time), set “dice”: 1 for all and min-max to 0-25, 26-50 etc.
Or you may set different “dice” and identical chance 0-25, then you get 25% chance for each reward independently.

I didn`t say anything about sum

Yes, but currently user is asked to calculate incremental sum on his own. So if you decide to change one value, you need to change another accordingly.

Thanks for explanation. This idea requires think over more. One question is how to define “empty” reward: explicitly for each dice? Or leave sum hardcoded to 100 and only change range to probability.

Wanted to play with UI elements in adventure map window.
I tried to make minimap in down left corner of window.
Minimap steel border is made like def (gemUL.def),
but still adventure map overlaps minimap. Seems like first minimap is drawn, then adventure map.
Is it possible to make minimap drawn after adventure map? Or it it by design and cannot be fixed?


Interesting, what will be, if composite artifact is made with one of components “grail”.
Will it be possible than to place several grails in form of composite artifacts giving chance to disassemble them and build grail structures?

There only one problem with that. Currently grail handling bases on ArtifactID::GRAIL (2) and artifacts don’t support subId. Otherwise it’s would work just fine if you allow to put grail into MISC slot as I think combined artifacts can only be disassembled when on hero.

So you can make grail part of combined artifacts right now, but each such artifact can only contain one grail.

Where I can found list of all town buildings id’s? Studying building json files I can see:
“requires” :
“allOf”, “dwellingLvl1”], “dwellingLvl2”], “dwellingLvl3”] ],
“id” : 34

but do not know what id:34 means…

Building identifier is name of entire Object field

“dwellingLvl5”: { “id” : 34, “requires” : “allOf”, “mageGuild1” ], “dwellingLvl4” ] ] },

dwellingLvl5 is the id, numeric id is VCMI internal (also do not use it in any mod)

Bad to hear that :frowning: For example, I want in my planned mod that one of town’s building function as a artefact merchant and I want rewrite json file to do that. And now I don’t know how :frowning:

Look at how it’s made in other town mods for VCMI, e.g Cove in HotA adoption.

Special buildings functionalities in mod towns are not implemented. It will be so until script language is implemented and modders could program special buildings functionality.

I’m wondering how ‘darkness’ bonus works, does it work like in WoG, so any hero with this specialization will create FoW around him step by step, or this is more complicated than I think?

Unfortunately currently it’s only implemented for towns, but fog of war need bug fixes and massive rework anyway so eventually it’s should work for any objects that may have bonuses.

Though I’m don’t sure if I like the idea if FoW going to be updated after each hero step on map. It’s may be more reasonable to update it on end of day as otherwise constant FoW change will cause issues with AI. E.g once AI get some map memory or complex deduction (like understanding where enemy hero likely stand) then we can implement more complex FoW.

So you’re proposing this solution, which seems fine for AI, but what about human player, will it be possible to implement it in such way in which human player would see changing FoW during enemy hero move?

How can I replace battlefields images? For example - I want to replace CmBkGrTr.pcx file with three another pcx’s for display them randomly during battle on the grass?

Macron1 once offered to implement battlefield support, but since then nothing happened. It’s open feature. Certainly we would like to have handling for different battlefields.

This is incomplete feature, (image is selected randomly but there is no way to add more than one).