[Map script]Creation.py for FFH2

cephalo

Deity
Joined
Jul 26, 2007
Messages
2,058
Location
Missouri, USA
This map script generates a random fantasy type world. It was specifically created for Kael's 'Fall from Heaven 2' mod for Civ 4, but can also be used for native Civ 4.

Fantasy worlds often have distinct regions or valleys that have their own special climate or atmosphere. Some examples would be Mordor from LOTR, or most of the regions in World of Warcraft. Well this map script is designed to have various 'valleys' connected to one another through mountain passes, such that each region is kindof a fortress on it's own.

Because this map script was created for FFH2, starting locations and other features are placed based on what is known about each civs fictional terrain preferences. These preferences are tunable toward the beginning of the script

Download Creation.py here from the Downloads database. To use this map, put the file in your Civ4\PublicMaps or BTS\PublicMaps folder.

-Help! there's no reagents!-
If you have a problem with reagents not appearing on the map, see this thread for an easy fix.
http://forums.civfanatics.com/showthread.php?t=267577

Here are some close up screenshots:
Spoiler :



Here are some standard size map overviews:
Spoiler :

And some huge sized map overviews:
Spoiler :

Version History
1.06 - Added some of the new preferences for FfH 0.32 unique improvements. Improved the choke point code to choose more valueable choke points for watchtowers and a new unique improvement coming in 0.33.

1.05 - Cleaned up peak generation so that peaks on the map edge aren't always on desert. This prevents large amounts of flames slowing down the framerate. Added the 'scrubs' feature to map generation. Fixed a bug that prevented valleys from growing enough to find a neighbor, resulting in the 'region has no gate' error.

1.04 - Added a tuning variable called SoftenPeakPercent which allows you to turn a percentage of peaks into hills to perforate the valleys and make them less like fortresses. Fixed a bug in detecting network games.

1.03 - Cleared forest and jungle from 1 tile around starting plot. This mod requires high tech levels to clear them and this can be a large hindrance. Civ preference with allowForestStart = True(Elves) will not clear the forest.

1.02 - Added a new civ placement scheme for FFH2 civs. Added a similar scheme for FFH2 unique improvements. Improved the way ancient towers are placed. Shrank the map yet again due the high percentage of playable land. Softened the effect of non-sea level land touching coast.

1.01 - Improved water area generation to more consistently make interesting map shapes. Water spread used to paint itself into a corner, this has been fixed. Prevented seas from being divided by small isthmuses. Only peaks and ocean will touch the map edge. Filled unreachable areas with peaks, we don't want Hyborem spawning there and you know he will if you let him. Shrank each map size, as there was too much room to expand for the default number of civs for each map size, resulting in no reason to go to war until late game. Temporarily added David Reichert's flavour map mod until I can do something with starting regions.
 

Attachments

  • Creation Ice Valley.jpg
    Creation Ice Valley.jpg
    154.3 KB · Views: 16,411
  • Creation Khazad.jpg
    Creation Khazad.jpg
    146.4 KB · Views: 15,986
  • Creation Desert Start.jpg
    Creation Desert Start.jpg
    138.8 KB · Views: 15,925
  • Creation Overview.jpg
    Creation Overview.jpg
    69.1 KB · Views: 15,992
  • Creation Overview2.jpg
    Creation Overview2.jpg
    60.9 KB · Views: 15,766
  • Creation Overview3.jpg
    Creation Overview3.jpg
    64.4 KB · Views: 15,527
  • Creation Huge Overview.jpg
    Creation Huge Overview.jpg
    60.2 KB · Views: 15,526
  • Creation Huge Overview2.jpg
    Creation Huge Overview2.jpg
    67.1 KB · Views: 15,826
I love the shot of Letum Frigus isolated in a corner of the mountains like that. So a thought occurs to wonder if it can be scripted so that all of the unique features are likely to be in an isolated location similar to that. Could be quite interesting, making a city with one of those VERY nicely fortified (1 attack direction), but easily set to Siege (1 direction to block), and make it unlikely you can use a unique feature AND the entire fat cross, thus balancing out their improved yield slightly :)

