What Would Gandhi Do? - AI Rebalancing Mod

Fixing this AI handicap thing seems like it might be a little bit more annoying than originally thought. It is very difficult to discover exactly what bonuses or negatives the AI is receiving from the player and/or AI lists for handicaps.

From my observations, AIUnhappinessPercent is not used. I started a game on Prince and one on Deity, and in both the AI got 60% unhappiness (corresponding to the chieftain level). Changing the post defines, the AI got the correct amount of happiness for Prince even when I play on Deity. The easiest way to check is using FireTuner's Lua console.

Unfortunately, modding the postdefines is either bugged or at least doesn't work like I expect it to. When I change the postdefine in a mod and start a game, then nothing changes (actually, the DB value changes but the AI still uses the old value in game). But when I exit to the menu again and restart, the new values are used. Very annoying.
 
Do you think that removing it from PostDefines and into Global might fix the issue? Given that the AI must be reading the Quick bit, I am starting to believe this might work.

Of course I am also basing this on the assumption that the Quick define is not actually used by the game for other purposes. Could be wrong here.

Either way, I am really concerned as to how to provide for a balanced AI. It seems more and more likely that maybe a separate set of Handicap Types would need to be added and the game understood which AI handicap to pair with the player one. How Firaxis let this one get out of Beta is beyond me.
 
Do you think that removing it from PostDefines and into Global might fix the issue? Given that the AI must be reading the Quick bit, I am starting to believe this might work.

Of course I am also basing this on the assumption that the Quick define is not actually used by the game for other purposes. Could be wrong here.

Either way, I am really concerned as to how to provide for a balanced AI. It seems more and more likely that maybe a separate set of Handicap Types would need to be added and the game understood which AI handicap to pair with the player one. How Firaxis let this one get out of Beta is beyond me.

I guess it needs to be in PostDefines or the game will break. At any rate, you can't remove it by mod without overwriting the vanilla file. I'm as stumped as you are, I never expected Firaxis to not even test whether the modifiers are applied correctly to the AI. I mean, seriously, how hard is it to test? It took me about 5 minutes once I sat down to do it. Really sounds like horrible organisation.

You could probably code a Lua script to boost the AI in some ways
 
Version 0.2 up on the Mod Browser

v.0.2
-Allows player to end Declarations of Friendship
-Lowered negative effects of being denounced by a friend significantly (Should lower chain denounces).
-Lowered negative effects of being at war with a friend significantly (Should lower chain denounces).
-Slightly decreased threshold to become friends/remain friends.
-Decreased likelihood of DoW against CS influence competitors slightly.
-AI less likely to ignore CSes while at war.
-AI less likely to ask for peace with only minor damage.
-Threat lowered for attacking/conquering CSes. (An attempt to counter wars with CS allies leading to world hate).
-Severly decreased victory disputes to only occur when the AI is positive on victory type AND several turns have passed.
-Severly decreased land disputes to only occur when several turns have passed and expansion is aggressive. (Less likely to covet)
-Diplomacy penalties from land disputes halved. (They covet our lands will hurt only half as bad.)
-Will display more information about leader mood in regards to land/victory/wonder/minorciv disputes and warmonger threat. (Will not show if AI deceptive)
 
Version 0.2 up on the Mod Browser

v.0.2
-Allows player to end Declarations of Friendship
-Lowered negative effects of being denounced by a friend significantly (Should lower chain denounces).
-Lowered negative effects of being at war with a friend significantly (Should lower chain denounces).
-Slightly decreased threshold to become friends/remain friends.
-Decreased likelihood of DoW against CS influence competitors slightly.
-AI less likely to ignore CSes while at war.
-AI less likely to ask for peace with only minor damage.
-Threat lowered for attacking/conquering CSes. (An attempt to counter wars with CS allies leading to world hate).
-Severly decreased victory disputes to only occur when the AI is positive on victory type AND several turns have passed.
-Severly decreased land disputes to only occur when several turns have passed and expansion is aggressive. (Less likely to covet)
-Diplomacy penalties from land disputes halved. (They covet our lands will hurt only half as bad.)
-Will display more information about leader mood in regards to land/victory/wonder/minorciv disputes and warmonger threat. (Will not show if AI deceptive)

I'll start playing with this tomorrow.

I see the point of the individual adjustments, but my overall impression is that it may give too much of the initiative to declare war to the human player. For example, why shouldn't the AI covet a two-resource city on its border defended by a fairly weak army?
 
