Looking for help with bringing RMG config up-to-date

Hi. We need some help with adding missing data to our config files.

In order for RMG to work properly we need to know such objects properties like their value, how often they must be placed and such. This information is hardcoded in H3 so we can’t automatically import it.

Luckily one Russian programmer reversed all that data and shared it in this post (russian, use google translate if you don’t know it):
forum.df2.ru/index.php?s=&showto … t&p=559149

Now we need to get this information in our config files located in config/objects directory. Just add information from that post into our files and upload files with changes here.

Note that there are 4 objects (spell scrolls, pandoras, prisons and seer huts) that should be skipped for now - they will need special handling.

This is how resulting data should look like, using witch hut as example. Current config alreadt contains everything but “rmg” entry.

	"witchHut" : {
		"index" :113,
		"handler": "witch",
		"types" : {
			"object" : {
				"index" : 0,
				"rmg" : {
					"zoneLimit" : 3,
					"mapLimit" : 32,
					"value" : 1500,
					"rarity" : 80

What about prison?

Prisons, dwellings and few more objects with special formulas will be hardcoded in RMG.

AVS, you’re right - I’ve added prison to exceptions list in my post.

I`ll try to convert semi-automatically, (the source -> spreadsheet->CSV->json) but not today.

Because of quite boring day and a lot of free time I tried to do something useful. I’ve managed to update only Rewardable.json file for now, but I’ll also upload other files (obviously if I’ll handle it). And a little question: what if one of fields(eg. zoneLimit or mapLimit) was said to be unlimited? I just commented such cases.
moddables.txt (8.08 KB)
creatureBanks.txt (23.7 KB)
generic.txt (18.3 KB)
rewardable.txt (8.17 KB)

Looks OK, will upload to git once it will be finished. Thanks :slight_smile:

If any of these two fields are missing, VCMI will interpret them as unlimited. So in this case only value/rarity is needed.

Oh - and when there is no RMG information about object at all - just don’t instert “rmg” entry. Entries without “rmg” will be considered to be non-placeable.

What about dwellings.json and moddables.json? Should I update them too, and if yes, in which places then?

In moddables - most objects will have hardcoded behavior. I think that only cartographers, mines and resources need RMG entry here. Just copy fixed values from that post (if present).

Dwellings - no. These too should be hardcoded.

I’m not sure how to update the “keymasterTent” field in moddables.json. Sav from forum.df2.ru described it as ‘Палатка Ключника: для каждого цвета набор с ценностями 5000, 7500, 10000, 20000, частота появления у палатки одного цвета одной ценности - 10 (особые правила генерации).’, but even after translating it to english I don’t know how to refer to this, so any clues would be appreciated :wink:

Just skip it. Main usage for RMG info is to place generic treasure objects. For everything else RMG would need special handling - e.g. placing matching keymasters for each border guard, selecting correct zone for dwellings, etc.

If something missing - we can add/fix this later. Right now having most of RMG information is what we need, even if it won’t be 100% complete and identical to H3

Ok, it seems that I’ve managed to update and upload all those files in few posts above. Thanks for helping.

Will take a look at these :slight_smile:

I tried to make config for WoG banks. They work fine, but spawn on different terrains, which looks ugly.

Is there a way to override available terrain only without rewriting entire object template?

“allowedTerrains”:“dirt”, “sand”],


Unfortunately no. At first I tried to implement this but it turned out to be too complicated to be useful. You may be able to decrease amount of work by using “base” entries in object group, e.g:

"creatureBank" :
    "base" : {
        "base" : {
            "visitableFrom" :  "---", "+++", "+++"] // this field will be propagated to every template of "creatureBank" objects
    "types" : { ... }

But apart from this no - you need to completely redefine templates.

Okay, I did it.

Also fixed Citadels :sunglasses: , as they couldn’t correctly spawn due to their odd shape.
dropbox.com/s/2ck6c4vvmhmyi … Banks.json

Now we have world’s first WoG random map generator!