[Map Script] SmartMap

PublicMaps under installation directory, e.g. c:\Games\Civilization IV\Beyond the Sword\PublicMaps

\Skodkim
 
For lovers of SmartMap, surt had this to say to me (via email):
surt said:
I've had a baby with some medical problems, I won't have any time for civ 4 I'm afraid. Anyone who wants to do anything with SmartMap has my permission to do so.

Good luck,
--surt
 
I've tried this, not sure if i missed something or messed up on something!! need help

you can fix that this way :

replace "import _winreg" with :
Code:
if (sys.platform == 'darwin'):
	import sets
	def set(arg):
		return sets.Set(arg)
else:
        import _winreg

and the function "def civFilePath():" with :

Code:
def civFilePath():
        if (sys.platform == 'darwin'):
                try:
                        userFolder = os.path.join(os.environ['HOME'], "Documents")
                        civFolder = "Civilization IV"
                        if (os.path.basename(os.getcwd()) == "Warlords"):
                                civFolder = "Civilization IV Warlords"
                        finalFolder = os.path.join(userFolder, civFolder)
                        return finalFolder
                except:
                        return ""
        else:
                try:
                        userFolder = regRead(_winreg.HKEY_CURRENT_USER,"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders","Personal")
                        civFolder = os.path.basename(regRead(_winreg.HKEY_LOCAL_MACHINE,"Software\\Firaxis Games\\Sid Meier's Civilization 4","INSTALLDIR"))
                        finalFolder =  os.path.join(os.path.join(userFolder, "My Games"), civFolder)
                        return finalFolder
                except:
                        return ""

this function has been made by AlanH . Note that i don't know the name of the document folder for BtS . you should perhaps add two lines :
Code:
                        if (os.path.basename(os.getcwd()) == "Beyond the Sword"):
                                civFolder = [COLOR="Red"]"the document name of BtS for MAC"[/COLOR]



the error comes from sorted and operator.itemgetter that are not defined with MacOS ( MAC use python 2.3 and windows python 2.4 ) .

you can try to replace :
Code:
	bonusIdsAndOrder = sorted(bonusIdsAndOrder, key=operator.itemgetter(1))

with :
Code:
	bonusIdsAndOrderTP = [ [item[1],item[0]] for item in bonusIdsAndOrder ]
	bonusIdsAndOrderTP.sort()
	bonusIdsAndOrder = [ (item[1],item[0]) for item in bonusIdsAndOrderTP ]

and :
Code:
	listsScoresPlayers = sorted(listsScoresPlayers, key=operator.itemgetter(1))	
	listsScoresPlayers.reverse()

with :
Code:
	listsScoresPlayersTP = [ [item[1],item[0],item[2]] for item in listsScoresPlayers ]
	listsScoresPlayersTP.sort()
	listsScoresPlayersTP.reverse()
	listsScoresPlayers = [ (item[1],item[0],item[2]) for item in listsScoresPlayersTP ]

There is probably a best method but this should work . In case you have a problem you can ask in this thread for map script MAC compatibility .

Tcho !
 
Post the contents of Logs/PythonErr.log (might need to enable logging using instructions in Troubleshooting link in my sig) so we can try to help. And please be more specific about what's happening.
 
Sorry, Im not too computer savy, & a novice @ codes & modding & stuff like that (it's like foreign language to me). Anyway to be a bit more specific I have a MAC and playing BTS 3.19. I opened the smartmap.py file and I followed each instruction that STO posted on the forum. I load the game, pulled up smartmap, but it does not show all the options that are available to customize the map, it only shows the general options (size, era, speed, etc.) and nothing more. Im just trying to make smartmap mac compatible (if possible). by the way, I dont have a (Logs/PythonErr.log) but i do have a (Logs/PytonERR2.log), but i did go to my CivilizationIV.ini file in TextEdit and changed LoggingEnabled to 1, I dont know if this makes a difference or if it was necessary!!

Post the contents of Logs/PythonErr.log (might need to enable logging using instructions in Troubleshooting link in my sig) so we can try to help. And please be more specific about what's happening.
 
Hmm, it sounds like it's not causing Python errors so much as just not working. I don't have a Mac so I cannot play with it to see if I can fix it. :( Try posting in the Mac forum.
 
I have just downloaded the BUG Mod 4.3 on my mac, and it has smartmap on there, and it works just perfect now. You guys that compiled and created all this, u guys ROCK!!!, next on the list is trying to get all 34 civs to play @ once. =)
 
Oh yeah, I forgot I had made the changes here to it in BUG. Glad you got it working. As for 34 civs, that requires a different DLL which the Mac doesn't support.
 
I've tried a lot of map scripts searching for something, but they all had some things missing. I didn't like fractal as it offered too many pangaea, I didn't like hemispheres as it was too predictable, I didn't like Planet_Generator_068 as it had too many forests and too much resourceless land (I figured something out for forests, but not enough for what I wanted, and figured nothing for resources). But at least this last script had what I wanted: Less predictable land. :D

Then I stumbled upon SmartMap and I found it to be great :D
I play it with 3-8 continents random, large, least round, some fragments, and it's almost perfect. But there's still one problem. I mean, if it happens to me, it's irrelevant, as I'll just reload, but it happened to my only continental neighbour in a game, and it didn't feel right: Joao started in the middle of the tundra, with some forested tundras, one or two forested non-tundra hills, one iron resource and nothing more. There was no food in his starting BFC as far as I could tell (I don't know if the AI settles out of place, if it does, then it was just a case of the AI making a huge mistake), so my neighbour had the most terrible start ever, whereas I started near silver, two food resources (one of them in the jungle, so needed IW, but still had another food resource beside that one) and with ellies.