Plus for those without an improved yield you wind up having to plant a city near them or your culture alone will never reach it. And Ideally it makes it less likely to start near one of them. Ooh, added bonus is that it limits Barbatos' field of death ;)
 
I love the shot of Letum Frigus isolated in a corner of the mountains like that. So a thought occurs to wonder if it can be scripted so that all of the unique features are likely to be in an isolated location similar to that. Could be quite interesting, making a city with one of those VERY nicely fortified (1 attack direction), but easily set to Siege (1 direction to block), and make it unlikely you can use a unique feature AND the entire fat cross, thus balancing out their improved yield slightly :)

Plus for those without an improved yield you wind up having to plant a city near them or your culture alone will never reach it. And Ideally it makes it less likely to start near one of them. Ooh, added bonus is that it limits Barbatos' field of death ;)

Try a few maps and see what you think. ;) They don't all appear on each map however. These placements are also tunable.
 
I am downloading this new release now.

In the previous release, I generated a map that was filled with the normal peaks and valleys and oceans, but 99% of the non-peak land tiles were forest or jungle (all hills were forested or jungled as well). I walked my settler, scout, and warrior through three valleys and did not find a section that was not all forests/jungles.
 
I am downloading this new release now.

In the previous release, I generated a map that was filled with the normal peaks and valleys and oceans, but 99% of the non-peak land tiles were forest or jungle (all hills were forested or jungled as well). I walked my settler, scout, and warrior through three valleys and did not find a section that was not all forests/jungles.

This should work a little better. I know how devesting an all forest start can be with this mod. The default starting placement should avoid the wettest areas (hopefully).
 
this mapscript is coming along nicely, we had some problems with a previous version going OOS in multiplayer right off, but im hoping it was because of the lack of a player starting spot scheme, great work :)

Hmm, I can't remember, but I thought I read that the flavour map mod had some issues with that. That's replaced now so any further issues will be something I did. The only thing I know of that will cause OOS in a map is inconsistent use of random number generators. For MP, you have to use the ones provided by the mapRand.
 
Finally had some time to play for a little while on the map, but I've loaded it hundreds of times while testing buttons and whatnot in game :)

Anyway, very interesting playstyle changes needed to use this map. I love it FAR more than the "Maze" maps, unless I want to play Lanun and completely destroy the world ;)

On thing I notced early: Hunting is a MUST HAVE technology now. With all those peaks around, Hawks are Godly (and you can avoid wading through 30 turns of forested walking to find it is just a dead end)
 
Finally had some time to play for a little while on the map, but I've loaded it hundreds of times while testing buttons and whatnot in game :)

Anyway, very interesting playstyle changes needed to use this map. I love it FAR more than the "Maze" maps, unless I want to play Lanun and completely destroy the world ;)

On thing I notced early: Hunting is a MUST HAVE technology now. With all those peaks around, Hawks are Godly (and you can avoid wading through 30 turns of forested walking to find it is just a dead end)

Yeah, that's why I'd like to see hawks toned down a bit. Exploration is fun! No need to bypass it almost entirely in my opinion.
 
SCORE! I had an idea and it worked.


First, I was stupid and didn't write things down, but I loaded up a random game to see if my idea would work, and I got a TON of python errors. All I can remember is one said something about not being able to find a gate. Wound up loading the game still, but it was solid plains :(


Anyway, reloaded and it was fine (so something just tried to place itself wrong I guess?), so here is the result of my idea:

Forests placed on Mountains block Hawk sight range :) So if you can decide on which type of forest you like graphically for being on top of a mountain, that is a possible solution to the problem that can be implemented with the mapscript only.
 
xienwolf said:
Forests placed on Mountains block Hawk sight range So if you can decide on which type of forest you like graphically for being on top of a mountain, that is a possible solution to the problem that can be implemented with the mapscript only.
but when a fol civ's borders go over a mountain range eventually it will become a ancient forest which doesn't form/move/change to match the terrain. (hopefully someone will find a way to fix that)
 
