is there an easy way (ie no dll) to set start location parameters for individual civs

el_hidalgo

Prince
Joined
Dec 24, 2007
Messages
354
Location
Republic of Texas
For example, let's say I want to create a mod where the Romans always start by a hill, the Khmer by jungle, the Portuguese by coast. Is that possible? If so, how?

It wouldn't surprise me if this question has been asked before, but I couldn't find the answer.
 
I wrote something like that for Fallout:Tame the Waste. Here some civs needed to start on a vault (feature) or the AI would get stuck building the first city. I solved it by modifying CvGame::assignStartingPlots(). It turned out to be buggy because it places units on multiple plots and not just the dedicated start plot. I have a theory that order of starting units in XML plays a role in this, but I haven't tested it.

I'm not sure if it can be done without modifying this DLL function. However it does call assignStartingPlots in MapScriptModule (python). The real question is if this function can be powerful enough to do what you want it to do and how complex it would be to make it do that.
 
You can pick the starting locations in the map script

Fall from Heaven 2 does this in the Erebus.py map script that comes with it via the already mentioned assignStartingPlots function in its StartingPlotFinder class. It works by including data for what each civilization prefers for various factors (moisture, altitude, distance from other civs, need coastal, can start on forest).

I expanded the system some in a new version of that map script that comes with the latest patch for Rocks 2 Rockets, R2R_Erebus_1_09R.py (which also tweaks the map generation some).My new version adds a "region type" to the civ preference data (since the Erebus map is broken up into regions) which adds preferences for what types of terrain are in the region, preferred min and max number of plots in the locations BFC for terrain types and features, preferences for minimum number of hill plots, and min and max number of peak plots, and whether or nor the location must be on a hill. (Although I have not yet actually gotten around to adding the list of what things the various civs in R2R actually want in their vicinity...)

So you cold use the regular Erebus map script or my modified version as an example of how to modify other map scripts to get some placement checking done for a variety of requirements. You probably can't use it directly (without tweaking) since it places the wider range of terrains used by R2R, which has more than most mods.
 
Back
Top Bottom