Is this a common problem? Is there any solution to this? Or was there soemthing else here?

Anyway, I think I'll go past this, as it happened in only one game as opposed to all the non-games I made just to see how the maps look, and in which no one had a tundra start, but if there is a solution, it would be lovely.

The map script is mostly great, though, it's definitely the closest to what I wanted. :D
 
Did Joao have a river through his BFC? If so much of that tundra may have been Flood Plains with +3:food: on each. I like this script for its excessive FP land but tend to need to kick down the difficulty level one notch to make up for the monster growth of the AIs.
 
Hm... didn't see that. I don't play with the Tile Output on, because I'm used to the standard values. :)

I've just generated two more maps and you're right, extra floodplains are added, I didn't know that, and Joao might have had some floodplains in his capital.

I've still seen two AI in these two maps without any food resource and without any FP tiles, but all in all, those FP make things a bit more balanced.

Is there any way to turn the FP behaviour off? And if I do that, will the food resources be more balanced to account for less FP?
 
You can set where FPs can occur, but it's broken somewhat. The "near fresh water only" setting still allows FPs on non-fresh-water coasts. IIRC the "normal" or "only on rivers" or whatever it's called does work, but it's been a long time since I tried that.

I have no idea if the food resource addition code is different in this script.
 
I've just released an updated version of this map-script. It's one of the scripts included in my MapScriptTools and as such dependent on them.

SmartMap_920_mst.py - Version History
Version 9.20 - edited by Temudjin - 15.July.2010
- NOW DEPENDS ON MapScriptTools.py


Adjusted for MapScriptTools
Full BtS compatibility
- Use both .Civ4WorldBuilderSave and .CivBeyondSwordWBSave files
- Use MapScriptTools to get Civ4 path
Planetfall / FFH2 compatibility
Mars Now! compatibility
Create Marshes, if mod allows it
Create Deep Ocean, if mod allows it
Create Special Regions (Bogs, Dents, Elemental Quarter, Lost Isle)
Place Kelp, Haunted Lands and Crystal Plains if mod allows for them
Check for Temudjin's Cool Starting Plots
Add option for team placement
Add option for balancing strategic starting-plot ressources
Adjusted some options
Adjust option handling - remove some options for 'Planetfall' / 'Mars Now!'
Add reasonable defaults for options not found in config-file
Adjust latitude calculation --> Unofficial Patch for BtS 3,19
Enable civ4-default peak-removal near starting-plots
Added some boni into resource handling lists
Prefixed and adjusted most PythonDbg.log output
Print stats of mod and map
Changed general map sizes slightly and can use additional worldsizes by the mod
Changed way to calculate map sizes from user override options

NOTE on overriding map sizes:
- general map sizes have priority.
- if either width or height are overridden, the other dimension will change in a way that the grid area doesn't significally changes.
- if both width and height are overridden, the proportions of the new width/height are preserved, but the size will adjusted so that the area will not change beyond 0.75 - 1.33.
- if both width and height are overridden and the biggest map size is choosen, the new values are used. (You could make really big maps that way.)

NOTE on map option menu items:
- 'Planetfall' and 'Mars Now!' have fewer map options, because some of them make no sense on those alien planets.
_____
Thank you surt for this great map-script. There are several concepts here that were (and are) not found in any other.
 
Hi, I've been trying to generate maps with no lakes at all, only rivers. So far this has almost been possible to accomplish with smartmap, but some tiles still are small lakes. Looking through the code I found a passage that is supposed to remove such size-1-lakes, but obviously those lakes left are created after the cleanup code.

Farther up the code I found a passage which defines how much of the map is ocean and the lowest percentage is 1%. Setting this to 0 produced a lakeless map but resulted in a game crash after turn one (Edit: ok, this seems to be ROM-related).
Any ideas?
Many thanks!

Edit: after some more trial and error I found out what placed the water tiles and I managed to reduce the amount to a single water tile per map. That does it for me.
 
This has been my favorite mapscript for civ 4 since it was created.

now if only someone would make SmartMap for Civ V
 
Does anyone know good options to make a desert map. (More desert than with "Oasis")
 
Thanks this is exactly what I wanted out of my maps, 3 large maps with 5 civs on each one and a bunch of random islands. Too bad OP hasn't been on this site in years, nigga dead :shifty:
 

Attachments

  • Untitled.png
    Untitled.png
    1.6 MB · Views: 464
Top Bottom