Yeah, Ancient Forests (and Burnt) look horrible above the mountains :( I was hoping you could go with burnt so it is still clearly a mountain, but that will upgrade to new, normal, ancient as well.


However, my favorite for look is Jungles, and those can't go ancient (but cause health issues.... might be a problem.
 
I am 400 turns into a game on the previous version of the map script and I do not think I know Hunting yet. Maybe I do, because I think I can build hunting lodges, but I have not built a hunter or a hawk.

I enjoyed having to wend my may through valleys and passes to explore the map. I actually found, after a couple hundred turns, that my civ was alone on about half the map. You have to travel through a long, narrow corridor (2 wide, about 15-20 tiles long) between peaks to reach a branching point that lead to three other civs. The last two civs are completely isolated by land as a chain of peaks cuts off every pass (yet I somehow made contact with them and two of my towns demanded to flip to their cultures across mountains).

This game is also memorable because Rosier the Fallen wiped out all three of my neighboring civs by himself.
 
I am 400 turns into a game on the previous version of the map script and I do not think I know Hunting yet. Maybe I do, because I think I can build hunting lodges, but I have not built a hunter or a hawk.

I enjoyed having to wend my may through valleys and passes to explore the map. I actually found, after a couple hundred turns, that my civ was alone on about half the map. You have to travel through a long, narrow corridor (2 wide, about 15-20 tiles long) between peaks to reach a branching point that lead to three other civs. The last two civs are completely isolated by land as a chain of peaks cuts off every pass (yet I somehow made contact with them and two of my towns demanded to flip to their cultures across mountains).

This game is also memorable because Rosier the Fallen wiped out all three of my neighboring civs by himself.

Yeah, that previous version is a very large map. I shrank the maps by another 8 tiles in each direction and I think it's much more reasonable now. It shouldn't be so big that your economy can never handle expanding into the available room, as was kindof the case.

The 'gate' bug, that xienwolf mentioned is a tough one to figure out because it happens so rarely. When a region cannot find a place for it's river to smoothly flow into the next region, this exception is thrown. It's should be impossible for that to happen, but obviously it's not. In any case you can just generate a new map.
 
I got another one AFTER the game finished loading (The "Start of Civilization splash screen was up). I was Malakim, and it sounded like it was unable to find any desert, and since it REALLY wanted to put me on desert it bugged.
 
Hey Cephalo

This map script is great. I thought you might like a little feedback from my one and only try so far.

Playing as the Amurites I started in an area totally surrounded by jungle. I had gems all around so decided to go for it anyway and beeline to sanitation. Poor plan I know and things were as expected, absolute rubbish. There I was stuck on 1 population unable to build anything in less than 30 turns and rapidly getting bored. Then I was lucky in getting Knowledge of the Ether from a hut and rushed out a mage guild and an adept. Quick fire later and the entire map was on fire and my 100% jungle became 50% fire and 50% growing/burnt/normal forest at any one time. Cool. I was back in the game and as I met Saba, Auric and Alexis in quick succession I declared war to try and slow their progress.

All jungle meant no metals, no incense and lots of sugar and bananas. I've been on the back foot since turn one. Only once I built Saverous did I become even slightly competitive. Still, the set up of the map and the battles in choke points make for a fantastic alternative to the standard maps.

Sorry no screenies, I'm at work.

Long story short, I love this script and will play it again and again. Keep up the good work.
 
I got another one AFTER the game finished loading (The "Start of Civilization splash screen was up). I was Malakim, and it sounded like it was unable to find any desert, and since it REALLY wanted to put me on desert it bugged.

If you see that again, can you send me the PythonDbg.log file? I need to capture one of those instances, and the debug file should report the random seed used to start the map.
 
Hey Cephalo
All jungle meant no metals, no incense and lots of sugar and bananas. I've been on the back foot since turn one. Only once I built Saverous did I become even slightly competitive. Still, the set up of the map and the battles in choke points make for a fantastic alternative to the standard maps.

All jungle ouch!! Hopefully that doesn't happen too often. I should make the plot normalizer get rid of some jungle and also forest. The default procedure goes overboard on jungle removal in my opinion, and doesn't remove forest.
 
Top Bottom