View Full Version : Customizing bonuses, need help with python code
joakimkasper Jan 05, 2008, 05:59 AM Hi guys
I just started modding in Civ IV BtS, and I am the noob of noobs...
I like the hemispheres map script, but I would like to have silver placed on plains and grassland (hills only) instead of just on tundra.
So I find this piece of code:
# Sirian's "Sahara Regional Bonus Placement" system.
It is used to customize resource placement in other map scripts and I tried to adapt it to customize the placement of silver in my new map script based on hemispheres code + customized bonus code (below). I add the extra code at the end of the standard hemispheres code.
It just doesn't work. I only get grassland, hills and forests are only around starting positions. AND: No silver at all :cry:
What am I doing wrong?
Am deeply thankful for any help!!!
# Sirian's "Sahara Regional Bonus Placement" system.
# Init all bonuses. This is your master key.
resourcesToEliminate = ('BONUS_INCENSE')
silver = ('BONUS_SILVER')
def addBonusType(argsList):
print('*******')
[iBonusType] = argsList
gc = CyGlobalContext()
map = CyMap()
dice = gc.getGame().getMapRand()
type_string = gc.getBonusInfo(iBonusType).getType()
if (type_string in resourcesToEliminate):
print('-NONE-', type_string, '-NONE-')
return None # These bonus types will not appear, at all.
elif not (type_string in silver):
print('Default', type_string, 'Default')
CyPythonMgr().allowDefaultImpl() # Let C handle this bonus in the default way.
else: # Current bonus type is custom-handled. Assignments to follow.
iW = map.getGridWidth()
iH = map.getGridHeight()
# Generate resources
if (type_string in silver):
print('---', type_string, '---')
global food
isilverBottom = food.getHeightFromPercent(10)
isilverTop = food.getHeightFromPercent(15)
for y in range(iH):
for x in range(iW):
# Fractalized placement
pPlot = map.plot(x,y)
if pPlot.isWater() or pPlot.isPeak(): continue
if pPlot.getTerrainType() == gc.getInfoTypeForString("TERRAIN_TUNDRA"): continue
if pPlot.getTerrainType() == gc.getInfoTypeForString("TERRAIN_SNOW"): continue
if pPlot.getTerrainType() == gc.getInfoTypeForString("TERRAIN_DESERT"): continue
if pPlot.getBonusType(-1) == -1:
foodVal = food.getHeight(x,y)
if (type_string in silver):
if pPlot.isHills():
if (foodVal >= iSilverBottom and foodVal <= iSilverTop):
map.plot(x,y).setBonusType(iBonusType)
return None
Sto Jan 05, 2008, 06:23 AM You have to add that to hemisphere :
def beforeGeneration():
global xShiftRoll
global yShiftRoll
global ySplitRoll
global yPortionRoll
gc = CyGlobalContext()
dice = gc.getGame().getMapRand()
# Binary shift roll (for horizontal shifting if Island Region Separate).
xShiftRoll = dice.get(2, "Region Shift, Horizontal - Left and Right PYTHON")
yShiftRoll = dice.get(2, "Region Shift, Vertical - Left and Right PYTHON")
ySplitRoll = dice.get(2, "Region Split, Vertical - Left and Right PYTHON")
yPortionRoll = dice.get(2, "Region Portioning, Vertical - Left and Right PYTHON")
print xShiftRoll
# add this code
map = CyMap()
iW = map.getGridWidth()
iH = map.getGridHeight()
global food
food = CyFractal()
food.fracInit(iW, iH, 7, dice, 0, -1, -1)
Tcho !
Seven05 Jan 05, 2008, 09:07 AM You can always just edit Civ4BonusInfos.xml and add those terrains as valid terrians for Silver. :)
joakimkasper Jan 05, 2008, 09:46 AM Hey Sto, thanks for your help...
Now the map is nice, but the silver bonuses still refuse to show up on other terrain than tundra and snow...
The script code is not that long, this is the way my hemispheres script code is written... (file also attached) Where could the problem be?
If you help me, I promise you that I from now on will play solely with Napoleon (as you are from France and therefore fan of Napoleon :king:) and then spread the French culture and lead the French civilization to greatness :D
# FILE: Hemispheres.py
# AUTHOR: Ben Sarsgard
# PURPOSE: Global map script - Hemisphere or quadrant split with oceanic divide
# Mostly adapted from Sirian's Big_and_Small
# VERSION: 1.20
#-----------------------------------------------------------------------------
# Copyright (c) 2007 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():
#TODO: get my own text string
return "TXT_KEY_MAP_SCRIPT_LEFT_AND_RIGHT_DESCR"
def isAdvancedMap():
"This map should not show up in simple mode"
return 0
def getNumCustomMapOptions():
return 3
def getCustomMapOptionName(argsList):
[iOption] = argsList
option_names = {
0: "TXT_KEY_MAP_SCRIPT_CONTINENTS_SIZE",
1: "TXT_KEY_MAP_SCRIPT_ISLANDS_SIZE",
2: "TXT_KEY_MAP_SCRIPT_NUMBER_OF_CONTINENTS"
}
translated_text = unicode(CyTranslator().getText(option_names[iOption], ()))
return translated_text
def getNumCustomMapOptionValues(argsList):
[iOption] = argsList
option_values = {
0: 4,
1: 2,
2: 5
}
return option_values[iOption]
def getCustomMapOptionDescAt(argsList):
[iOption, iSelection] = argsList
selection_names = {
0: {
0: "TXT_KEY_MAP_SCRIPT_MASSIVE_CONTINENTS",
1: "TXT_KEY_MAP_SCRIPT_NORMAL_CONTINENTS",
2: "TXT_KEY_MAP_SCRIPT_SNAKY_CONTINENTS",
3: "TXT_KEY_MAP_SCRIPT_VARIED"
},
1: {
0: "TXT_KEY_MAP_SCRIPT_ISLANDS",
1: "TXT_KEY_MAP_SCRIPT_TINY_ISLANDS"
},
2: {
0: "2",
1: "3",
2: "4",
3: "5",
4: "6"
}
}
if (iOption < 3):
translated_text = unicode(CyTranslator().getText(selection_names[iOption][iSelection], ()))
else:
translated_text = selection_names[iOption][iSelection]
return translated_text
def getCustomMapOptionDefault(argsList):
[iOption] = argsList
option_defaults = {
0: 1,
1: 1,
2: 0
}
return option_defaults[iOption]
def minStartingDistanceModifier():
return -12
def beforeGeneration():
global xShiftRoll
global yShiftRoll
global ySplitRoll
global yPortionRoll
gc = CyGlobalContext()
dice = gc.getGame().getMapRand()
# Binary shift roll (for horizontal shifting if Island Region Separate).
xShiftRoll = dice.get(2, "Region Shift, Horizontal - Left and Right PYTHON")
yShiftRoll = dice.get(2, "Region Shift, Vertical - Left and Right PYTHON")
ySplitRoll = dice.get(2, "Region Split, Vertical - Left and Right PYTHON")
yPortionRoll = dice.get(2, "Region Portioning, Vertical - Left and Right PYTHON")
print xShiftRoll
# Add this code
map = CyMap()
iW = map.get.GridWidth()
iH = map.get.GridHeight()
global food
food = CyFractal()
food.frac.Init(iW, iH, 7, dice, 0, -1, -1)
class BnSMultilayeredFractal(CvMapGeneratorUtil.Multilay eredFractal):
def generateIslandRegion(self, minTinies, extraTinies, iWestX, iSouthY, iWidth, iHeight, iGrain):
# Add a few random patches of Tiny Islands first.
#TODO: Base numTinies on global prevalance option
numTinies = minTinies + self.dice.get(extraTinies, "Tiny Islands - Custom Continents PYTHON")
print("Patches of Tiny Islands: ", numTinies)
if numTinies:
for tiny_loop in range(numTinies):
tinyWidth = int(self.iW * 0.15)
tinyHeight = int(self.iH * 0.15)
tinyWestX = iWestX + self.dice.get(iWidth - tinyWidth, "Tiny Longitude - Custom Continents PYTHON")
tinySouthY = iSouthY + self.dice.get(iHeight - tinyHeight, "Tiny Latitude - Custom Continents PYTHON")
self.generatePlotsInRegion(80,
tinyWidth, tinyHeight,
tinyWestX, tinySouthY,
iGrain, 3,
0, self.iTerrainFlags,
6, 5,
True, 3,
-1, False,
False
)
return 0
def generateContinentRegion(self, iWater, iWidth, iHeight, iWestX, iSouthY, iGrain, xExp):
self.generatePlotsInRegion(iWater,
iWidth, iHeight,
iWestX, iSouthY,
iGrain, 4,
self.iRoundFlags, self.iTerrainFlags,
xExp, 6,
True, 15,
-1, False,
False
)
return 0
def generatePlotsByRegion(self):
# Sirian's MultilayeredFractal class, controlling function.
# You -MUST- customize this function for each use of the class.
global xShiftRoll
global yShiftRoll
global ySplitRoll
global yPortionRoll
print("getSeaLevelChange", self.gc.getSeaLevelInfo(self.map.getSeaLevel()).ge tSeaLevelChange())
if (self.map.getCustomMapOption(0) == 3):
# Generate varied
iContinentsGrain = 1
iSecondaryContinentsGrain = 3
iTertiaryContinentsGrain = 2
iPrimaryWater = 74
iSecondaryWater = 79
iTertiaryWater = 76
else:
iContinentsGrain = 1 + self.map.getCustomMapOption(0)
iSecondaryContinentsGrain = 1 + self.map.getCustomMapOption(0)
iTertiaryContinentsGrain = 1 + self.map.getCustomMapOption(0)
iPrimaryWater = 74
iSecondaryWater = 74
iTertiaryWater = 74
iPrimaryWater += self.gc.getSeaLevelInfo(self.map.getSeaLevel()).ge tSeaLevelChange()
iSecondaryWater += self.gc.getSeaLevelInfo(self.map.getSeaLevel()).ge tSeaLevelChange()
iTertiaryWater += self.gc.getSeaLevelInfo(self.map.getSeaLevel()).ge tSeaLevelChange()
splitYBigger = 0.5
splitYSmaller = 0.5
splitYBuffer = 0.1
iIslandsGrain = 3 + self.map.getCustomMapOption(1)
tinyIslandOverlap = 0
regions = 2 + self.map.getCustomMapOption(2)
if (regions == 2):
vSplitPrimary = 0
vSplitSecondary = 0
vSplitTertiary = 0
tripleSplit = 0
elif (regions == 3):
vSplitPrimary = 0
vSplitSecondary = 0
vSplitTertiary = 0
tripleSplit = 1
elif (regions == 4):
vSplitPrimary = 1
vSplitSecondary = 1
vSplitTertiary = 0
tripleSplit = 0
elif (regions == 5):
vSplitPrimary = 0
vSplitSecondary = 1
vSplitTertiary = 1
tripleSplit = 1
elif (regions == 6):
vSplitPrimary = 1
vSplitSecondary = 1
vSplitTertiary = 1
tripleSplit = 1
else:
#unexpected
vSplitPrimary = 0
vSplitSecondary = 0
vSplitTertiary = 0
tripleSplit = 0
# Water variables need to differ if Overlap is set. Defining default here.
#TODO: Set this from the global option
#iWater = 74
# Base values for full map
iSouthY = 0
iNorthY = self.iH - 1
iHeight = iNorthY - iSouthY + 1
iWestX = 0
iEastX = self.iW - 1
iWidth = iEastX - iWestX + 1
print("Cont South: ", iSouthY, "Cont North: ", iNorthY, "Cont Height: ", iHeight)
if tinyIslandOverlap:
self.generateIslandRegion(4, 6, iWestX, iSouthY, iWidth, iHeight, iIslandsGrain)
# Add the Continents.
# Horizontal dimensions may be affected by overlap and/or shift.
# The regions are separate, with continents only in one part, islands only in the other.
# Set X exponent to square setting:
xExp = 6
# Handle horizontal shift for the Continents layer.
# (This will choose one side or the other for this region then fit it properly in its space).
if tripleSplit:
if xShiftRoll:
westShift = int(0.33 * self.iW)
eastShift = int(0.33 * self.iW)
else:
westShift = 0
eastShift = int(0.66 * self.iW)
else:
if xShiftRoll:
westShift = int(0.5 * self.iW)
eastShift = 0
else:
westShift = 0
eastShift = int(0.5 * self.iW)
iWestX = westShift
iEastX = self.iW - eastShift
iWidth = iEastX - iWestX
if vSplitPrimary:
# Do first in split
if yPortionRoll:
if yShiftRoll:
northShift = int(splitYBuffer * self.iH)
southShift = int(splitYBigger * self.iH)
else:
northShift = int(splitYSmaller * self.iH)
southShift = int(splitYBuffer * self.iH)
else:
if yShiftRoll:
northShift = int(splitYBuffer * self.iH)
southShift = int(splitYSmaller * self.iH)
else:
northShift = int(splitYBigger * self.iH)
southShift = int(splitYBuffer * self.iH)
iSouthY = southShift
iNorthY = self.iH - northShift
iHeight = iNorthY - iSouthY
print("Island West: ", iWestX, "Island East: ", iEastX, "Isl Width: ", iWidth)
self.generateContinentRegion(iPrimaryWater, iWidth, iHeight, iWestX, iSouthY, iContinentsGrain, xExp)
if (tinyIslandOverlap == 0):
self.generateIslandRegion(1, 2, iWestX, iSouthY, iWidth, iHeight, iIslandsGrain)
# Second in split
if yPortionRoll:
if yShiftRoll:
northShift = int(splitYSmaller * self.iH)
southShift = int(splitYBuffer * self.iH)
else:
northShift = int(splitYBuffer * self.iH)
southShift = int(splitYBigger * self.iH)
else:
if yShiftRoll:
northShift = int(splitYBigger * self.iH)
southShift = int(splitYBuffer * self.iH)
else:
northShift = int(splitYBuffer * self.iH)
southShift = int(splitYSmaller * self.iH)
iSouthY = southShift
iNorthY = self.iH - northShift
iHeight = iNorthY - iSouthY
print("Island West: ", iWestX, "Island East: ", iEastX, "Isl Width: ", iWidth)
self.generateContinentRegion(iPrimaryWater, iWidth, iHeight, iWestX, iSouthY, iContinentsGrain, xExp)
if (tinyIslandOverlap == 0):
self.generateIslandRegion(1, 2, iWestX, iSouthY, iWidth, iHeight, iIslandsGrain)
else:
# Only one primary region
iSouthY = 0
iNorthY = self.iH - 1
iHeight = iNorthY - iSouthY + 1
print("Cont West: ", iWestX, "Cont East: ", iEastX, "Cont Width: ", iWidth)
self.generateContinentRegion(iPrimaryWater, iWidth, iHeight, iWestX, iSouthY, iContinentsGrain, xExp)
if (tinyIslandOverlap == 0):
self.generateIslandRegion(2, 3, iWestX, iSouthY, iWidth, iHeight, iIslandsGrain)
# Add the Secondary continents.
# Horizontal dimensions may be affected by overlap and/or shift.
# The regions are separate, with continents only in one part, islands only in the other.
# Set X exponent to square setting:
xExp = 6
# Handle horizontal shift for the Continents layer.
# (This will choose one side or the other for this region then fit it properly in its space).
if tripleSplit:
if xShiftRoll:
westShift = 0
eastShift = int(0.66 * self.iW)
else:
westShift = int(0.33 * self.iW)
eastShift = int(0.33 * self.iW)
else:
if xShiftRoll:
westShift = 0
eastShift = int(0.5 * self.iW)
else:
westShift = int(0.5 * self.iW)
eastShift = 0
iWestX = westShift
iEastX = self.iW - eastShift
iWidth = iEastX - iWestX
if vSplitSecondary:
# Do first in split
if yPortionRoll:
if yShiftRoll:
northShift = int(splitYBuffer * self.iH)
southShift = int(splitYBigger * self.iH)
else:
northShift = int(splitYSmaller * self.iH)
southShift = int(splitYBuffer * self.iH)
else:
if yShiftRoll:
northShift = int(splitYBuffer * self.iH)
southShift = int(splitYSmaller * self.iH)
else:
northShift = int(splitYBigger * self.iH)
southShift = int(splitYBuffer * self.iH)
iSouthY = southShift
iNorthY = self.iH - northShift
iHeight = iNorthY - iSouthY
print("Island West: ", iWestX, "Island East: ", iEastX, "Isl Width: ", iWidth)
self.generateContinentRegion(iSecondaryWater, iWidth, iHeight, iWestX, iSouthY, iSecondaryContinentsGrain, xExp)
if (tinyIslandOverlap == 0):
self.generateIslandRegion(2, 3, iWestX, iSouthY, iWidth, iHeight, iIslandsGrain)
# Second in split
if yPortionRoll:
if yShiftRoll:
northShift = int(splitYSmaller * self.iH)
southShift = int(splitYBuffer * self.iH)
else:
northShift = int(splitYBuffer * self.iH)
southShift = int(splitYBigger * self.iH)
else:
if yShiftRoll:
northShift = int(splitYBigger * self.iH)
southShift = int(splitYBuffer * self.iH)
else:
northShift = int(splitYBuffer * self.iH)
southShift = int(splitYSmaller * self.iH)
iSouthY = southShift
iNorthY = self.iH - northShift
iHeight = iNorthY - iSouthY
print("Island West: ", iWestX, "Island East: ", iEastX, "Isl Width: ", iWidth)
self.generateContinentRegion(iSecondaryWater, iWidth, iHeight, iWestX, iSouthY, iSecondaryContinentsGrain, xExp)
if (tinyIslandOverlap == 0):
self.generateIslandRegion(2, 3, iWestX, iSouthY, iWidth, iHeight, iIslandsGrain)
else:
# Only one secondary region
iSouthY = 0
iNorthY = self.iH - 1
iHeight = iNorthY - iSouthY + 1
print("Island West: ", iWestX, "Island East: ", iEastX, "Isl Width: ", iWidth)
self.generateContinentRegion(iSecondaryWater, iWidth, iHeight, iWestX, iSouthY, iSecondaryContinentsGrain, xExp)
if (tinyIslandOverlap == 0):
self.generateIslandRegion(3, 4, iWestX, iSouthY, iWidth, iHeight, iIslandsGrain)
if tripleSplit:
# Add the Tertiary continents.
# Horizontal dimensions may be affected by overlap and/or shift.
# The regions are separate, with continents only in one part, islands only in the other.
# Set X exponent to square setting:
xExp = 6
# Handle horizontal shift for the Continents layer.
# (This will choose one side or the other for this region then fit it properly in its space).
westShift = int(0.66 * self.iW)
eastShift = 0
iWestX = westShift
iEastX = self.iW - eastShift
iWidth = iEastX - iWestX
if vSplitTertiary:
# Do first in split
if yPortionRoll:
if yShiftRoll:
northShift = int(splitYBuffer * self.iH)
southShift = int(splitYBigger * self.iH)
else:
northShift = int(splitYSmaller * self.iH)
southShift = int(splitYBuffer * self.iH)
else:
if yShiftRoll:
northShift = int(splitYBuffer * self.iH)
southShift = int(splitYSmaller * self.iH)
else:
northShift = int(splitYBigger * self.iH)
southShift = int(splitYBuffer * self.iH)
iSouthY = southShift
iNorthY = self.iH - northShift
iHeight = iNorthY - iSouthY
print("Island West: ", iWestX, "Island East: ", iEastX, "Isl Width: ", iWidth)
self.generateContinentRegion(iTertiaryWater, iWidth, iHeight, iWestX, iSouthY, iTertiaryContinentsGrain, xExp)
if (tinyIslandOverlap == 0):
self.generateIslandRegion(2, 3, iWestX, iSouthY, iWidth, iHeight, iIslandsGrain)
# Second in split
if yPortionRoll:
if yShiftRoll:
northShift = int(splitYSmaller * self.iH)
southShift = int(splitYBuffer * self.iH)
else:
northShift = int(splitYBuffer * self.iH)
southShift = int(splitYBigger * self.iH)
else:
if yShiftRoll:
northShift = int(splitYBigger * self.iH)
southShift = int(splitYBuffer * self.iH)
else:
northShift = int(splitYBuffer * self.iH)
southShift = int(splitYSmaller * self.iH)
iSouthY = southShift
iNorthY = self.iH - northShift
iHeight = iNorthY - iSouthY
print("Island West: ", iWestX, "Island East: ", iEastX, "Isl Width: ", iWidth)
self.generateContinentRegion(iTertiaryWater, iWidth, iHeight, iWestX, iSouthY, iTertiaryContinentsGrain, xExp)
if (tinyIslandOverlap == 0):
self.generateIslandRegion(2, 3, iWestX, iSouthY, iWidth, iHeight, iIslandsGrain)
else:
# Only one tertiary region
iSouthY = 0
iNorthY = self.iH - 1
iHeight = iNorthY - iSouthY + 1
print("Island West: ", iWestX, "Island East: ", iEastX, "Isl Width: ", iWidth)
self.generateContinentRegion(iTertiaryWater, iWidth, iHeight, iWestX, iSouthY, iTertiaryContinentsGrain, xExp)
if (tinyIslandOverlap == 0):
self.generateIslandRegion(3, 4, iWestX, iSouthY, iWidth, iHeight, iIslandsGrain)
# All regions have been processed. Plot Type generation completed.
print "Done"
return self.wholeworldPlotTypes
'''
Regional Variables Key:
iWaterPercent,
iRegionWidth, iRegionHeight,
iRegionWestX, iRegionSouthY,
iRegionGrain, iRegionHillsGrain,
iRegionPlotFlags, iRegionTerrainFlags,
iRegionFracXExp, iRegionFracYExp,
bShift, iStrip,
rift_grain, has_center_rift,
invert_heights
'''
def generatePlotTypes():
NiTextOut("Setting Plot Types (Python Custom Continents) ...")
fractal_world = BnSMultilayeredFractal()
plotTypes = fractal_world.generatePlotsByRegion()
return plotTypes
def generateTerrainTypes():
NiTextOut("Generating Terrain (Python Custom Continents) ...")
terraingen = TerrainGenerator()
terrainTypes = terraingen.generateTerrain()
return terrainTypes
def addFeatures():
NiTextOut("Adding Features (Python Custom Continents) ...")
featuregen = FeatureGenerator()
featuregen.addFeatures()
return 0
# Sirian's "Sahara Regional Bonus Placement" system.
# Init all bonuses. This is your master key.
resourcesToEliminate = ('BONUS_INCENSE')
silver = ('BONUS_SILVER')
def addBonusType(argsList):
print('*******')
[iBonusType] = argsList
gc = CyGlobalContext()
map = CyMap()
dice = gc.getGame().getMapRand()
type_string = gc.getBonusInfo(iBonusType).getType()
if (type_string in resourcesToEliminate):
print('-NONE-', type_string, '-NONE-')
return None # These bonus types will not appear, at all.
elif not (type_string in silver):
print('Default', type_string, 'Default')
CyPythonMgr().allowDefaultImpl() # Let C handle this bonus in the default way.
else: # Current bonus type is custom-handled. Assignments to follow.
iW = map.getGridWidth()
iH = map.getGridHeight()
# Generate resources
if (type_string in silver):
print('---', type_string, '---')
global food
isilverBottom = food.getHeightFromPercent(10)
isilverTop = food.getHeightFromPercent(15)
for y in range(iH):
for x in range(iW):
# Fractalized placement
pPlot = map.plot(x,y)
if pPlot.isWater() or pPlot.isPeak(): continue
if pPlot.getTerrainType() == gc.getInfoTypeForString("TERRAIN_TUNDRA"): continue
if pPlot.getTerrainType() == gc.getInfoTypeForString("TERRAIN_SNOW"): continue
if pPlot.getTerrainType() == gc.getInfoTypeForString("TERRAIN_DESERT"): continue
if pPlot.getBonusType(-1) == -1:
foodVal = food.getHeight(x,y)
if (type_string in silver):
if pPlot.isHills():
if (foodVal >= iSilverBottom and foodVal <= iSilverTop):
map.plot(x,y).setBonusType(iBonusType)
return None
Sto Jan 05, 2008, 10:06 AM You can always just edit Civ4BonusInfos.xml and add those terrains as valid terrians for Silver. :)
Sure , but with python you have the choice to control frequency and do multiple scripts as you wish when you want to play instead of making a MOD ( the great advantage of the map script ) :)
Hey Sto, thanks for your help...
Now the map is nice, but the silver bonuses still refuse to show up on other terrain than tundra and snow...
There is two problems , you have added some "." in the code .. just copy paste it or copy it exactly .
you have probably change also :
iSilverBottom = food.getHeightFromPercent(10)
iSilverTop = food.getHeightFromPercent(15)
to :
isilverBottom = food.getHeightFromPercent(10)
isilverTop = food.getHeightFromPercent(15)
you have to restore that , python take in count uppercase in variable so isilver is different than iSilver .
The script work after that .
If you help me, I promise you that I from now on will play solely with Napoleon (as you are from France and therefore fan of Napoleon :king:) and then spread the French culture and lead the French civilization to greatness :D
About Napoleon , he was probably the best France leader of history in a term of domestic policy but was also one of the bloodier in a term of foreign policy (not big fan ) .
Tcho !
joakimkasper Jan 05, 2008, 03:48 PM Hey Sto
Works beautifully now!
Thanks very much, I really appreciate your help :goodjob: :worship:
Kind regards
Kasper
|
|