WTB - Facts on AI cheating

snoochems

Prince
Joined
May 25, 2004
Messages
434
Hi guys. I haven't played for a while. Just wanting to know if the AI cheats with happiness. It might be that the AI just is good at managing happiness that it can spam cities so much. But I suspect that it cheats.

If so, is there any way to mod out these cheats?
 
http://tactical.mine.nu/files/civ5.html


I've heard some pretty flagrant things, but what is intended is for deity AI to have 60% unhappiness.

This means 5 population costs 3 unhappy, and a new city costs 1.2 unhappy.

Couple this with half hammer cost Collosseums or Circuses, along with 60% food required for growth, and half maintenance costs on all those buildings, and you will see why AI can ICS so easily.


At 60% unhappy, AI cities are happiness generators. With a collosseum, an AI city @ size 5 costs 0.2 happy total.

This is why deity AI can easily many size 8-10 cities very fast.


I've heard it is possible, in the xml files? One guy changed the 60% to 1000% just to see what its like.

The funny thing is that if you turn AI unhappiness up, it makes the cities production focus more, and they actually get more units out of it, though less science.

AIs get dangerous once they run out of crappy hexes to use, and start using the ones that make a lot of hammers. One of the greatest and simplest problems with the AI is the "backwards logic" on hex prioritization.
 
If so, is there any way to mod out these cheats?

two things: the ai plays on chieftain level always, which makes the game easier for them regardless of difficulty you play at. you can change this by opening up
assets\Gameplay\XML\GameInfo\CIV5HandicapInfos.xml

go to the HANDICAP_PRINCE section, select all the lines under <Help> and copy them,
move up to the HANDICAP_CHIEFTAIN section, and select the same set of lines and paste over them. this should make a prince vs prince game be on same exact terms.

if you just want to adjust the happiness and not the other things, the parts to change are

<HappinessDefault>12</HappinessDefault>
<ExtraHappinessPerLuxury>1</ExtraHappinessPerLuxury>
<NumCitiesUnhappinessMod>60</NumCitiesUnhappinessMod>
<PopulationUnhappinessMod>60</PopulationUnhappinessMod>

to 9, 0, 100, 100


at other difficulties the ai gets bonuses based on the handicaps that start with AI, eg <AIUnhappinessPercent>60</AIUnhappinessPercent>
 
Although the AIUnhappiness doesn't seem to be used as it always gets 60% unhappiness, no matter the difficulty level.
 
Although the AIUnhappiness doesn't seem to be used as it always gets 60% unhappiness, no matter the difficulty level.

even if you change the chieftain setting? i haven't actually tried
 
even if you change the chieftain setting? i haven't actually tried

Well if you change the chieftain bonuses to prince bonuses and then play on deity it will get 1 unhappiness per pop (appropriate for prince)
 
Well if you change the chieftain bonuses to prince bonuses and then play on deity it will get 1 unhappiness per pop (appropriate for prince)

that doesn't seem right.
the other AIxxx things have an effect on deity, so i'd guess the chieftain settings (what the AI is playing at) and the AIxx things work together somehow (probably multiplicative so on deity the ai is getting 36% unhappiness)
 
okay, i did some verifying.
set up a game, loaded firetuner and used city plopper for my opponent, declared war, and checked after each city plopped to see if combat odds show very unhappy modifier for them.
with the 12 base at chieftain they need > 22 unhappiness for this

vs diety, it took 21 cities at 1 pop
(63 * .36 = 22.68 unhappiness)

vs prince, 13 cities
(39*.6 = 23.4)

modified handicaps for chieftain to 100, 100 for cities/pop
vs prince, 8 cities
(24*1 = 24)


so, they both play a part, and my original advice does work.
 
okay, i did some verifying.
set up a game, loaded firetuner and used city plopper for my opponent, declared war, and checked after each city plopped to see if combat odds show very unhappy modifier for them.
with the 12 base at chieftain they need > 22 unhappiness for this

vs diety, it took 21 cities at 1 pop
(63 * .36 = 22.68 unhappiness)

vs prince, 13 cities
(39*.6 = 23.4)

modified handicaps for chieftain to 100, 100 for cities/pop
vs prince, 8 cities
(24*1 = 24)


so, they both play a part, and my original advice does work.

Strange. If I use the Lua function Player:GetUnhappinessFromCityPopulation() it displays the same on deity as on prince.
 
i'd guess it just queries for the value defined in PopulationUnhappinessMod, since you said it returns 60 for the ai.
 
Yes apparently the AIUnhappinessBonus is applied after that. The strange thing is that the function I used is influenced by stuff like SPs (well I only know it for certain for the player because it's the one used in the UI) but not by the AI bonus :crazyeye:
 
Back
Top Bottom