How to mod ideology triggers?

abob101

Chieftain
Joined
Dec 28, 2014
Messages
56
Hi all,

Anyone know where the triggers are defined for the player having to choose an ideology? For example the default triggers are "when reaching the Modern Era, or else after finishing three Factories"....

Is it possible to change it so that the ideology must be selected at the medieval era for example? I tried changing the EraPrereq in PolicyBranchTypes but that didn't seem to have any effect.

Is it possible to change the "3 factories" to some other combination of buildings? Where the heck is it defined... xml, lua, dll?

Thanks.
 
I can definitely help you with the building trigger. The factory has this line which can be removed and placed elsewhere (also of course the number required can be changed):

<XBuiltTriggersIdeologyChoice>3</XBuiltTriggersIdeologyChoice>


Not sure about the era and about to go to work, so no time to investigate right now. If I can find the answer, I'll post it, though it might be hardcoded.
 
Not sure about the era and about to go to work, so no time to investigate right now. If I can find the answer, I'll post it, though it might be hardcoded.

Well, it's not like Firaxis hard-codes half their stuff amirite? :lol:

Code:
bool CvPlayerPolicies::IsTimeToChooseIdeology() const
{
... // more code
if (m_pPlayer->GetCurrentEra() > GC.getInfoTypeForString("ERA_INDUSTRIAL"))
	{
		return true;
	}
... // more code
}
 
Well, it's not like Firaxis hard-codes half their stuff amirite?

If you're using my DLL or the CP DLL, it's been moved into the <PostDefines> table under IDEOLOGY_START_ERA
 
I can definitely help you with the building trigger. The factory has this line which can be removed and placed elsewhere (also of course the number required can be changed):

<XBuiltTriggersIdeologyChoice>3</XBuiltTriggersIdeologyChoice>

Ah brilliant, thanks.
 
Top Bottom