Json configuration for towns

I think that faction config should include Commander. I realized it when Cove heroes entered combat with Pikeman at Commander’s slot :smiley:

Another issue is that Commander for Cove has not been published (and abandoned), but we could make for example Sea Dog as a dummy.

Commanders were definitely low-priority for me - feel free to fix this. I just finished spell chances so the town is ready from my point of view.
I also removed hardcoded ID for town so now we definitely can load any number of towns (I think that current limit is 255)

Package, same link: dl.dropbox.com/u/22372764/vcmi/mods/cove.zip

What missing right now is:

  • heroes specialties (only text\images) - I’d rather pass this to you.
  • commanders - passing this to you, but IMO should be part of hero class config, not faction
  • external dwellings - Should be implemented using proper mechanism for new objects instead of current hack also known as ModHandler::reload()

I know it has been discussed before but just my opinion: I would prefer names here. Otherwise it is somewhat cryptic.

"buildings" :
			
				{ "id" : 0 },
				{ "id" : 1,  "upgrades" : 0 },
				{ "id" : 2,  "upgrades" : 1 },
				{ "id" : 3,  "upgrades" : 2 },
				{ "id" : 4,  "upgrades" : 3 },
				{ "id" : 5 },
				{ "id" : 7 },
				{ "id" : 8,  "upgrades" : 7 },
				{ "id" : 9,  "upgrades" : 8 },
				{ "id" : 10, "mode" : "auto" },
				{ "id" : 11, "upgrades" : 10, "requires" :  5 ] },

Of course. I have this planned, along with configurable buildings support.
But I’d like to rest for a while from modding system.

To me it seems that right now Cove faction is given random neutral buildings, which is not only not right, but can lead to total map lockout as neutral buildings have different block maps. See screenshot taken on Irrational Hostility:

Building handling may need complete redesign to handle new structures, but I can think about solution for now if you provide Cove adventure defs.

I never said that this is right - but placing any random dwelling is much more easier than placing new dwellings at least for now.

And what is that “yellow hole” is? Dwelling?
Randomizer should place only dwellings here (and all H3 dwelling have same blockmap). If not - then this is a bug.

Anyway - cove external dwellings attached. I’ve also included msk files (not needed for objects added in ModHandler::reload())
cove-dwellings.zip (69.3 KB)

That “yellow hole” is WoG dwelling of Hell Steeds - which is tier 6 (while we expect tier 4 here) and has different blockmap, unfortunatelly.

Unless I’m missing something, adding more regular dwellings should be easy, as creature id and def is their only characteristic property.

Already working. Code can be convoluted at some places, but adding dwellings is straigthforward.

dropbox.com/s/98pm5ibk9ni7gei/cove.rar

Last part of full faction support, hero specialties was added in r3111. Check updated Cove package.

dropbox.com/s/98pm5ibk9ni7gei/cove.rar

Nice. So everything (in mods) ready for 0.91 or something is still missing?

Probably it is time to add some organization to wiki:

  • for users: list of available mods (instead of link hunting on forum), how to install, how to enable\disable them (anything else?)
  • for modders: some examples\tutorials. Full documentation is great but some simpler examples are needed as well.

For me it’s done. Now just bugfixes and tweaks, but nothing urgent.

Final update, balance changes from 1.2 release. Wiki link updated.
dl.dropbox.com/u/22372764/vcmi/mods/cove.zip

Hey.
I have some idea.

Possible to buy two creature in one building.
Something like this:
“pixie”,“centaur”], “sprite”, "centaurCaptain] ],

When we buy centaur building we can recruit pixies or centaur, if why upg building we can recruit sprite, centaurCaptain

Good idea. However:

  1. A bit troublesome to implement with current code
  2. I’m planning to make buildings more configurable (not only dwellings). Probably will be only in 0.93 but it will allow such stuff like this.

I was wondering about new fractions relations. For now there are no relations as I see. For example when we add 3 new towns as separate mods, they have no entries about chance to get their hero classes in each other tavern etc (I also assume, that no such entry = 0 chance to get A or B town hero in C town tavern). I understand that matter can be troublesome, but I think that it is possible to solve it in easy way (but I am not a programmer though and can be wrong). If it would be possible to extra define all not-basic towns as ‘other’ and put them standard values. Then my example with heroes would look like that: we have standard chance (for example 5) to get hero A or B in town C. Which is surely better solution that 0, right?

@Set it can be configured in Hero class config. And, if a value is not specified, it’s really assumed to be 0. And I’m not sure that 5 would be better than 0 – in this can heroes would appear in towns modder didn’t know about, which sometimes can make no sense. But default value determined by hero/faction alignment (good/neutral/evil) would be a good solution IMO – higher chance if alignment is the same.

May be smth like average configured chance of heroes of same alignment (excluding own heroes).

Any objections against me moving “commander” field from town format to hero class format? From my point of view this is property of either hero or hero class - definitely not faction.

As a bonus - this will also allow different commanders for might & magic heroes.