#
# FILE: Continents.py
# AUTHOR: Soren Johnson
# PURPOSE: Global map script - Civ4's default map script
#-----------------------------------------------------------------------------
# Copyright (c) 2004, 2005 Firaxis Games, Inc. All rights reserved.
#-----------------------------------------------------------------------------
#
from CvPythonExtensions import *
import CvUtil
import CvMapGeneratorUtil
from CvMapGeneratorUtil import FractalWorld
from CvMapGeneratorUtil import TerrainGenerator
from CvMapGeneratorUtil import FeatureGenerator
def getDescription():
return "TXT_KEY_MAP_SCRIPT_FRACTAL_DESCR"
def isAdvancedMap():
"This map should show up in simple mode"
return 0
def generatePlotTypes():
NiTextOut("Setting Plot Types (Python Fractal) ...")
fractal_world = FractalWorld()
fractal_world.initFractal(rift_grain = -1, has_center_rift = False, polar = True)
return fractal_world.generatePlotTypes()
def generateTerrainTypes():
NiTextOut("Generating Terrain (Python Fractal) ...")
terraingen = TerrainGenerator()
terrainTypes = terraingen.generateTerrain()
return terrainTypes
def addFeatures():
NiTextOut("Adding Features (Python Fractal) ...")
featuregen = FeatureGenerator()
featuregen.addFeatures()
return 0
def afterGeneration():
map = CyMap()
mapHeight = map.getGridHeight()
width = map.getGridWidth()
height = map.getGridHeight()
for x in range(width):
for y in range(height):
plot = map.plot(x,y)
if (plot.getPlotType() == PlotTypes.PLOT_PEAK):
plot.setPlotType(PlotTypes.PLOT_HILLS)
first off all, i really appreciate your work and help! ok that way my fractal.py in the public map folder is looking now. it still doesnt work. i bet im doing something wrong