Best settings for limiting AI aggressiveness

Can't beat the AI? Is it too tame? Discuss the best strategies!
User avatar
GriffonSpade
Elite
Posts: 578
Joined: Mon Apr 29, 2013 4:41 pm

Re: Best settings for limiting AI aggressiveness

Postby GriffonSpade » Sun Dec 14, 2014 1:16 pm

Ozor Mox wrote:Yes, I saw this in the civ2civ3 ruleset:

Code: Select all

[effect_ai_love]
name    = "Gain_AI_Love"
value   = 10
reqs    =
    { "type", "name", "range"
      "AI", "Normal", "Player"
    }

[effect_ai_love_1]
name    = "Gain_AI_Love"
value   = 20
reqs    =
    { "type", "name", "range"
      "AI", "Hard", "Player"
    }

[effect_ai_love_2]
name    = "Gain_AI_Love"
value   = 30
reqs    =
    { "type", "name", "range"
      "AI", "Cheating", "Player"
    }


I take it this means that normal AIs will gain 10 extra love towards all other civs, hard will gain 20 and cheating will gain 30. Presumably this is to offset the increasing aggression as you move up the difficulty levels.

Looks like whoever made the civ2civ3 ruleset decided the AI needed to be toned down a bit to more closely resemble those games! :)


I wonder, does Gain_AI_Love take negative values? I also notice that the player gets none, so this sounds like it makes the AI more buddy-buddy with /EACH OTHER/, but still hostile to the player! It's too bad there's no way to modify this based on the target, instead of just the recipient of the love. It would have made it very easy to create aggressive/peaceful AIs. Just copy paste a default AI and change the one effect!

Ozor Mox
Posts: 45
Joined: Wed Apr 02, 2014 12:15 pm

Re: Best settings for limiting AI aggressiveness

Postby Ozor Mox » Mon Dec 15, 2014 10:59 am

GriffonSpade wrote:I wonder, does Gain_AI_Love take negative values? I also notice that the player gets none, so this sounds like it makes the AI more buddy-buddy with /EACH OTHER/, but still hostile to the player! It's too bad there's no way to modify this based on the target, instead of just the recipient of the love. It would have made it very easy to create aggressive/peaceful AIs. Just copy paste a default AI and change the one effect!


I haven't tried a negative value myself, but other similarly defined entries in rulesets can take negative values so I see no reason why this one wouldn't, and it would just make the AI more aggressive than the default.

I have played with this setting quite a bit now, and setting it with no defined reqs will increase all AIs love towards all other players, human and AI. I can confirm this.

Setting an AI difficulty under reqs as far as I understand (though I haven't tried it) will cause just that particular difficulty to increase their love with all other players, human and AI. So I think you could create aggressive and peaceful AIs by, for example, setting Gain_AI_Love just for normal difficulty. Then whichever AIs are set to normal will be more peaceful with everyone, while the rest will be as normal.

If I'm wrong about defining the reqs part, I'll wait for cazfi to correct me :)

User avatar
GriffonSpade
Elite
Posts: 578
Joined: Mon Apr 29, 2013 4:41 pm

Re: Best settings for limiting AI aggressiveness

Postby GriffonSpade » Mon Dec 15, 2014 1:54 pm

The default usage that I know of is that that the owner of the Eiffel Tower gets AI love.
I don't know the exacts of how it works at all, but from this use I have to assume it means "If you have the Eiffel tower, the AI players will love you". However, if an AI player had the Eiffel tower, it would not make them any nicer to anyone else! It doesn't make them less aggressive, it just means that other AI players will forgive them more readily when they /are/ aggressive. So if you give the human player 50 AI love, /all/ the AI players, regardless of their level, will become less aggressive towards the human player.

Ozor Mox
Posts: 45
Joined: Wed Apr 02, 2014 12:15 pm

Re: Best settings for limiting AI aggressiveness

Postby Ozor Mox » Mon Dec 15, 2014 2:28 pm

GriffonSpade wrote:The default usage that I know of is that that the owner of the Eiffel Tower gets AI love.
I don't know the exacts of how it works at all, but from this use I have to assume it means "If you have the Eiffel tower, the AI players will love you". However, if an AI player had the Eiffel tower, it would not make them any nicer to anyone else! It doesn't make them less aggressive, it just means that other AI players will forgive them more readily when they /are/ aggressive. So if you give the human player 50 AI love, /all/ the AI players, regardless of their level, will become less aggressive towards the human player.


