After updating from r1517 to r1533, I'm no longer able to open the Civilopedia and I get no interface when I start a game. The python log says this:
I forgot to add several files. Try the current revision.
After updating from r1517 to r1533, I'm no longer able to open the Civilopedia and I get no interface when I start a game. The python log says this:
I forgot to add several files. Try the current revision.
CvUnit.cpp
CvUnit.cpp(732) : error C2065: 'bHero' : undeclared identifier
After checking with annotate, it seems that the error is caused by new lines included in r1536.
[to_xp]Gekko;12672692 said:my culture brought acheron's city to a revolt and he got bumped out of the city. not sure if it's intended but it would be nice if he lost held when that happens![]()
[to_xp]Gekko;12674716 said:there have been reports a while ago of some resources ( usually reagents ) not spawning when the blessings of amatheon gameoption is enabled.
[to_xp]Gekko;12674995 said:a couple things still to fix in the latest rvn:
godking info popup says "commerce" instead of "gold"
Rally worldspell spawns demagogs from enclaves
[to_xp]Gekko;12688339 said:River of Blood worldspell doesn't work on size 2 cities
The Stigmata promo does not seem to grant the respective strenght bonus right now.
[to_xp]Gekko;12694276 said:lizardman druid ( clan druid UU ) doesn't get entangle.
[to_xp]Gekko;12702271 said:when you get attacked by HN units, the text in the upper part of the screen still tells you "your forces are under attack by ... " , telling you the nationality of the attacker.
Centaur archers can get flanking 3, seems like a bug since that brings them to 95% withdrawal.
When playing with Puppet States and Revolutions, the AI sometimes will ignore a 10 turn peace treaty. For example, the AI will sometimes declare war on the very next turn following agreeing to a treaty.
OK. This should also be fixed now.
GET_PLAYER(getID()).AI_invalidateAttitudeCache(eIndex1);
if (m_pUnitInfo->getPrereqAlignment() != NO_ALIGNMENT)
{
if (m_pUnitInfo->getStateReligion() != GET_PLAYER(pPlot->getOwner()).getAlignment())
{
return false;
}
}
diff -r 246140a43a54 python/entrypoints/CvSpellInterface.py
--- a/python/entrypoints/CvSpellInterface.py Wed Aug 28 20:40:47 2013 +0200
+++ b/python/entrypoints/CvSpellInterface.py Wed Aug 28 20:51:13 2013 +0200
@@ -3835,7 +3835,8 @@
pPlayer = gc.getPlayer(caster.getOwner())
py = PyPlayer(caster.getOwner())
for pUnit in py.getUnitList():
- if pUnit.baseCombatStr() > 0:
+ pPlot = pUnit.plot()
+ if pUnit.baseCombatStr() > 0 and pUnit.isAlive() and not pPlot.isWater() and not pPlot.isPeak():
newUnit = pPlayer.initUnit(iWolf, pUnit.getX(), pUnit.getY(), UnitAITypes.UNITAI_ATTACK, DirectionTypes.DIRECTION_SOUTH)
if pUnit.baseCombatStr() > 3:
i = (pUnit.baseCombatStr() - 2) / 2
diff -r 7691371ad4f8 python/CustomFunctions.py
--- a/python/CustomFunctions.py Wed Aug 28 20:55:18 2013 +0200
+++ b/python/CustomFunctions.py Thu Aug 29 18:54:01 2013 +0200
@@ -1066,6 +1066,9 @@
if pTargetPlayer.getTeam() == pCasterPlayer.getTeam():
continue
+ if (gc.getTeam(pCasterPlayer.getTeam()).isVassal(pTargetPlayer.getTeam())):
+ continue
+
iBaseModifier = 100
if pTargetPlayer.getStateReligion() == iVeil:
iBaseModifier -= 20
diff -r de208a86e2bf python/CvEventManager.py
--- a/python/CvEventManager.py Thu Aug 29 18:58:14 2013 +0200
+++ b/python/CvEventManager.py Thu Aug 29 19:31:33 2013 +0200
@@ -1145,9 +1145,12 @@
pPlayer.initUnit(gc.getInfoTypeForString('UNIT_DRIFA'), pCity.getX(), pCity.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
if iProjectType == gc.getInfoTypeForString('PROJECT_THE_DRAW'):
- pPlayer.changeNoDiplomacyWithEnemies(1)
iTeam = pPlayer.getTeam()
eTeam = gc.getTeam(iTeam)
+ for iLoopPlayer in range(gc.getMAX_PLAYERS()):
+ pLoopPlayer = gc.getPlayer(iLoopPlayer)
+ if pLoopPlayer.isAlive() and pLoopPlayer.getTeam() == iTeam:
+ pLoopPlayer.changeNoDiplomacyWithEnemies(1)
for iLoopTeam in range(gc.getMAX_TEAMS()):
if iLoopTeam != iTeam:
if iLoopTeam != gc.getPlayer(gc.getBARBARIAN_PLAYER()).getTeam():
diff -r c81a2ca199cc python/entrypoints/CvSpellInterface.py
--- a/python/entrypoints/CvSpellInterface.py Thu Aug 29 20:11:06 2013 +0200
+++ b/python/entrypoints/CvSpellInterface.py Thu Aug 29 20:34:59 2013 +0200
@@ -911,16 +911,18 @@
for iiX in range(iX-2, iX+3, 1):
for iiY in range(iY-2, iY+3, 1):
pPlot = CyMap().plot(iiX,iiY)
- bEnemy = False
- bNeutral = False
- for i in range(pPlot.getNumUnits()):
- pUnit = pPlot.getUnit(i)
- if eTeam.isAtWar(pUnit.getTeam()):
- bEnemy = True
- else:
- bNeutral = True
- if (bEnemy and bNeutral == False):
- return True
+ if pPlot.isVisible(iTeam, False):
+ bEnemy = False
+ bNeutral = False
+ for i in range(pPlot.getNumUnits()):
+ pUnit = pPlot.getUnit(i)
+ if not pUnit.isInvisible(iTeam, False):
+ if eTeam.isAtWar(pUnit.getTeam()):
+ bEnemy = True
+ else:
+ bNeutral = True
+ if (bEnemy and not bNeutral):
+ return True
return False
def spellCrush(caster):
@@ -936,19 +938,21 @@
bNeutral = False
iValue = 0
pPlot = CyMap().plot(iiX,iiY)
- for i in range(pPlot.getNumUnits()):
- pUnit = pPlot.getUnit(i)
- if eTeam.isAtWar(pUnit.getTeam()):
- iValue = iValue + 10
- else:
- bNeutral = True
- if (iValue > iBestValue and bNeutral == False):
- iBestValue = iValue
- pBestPlot = pPlot
+ if pPlot.isVisible(iTeam, False):
+ for i in range(pPlot.getNumUnits()):
+ pUnit = pPlot.getUnit(i)
+ if not pUnit.isInvisible(iTeam, False):
+ if eTeam.isAtWar(pUnit.getTeam()):
+ iValue = iValue + 10
+ else:
+ bNeutral = True
+ if (iValue > iBestValue and not bNeutral):
+ iBestValue = iValue
+ pBestPlot = pPlot
if pBestPlot != -1:
def reqDeclareNationality(caster):
@@ -1979,16 +1983,18 @@
for iiX in range(iX-2, iX+3, 1):
for iiY in range(iY-2, iY+3, 1):
pPlot = CyMap().plot(iiX,iiY)
- bEnemy = false
- bNeutral = false
- for i in range(pPlot.getNumUnits()):
- pUnit = pPlot.getUnit(i)
- if eTeam.isAtWar(pUnit.getTeam()):
- bEnemy = true
- else:
- bNeutral = true
- if (bEnemy and bNeutral == false):
- return true
+ if pPlot.isVisible(iTeam, False):
+ bEnemy = False
+ bNeutral = False
+ for i in range(pPlot.getNumUnits()):
+ pUnit = pPlot.getUnit(i)
+ if not pUnit.isInvisible(iTeam, False):
+ if eTeam.isAtWar(pUnit.getTeam()):
+ bEnemy = True
+ else:
+ bNeutral = True
+ if (bEnemy and not bNeutral):
+ return True
return false
def spellPillarofFire(caster):
@@ -2004,15 +2010,17 @@
bNeutral = False
iValue = 0
pPlot = CyMap().plot(iiX,iiY)
- for i in range(pPlot.getNumUnits()):
- pUnit = pPlot.getUnit(i)
- if eTeam.isAtWar(pUnit.getTeam()):
- iValue += 5 * pUnit.baseCombatStr()
- else:
- bNeutral = True
- if (iValue > iBestValue and bNeutral == False):
- iBestValue = iValue
- pBestPlot = pPlot
+ if pPlot.isVisible(iTeam, False):
+ for i in range(pPlot.getNumUnits()):
+ pUnit = pPlot.getUnit(i)
+ if not pUnit.isInvisible(iTeam, False):
+ if eTeam.isAtWar(pUnit.getTeam()):
+ iValue += 5 * pUnit.baseCombatStr()
+ else:
+ bNeutral = True
+ if (iValue > iBestValue and not bNeutral):
+ iBestValue = iValue
+ pBestPlot = pPlot
if pBestPlot != -1:
for i in range(pBestPlot.getNumUnits()):
pUnit = pBestPlot.getUnit(i)
[to_xp]Gekko;12751915 said:Crusade spawning demagogs from enclaves is fixed, but Rally worldspell isn't yet ( cvspellinterface.py ) . the Crusade code also includes a nicely commented fix by Denev which should probably be applied to Rally as well ( i.e. don't spawn units on the same tile as an enemy unit )
All of the fixes for the issues reported in this post have been tested to work in my own mod. Let me know if you need the source code changes in any other format.
def reqPillarofFire(caster):
iX = caster.getX()
iY = caster.getY()
iPlayer = caster.getOwner()
pPlayer = gc.getPlayer(iPlayer)
iTeam = pPlayer.getTeam()
eTeam = gc.getTeam(iTeam)
for iiX in range(iX-2, iX+3, 1):
for iiY in range(iY-2, iY+3, 1):
pPlot = CyMap().plot(iiX,iiY)
if pPlot.isVisibleEnemyUnit(iPlayer):
bNeutral = False
for i in range(pPlot.getNumUnits()):
pUnit = pPlot.getUnit(i)
if not eTeam.isAtWar(pUnit.getTeam()):
bNeutral = True
if not bNeutral:
return True
return false
// lfgr fix: copied this check from AI_counterMove(), else it is possible that a group is created and then splitted indefinitely
// "Should never have group lead by counter unit"
if( getGroup()->getHeadUnitAI() == UNITAI_COUNTER && getGroup()->getNumUnits() == 1 )
{
if( plot()->isCity() && plot()->getOwnerINLINE() == getOwnerINLINE() )
{
return false;
}
}
// lfgr fix end