The problem is coveting is primarily based on number of tiles away of the closest border to the next civ, and not in any way individual city/resource related. It also is an incremental system where every turn you are neighbors with that civ, it will covet your lands a little more until it reaches a threshold of "screw it I am going to DoW you." One friend civ doing this often leads to the chain denouncements/DoWs.
 
The problem is coveting is primarily based on number of tiles away of the closest border to the next civ, and not in any way individual city/resource related. It also is an incremental system where every turn you are neighbors with that civ, it will covet your lands a little more until it reaches a threshold of "screw it I am going to DoW you." One friend civ doing this often leads to the chain denouncements/DoWs.

Thanks for the explanation. I'm always fascinated by the real reason why the AI does this or that.
 
I am gonna try it right now. On immortal, standard map, 9 AI's and I will try going for a peaceful type of victory. (I will use PlayWithMe and CS Diplomacy mods as well).
 
I am gonna try it right now. On immortal, standard map, 9 AI's and I will try going for a peaceful type of victory. (I will use PlayWithMe and CS Diplomacy mods as well).

Me too, also with PWM v4 and CSD 2.8 :)
Tiny map, 6 civs, 6 CSs, King level, Pangaea, Tech or Dominance win...
Will report on the interesting parts...
 
a quick note on my test I have begun:

Yes, yes, AI is more friendly:
My (not very close) neighbor Askia was F from the beginning, then offered DoF
My also not so close neighbor Hiawatha was neutral, but then came with DoF offer, I accepted
Egypt is closer a bit, they are N
Far Rome is F

Later I bought land near Songhai, he noted it in the red comments, but nothing more

I am now in turn 90, quick game
Rome leads in score, 3 civs (me among them) are close to Rome in a group
 
I just looked into DiploCurrentDeals for the first time and was horrified that a AAA game would leave in code like that.

Even a glance at the "organization" of TEXT_KEY files shows that too. It's like coding standards for this game got changed mid-development... :wow:
 
Appreciate your mod a lot, but I think this conflicts with infoaddict, but only the part when the diplo screen shows up. I can't click the infoaddict button. Other than that, no problems so far. Is a fix soon? :)
 
I will check for the conflict. I am sure it is due to the added lua files. As far as the battle ai mod I have never used it so I will try to fix that too.

Soma, the ai could always end friendships. Only the player could not.

My biggest worry is making the ai too friendly. It is a very hard balance to strike because the game is pretty much hard coded to make regaining friendship near impossible. There is no ticking positive bonus to relations but about four negative ones.
 
My biggest worry is making the ai too friendly. It is a very hard balance to strike because the game is pretty much hard coded to make regaining friendship near impossible. There is no ticking positive bonus to relations but about four negative ones.

In the early stages on Immortal, a two-city-then-NC start gave me two friendly relations and war with Siam only because we were competing for the same CS. Egypt and Ottomans seem pretty relaxed, though - no threats to anyone anywhere.
 
Hotfix for InfoAddict conflict:

1. Open DiscussionDialog.lua in notepad the WWGD MOD folder (Documents/My Games/sid meier's civilization v/MODS/WWGD)

2. Scroll to the very bottom of the file, and add these lines:
Code:
-- Added by robk for InfoAddict mod, 2010.11.02
function OnInfoAddict()
  local InfoAddictControl = MapModData.InfoAddict.InfoAddictScreenContext;
  UIManager:PushModal(InfoAddictControl);
end;
Controls.InfoAddictButton:RegisterCallback( Mouse.eLClick, OnInfoAddict );
-- END robk Edit

3. Save the document, and close it.

4. Go into Documents/My Games/sid meier's civilization v/MODS/InfoAddict/Lua

5. Delete DiscussionDialog.lua
 
Can I use WWGD and AI Tweaks-Battle AI?

It should work with it, though that mod is currently outdated. I will just say that having never played that mod, I cannot tell you how it may affect the AI, or if it does anything beyond changing flavor values.
 
Testgame report

First war occurs in 1896: Egypt, score leader attacks the Iroqouis...
It is on King level, Egypt enters modern age also in ca. 1900
AND completes Manhattan Project in 1908

(I play with PWM mod too)
 
Not sure how to explain the excellent tech speed. Nothing in this mod should really affect that, other than peaceful civs being able to re-route resources to science.
 
Top Bottom