Leader-Specific Heroes

redazncommieDXP

Warlord
Joined
Jan 5, 2007
Messages
176
How can I change which leaders get which heroes? For example, I'd like the Risen Emperor to be able to build the Risen Emperor, and vice versa with Korinna.
 
AFAIK it is done via traits, not leaders. So every Scion leader with same traits as Risen Emperor may build Korinna.
 
It will take a bit of python.

In CvGameUtils.py, search for the following code:

Code:
		if eBuilding == gc.getInfoTypeForString('BUILDING_VACANT_MAUSOLEUM'):
			if pPlayer.getLeaderType() == gc.getInfoTypeForString('LEADER_RISEN_EMPEROR'):
				return True

Change the leader to LEADER_ALEXI. That's Korinna's original name, was never updated in the XML (Honestly, I like it better; Vehem had it changed because it was too close to Alexis, of the Calabim) This code is what PREVENTS the Emperor from building the Mausoleum (Returning true in a CannotBuild prevents the build), after the change it should be buildable. Code for the various temples is there too.

Then open up Civ4EventTriggerInfos.xml, search for EVENTTRIGGER_POP_KORRINA. Scroll down to where it says <PrereqLeader>LEADER_RISEN_EMPEROR</PrereqLeader>, and change it to be LEADER_ALEXI, once again. Should be good after that.
 
Top Bottom