... and change it with a hex editor ...
Or hang on until v41 of my DLL as I've added it to the list of things to add to the Lua API![]()
Won't we need some kind of UI to do it though?
Lua console in FireTuner![]()
-- Make the first City State friendly and the second irrational
Players[22]:SetPersonality(MinorCivPersonalityTypes.MINOR_CIV_PERSONALITY_FRIENDLY)
Players[23]:SetPersonality(MinorCivPersonalityTypes.MINOR_CIV_PERSONALITY_IRRATIONAL)
-- Make all hostile City States neutral
for iCS = GameDefines.MAX_MAJOR_CIVS, GameDefines.MAX_CIV_PLAYERS-2, 1 do
local pCS = Players[iCS]
if (pCS:IsEverAlive() and pCS:GetPersonality() == MinorCivPersonalityTypes.MINOR_CIV_PERSONALITY_HOSTILE) then
pCS:SetPersonality(MinorCivPersonalityTypes.MINOR_CIV_PERSONALITY_NEUTRAL)
end
end
Assuming there are only 22 playable major civs, yes. But see the loop for a better way to determine the first and last possible CS idAre CS always numbered from 22 and onwards?
YesDo nr. 1 correspond to the first CS in the maps panel of the fire tuner? (can test this if you don't know)?
You can do that with only the code given, an alternative would be to have a list with the City States in and 4 buttonsI was thinking making a new panel in the fire tuner with a button for city state 1 to 10 (or so). For each CS I'd make a button making the CS friendly, neutral, ... Is that doable with the code above
I got an error first time I opened it
(g_PlopperSettings and g_PlopperSettings.Player and Players[g_PlopperSettings.Player]:IsAlive() and Players[g_PlopperSettings.Player]:IsMinorCiv() and {existing_condition_here})
That's because I hijacked g_PlopperSettings.Player, and that can be nil
the selected conditions (two of them) should look like
Code:(g_PlopperSettings and g_PlopperSettings.Player and Players[g_PlopperSettings.Player]:IsAlive() and Players[g_PlopperSettings.Player]:IsMinorCiv() and {existing_condition_here})
(but I was too lazy to type that twice!)
76: item["Selected"] = ({put_extra_here} and Players[g_PlopperSettings.Player]:GetPersonality() == (p-1))
117: item["Selected"] = ({put_extra_here} and Players[g_PlopperSettings.Player]:GetMinorCivTrait() == (t-1))