Page 1 of 1
AI combat bonus
Posted: Mon May 01, 2023 8:28 pm
by Kossatx
Hi, anyone knows in which file is AI combat bonus script? Thanks!
Re: AI combat bonus
Posted: Mon May 01, 2023 9:30 pm
by Robotron
Don't call me "anyone".
All combat stuff is of course dealt with in
game.combat.lua which can be found in Data/Scripts/game/
Tell me what AI combat bonus you are specifically searching for so I can point you at the correct part of that script.
Re: AI combat bonus
Posted: Tue May 02, 2023 7:18 pm
by Kossatx

Of curse I was summoning you, Robotron. I was looking for any script which gives general bonus for AI, not an event specific bonus, but global. Time ago there was what I'm looking for in "main_hud.lua", around "GiveOneOffBonuses” command... but now I can't found it

Re: AI combat bonus
Posted: Tue May 02, 2023 9:26 pm
by Robotron
function GiveOneOffBonuses(faction,alliance) can be found in game_resources.lua but contrary to what you think it does not give combat bonus to the AI but instead extra manpower and it always did just that.
There never was a function that gave a global combat bonus to the AI, only situation/event specific bonus and those can all be found in game_combat.lua.
And just to be clear: the new difficulty selection system does not affect the AI at all but only affects the player: he loses more morale, has worse combat results and all neutral nations are less likely to join the player's alliance.
Medium difficulty reduces combat/morale/neutral alignment change by -10% each time, Hard difficulty by -15% each and impossible difficulty by -20% each.
Re: AI combat bonus
Posted: Tue May 02, 2023 9:54 pm
by Kossatx
Oh! I was wrong then, thanks for your explanation.
Re: AI combat bonus
Posted: Tue May 02, 2023 11:51 pm
by Robotron
If you need help with anything else I'll be happy to give advice.

Re: AI combat bonus
Posted: Wed May 03, 2023 7:47 pm
by Kossatx
Thanks a lot for your support
