The cause of the lack of jungles

PawelS

Ancient Druid
Joined
Dec 11, 2003
Messages
2,811
Location
Poland
I found out why there are so little jungles on random maps:

FeatureGenerator:AddJunglesAtPlot uses CanHaveFeature(self.featureJungle) to check if a jungle can be placed on a given hex. It checks if the base terrain is appropriate, and CIV5Features.xml (Feature_TerrainBooleans section) allows jungles only on Plains. But most of the land hexes near the equator are Grass, so there are very little hexes where jungles can be actually placed.

I fixed it by allowing jungles on Grass in the XML, now there are a lot more jungles on maps that I generate. FeatureGenerator:AdjustTerrainTypes changes the terrain under jungles to Plains, so they should be all on Plains after generating the map (I haven't checked if it works though).
 
Yeah I always found this strange. In previous civs, the entire middle of the map was multiple tiles thick with jungle. Civ 5 is jungle only here and there. I'm guessing its intentional tho due to the science bonus you get with university, plus the fact that trade posts can be built without removing the jungle. This would make a city surrounded by jungle insanely powerful.
 
You're right, I fixed it in my mod by reducing the food from jungle to 1, and the science bonus with University to 1 (Wat still gives 2).
 
I haven't had much luck trying to change this myself. In CIV5features in the "Feature_TerrainBooleans" section I changed the line
<GrowthTerrainType>TERRAIN_PLAINS</GrowthTerrainType> to
<GrowthTerrainType>TERRAIN_GRASS</GrowthTerrainType>
This didn't do anything, jungle is still only appearing on plains in my game, and I wonder why.

I did find another way to get slightly more jungle, though. In the TerrainGenerator LUA file you'll find this line, not far from the top:
local fGrassLatitude = args.fGrassLatitude or 0.1; -- Above this is actually the latitude where it stops being all grass. - Bob
The explanation is given; on the equator only grass can appear. If you change the 0.1 to an 0.0 also other terrain types can appear here, so you'll probably then get some more plains and the chance of a bit more jungle - not a lot more on a standard map, but I personally wouldn't want huge areas of jungle as well.

I'm still interested in help with how to get it to appear on grass, though, I think it might look more pleasing that way.
 
You should use Feature_TerrainBooleans, GrowthTerrainType doesn't seem to have any effect (as features don't actually grow in Civ5). So you should add this to Feature_TerrainBooleans:
Code:
<Row>
	<FeatureType>FEATURE_JUNGLE</FeatureType>
	<TerrainType>TERRAIN_GRASS</TerrainType>
</Row>

In FeatureGenerator.lua all terrain with Jungles is changed to Plains, so even if you enable them on Grass they will still all be on Plains, but the amount of them will increase significantly.
 
Back
Top Bottom