I'm not sure what event that is. If you can give me a screenshot of it or quote a bit of text I can try and track it down.
I didn't get a screenshot at the time, and haven't seen it happen again since.
I think the text I remember is from TXT_KEY_REV_CULT_VIOLENT, the code starting around line 2842 of Revolution.py, but I'm not sure.
Do you need to keep all of those Text files separate? Kael kept all of his TXT_KEYs in a single file (CIV4GameText_FFH2.xml) and I am keeping all of my changes in another (Magister_CIV4GameText_FFH2.xml). Your TXT_KEYs are spread out over
79 different files, many of which include only one or two TXT_KEYs. This makes it much more difficult to search for a specific bit of text. It also wastes time when I have to scroll through them all to find Magister_CIV4GameText_FFH2.xml in order to change something. Would you mind consolidating those files?
In my modmod there are problems that could arise from having doppelgangers of Auric, Basium, and other leaders that have avatar units. I've never really cared for things like having 3 Arendel Phaedras in the world at the same time either. It is fine if you want to leave the imposters in your modmod, but what would I have to do in order to make sure that revolution events never duplicate a leader?
When I was looking through the code the only place which I could tell was allowing duplicate leaders are the lines in bold, which I commented out. Is that enough to prevent duplicate leaders? Does eliminating them introduce any other problems?
Code:
# RevCivUtils.py
....
def getLeaderList( self, iSplitType, iReligion ) :
liResult = list()
liResult.extend( self.liLeaders )
liBadLeaders = list()
for iLeader in self.liLeaders :
# check if leader is used
for iPlayer in xrange( gc.getMAX_CIV_PLAYERS() ) :
if( iLeader == gc.getPlayer( iPlayer ).getLeaderType() ) :
liResult.remove( iLeader )
liBadLeaders.append( iLeader )
break
if not iLeader in liResult:
continue
if iReligion != -1:
# check for agnostic leaders, and leaders unable to adopt the specific religion, in a religious revolution
iAgnostic = CvUtil.findInfoTypeNum( gc.getTraitInfo, gc.getNumTraitInfos(), 'TRAIT_AGNOSTIC' )
pLeader = gc.getLeaderHeadInfo(iLeader)
if pLeader.hasTrait(iAgnostic) or pLeader.getReligionWeightModifier(iReligion) <= -100:
liResult.remove( iLeader )
liBadLeaders.append( iLeader )
continue
[B]
## if( iSplitType == SPLIT_PUPPET and len( liResult ) == 0 ) :
## liResult = liBadLeaders[/B]
return liResult
As usual, I'm wondering whether to try to release a new version of my modmod sooner or wait to include your next update in it. Any idea when it might be ready?