Leaders that change with the era?

Civciv5

Grand Emperor
Joined
Aug 14, 2011
Messages
2,111
Location
Nergenshuizen, Belgium
In Rhye's and Fall of Civilization leaders change with the time,example:Qin Shi Huang,Taizong,Hongwu,Cixi,Mao Zedong.
Would it be possible to do that in the regular game?
I'm thinking about creating a mod about that.
 
It's enough when it only affects the AI.
How do I have to do that in Python?
I can't edit/compile the SDK or DLL,so that's excluded,unless someone can do that for me.
How is it done in RFC?
 
python, in Riseandfalls.py, to be precise. In const.py there are some arrays which you would need to edit.
Why do you need to change the LH for humans? Traits don't exist there, and the only thing that would change is music that plays when you zoom into a city.
 
I use this in Civ4Col, but it should work in Civ4 too (but this is a SDK solution):

Code:
//Androrc Change Leader
void CvPlayer::setLeaderType(LeaderHeadTypes eLeader)
{
	//unprocess the current leader's traits
	for (int iI = 0; iI < GC.getNumTraitInfos(); iI++)
	{
		if (GC.getLeaderHeadInfo(getLeaderType()).hasTrait(iI))
		{
			processTrait((TraitTypes) iI, -1);
		}
	}

	GC.getInitCore().setLeader(getID(), eLeader);
	GC.getInitCore().setLeaderName(getID(), GC.getLeaderHeadInfo(getLeaderType()).getDescription());
	setPersonalityType(eLeader);

	//process the new leader's traits
	for (int iI = 0; iI < GC.getNumTraitInfos(); iI++)
	{
		if (GC.getLeaderHeadInfo(getLeaderType()).hasTrait(iI))
		{
			processTrait((TraitTypes) iI, 1);
		}
	}
}
//Androrc End

Code:
	void setLeaderType(LeaderHeadTypes eLeader);
 
It works!
Thanks,The_J!
But when the leader changes he/she dissappears one turn and the teamcolor changes.
This is a list of civilizations and their "eraleaders"
America:Washington,Lincoln,Roosevelt
Arabia:Abu Bakr,Saladin,?
Aztecs:Tenoch,Itzcoatl,Montezuma
Babylonia:Hammurabi,Nebuchadnezzar II,?
Byzantine:Constantine,Justinian,Theodora
Carthage: Dido,Hannibal,?
Celts:???
China:Qin Shi Huang,Yongle,Mao Zedong
Dutch:Willem van Oranje,?,Wilhelmina
Egypt:Ramesses II,Ptolemy,Nasser
England:Alfred I,Elizabeth I,Churchill
Ethiopia:?,Zara Yaqob,Haile Selasie
France:Clovis I,Louis XIV,De Gaulle
Germany:Frederick Barbarossa,Frederick II,Adenauer
Greece:Pericles,Alexander?,?
Holy Rome:Charlemagne,Maximillian I,Franz II
Inca:Manco Capac,Pachacuti:,Huayna Capac
India:Asoka,Razia Sultana,Gandhi
Japan:Jimmu,Oda Nobunaga,Hirohito
Khmer:Soma,Suryavarman,Pol Pot
Korea: Dangun,Wang Kon,Kim Jong-il
Mali:????
Maya:???
Mongolia:Genghis Khan,Kublai-Khan,Tamerlane
Native America:?,Hiawatha,Sitting Bull
Ottomans:Osman I,Mehmed II,Suleiman
Persia:Cyrus,Shapur II,Abbas I
Portugal:Afonso I,Joao II,Maria II
Rome:Julius Caesar,Trajan,Constantine
Russia:Ivan IV,Peter,Stalin
Spain:?,Isabella,Franco
Sumeria:???
Viking:???
Zulu:???
I doubt between placing them "ancient,medieval and modern"or place them in their real reign.
 
That's one of the issues :/.
In fact, the leader is not really replaced, but the old one is killed and everything is transferred to the new leader. That causes some minor problems (e.g. the messages about the death), but no major problems (AFAIK).
 
I don't understand all those tutorials and other stuff of the SDK,I already tried many times.
 
python, in Riseandfalls.py, to be precise. In const.py there are some arrays which you would need to edit.
Why do you need to change the LH for humans? Traits don't exist there, and the only thing that would change is music that plays when you zoom into a city.

It also changes the behavior of the AI. It loads another leader, so all values in the XML change. The AI Alexander is more aggresive than the AI Pericles.
 
Is it possible that when the leader change that it gives a message as:
"Empress Wu Zetian has seized the throne and declared herself empress of the Zhou Dynasty of China!"?
 
I'm currently making a scenario on a map of Earth and I would like to have a system that changes the leader of a civ at a certain date.
I know it needs modification of the SDK,so I would really appreciate if somebody makes a dll where 50 civs are possible and there is something like in RFC that changes the leaders...
 
Back
Top Bottom