Hmm. I took the reqs section to mean that everything under it has to be satisfied for the effect to be active. In other words, with no requirements, all AIs have the Gain_AI_Love effect (towards everyone), but with the requirement of Normal difficulty, only Normal difficulty AIs have the Gain_AI_Love effect (towards everyone).

I know what you're saying about the Eiffel Tower effect however, and that seems to contradict what I've said since, like you said, the Eiffel Tower effect only applies to the player who has it, not everyone.

I can't explain that, all I can tell you is that with the Gain_AI_Love effect with no requirements, the AIs are noticeably more peaceful towards both me and each other. I guess someone who understands rulesets better than I do will need to answer the rest.

Ozor Mox
Posts: 45
Joined: Wed Apr 02, 2014 12:15 pm

Re: Best settings for limiting AI aggressiveness

Postby Ozor Mox » Mon Dec 15, 2014 2:42 pm

Actually, doesn't ai_effects.ruleset contain the usage that I'm suggesting?

Code: Select all

[effect_ai_cheat_science]
type = "Output_Bonus"
value = 40
reqs =
{ "type", "name", "range"
"AI", "Cheating", "Player"
"OutputType", "Science", "Local"
}


AI level Cheating is the thing that experiences the behaviour, not the recipient of it.

Also, from one of your earlier questions, some of the ai_effects values are negative suggesting those should work fine for Gain_AI_Love.

User avatar
GriffonSpade
Elite
Posts: 578
Joined: Mon Apr 29, 2013 4:41 pm

Re: Best settings for limiting AI aggressiveness

Postby GriffonSpade » Mon Dec 15, 2014 4:13 pm

I think it's probably best to think of the Gain_AI_Love effect as a boost to charisma. You can raise or lower the charisma, but you can't make it nice or mean. Mind, if the boost is universal, and EVERYONE gets it, then everyone will be loved by the AI players more. It's just that you can't pick and choose which ones get it.

However, it looks like you can make a player do-no-wrong in the eyes of the AI, and if negative values work, you can make a player a universal scapegoat for the AI's hatred.

Hmmm, I suppose that among AIs, the scapegoat would equate to aggressive (even though it's actually everyone else attacking them...), and the do-no-wrong equating to peaceful. After all any AI is probably likely to be aggressive to those who declare war on them, and beneficient to those who make peace with them. The only oddity would be their neutral interactions with human players, who wouldn't know about any of that stuff. (Although angering a 'peaceful' AI might be your last mistake, since they could very well bring ALL the AI players against you.)

cazfi
Elite
Posts: 1713
Joined: Tue Jan 29, 2013 6:54 pm

Re: Best settings for limiting AI aggressiveness

Postby cazfi » Mon Dec 15, 2014 5:24 pm

It's Gain_Ai_Love, not Give_Ai_Love. The requirements refer to one who is receiving the love. If you have requirement of AI level "Cheating", then Cheating level AIs will receive extra love from all AIs regardless of their difficulty level.

Ozor Mox
Posts: 45
Joined: Wed Apr 02, 2014 12:15 pm

Re: Best settings for limiting AI aggressiveness

Postby Ozor Mox » Mon Dec 15, 2014 5:55 pm

I just experimented with this and I see cazfi has already confirmed what I saw, that the difficulty level in reqs is the recipient of the love from all other AIs. No requirements simply means everyone in the game (including humans) is the recipient of the love from all other AIs.

So in that case, you can have one or more AI difficulties gain the love, or everyone, but not only the player. Unless there's something you can put in reqs to mean the player.

cazfi
Elite
Posts: 1713
Joined: Tue Jan 29, 2013 6:54 pm

Re: Best settings for limiting AI aggressiveness

Postby cazfi » Mon Dec 15, 2014 6:00 pm

Ozor Mox wrote:Unless there's something you can put in reqs to mean the player.

Only via negated requirements. Not Cheating AI, Nor Hard AI...

Ozor Mox
Posts: 45
Joined: Wed Apr 02, 2014 12:15 pm

Re: Best settings for limiting AI aggressiveness

Postby Ozor Mox » Mon Dec 15, 2014 6:08 pm

cazfi wrote:
Ozor Mox wrote:Unless there's something you can put in reqs to mean the player.

Only via negated requirements. Not Cheating AI, Nor Hard AI...


Ah I see, thanks. All of these possible ruleset changes perfectly solve my original issue so hopefully it will come in useful to others with the same problem.