Modding FAQ


#101

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


#102

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


#103

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.


#104

I didn`t say anything about sum


#105

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.


#106

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.


#107

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?



#108

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?


#109

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.


#110

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…


#111

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)


#112

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:


#113

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


#114

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.


#115

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?


#116

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.


#117

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?


#118

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?


#119

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.


#120

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