How to control resource frequency?

curtadams

Warlord
Joined
Sep 30, 2004
Messages
146
I'm playing with a mod around the idea that development will mostly be of bonus tiles (modifying AcidSphinx' draft for a Stone Age mod). Accordingly, I need a lot of bonuses. But I can't figure out how to control frequency. Some of the added resources become quite frequent with the iTILESPER parameter set low (to 8) But not all, and I can't get some of the native resources, especially wheat and sheep, to be common, even with the same parameters as the high-frequency added resources. iPLAYER and MINPERCENT don't seem to do anything. Is there any documentation or info on how the parameters for BonusInfo work?
 
but is there some different resources placed in adjacent tiles ? (perhaps something change with warlords ?)

edit : i've never seen two different resources in adjacent tiles with 1.61 ( ex : an iron near a silk ) and when i tried to put max of resources by changing CvBonusInfo.xml , i get a map fill with bonus but with at least 1 tile between two different bonus .

edit : you may have more of one bonus if there are the same with <iGroupRange> and <iGroupRand> but the default implementation prevent 2 different bonus to appear in adjacent tiles ... i take a look at continent to see if this is the default implementation

edit : here the part of canPlaceBonusAt in CvMapGenerator.cpp that prevent two different bonus to appear in adjacent tiles :

Code:
	for (iI = 0; iI < NUM_DIRECTION_TYPES; iI++)
	{
		pLoopPlot = plotDirection(iX, iY, ((DirectionTypes)iI));

		if (pLoopPlot != NULL)
		{
			if ((pLoopPlot->getBonusType() != NO_BONUS) && (pLoopPlot->getBonusType() != eBonus))
			{
				return false;
			}
		}
	}
 
I seem to have mostly fixed my problem. It's related to the bonus class, which can overide bonus settings somehow. Thanks for the link, though, it's very handy!

Looking at the last two maps, it seems you're right about adjacent different resources not happening. I'd swear I've seen it but maybe I remembered incorrectly.
 
Back
Top Bottom