Traceback (most recent call last):
File "BugEventManager", line 308, in _handleDefaultEvent
File "CvEventManager", line 2614, in onCityDoTurn
AttributeError: 'CyPlayer' object has no attribute 'getInfoTypeForString'
line 2617Christian wonder - Crusaders
Christian wonder - Crusaders have broken Python code.
Code:Traceback (most recent call last): File "BugEventManager", line 308, in _handleDefaultEvent File "CvEventManager", line 2614, in onCityDoTurn AttributeError: 'CyPlayer' object has no attribute 'getInfoTypeForString'
It spawns crusaders once but that is all.
Yeah, that was quite a code error, must have been real tired when writing that nonsense.. ^^line 2617
Ugh... ya can't do much when that's taking place.Our code repository is under maintenance, so I can't update to latest revision, that puts a stop to my will to mod today, sorry.
I'm currently at rev. 10584, I understand some bugs were introduced to PPIO in later SVN revisions.
I'll play crusader kings II today instead. ^^
Do you use the steam beta version of BtS?
If not, then that is the reason you have that display bug.
# NANITE DEFUSER - destroyes all nukes from all players
elif iBuilding == mapBuildingType["NANITE_DEFUSER"]:
CyPlayer = GC.getPlayer(iPlayer)
X = CyCity.getX()
Y = CyCity.getY()
szText = TRNSLTR.getText("TXT_KEY_NANITE_DEFUSER_PYTHON",())
for iPlayerX in xrange(self.MAX_PLAYERS):
CyUnit, i = CyPlayer.firstUnit(False)
while CyUnit:
if CyUnit.isDead() or CyUnit.isNone():
print "CvEventManager\onBuildingBuilt", ("CyUnit.isDead()", CyUnit.isDead()), ("CyUnit.isNone()", CyUnit.isNone())
elif CyUnit.getUnitCombatType() == GC.getInfoTypeForString("UNITCOMBAT_DOOM") or CyUnit.nukeRange() > 0 or CyUnit.getUnitAIType() == UnitAITypes.UNITAI_ICBM:
CyUnit.kill(0, -1)
CyUnit, i = CyPlayer.nextUnit(i, False)
if CyPlayer.isHuman() and CyPlayer.isAlive():
CyInterface().addMessage(iPlayerX, False, 15, szText, "", 0, 'Art/Interface/Buttons/Buildings/Ascension_Gate.dds', ColorTypes(44), X, Y, True, True)
I updated path in Python file and committed it now.That button has been moved to \art\interface\buttons\great_wonders\ascension_gate.dds, but I think it would be more appropriate with \art\interface\buttons\great_wonders\nanite_defuser.dds in this case.
This is not exactly a PPIO issue, as the same code for the message is used by core C2C.
Code:if (iBuildingType == self.iBUILDING_NANITE_DEFUSER): pPlayer = gc.getPlayer(pCity.plot().getOwner()) iX = pCity.getX() iY = pCity.getY() for player in PlayerUtil.players(alive=True): pPID = player.getID() for unit in PlayerUtil.playerUnits(player): if (unit.getUnitCombatType() == gc.getInfoTypeForString("UNITCOMBAT_DOOM") or unit.nukeRange() > 0 or unit.getUnitAIType() == UnitAITypes.UNITAI_ICBM and not unit.isNone()): unit.kill( 0, -1 ) CyInterface().addMessage(pPID,False,15,CyTranslator().getText("TXT_KEY_NANITE_DEFUSER_PYTHON",()),'',0,'Art/Interface/Buttons/Buildings/Ascension_Gate.dds',ColorTypes(44), iX, iY, True,True)
Do you use steam without having the beta version of BtS activated?
If so, then that is the reason you have that display bug.
Set this to 0 in vanilla BTS INI.Turning in steam "original release" under BETA's on in BtS fixed it but how to disable that error message now? "You have selected an unsusable voice capture device"?
Set this to 0 in vanilla BTS INI.
Its here: C:\Users\<USERNAME>\Documents\My Games\Beyond the Sword
; Enable voice over IP capture and playback
EnableVoice = 0
I would need a save file where this is happening to be able to debug it, I couldn't find any obvious problems in the code.There is an issue with the Civics screen, I can not select Mercenaries. According my civic screen, I have no military civic at all now. Sorry for the bad image, but print screen is busted on my computer. Don't ask.Spoiler Screenshot :
This happens if civics in same category are researchable in same or very close columns but are in different techs.I would need a save file where this is happening to be able to debug it, I couldn't find any obvious problems in the code.
Well, that is strange as the code doesn't check the tech req of civics, it just asks the dll if the civic is unlocked for this player. I'll have to look at the dll code, perhaps the canDoCivic call is not the right one to use, or that I need another call for specific cases.This happens if civics in same category are researchable in same column but are in different techs.
Then this graphical bug happens and you have to choose other civic window to actually choose civic.
Civics are listed as are ordered in civic infos.Well, that is strange as the code doesn't check the tech req of civics, it just asks the dll if the civic is unlocked for this player. I'll have to look at the dll code, perhaps the canDoCivic call is not the right one to use, or that I need another call for specific cases.
Which is strange as they use pretty much the same code for displaying the icons.Notice that you can select civics in vertical list window normally as always you could.
So bug is in that new window, that shows only civic icons.
for CvCivicInfoX, iCivicX in civicList:
Img = "WID|CIVIC%d" % iCivicX
if bDebug or CyPlayer.canDoCivics(iCivicX):
BTN = CvCivicInfoX.getButton()
else: BTN = CANCEL
screen.setImageButtonAt(Img, ScPnl, BTN, x, y, iSize, iSize, eWidGen, 1, 1)
x += dx
for CvCivicInfoX, iCivicX in civicList:
if bDebug or CyPlayer.canDoCivics(iCivicX):
BTN = CvCivicInfoX.getButton()
else: BTN = CANCEL
screen.addDDSGFCAt("", ScPnl, BTN, 8, y, iSize, iSize, eWidGen, 1, 1, False)
y += dy
Still no build actions shows in Great Farmer at all.Could someone please check if the great farmer unit works as it should on this test version of PPIO?
Would be great if you had enabled python logging and error messages just in case.
Test version number 2 includes the restrictions that you need to have the bonus available to your capital city to be able to place it.
Still doesn't work - that is absolutely no build actions are in this unit.Lol, I probably found the reason in PythonCallbackDefines.xml:
<Define>
<DefineName>USE_CAN_BUILD_CALLBACK</DefineName></Define>
<iDefineIntVal>0</iDefineIntVal>
Change that to 1