dreiche2
Prince
- Joined
- Apr 9, 2003
- Messages
- 320
Ok folks I updated the code for FfH 0.2. I removed everything but the flavor aspect. And, I put all the code into a separate module, which makes it very easy for anyone to create their own "flavor" version of a map script. Just put the module file into the PublicMap folder and import it into a map script by adding some lines of code (actually just one line that does something, rest is comments... see below for the details.).
This also means there is one central file you can edit to change the flavor settings to your liking, and this will affect all scripts where you imported the module. For those that are reluctant to modify scripts themselves I attached examples of modified scripts.
From the module:
So, here comes the module. Place this in your PublicMaps folder, then add the 'import' code block to the map script of your choice...
View attachment FfH_flavor_mapmod.zip
To get you started, here are some already modified versions of popular map scripts. Remember that essentially only one line has to be added, so it's really not complicated to do it for other scripts. Of course, credit for the map scripts themselves goes to the corresponding authors...
NOTE: just to make it clear, you need both the module file and the modified map script!
View attachment FfH_Fractal.zip
View attachment FfH_Lakes.zip
View attachment FfH_SmartMap.zip (SmartMap script by surt, version 9.1, see http://forums.civfanatics.com/showthread.php?t=154989)
View attachment FfH_Tectonics.zip (Tectonics script by LDiCesare, version 3.9, see http://forums.civfanatics.com/showthread.php?t=149278&page=5)
FfH_pangea.zip
This also means there is one central file you can edit to change the flavor settings to your liking, and this will affect all scripts where you imported the module. For those that are reluctant to modify scripts themselves I attached examples of modified scripts.
From the module:
FILE: FfH_flavor_mapmod.py
VERSION: 3.00
AUTHOR: David Reichert (dreiche2)
PURPOSE: For the Fall from Heaven (FfH) mod: Have civs start in regions that match their flavor.
DESCRIPTION:
This module can be used in conjunction with other map scripts. It redistributes the original starting locations among the civs according to FfH flavor, i.e. Ljosalfar (elves) get a location with many forests, Lanun ("pirates") get a coastal start etc.
Note that this module does not change the map itself, and only uses the starting locations assigned by the base map script. Hence, if there are no forests on the map at all, the elves won't get any, either. So there will only be a tendency (albeit a clear one), no guarantee that all the relevant civs have 'flavory' staring positions. An advantage is that this module minimally interfers with what the map scripts does.
USAGE:
It is very simple to use this module in a map script of your choice (e.g. the default continents script). Just copy this file into the <civ4>/PublicMaps folder, and then open the map script file (e.g. Continents.py) with a text editor and copypaste the small code block below this paragraph into the script (preferably at the top), and uncomment the 'import' line by removing the '#'. Of course you're advised to backup the map script and rename your modified version to something like "FfH_whatever.py" so that you don't confuse the various versions. You can modify the flavor settings to your liking, see SETTINGS below.
Code:## copy below, remove '#' in 'from...import' line. ############################################################################### # This map script was modified to use the Fall from Heaven flavor map module. # # See FfH_flavor_mapmod.py for details. # ############################################################################### #from FfH_flavor_mapmod import normalizeStartingPlotLocations ############################################################################### ## copy above
COMPATIBILITY
The flavor module should work with most map scripts. It uses the normalizeStartingPlotLocations() function, hence civ does not use its default implementation. That means that members of a team are no longer placed close together as by default.
A conflict occurs if the map script itselfs implements normalizeStartingPlotLocations(), though only few do. If that's the case you can simply remove/comment out the relevant code in the map script, although of course you remove any functionality that was implemented there.
SETTINGS
List of civs with preferred starting spots:
Malakim: desert
Lanun: coastal start
Ljosalfar: forest
Luchuirp and Khazad: hills
Doviello: tundra
Illians: tundra (low priority)
Hippus: like: grass, plains; dislike somewhat: hills, forests
Note: It should be easy to modify the settings to your liking, and add new flavor civs. Just look at the code below. Everything relevant happens in normalizeStartingPlotLocations().
So, here comes the module. Place this in your PublicMaps folder, then add the 'import' code block to the map script of your choice...
View attachment FfH_flavor_mapmod.zip
To get you started, here are some already modified versions of popular map scripts. Remember that essentially only one line has to be added, so it's really not complicated to do it for other scripts. Of course, credit for the map scripts themselves goes to the corresponding authors...
NOTE: just to make it clear, you need both the module file and the modified map script!
View attachment FfH_Fractal.zip
View attachment FfH_Lakes.zip
View attachment FfH_SmartMap.zip (SmartMap script by surt, version 9.1, see http://forums.civfanatics.com/showthread.php?t=154989)
View attachment FfH_Tectonics.zip (Tectonics script by LDiCesare, version 3.9, see http://forums.civfanatics.com/showthread.php?t=149278&page=5)
FfH_pangea.zip