[Python] getWarWeariness

jkp1187

Unindicted Co-Conspirator
Joined
Aug 29, 2004
Messages
2,496
Location
Pittsburgh, Pennsylvania
Trying to use this (and its companion, changeWarWeariness) in an event centered on war protests. Problem is, when I tried to trigger the event, I received this error message:

Code:
Traceback (most recent call last):
  File "CvRandomEventInterface", line 6087, in canTriggerGivePeaceAChance
AttributeError
: 
'CyPlayer' object has no attribute 'getWarWeariness'

Huh? I got 'getWarWeariness' from the API -- has this command not been exposed to Python anyway?
 
there is no getWarWeariness ... just getWarWearinessModifier and getWarWearinessPercentAnger in the class CyPlayer.
 
So there's no way to find the current value of War Weariness for one player vs. another in Python? Pshaw.

And where do you look to see if certain functions have been exposed to Python? (I might have asked before, but can't recall...)
 
I find it's better to go to the source. Try CyTeam. ;)

int CyTeam::getWarWeariness(int /*TeamTypes*/ eIndex)
 
By the way, my lesson for the week was apparently: Team functions are not the same as Player functions, no matter how similar they may look!

Guess I had to learn it sometime....
 
Back
Top Bottom