SetPersonalityType

Pazyryk

Deity
Joined
Jun 13, 2008
Messages
3,584
I just noticed this one in the wiki:

void player:SetPersonalityType( eNewValue);

In Civ4, you used a leader ID as argument. Does anyone know if this works in Civ5? This would be extraordinarily valuable for my mod, since I have leaders changing in game (mostly a UI trick since the core table leader isn't really changing). But if this works, then my "leader changes" could really interface with the core AI/flavor system.
 
Not sure. Seems like this would only really apply to CS and not majors, as majors lack set personality types.
 
The question is what is "eNewValue"? I think it might be leader because Civ4 had a function of the same exact name that did this. (and there is no PersonalityType enum listed in the wiki)

This is trivial to figure out because there is a GetPersonalityType function. I'll test this next time I have access to my mod.
 
Well, player:GetPersonalityType() does get you the leader ID (which happens to equal civ ID, but it's much more likely to be leader). And player:GetPersonalityType(int) changes it. It seems likely to me that this is really changing AI personality to a different leader. Is there a concrete way to test this, other than trying to gauge it while playing a long game with an altered AI?
 
Back
Top Bottom