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

[Map Script] PerfectWorld.py

Discussion in 'Civ4 - Map Scripts' started by cephalo, Aug 23, 2007.

  1. Chuggi

    Chuggi Espada

    Joined:
    Jan 2, 2007
    Messages:
    2,369
    Location:
    Australia
    I didn't know that they could be generated at the start, may have to look into it some more. I've set most improvements except roads to destroy the features anyway, because there were some bad clipping issues with some of them.
     
  2. The Capo

    The Capo godless Heathen

    Joined:
    Jan 29, 2001
    Messages:
    9,302
    Location:
    Washington, DC
    I just downloaded the latest version of this (I think), and I was wondering how to put it into a mod that I am working on. What exactly do I do with the py file?

    Wait, I think I just figured this out, I just make a publicmaps folder in my mod's folder right? And then put this in there?
     
  3. Mknn

    Mknn Prince

    Joined:
    Dec 17, 2007
    Messages:
    337
    Location:
    Houston
    I just got the following on a large map with 13 civs, start anywhere and allow pangeas:

    File "PerfectWorld", line 4047 in AddBonuses
    File "PerfectWorld", line 2091 in AddBonuses
    File "PerfectWorld", line 2166 in AddBonusType

    ValueError: bad index shuffling plot list randIndex=2864 listLength=2864, mapSize = 10240

    I closed out, re-rolled the start, and got a map with no errors, so just FYI ...
     
  4. modifieda4

    modifieda4 Chief Time Waster

    Joined:
    Sep 3, 2006
    Messages:
    385
    Location:
    Gold Coast
    find the other map scripts for the unmodded game and duplicate that directory structure in your mod directory. then put the script in there.

    for an example see my Expanded Plus Mod download in my sig, I included the perfect world map script with it.
     
  5. cephalo

    cephalo Deity

    Joined:
    Jul 26, 2007
    Messages:
    2,058
    Location:
    Missouri, USA
    That is a long standing, very occasional bug that I absolutely cannot figure out. It is impossible for that to happen, yet it happens. Sometimes the length of a list is not updated fast enough I guess... but I really just don't know.

    the randIndex is the same as the length as you can see, which is of course a bad index.
     
  6. The Capo

    The Capo godless Heathen

    Joined:
    Jan 29, 2001
    Messages:
    9,302
    Location:
    Washington, DC
    Hmm, yeah that's what I did with my mod but a strange thing happens. I put the NewWorld.py and Perfect_World.py into my PublicMaps folder within my mod, and I actually tested both scripts out. Now when you start the game the loading bar sticks on "initializing" for quite a long time, but it went through for both scripts. Now here's the strange part. THE NEXT TIME I try and load up the game right after the opening video shows it says it can't locate the file NewWorld.py/Perfect_World.py. Why does this happen? Do I have to have them present in the regular PublicMaps folder as well as my PublicMaps folder?

    And if that is the case why does Thomas' War work without having them in both folders?

    Anyone know why this is happening?
     
  7. cephalo

    cephalo Deity

    Joined:
    Jul 26, 2007
    Messages:
    2,058
    Location:
    Missouri, USA
    Ya, I'm familiar with this issue. The game writes your last map used in your ini file. However, the normal game does not look in all the mod folders for maps, only the main PublicMaps folder. So if you use a mod with it's own map, then start up the normal game, it can't find the map it saved in the ini file. What you can do is just ignore the error messages, run a different map and the problem goes away.
     
  8. The Capo

    The Capo godless Heathen

    Joined:
    Jan 29, 2001
    Messages:
    9,302
    Location:
    Washington, DC
    Yeah but it just locks up between opening screens (the opening video, and all that other crap), so how can I solve this issue?
     
  9. cephalo

    cephalo Deity

    Joined:
    Jul 26, 2007
    Messages:
    2,058
    Location:
    Missouri, USA
    I usually get error messages that I can just click through. It's really locking up? In that case, you can edit the ini file and remove the part regarding what map script is chosen. As for inclusion in a mod, you might create a PrivateMaps directory like Final Frontier does, instead of a PublicMaps directory. That may actually prevent this problem. I'm not sure about that since I just thought of it one second ago, but it's worth a try.
     
  10. manaia

    manaia Chieftain

    Joined:
    Nov 2, 2007
    Messages:
    6
    thanks mate :)
     
  11. Elenhil

    Elenhil Warlord

    Joined:
    Jan 19, 2008
    Messages:
    254
    BTW, I've found this map to occasinally produce civ starting spots that are too close to each other. Like two coastal capitals on the sides of a narrow channel or small gulf.
     
  12. cephalo

    cephalo Deity

    Joined:
    Jul 26, 2007
    Messages:
    2,058
    Location:
    Missouri, USA
    The starting positions were the very most difficult part of making this map. The reason you see that kind of behavior is that everything is done by continent. The starting placer knows how many people should be on a continent, and tries to make those starts as fair as it can. Starts on different continents are not examined at all. This map is so variable in terms of land quality that creating fair starts is very difficult.
     
  13. Pariah

    Pariah Outside Influence

    Joined:
    Feb 19, 2003
    Messages:
    881
    Location:
    Beyond, Between, Before
    I've been using your map script on BTS for about 3 months now, and I have to say: EXCELLENT JOB SIR! It's by far my favourite type of world. I especially love the abundance of grassland/hills/forests and rivers, and the long mountain ranges which act as natural lines of defence.

    Just one gripe: the human player too often seems to start on a separate island or small continent, and may even remain isolated until the discovery of Optics - with an obvious heavy disadvantage in the tech race. And there are sometimes sizeable landmasses with no luxury resources of any kind. Is this intentional?
     
  14. The Capo

    The Capo godless Heathen

    Joined:
    Jan 29, 2001
    Messages:
    9,302
    Location:
    Washington, DC
    Hmm, that's odd, in my games with this map there is usually one huge continent that has the majority of civs, and then maybe two or three much smaller continents (almost really just large islands) that have one AI civ on them. I always wind up on the largest continent.

    Also one game I played as Japan I was on this huge continent, and there was a mountain range separating me from the rest of it, but I had really great land, and a good deal of it. So it was a little easy. Is there anything that can be done about this phenomenon (one time the Chinese started on an island that only had two tiles)?
     
  15. Woody1

    Woody1 Prince

    Joined:
    Feb 19, 2002
    Messages:
    468
    Location:
    Texas
    I always generate several times, checking the overall look of the map with worldbuilder, before starting the game. I love this map script, but most of the maps it generates I don't like. (One large snakey continent, and some smaller islands.) But I love the ones I do like! (The ones that give at least two good-sized continents.)

    I've tweaked the settings to give more land, and less desert and ice.
     
  16. Pariah

    Pariah Outside Influence

    Joined:
    Feb 19, 2003
    Messages:
    881
    Location:
    Beyond, Between, Before
    Me too - except I don't usually look in WorldBuilder, just keep regenerating until I get a prime starting location.
     
  17. Woody1

    Woody1 Prince

    Joined:
    Feb 19, 2002
    Messages:
    468
    Location:
    Texas
    I find one of the problem with most map scripts, is that sometimes you get a mountain on a single tile that separates two big landmasses. That messes up the AI, because it doesn't know how to settle "around the mountain". It probably doesn't know how to attack around it, either. The AI doesn't seem to understand it needs to use ships to go around the mountain, even if it's on the same continent.

    So, I always convert those mountains into hills before starting the game.
     
  18. Pongu

    Pongu Chieftain

    Joined:
    Dec 2, 2008
    Messages:
    23
    Cephalo, these are the maps I always craved. Thank you.
     
  19. emptyd

    emptyd Chieftain

    Joined:
    Mar 4, 2008
    Messages:
    6
    This is probably a very simplistic suggestion by your standards, but...

    Does python use a base of 0 for indexes? If so, then for a list with N elements, legal indexes are 0 thru N-1, not 1 thru N. Since the error message lists the same length and index I’d guess that’s the issue.

    The infrequency of the error would be confirmed because it would occur only when a random index equal to the last (really the last +1) element is indicated.
     
  20. Psycho_Ivan

    Psycho_Ivan Warlord

    Joined:
    Oct 6, 2008
    Messages:
    218
    My only gripe with the maps I get now is that they tend to be... heavily forested. And very green. It fits the bill for a good starting spot, but it tends to be a little boring when you can't find much variety in starting spots.
     

Share This Page