1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

RFC Not-Quite-Random

Discussion in 'Rhye's and Fall Modmods' started by archontophoenix, Sep 20, 2008.

  1. archontophoenix

    archontophoenix Chieftain

    Joined:
    Jan 12, 2005
    Messages:
    56
    Location:
    Left Coast
    I have to admit I was a little disappointed when RFC RAND came out. The maps didn't have much of an earth-like feel at all -- each time I tried it, I wound up in the middle of (or on the edge of) a big, resourceless desert (even for seafaring civs like the Greeks). So I gave up on it.

    Still, there's replay value in not knowing the map cold. So I decided to see if I could come up with a random map generator that would work without changing any of the XML, Python, or C++ code. I had to figure out which map locations I had to leave alone -- places where civs or barbs spawn, for example.

    And I think I've done it, although only for BTS 1.181, unlocked 3000 BC start (there's a slight chance it may work for other versions, but I won't fix it if it doesn't, since I can't test it). Here are some maps I've generated that you can try out.

    Since the underlying code is the same, spawn dates and relative locations are all the same. For example, if you play Greece, you know that Rome will appear on turn 84, 7 spaces west and 3 north of your starting location, as usual (if I've counted right) -- even if your starting location looks nothing like the one on the original RFC map.

    I'll post the generator itself in a few days, after I *ahem* document the code. Meanwhile, let me know about problems.

    Instructions:

    Unzip the maps in the accompanying zip file to your Rhye's and Fall of Civilization\PublicMaps folder.

    When you choose "Play a Scenario", select one of the Scrambled... maps instead of the unlocked 3000 BC map. The lower-numbered maps are more earth-like; the higher-numbered ones are generated with more extreme parameter values and are pretty strange.
     

    Attached Files:

  2. Feyaria

    Feyaria Warlord

    Joined:
    Aug 13, 2008
    Messages:
    195
    Location:
    Austria
    Some maps are realy strange... Egypt and Mali without floodplains but with sheep on deserthill, Maya terriotry only accesible by jungle, so protected from dog soldiers, spain and greece touching africa, so the mediterenean is two big lakes.

    Some UHVs wont be possible on some of these maps, but a different map is always fun to play.

    And there is a graphic issue, with marshes touching the ocean.
     
  3. Jet

    Jet No, no, please. Please.

    Joined:
    Mar 16, 2006
    Messages:
    2,364
    From looking at the Babylon and Mali starts on map 7 I would say yeah, civs that normally start with flood plains are going to be in big trouble if they get neither the flood plains nor something else to compensate.

    I would suspect that the same idea is pertinent for other civs and geographic features.

    ... Looking at map 7 in its entirety, another one that comes to mind is whether the Incas are blocked in by mountains and whether the tiles on their settler map are on land.

    That said, thanks for doing this.
     
  4. archontophoenix

    archontophoenix Chieftain

    Joined:
    Jan 12, 2005
    Messages:
    56
    Location:
    Left Coast
    Yes, there's probably still some tuning I can do in terms of make sure that each civ's starting location is at least playable. I've tried to do some of that with the desert civs by adding sheep and oases around them when there's no river (and hence no flood plains). However, I haven't done much to ensure that starting locations are reasonably accessible and have something like the original number of resources available nearby.

    As for UHVs, I think it would be too hard to generate maps so as to preserve their difficulty. Some will be impossible on the generated maps, and some much easier -- part of the adventure is finding out which is which.
     
  5. archontophoenix

    archontophoenix Chieftain

    Joined:
    Jan 12, 2005
    Messages:
    56
    Location:
    Left Coast
    Do you know which files would I look in to find the settler maps? And how inflexible is an AI civ about following its map -- that is, if a place where it wants to settle doesn't exist, will it try someplace nearby, or give up?
     
  6. Jet

    Jet No, no, please. Please.

    Joined:
    Mar 16, 2006
    Messages:
    2,364
    Sure, here. No idea exactly how the live AIs decide where to settle.
     
  7. archontophoenix

    archontophoenix Chieftain

    Joined:
    Jan 12, 2005
    Messages:
    56
    Location:
    Left Coast
    Thanks. Actually, it looks as if most civs that tend to build large empires have a large enough map that they're likely to find something suitable even in a rearranged world. I think I'll ignore the settler map question for now, but if it looks as if they are failing to settle the generated maps adequately, I'll revisit it.
     
  8. archontophoenix

    archontophoenix Chieftain

    Joined:
    Jan 12, 2005
    Messages:
    56
    Location:
    Left Coast
    I've fiddled around with some parameters that make slightly more reasonable maps. But now that I've had a chance to play with a map script, I see that there's really no end to it -- you can try an infinite variety of heuristics and never come up with the perfect script. So I think this is the last I'll do on this, especially since Rhye seems to be back working on RFC Rand.

    Attached are the generator (a Java program -- sorry, my Python is not fluent enough for this) and a couple of screenshots.

    If you're familiar with Java and want to run the generator, the interface is completely line-oriented and more-or-less self-explanatory. Do:

    javac -cp . ScrambledRFC.java
    java -cp . ScrambledRFC


    and you'll be prompted for the parameter arguments. With luck, the program will guess the right directory to put the map in.
     

    Attached Files:

Share This Page