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] SmartMap

Discussion in 'Civ4 - Map Scripts' started by surt, Jan 20, 2006.

  1. Thalioden

    Thalioden Chieftain

    Joined:
    Dec 15, 2003
    Messages:
    12
    I have scoured this script for some indication of how "smartmap random" is implemented. My goal was to specify which selections "smartmap random" chose from. However, I have had no luck. :crazyeye: Can anyone point me in the right direction?
     
  2. Thedrin

    Thedrin Chieftain

    Joined:
    Jan 24, 2002
    Messages:
    2,649
    Location:
    London
    I used SmartMap as a starting point when trying to figure out how to write my own map script (which is linked to in my signature).

    All the columns of green text (assuming your using the editor IDLE) about three quarters way down the SmartMap code govern the menu options. The first column lists the names of each menu option. All subsequent columns list the available choices for each menu option. Each menu option choice is assigned three variables:
    1) Choice name,
    2) Choice value,
    3) True or false.

    It's the true or false value that determines whether SmartMap Random can pick the option choice. The actual code which covers the use of true and false is found much further down among the assorted helper functions.
     
  3. Bigben34

    Bigben34 Chieftain

    Joined:
    Jun 14, 2006
    Messages:
    131
    Greetings.
    Can someone post a fixed version of this awesome map generator? I think the fixes for MULTIPLAYER WARLORDS would be easy enough... The three main problems I'm aware of is that:

    1) After launch, everyone starts Out Of Sync. All players besides teh host see nothing but bare grass and mountains, without resources or terrain features. However, if they rejoin the game this is fixed.

    2) The override features for the map size are broken. Sometimes you get the size of map you specify, sometimes you get an insanely larger map.

    3) With more than 4 players in multiplayer the map usually hangs on initiation

    4) Sometimes the resource distribution goes whacky, with certain settings.

    The author has been gone for months. Just post a corrected version in a new thread, or here with a sticky, if you fix it!! Thanks.

    Bigben34
     
  4. Thedrin

    Thedrin Chieftain

    Joined:
    Jan 24, 2002
    Messages:
    2,649
    Location:
    London
    I'm fairly certain that none of SmartMap's code is dependent on single player being selected.
     
  5. Bigben34

    Bigben34 Chieftain

    Joined:
    Jun 14, 2006
    Messages:
    131
    I don't know, all I know is that it's extremely hard to get it to work for more than 4 players in mp. Regardless of how many players, I have to have everyone besides me rejoin after launch, to correct the OOS. Also, if more than 4 players want to play I have to tell them to hotjoin once I've launched, which sucks because their capital is then allready founded and this map generator doesn't do a good job with the territory around your capital site... you could have snow/tundra/desert, and a fish is just as likely to be 1 hex too far away to use, as it is to be within range.

    Bigben34
     
  6. Thedrin

    Thedrin Chieftain

    Joined:
    Jan 24, 2002
    Messages:
    2,649
    Location:
    London
    Regarding 2) and 4), would you care to give more details?

    Can't really comment on this since I don't use multiplayer. The problems don't sound like anything related to the SmartMap code - do you have these problems when hosting multiplayer games that use other map scripts?

    That stuff happens with single player but it's worth pointing out that the appearance of snow/tundra/desert around your starting position was only introduced in later versions of the SmartMap. Try using an older version (SmartMap v8.5 was the version I always used). Alternatively, try using 'standard' civ starting placement rather than 'SmartMap' civ starting placement. Do you use the Blake AI? As I recall this has a positive affect on civ starting positions.
     
  7. Bigben34

    Bigben34 Chieftain

    Joined:
    Jun 14, 2006
    Messages:
    131
    Hello Again:
    In multiplayer warlords 2.08 games, any map script works fine except smartmap. After the game initializes, all players are listed OOS with values of 0. All players beside the host have a map with just grass and mountains, no resources or terrain features.... just the correct shapes of the continents. However, if the exit the game and hotjoin, then they have the correct map, and we can play.
    Also, on multiplayer sometimes the map will generate a huge unmaneabeable file, and sometimes make a map much bigger than the override size i chose.
    Also, once in a while it hangs during initialization.


    I think I did use standard starting positions, but I'll keep an eye out for that. I dont' use blake AI.

    Bigben34
     
  8. Thedrin

    Thedrin Chieftain

    Joined:
    Jan 24, 2002
    Messages:
    2,649
    Location:
    London
    This thread fell off the bottom of the page (or it did on my settings) so *bump*.
     
  9. EmperorFool

    EmperorFool Chieftain

    Joined:
    Mar 2, 2007
    Messages:
    9,633
    Location:
    Mountain View, California
    Yes, I have trouble with generating a normally-sized map. I get really wide and really tall maps usually, even though I have both "Overide X" and "Override Y" to "Do Not Override". In my mind, this should force it to remain at the chosen size of map (Standard in my case).

    The other thing that irks me is that I can't seem to get rid of the crablike coast. I select "very round; no fragments" but I get crablegs on all the coasts. Am I missing something?

    Even with those, I love this map generator usually, though I either get a "great map" or "WTF? reroll" -- no middle ground.
     
  10. Thedrin

    Thedrin Chieftain

    Joined:
    Jan 24, 2002
    Messages:
    2,649
    Location:
    London
    It doesn't.

    SmartMap takes the map size you have selected and uses it to define an area, a minimum dimension, and a maximum dimension. The area is always roughly the same but with each map generation SmartMap obtains new values for the x and y lengths which are greater than the minimum dimension and less than the maximum dimension.

    If you want consistent map shapes you must make use of the 'Override X' and 'Override Y' options so that the x and y lengths are exact.
     
  11. EmperorFool

    EmperorFool Chieftain

    Joined:
    Mar 2, 2007
    Messages:
    9,633
    Location:
    Mountain View, California
    Thanks. I took a peek at the code after posting and what I understand jibes with what you just said. I'll start doing that. The reason I find it so annoying is that the circumnavigation race is either over really early or wrapping around the world takes forever. :)
     
  12. Mesousa

    Mesousa -8.38 -6.67

    Joined:
    Apr 19, 2006
    Messages:
    478
    If anyone's wondering, I've tried SmartMap in BTS, and it seems to work just fine. :)
     
  13. BeardedWonder

    BeardedWonder Chieftain

    Joined:
    Jul 20, 2007
    Messages:
    77
    Location:
    Manchester
    :goodjob:

    Just came on to check. :)
     
  14. Alphard

    Alphard Chieftain

    Joined:
    Nov 25, 2005
    Messages:
    46
    So... is anyone still working on this or is there any chance someone will pick up the project? It is a great script... my favourite in fact, but still could use some tweaking... so .. any takers?
     
  15. Thedrin

    Thedrin Chieftain

    Joined:
    Jan 24, 2002
    Messages:
    2,649
    Location:
    London
    The LandMasses map script began as a variant on SmartMap's continent generator. It doesn't include SmartMap's fragments generator and is designed to remove inland lakes, but otherwise playing LandMasses maps with 'one continent per land mass' and 'standard' coastlines can produce similarly (though not identically) shaped continents to SmartMap.
     
  16. Thrasybulus

    Thrasybulus Chieftain

    Joined:
    Jul 20, 2007
    Messages:
    29
    Location:
    Delphi
    Having tried both with Warlords I found LandMasses much better once I got used to the custom settings. The variety of maps that can be generated from one group of settings (once I got them right) was impressive; the starting locations are superior also.

    However, it doesn't work with BtS....yet. Thedrin, have you finished Potter yet and picked up a copy?
     
  17. Brave Sir Robin

    Brave Sir Robin he bravely ran away

    Joined:
    Apr 7, 2006
    Messages:
    200
    Location:
    Ft. Worth TX USA
    i also can not get Smart map to work with bts
    yes , i did put smart map.py in the custom map folder
    every start ended up being 1897 ? :confused:
    no i did not check advanced start
    any suggestion ?
     
  18. jpinard

    jpinard Martian

    Joined:
    Jan 18, 2002
    Messages:
    760
    Location:
    Enceladus, Saturn
    Can you post your landmasses cfg file you've uses? I am having a terrible time getting the settings right for Landmasses.
     
  19. Thrasybulus

    Thrasybulus Chieftain

    Joined:
    Jul 20, 2007
    Messages:
    29
    Location:
    Delphi
    I'm rushing off to work at the moment, and it seems my landmasses cfg file is no longer there (I haven't tried it in BTS yet), but I may be able to remember the main settings:

    Size: because of my system something between small and standard but with no variation
    Land Masses: 1 - 4
    Continents: 5-20
    Randomly distributed continents
    Normal continent placement
    Sea Level 40-80%
    Land buffer: 4 to 10 (or maybe 12)
    Rougher edges to the land masses
    less desert more plains
    All other terrain options standard
    all the resource options to standard

    Try setting aside 30 minutes or so to just generating maps and see if you like what you get. I think you'll be surprised at the variety of maps and thus the different strategies you'll have to use.
     
  20. jpinard

    jpinard Martian

    Joined:
    Jan 18, 2002
    Messages:
    760
    Location:
    Enceladus, Saturn
    Hehe, I spent 3 hours doing that last night :) That's why I came here for help. Almost all my maps look like giant landmasses with a slice of fat river going through them. Even when I'd up the ocean content to 70% it still wasn't adjusting the amount of water. And some adjustments caused the whole and to be just trees. So I've got one or two things I set wrong and its messing up all the other varriables.
     

Share This Page