artisticMink
Chieftain
- Joined
- Jul 18, 2013
- Messages
- 10
Hello folks, i'm messed around with city states lately. Today, i've attempted to set their personalities manually.
So, the first thing i did was looking into the CityStateDiplo.lua
So, since there are minor civ personality types, i searched further and expected to find a setter.
I found two getters: GetPersonality(); (from above) and GetPersonalityType();
And one setter: SetPersonalityType(integer);
I can get and set the PersonalityType without Problems, however that doesnt change the Personality which seems to be another own property. (No changes regarding quests or in the ui since it asks for Personality instead of PersonalityType).
Sadly Gedemons GIT is down so i don't have any chance to look into the actual code to see what the heck is going on there.
I would greatly appriciate it if someone could help me out here.
So, the first thing i did was looking into the CityStateDiplo.lua
Spoiler :
PHP:
-- Personality
local strPersonalityText = "";
local strPersonalityTT = "";
local iPersonality = pPlayer:GetPersonality();
if (iPersonality == MinorCivPersonalityTypes.MINOR_CIV_PERSONALITY_FRIENDLY) then
strPersonalityText = Locale.ConvertTextKey("TXT_KEY_CITY_STATE_PERSONALITY_FRIENDLY");
strPersonalityTT = Locale.ConvertTextKey("TXT_KEY_CITY_STATE_PERSONALITY_FRIENDLY_TT");
elseif (iPersonality == MinorCivPersonalityTypes.MINOR_CIV_PERSONALITY_NEUTRAL) then
strPersonalityText = Locale.ConvertTextKey("TXT_KEY_CITY_STATE_PERSONALITY_NEUTRAL");
strPersonalityTT = Locale.ConvertTextKey("TXT_KEY_CITY_STATE_PERSONALITY_NEUTRAL_TT");
elseif (iPersonality == MinorCivPersonalityTypes.MINOR_CIV_PERSONALITY_HOSTILE) then
strPersonalityText = Locale.ConvertTextKey("TXT_KEY_CITY_STATE_PERSONALITY_HOSTILE");
strPersonalityTT = Locale.ConvertTextKey("TXT_KEY_CITY_STATE_PERSONALITY_HOSTILE_TT");
elseif (iPersonality == MinorCivPersonalityTypes.MINOR_CIV_PERSONALITY_IRRATIONAL) then
strPersonalityText = Locale.ConvertTextKey("TXT_KEY_CITY_STATE_PERSONALITY_IRRATIONAL");
strPersonalityTT = Locale.ConvertTextKey("TXT_KEY_CITY_STATE_PERSONALITY_IRRATIONAL_TT");
end
So, since there are minor civ personality types, i searched further and expected to find a setter.
I found two getters: GetPersonality(); (from above) and GetPersonalityType();
And one setter: SetPersonalityType(integer);
Spoiler :
PHP:
--Sets player 22 to 3
Player[22]:SetPersonalityType(MinorCivPersonalityTypes.MINOR_CIV_PERSONALITY_IRRATIONAL)
--Returns 3
Player[22]:GetPersonalityType()
--Returns always 2
Player[22]:GetPersonality()
I can get and set the PersonalityType without Problems, however that doesnt change the Personality which seems to be another own property. (No changes regarding quests or in the ui since it asks for Personality instead of PersonalityType).
Sadly Gedemons GIT is down so i don't have any chance to look into the actual code to see what the heck is going on there.
I would greatly appriciate it if someone could help me out here.