I wanted to fill a map with grass so I went and took the grass codes from Great Plains. Problem is, the grass on GP only spams on the middle of the map, while I want the grass the be on the entire map (except maybe the small pond in the middle).
I tried everything with the codes, changed every value, nothing. I get patches of grass all around the map but they are random and... they are not everywhere!
If someone could help me out it would be highly appreciated.
Here are the grass codes:
Code: Select all
// Build grassy areas everywhere. Whee!
numTries=6*cNumberNonGaiaPlayers;
failCount=0;
for (i=0; <numTries)
{
int grassyArea=rmCreateArea("grassyArea"+i);
rmSetAreaWarnFailure(grassyArea, false);
rmSetAreaSize(grassyArea, rmAreaTilesToFraction(1000), rmAreaTilesToFraction(1000));
rmSetAreaForestType(grassyArea, "Great Plains grass");
rmSetAreaForestDensity(grassyArea, 0.3);
rmSetAreaForestClumpiness(grassyArea, 0.1);
rmAddAreaConstraint(grassyArea, avoidHills);
rmAddAreaConstraint(grassyArea, avoidTradeRoute);
rmAddAreaConstraint(grassyArea, avoidSocket);
rmAddAreaConstraint(grassyArea, avoidNatives);
rmAddAreaConstraint(grassyArea, avoidStartingUnits);
rmAddAreaConstraint(grassyArea, avoidNuggetSmall);
if(rmBuildArea(grassyArea)==false)
{
// Stop trying once we fail 5 times in a row.
failCount++;
if(failCount==5)
break;
}
else
failCount=0;
}
(posted on NE's forum as well)