Question about map generation

Capuqin

Chieftain
Joined
Oct 17, 2010
Messages
21
Location
Melbourne, Aust.
Hello forums!

I'm a long time lurker (say, roughly 4 years) and have recently decided to have a crack at modding. This is partly out of pure interest, partly because I think the understanding of how the game works and what ever programming understanding I pick up could be useful, and partly because other's modpack's haven't totally satiated my appetite lately.

Getting to my actual question, I'm wondering how the map generator chooses whether to place a 'leafy', 'evergreen', or 'snowy' forest feature.
I was fiddling around and tried to replace the old 'leafy' with the equivalent from CivColon like what was done with Caveman to Cosmos, but this only works for the arboria map script, where as the other scripts use the old leafy model.
I thought about the fact that arboria uses the same model for all forests, and then after looking at the script noticed that it isn't a climate map. This lead me to believe it wasn't using the new leafy because it's climate range wasn't defined for BTS, but then I didn't think that would be related to the art files anyway :confused:

Long story slightly shorter, I've been wading through XMLs and Cymaps and mapgeneratorutils and so on for hours and still can't figure this out.
I don't have any serious understanding of programming yet, mainly just tweaked the XMLs. Oh, and I had quick looks at stuff that Baldyr suggested.

Also, if it makes any difference, I'm doing all my fiddling with the last official version of RoM AND. Thanks in advance!
 
Not sure either, but I think which model is placed is automatically somewhere determined, based on the latitute, and it's assumed that a normal map is going from -90 to 90°, unless it's specified that it doesn't (I think Arboria and some others, Boreal, Rainforest, etc. are cut down on the latitudes, but not only symetricaly).
 
I assume that changing unit graphics would be a lot simpler, but if anyone who has changed feature or terrain graphics for their mod could let me in on the secret, that would be 'fully tubular and/or rad'.
 
Since units are not affected by lattitude, yes, that's definitely easier.
If you can't find out how to do it (if you already dealt with the terrain, then a unit should not be much more difficult), then take a look at the top of the tutorials subforum, there's a tutorial for adding units stickied.
 
I'm not an expert at python code so can't do much more than offer this pointer.
I think the code your looking for is here in CvMapGeneratorUtil (search for FeatureGenerator)
Firaxis Games\Sid Meier's Civilization 4\Assets\Python

Other points of interest would be


CIV4ArtDefines_Feature.xml
ART_DEF_FEATURE_FOREST there are three <FeatureVariety>'s TreeLeafy,TreeEvergreen and TreeSnowy. in that order.

in the WBS file for each plot

Code:
BeginPlot
	x=79,y=59
	FeatureType=FEATURE_FOREST, [B]FeatureVariety=2[/B]
	TerrainType=TERRAIN_TUNDRA
	PlotType=2
EndPlot

FeatureVariety=0 is TreeLeafy
FeatureVariety=1 is TreeEvergreen
FeatureVariety=2 is TreeSnowy
 
Since units are not affected by lattitude, yes, that's definitely easier.
If you can't find out how to do it (if you already dealt with the terrain, then a unit should not be much more difficult), then take a look at the top of the tutorials subforum, there's a tutorial for adding units stickied.

Ha ha, thanks but I saw another newb asked about unit graphics, and basically got told to learn to use the search tool :D.
You've started me off thinking about units using different skins for different latitudes now, though. for example, marines' uniforms could change depending on whether they're in jungles or snow or desert. That probably isn't worth the effort, however.

CIV4ArtDefines_Feature.xml
ART_DEF_FEATURE_FOREST there are three <FeatureVariety>'s TreeLeafy,TreeEvergreen and TreeSnowy. in that order.

in the WBS file for each plot

Great, thanks for pointing that out. It took me a little while to figure out what the WBS file was (worldbuilder?) but I'm looking into that now :).
I have two minor points/ questions though. firstly, I copied the treeleafy FeatureVariety from the civcol ART_DEF_FEATURE_FOREST originally, and just pasted over the old FeatureVariety in the Civ4 equivalent, so shouldn't it point to the civcol graphics that I put in RoM-AND's Terrain\Features folder? Secondly, as far as I can tell, a WBS file doesn't control how the map is generated or how features are chosen, it just saves what has already been generated. Am I looking at the wrong file(s)?
 
Ha ha, thanks but I saw another newb asked about unit graphics, and basically got told to learn to use the search tool :D.

mmhh? Such an impoliteness shouldn't happen here.
If it was worse, then please use the "report post" () function.

You've started me off thinking about units using different skins for different latitudes now, though. for example, marines' uniforms could change depending on whether they're in jungles or snow or desert. That probably isn't worth the effort, however.

Ugh...yeah, that would probably require lots of coding.

firstly, I copied the treeleafy FeatureVariety from the civcol ART_DEF_FEATURE_FOREST originally, and just pasted over the old FeatureVariety in the Civ4 equivalent, so shouldn't it point to the civcol graphics that I put in RoM-AND's Terrain\Features folder?

And that's working???
The paths themselv are relativ.
If you have a e.g. Art/Terrain/Features/IcePack/Ice01_01.nif in your mod, it will take this. If there isn't, then it will try to look at BtS first, then Warlords, afterwards Vanilla (the whole cycle does not include Col).

If you copied the Col graphics over to your mod, then yes, it should load them.

Secondly, as far as I can tell, a WBS file doesn't control how the map is generated or how features are chosen, it just saves what has already been generated. Am I looking at the wrong file(s)?

Yes, you're right here. A worldbuilder file is just a save in another format, used for scenarios.
If you want to create scenarios and change the forst there, then you should take a look at these files, else not.
 
I see the_J has already answered but having written my answer and been delayed posting I'll post it anyway for you
I have two minor points/ questions though. firstly, I copied the treeleafy FeatureVariety from the civcol ART_DEF_FEATURE_FOREST originally, and just pasted over the old FeatureVariety in the Civ4 equivalent, so shouldn't it point to the civcol graphics that I put in RoM-AND's Terrain\Features folder?
Not necessarily, if you haven't done it correctly it won't. File structure is all important, In the bts CIV4ArtDefines_Feature.xml points to, for example Art/Terrain/Features/TreeLeafy/Leafy03_01.nif it will look first in Sid Meier's Civilization 4\Beyond the Sword\Assets\Art\Terrain\Features for the TreeLeafy folder as it is not there it will look in warlords and then lastly civ4. Best practice is not to alter the game files but to create a new mods folder in BTS/ Mods with the folder structure of Beyond the Sword\Mods\"my mod"\Assets\Terrain\Features and copy the TreeLeafy folder from RoM-AND's Terrain\Features folder to it. Then make the folder structure Beyond the Sword\Mods\"my mod"\Assets\XML\Art and copy the bts CIV4ArtDefines_Feature.xml and modify it. Then when you run the mod, it will load the mods files first.

Secondly, as far as I can tell, a WBS file doesn't control how the map is generated or how features are chosen, it just saves what has already been generated. Am I looking at the wrong file(s)?
For random map generation you'll have to use Python. WBS is a way to alter what has been randomly generated and save your changes. you can open the save file and edit it in a text editor or you can edit in the world builder.
 
Top Bottom