PerfectWorld2 floodplains

StormLord-711-

Winter is Coming
Joined
Jan 3, 2008
Messages
191
The fact that this is my biggest gripe with my games says a lot about this mod ;):


The version of the PerfectWorld2f map script in this mod seems to put a whole lot of floodplains in the desert. I use gigantic maps, which tend to cause much larger deserts (which I rather like): ideally, I'd like to see the deserts be a massive barrier to travel (like they've always been historically). However, having floodplains all over the deserts means that units don't get terrain damage when they use them to go through the desert. I really like this mapscript, and I think it is an excellent fit for this mod, except for this one problem.

I've tried to keep the mapscript from making floodplains in the first place by commenting out the last line in the script excerpt below from [RoM-AND folder]/PrivateMaps/RoM_PerfectWorld2.py. It really looks like that is the line that adds floodplains to all flat desert tiles next to a river. When I comment the line out though, it just seems to cause civ to hang when the map is being generated. I don't know python (only C++), but I'm willing to learn a little just to change this annoyance.

Code:
#floodplains and Oasis
            elif sm.terrainMap[i] == mc.DESERT and sm.plotMap[i] != mc.HILLS and\
            sm.plotMap[i] != mc.PEAK and plot.isWater() == False:
                if plot.isRiver() == True:
                    plot.setFeatureType(featureFloodPlains,0)

Does anyone have any idea how I'd do one of these things?:

  1. Stop rivers from appearing much at all in the desert. In my opinion, the best way to go about this would be to have rivers not get put on the map until they meet a threshold. This threshold would be judged by whether they have collected a certain amount of water (figured based on the rainfall of their surrounding terrain). Another option is just banning rivers from starting in the desert, but I think the first would be more organic, if harder to program.

    If this could be done, then I think floodplains would be rare enough to have them be 3:food: each rather than 2.

    This is the only real solution in my mind (but I'm sure it needs some python coding)- the options after this I just consider workarounds, so this is the option I'd prefer and would eventually like to do, even if I just use the workarounds so I can play while I'm still learning python.

  2. Get rid of floodplains altogether. I don't consider them as important as deserts shaping the expansion of civilizations, and I think it's really weird having fresh water all over the desert.
  3. Change floodplains so they cause terrain damage like deserts and tundra. This is better than nothing, but it still doesn't change the problem of having floodplains all over the desert.
 
Never mind my original question- some people have already done the work. I should have realized that it is likely that someone would have forked a script as good as PerfectWorld2.

Totestra appears to be a map script that is pretty close to what I was looking for (and it seems to have some other updates too but it doesn't seem to be stuff I'm too terribly concerned with). It seems like the rivers were programmed very similar to what I had in mind. I'm trying it out. (Well, to be exact, I'm using the gTotestraHUGE script rather than the one for more regular-sized maps.)

I also saw PerfectMongoose, an adaptation of PerfectWorld3, originally a Civ V script, for Civ IV. It looks interesting; apparently many C2C players use it too. However, the download link is no longer supported by the server. Anyone by any chance know where else to get it?

I do have one important question though- I can just drop the map script into [my RoM-AND folder]/PrivateMaps folder without having to edit it, right? The extra resources that are part of this mod seem to be getting placed. (I've heard that map scripts aren't actually the code that places the resources, is that true?) The only thing I can think of that might be getting missed are marshes (since the map script does generate features), but they aren't a big deal to me. Am I missing anything else or is this script otherwise a drop-in replacement for RoM_PerfectWorld2?


EDIT: By the way, I understand that this forum is pretty quiet right now, and I don't mind waiting a while for an answer. A good map is a vital part of a good RoM-AND game for me.
 
Yes, resource data comes from the bonusinfo xml data in assets so it should work just fine in RoM. As you say, terrain like marshes needs to be addressed by the map script.

I looked in my Civ 4 junk drawer, and this seems to be the final PerfectMongoose map script. I downloaded it about a year ago, I think. It is also packaged with an updated Perfectworld 2 script. I think both have Marsh terrain.
 

Attachments

  • LM_PerfectMongoose_3.1.zip
    81.2 KB · Views: 52
Top Bottom