Inconsistency related to primaryResource

So in faction format it’s said that if not set then town produce wood and ore:
wiki.vcmi.eu/index.php?title=Town_Format

But in configuration files all towns have primaryResource set and towns that must produce both wood and ore set just to “ore”. That doesn’t affect silo generation for some reason, but does affect starting bonus. So if you choose resource as starting bonus then you’ll only get ore because at point where resources given town resource is “ore”.

So how this should be fixed:

  • Drop current primaryResource ore from faction config?
  • Should we make town config more obvious and introduce something like “woodAndOre” in JSON?

PS: For some reason silo still produce both wood and ore.

In file ResourceSet.h:

	enum ERes
	{
		WOOD = 0, MERCURY, ORE, SULFUR, CRYSTAL, GEMS, GOLD, MITHRIL,

		WOOD_AND_ORE = 127 // special case for town bonus resource
	};

So yes WOOD_AND_ORE should apply for Resource Silo in some towns. Not sure how it’s handled in town config, so far no one raised this issue.

Does that affect starting resource bonus? Didn’t know.

H3 towns it’s not affected because they all have produced resources set for Silo in town config. So I think it’s okay.

So only starting resource bonus is broken atm. Still I have no idea if I should just remove current entries or introduce some new one that going to be more obvious that “default”.

Ok I’m decide that for now I can just remove primaryResource from those towns:
github.com/vcmi/vcmi/commit/a70 … fa29c4406d

After all we do use JSON with comments so it’s not too bad.