Vermicious Knid
King
- Joined
- Feb 7, 2007
- Messages
- 782
works for me![]()
Hmmm. I'll download the release version then. Perhaps I have a buggy install.
works for me![]()
Ugh. Thought I fixed that one... Anyone else getting it?
1. Dispel magic seems to count ambition as a 'bad' effect for my units.
2. Was able to not only found a religion through tech as supposedly intolerant Kahd, but it also passively spread through the empire.
(the above two were before release patch E, so I'm not sure if they still exist)
3. Spring can upgrade plains further to grasslands and then to marshes, making nature III pointless.
Me. I'm missing like 20 xml files (so the pop ups tell me, at least).
Well, I'm not sure if I had installed B, so then I did it, and reinstalled. That didn't work. And I've tried to reinstall at different mirrors. That didn't work. FF patch B, installed the full thing. So idk, I might try reinstalling FF tomorrow.
- That is odd... It shouldn't. I'll look at it.
- This is a base FF bug. Intolerant doesn't function the way it claims.
- I wouldn't say it's pointless, personally... Saves quite a bit of time. That said, it IS weaker now... What could we add to it? We can buff Vitalize, OR we can bring back 'Summon Guardian Vine' and have two Nature III spells.
That should not happen. Did you install FF first? Only thing I can think of that would cause entire files to be missing.
I wouldn't say it's pointless, personally... Saves quite a bit of time. That said, it IS weaker now... What could we add to it? We can buff Vitalize, OR we can bring back 'Summon Guardian Vine' and have two Nature III spells.
Since you have to cast it the same number of times as spring, it doesn't really save any time. And with spring and scorch you can just spam adepts.
I changed Vitalize to affecting a larger area and having a casting delay to reduce micromanagement.
You could have the code if you want, it also makes the spell affected by spell extension and allows specific upgrades by civilization. Illians make Ice, Lizards make marsh...
But even without a casting delay, vitalize would be underpowered if spring and scorch can do everything vitalize can do 200 turns earlier without tying up archmages.
Hmm... That's extremely odd. If it happens again, could you take screenshots of the messages?
Yes, post that code please.
import CvPythonExtensions
import PyHelpers
gc = CvPythonExtensions.CyGlobalContext()
def plotsInRange( centerX, centerY, maxRange, minRange=None ):
maxRangeSquared = (maxRange+.5)**2
if minRange is None:
minRangeSquared = -1
else:
minRangeSquared = (minRange+.5)**2
for offsetX in xrange( -maxRange, maxRange+1 ):
for offsetY in xrange( -maxRange, maxRange+1 ):
if minRangeSquared < offsetX**2 + offsetY**2 < maxRangeSquared:
yield ( centerX + offsetX, centerY + offsetY )
def getSpellRange( caster ):
spellRange = 0
for promotion in ( 'PROMOTION_EXTENSION1', 'PROMOTION_EXTENSION2' ):
if caster.isHasPromotion( gc.getInfoTypeForString( promotion ) ):
spellRange += 1
return spellRange
# Vitalize
baseVitalizeUpgrades = dict( ( gc.getInfoTypeForString( start_terrain ), gc.getInfoTypeForString( end_terrain ) )
for start_terrain, end_terrain in [
('TERRAIN_SNOW', 'TERRAIN_TUNDRA'),
('TERRAIN_TUNDRA', 'TERRAIN_PLAINS'),
('TERRAIN_DESERT', 'TERRAIN_PLAINS'),
('TERRAIN_PLAINS', 'TERRAIN_GRASS'),
('TERRAIN_MARSH', 'TERRAIN_GRASS'),
('TERRAIN_OCEAN', 'TERRAIN_COAST'),
] )
civSpecificVitalize = dict()
civSpecificVitalize[gc.getInfoTypeForString('CIVILIZATION_ILLIANS')] = dict( ( gc.getInfoTypeForString( start_terrain ), gc.getInfoTypeForString( end_terrain ) )
for start_terrain, end_terrain in [
('TERRAIN_TUNDRA', 'TERRAIN_SNOW'),
('TERRAIN_DESERT', 'TERRAIN_SNOW'),
('TERRAIN_PLAINS', 'TERRAIN_SNOW'),
('TERRAIN_GRASS', 'TERRAIN_SNOW'),
('TERRAIN_MARSH', 'TERRAIN_SNOW'),
('TERRAIN_BURNING_SANDS', 'TERRAIN_SNOW'),
('TERRAIN_BROKEN_LANDS', 'TERRAIN_SNOW'),
('TERRAIN_FIELDS_OF_PERDITION', 'TERRAIN_SNOW'),
('TERRAIN_OCEAN', 'TERRAIN_COAST'),
] )
civSpecificVitalize[gc.getInfoTypeForString('CIVILIZATION_MAZATL')] = dict( baseVitalizeUpgrades )
civSpecificVitalize[gc.getInfoTypeForString('CIVILIZATION_MAZATL')].update( dict( ( gc.getInfoTypeForString( start_terrain ), gc.getInfoTypeForString( end_terrain ) )
for start_terrain, end_terrain in [
('TERRAIN_GRASS', 'TERRAIN_MARSH'),
('TERRAIN_MARSH', 'TERRAIN_MARSH'),
] ) )
civSpecificVitalize[gc.getInfoTypeForString('CIVILIZATION_CUALLI')] = dict (civSpecificVitalize[gc.getInfoTypeForString('CIVILIZATION_MAZATL')])
civSpecificVitalize[gc.getInfoTypeForString('CIVILIZATION_MALAKIM')] = dict( baseVitalizeUpgrades )
civSpecificVitalize[gc.getInfoTypeForString('CIVILIZATION_MALAKIM')].update( dict( ( gc.getInfoTypeForString( start_terrain ), gc.getInfoTypeForString( end_terrain ) )
for start_terrain, end_terrain in [
('TERRAIN_DESERT', 'TERRAIN_DESERT'),
] ) )
def reqVitalize(caster):
pPlot = caster.plot()
if pPlot.getOwner() != caster.getOwner():
return False
if pPlot.isWater():
return False
pPlayer = gc.getPlayer( caster.getOwner() )
vitalizeUpgrades = civSpecificVitalize.get( pPlayer.getCivilizationType(), baseVitalizeUpgrades )
if not pPlot.getTerrainType() in vitalizeUpgrades:
return False
return True
def spellVitalize(caster):
map = CvPythonExtensions.CyMap()
grass = gc.getInfoTypeForString( 'TERRAIN_GRASS' )
plains = gc.getInfoTypeForString( 'TERRAIN_PLAINS' )
desert = gc.getInfoTypeForString( 'TERRAIN_DESERT' )
floodPlains = gc.getInfoTypeForString('FEATURE_FLOOD_PLAINS')
pPlayer = gc.getPlayer( caster.getOwner() )
vitalizeUpgrades = civSpecificVitalize.get( pPlayer.getCivilizationType(), baseVitalizeUpgrades )
for x,y in plotsInRange( caster.getX(), caster.getY(), getSpellRange( caster )+1 ):
pPlot = map.plot(x,y)
if not pPlot.isNone() and pPlot.getOwner() == caster.getOwner():
terrain = pPlot.getTerrainType()
if terrain in vitalizeUpgrades:
pPlot.setTerrainType( vitalizeUpgrades[terrain], True, True )
# From here on terrain refers to what pPlot was before the upgrade
if terrain == desert and pPlot.getFeatureType() == floodPlains and terrain != pPlot.getTerrainType():
pPlot.setFeatureType(-1, -1)
if pPlot.getTerrainType() == grass and pPlot.isHills() and pPlot.isCity():
pPlot.setTerrainType( plains, True, True )
def reqVitalizeCompanion(caster):
pPlot = caster.plot()
if pPlot.getOwner() != caster.getOwner():
return False
elif pPlot.isWater():
return False
elif not pPlot.getTerrainType() in ( gc.getInfoTypeForString( terrain ) for terrain in ['TERRAIN_GRASS', 'TERRAIN_PLAINS']):
return False
return True
def spellVitalizeCompanion(caster):
'''
Transforms concentric circles of grassland to plains.
'''
map = CvPythonExtensions.CyMap()
grass = gc.getInfoTypeForString( 'TERRAIN_GRASS' )
plains = gc.getInfoTypeForString( 'TERRAIN_PLAINS' )
player = caster.getOwner()
for transformRange in xrange( getSpellRange( caster )+1+1 ): # +1 for basic range, +1 to include endpoint
altered = False
if transformRange:
minRange = transformRange -1
else:
minRange = None
for x,y in plotsInRange( caster.getX(), caster.getY(), transformRange, None ):
pPlot = map.plot(x,y)
if not pPlot.isNone() and pPlot.getOwner() == player:
terrain = pPlot.getTerrainType()
if terrain == grass:
pPlot.setTerrainType( plains, True, True )
altered = True
if altered:
return
# Vitalize end
<SpellInfo> <!-- Vitalize -->
<Type>SPELL_VITALIZE</Type>
<Description>TXT_KEY_SPELL_VITALIZE</Description>
<Civilopedia>TXT_KEY_SPELL_VITALIZE_PEDIA</Civilopedia>
<Help>TXT_KEY_SPELL_VITALIZE_HELP</Help>
<PromotionPrereq1>PROMOTION_NATURE3</PromotionPrereq1>
<bAllowAI>1</bAllowAI>
<bDisplayWhenDisabled>1</bDisplayWhenDisabled>
<bHasCasted>1</bHasCasted>
<PyResult>odmod.spellVitalize(pCaster)</PyResult>
<PyRequirement>odmod.reqVitalize(pCaster)</PyRequirement>
<Effect>EFFECT_VITALIZE</Effect>
<Sound>AS3D_SPELL_SANCTIFY</Sound>
<Button>Art/Interface/Buttons/Spells/Vitalize.dds</Button>
</SpellInfo>
<SpellInfo> <!-- Vitalize Companion -->
<Type>SPELL_VITALIZE_COMPANION</Type>
<Description>TXT_KEY_SPELL_VITALIZE_COMPANION</Description>
<Civilopedia>TXT_KEY_SPELL_VITALIZE_COMPANION_PEDIA</Civilopedia>
<Help>TXT_KEY_SPELL_VITALIZE_COMPANION_HELP</Help>
<PromotionPrereq1>PROMOTION_NATURE3</PromotionPrereq1>
<bAllowAI>0</bAllowAI>
<bDisplayWhenDisabled>0</bDisplayWhenDisabled>
<bHasCasted>0</bHasCasted>
<PyResult>odmod.spellVitalizeCompanion(pCaster)</PyResult>
<PyRequirement>odmod.reqVitalizeCompanion(pCaster)</PyRequirement>
<Effect>EFFECT_SCORCH</Effect>
<Sound>AS3D_SPELL_SANCTIFY</Sound>
<Button>Art/Interface/Buttons/Spells/Scorch.dds</Button>
</SpellInfo>
Was the issue with Minor leaders not gaining traits fixed, or do I need to edit the coding, as mentioned earlier in the thread? As it stands in my games, no minor leader can gain any trait, and they do not loose minor upon founding a fourth city.
Dont know if this is a Bug or if i missed something, but Bedouin-Workers cant build Farms on Floodplains. In Fact they cant build anything on Floodplains except Caravan Routes.
Makes Malakim Floodplains kinda weak ^^
Aight, reinstalling FF and FF+, with all patches, seemed to have fixed it. Dunno what was wrong though.
My version of vitalize. The changes are:
- Vitalize affects a larger area. 1 radius base, +1 each for Spell Extension I and II.
- Civs can have specific upgrades. Illians make everything snow; lizards upgrade grassland to marsh for instance.
- Ocean is upgraded to coast.
- Cities on grassland hills become plains hills.
- A companion spell quickly makes grassland to plains, for those times you prefer plains.
Also, I don't think it's a change; floodplains become normal plains.
code:
Spoiler :Code:import CvPythonExtensions import PyHelpers gc = CvPythonExtensions.CyGlobalContext() def plotsInRange( centerX, centerY, maxRange, minRange=None ): maxRangeSquared = (maxRange+.5)**2 if minRange is None: minRangeSquared = -1 else: minRangeSquared = (minRange+.5)**2 for offsetX in xrange( -maxRange, maxRange+1 ): for offsetY in xrange( -maxRange, maxRange+1 ): if minRangeSquared < offsetX**2 + offsetY**2 < maxRangeSquared: yield ( centerX + offsetX, centerY + offsetY ) def getSpellRange( caster ): spellRange = 0 for promotion in ( 'PROMOTION_EXTENSION1', 'PROMOTION_EXTENSION2' ): if caster.isHasPromotion( gc.getInfoTypeForString( promotion ) ): spellRange += 1 return spellRange # Vitalize baseVitalizeUpgrades = dict( ( gc.getInfoTypeForString( start_terrain ), gc.getInfoTypeForString( end_terrain ) ) for start_terrain, end_terrain in [ ('TERRAIN_SNOW', 'TERRAIN_TUNDRA'), ('TERRAIN_TUNDRA', 'TERRAIN_PLAINS'), ('TERRAIN_DESERT', 'TERRAIN_PLAINS'), ('TERRAIN_PLAINS', 'TERRAIN_GRASS'), ('TERRAIN_MARSH', 'TERRAIN_GRASS'), ('TERRAIN_OCEAN', 'TERRAIN_COAST'), ] ) civSpecificVitalize = dict() civSpecificVitalize[gc.getInfoTypeForString('CIVILIZATION_ILLIANS')] = dict( ( gc.getInfoTypeForString( start_terrain ), gc.getInfoTypeForString( end_terrain ) ) for start_terrain, end_terrain in [ ('TERRAIN_TUNDRA', 'TERRAIN_SNOW'), ('TERRAIN_DESERT', 'TERRAIN_SNOW'), ('TERRAIN_PLAINS', 'TERRAIN_SNOW'), ('TERRAIN_GRASS', 'TERRAIN_SNOW'), ('TERRAIN_MARSH', 'TERRAIN_SNOW'), ('TERRAIN_BURNING_SANDS', 'TERRAIN_SNOW'), ('TERRAIN_BROKEN_LANDS', 'TERRAIN_SNOW'), ('TERRAIN_FIELDS_OF_PERDITION', 'TERRAIN_SNOW'), ('TERRAIN_OCEAN', 'TERRAIN_COAST'), ] ) civSpecificVitalize[gc.getInfoTypeForString('CIVILIZATION_MAZATL')] = dict( baseVitalizeUpgrades ) civSpecificVitalize[gc.getInfoTypeForString('CIVILIZATION_MAZATL')].update( dict( ( gc.getInfoTypeForString( start_terrain ), gc.getInfoTypeForString( end_terrain ) ) for start_terrain, end_terrain in [ ('TERRAIN_GRASS', 'TERRAIN_MARSH'), ('TERRAIN_MARSH', 'TERRAIN_MARSH'), ] ) ) civSpecificVitalize[gc.getInfoTypeForString('CIVILIZATION_CUALLI')] = dict (civSpecificVitalize[gc.getInfoTypeForString('CIVILIZATION_MAZATL')]) civSpecificVitalize[gc.getInfoTypeForString('CIVILIZATION_MALAKIM')] = dict( baseVitalizeUpgrades ) civSpecificVitalize[gc.getInfoTypeForString('CIVILIZATION_MALAKIM')].update( dict( ( gc.getInfoTypeForString( start_terrain ), gc.getInfoTypeForString( end_terrain ) ) for start_terrain, end_terrain in [ ('TERRAIN_DESERT', 'TERRAIN_DESERT'), ] ) ) def reqVitalize(caster): pPlot = caster.plot() if pPlot.getOwner() != caster.getOwner(): return False if pPlot.isWater(): return False pPlayer = gc.getPlayer( caster.getOwner() ) vitalizeUpgrades = civSpecificVitalize.get( pPlayer.getCivilizationType(), baseVitalizeUpgrades ) if not pPlot.getTerrainType() in vitalizeUpgrades: return False return True def spellVitalize(caster): map = CvPythonExtensions.CyMap() grass = gc.getInfoTypeForString( 'TERRAIN_GRASS' ) plains = gc.getInfoTypeForString( 'TERRAIN_PLAINS' ) desert = gc.getInfoTypeForString( 'TERRAIN_DESERT' ) floodPlains = gc.getInfoTypeForString('FEATURE_FLOOD_PLAINS') pPlayer = gc.getPlayer( caster.getOwner() ) vitalizeUpgrades = civSpecificVitalize.get( pPlayer.getCivilizationType(), baseVitalizeUpgrades ) for x,y in plotsInRange( caster.getX(), caster.getY(), getSpellRange( caster )+1 ): pPlot = map.plot(x,y) if not pPlot.isNone() and pPlot.getOwner() == caster.getOwner(): terrain = pPlot.getTerrainType() if terrain in vitalizeUpgrades: pPlot.setTerrainType( vitalizeUpgrades[terrain], True, True ) # From here on terrain refers to what pPlot was before the upgrade if terrain == desert and pPlot.getFeatureType() == floodPlains and terrain != pPlot.getTerrainType(): pPlot.setFeatureType(-1, -1) if pPlot.getTerrainType() == grass and pPlot.isHills() and pPlot.isCity(): pPlot.setTerrainType( plains, True, True ) def reqVitalizeCompanion(caster): pPlot = caster.plot() if pPlot.getOwner() != caster.getOwner(): return False elif pPlot.isWater(): return False elif not pPlot.getTerrainType() in ( gc.getInfoTypeForString( terrain ) for terrain in ['TERRAIN_GRASS', 'TERRAIN_PLAINS']): return False return True def spellVitalizeCompanion(caster): ''' Transforms concentric circles of grassland to plains. ''' map = CvPythonExtensions.CyMap() grass = gc.getInfoTypeForString( 'TERRAIN_GRASS' ) plains = gc.getInfoTypeForString( 'TERRAIN_PLAINS' ) player = caster.getOwner() for transformRange in xrange( getSpellRange( caster )+1+1 ): # +1 for basic range, +1 to include endpoint altered = False if transformRange: minRange = transformRange -1 else: minRange = None for x,y in plotsInRange( caster.getX(), caster.getY(), transformRange, None ): pPlot = map.plot(x,y) if not pPlot.isNone() and pPlot.getOwner() == player: terrain = pPlot.getTerrainType() if terrain == grass: pPlot.setTerrainType( plains, True, True ) altered = True if altered: return # Vitalize end
xml:Spoiler :Code:<SpellInfo> <!-- Vitalize --> <Type>SPELL_VITALIZE</Type> <Description>TXT_KEY_SPELL_VITALIZE</Description> <Civilopedia>TXT_KEY_SPELL_VITALIZE_PEDIA</Civilopedia> <Help>TXT_KEY_SPELL_VITALIZE_HELP</Help> <PromotionPrereq1>PROMOTION_NATURE3</PromotionPrereq1> <bAllowAI>1</bAllowAI> <bDisplayWhenDisabled>1</bDisplayWhenDisabled> <bHasCasted>1</bHasCasted> <PyResult>odmod.spellVitalize(pCaster)</PyResult> <PyRequirement>odmod.reqVitalize(pCaster)</PyRequirement> <Effect>EFFECT_VITALIZE</Effect> <Sound>AS3D_SPELL_SANCTIFY</Sound> <Button>Art/Interface/Buttons/Spells/Vitalize.dds</Button> </SpellInfo> <SpellInfo> <!-- Vitalize Companion --> <Type>SPELL_VITALIZE_COMPANION</Type> <Description>TXT_KEY_SPELL_VITALIZE_COMPANION</Description> <Civilopedia>TXT_KEY_SPELL_VITALIZE_COMPANION_PEDIA</Civilopedia> <Help>TXT_KEY_SPELL_VITALIZE_COMPANION_HELP</Help> <PromotionPrereq1>PROMOTION_NATURE3</PromotionPrereq1> <bAllowAI>0</bAllowAI> <bDisplayWhenDisabled>0</bDisplayWhenDisabled> <bHasCasted>0</bHasCasted> <PyResult>odmod.spellVitalizeCompanion(pCaster)</PyResult> <PyRequirement>odmod.reqVitalizeCompanion(pCaster)</PyRequirement> <Effect>EFFECT_SCORCH</Effect> <Sound>AS3D_SPELL_SANCTIFY</Sound> <Button>Art/Interface/Buttons/Spells/Scorch.dds</Button> </SpellInfo>
The important part of the xml is that the companion spell is human only and may be cast any number of times per turn. And obviously the PyResult and PyRequirement needs to be adapted to the code.
Sounds good.The only thing I'm unsure of is the Ocean to Coast upgrade.