Do the AI leaders ever forget about your negative actions ?

rashaverak

Chieftain
Joined
Jul 14, 2006
Messages
23
Hello,

the topic says it. I declare war on a nation, they get some negative diplomacy points towards me, logical. I declare war to their friends, the same. Some others actions as well. But before, they tend to forget about those after some time, which seems pretty realistic, after some centuries (even faster) nations can become friends even after huge wars, look ar europe nations. But now it seems they do not forget, it is thousands turns now since the wars and when i mouse over the leaders in the scoreboard they still remember. Is it a kind of bug or can I help to remove it. I can give them some resources but that solves the problem only up to some point. Maybe because I am playing on the slowest game speed, does it probably require even more than 1000s turns ? If it is the case then I would say it needs some rebalancing.

Thanks.
 
It's going to require a lot of xml work to get that all into shape. I also have a project still to work on Leader Archetypes which will make this issue much easier to address.

Been thinking on that some lately.

Anyhow, some things they get angry about they'll never forget. Long standing bug due to the size of the project required to fix it.
 
You don't have to do any XML work to change how quickly (or slowly) the AI will forget past memories. It's controlled in the SDK, and can be easily modified. I know I've fiddled with it.
 
There are values in the leaderhead XML that can control how long they remember things. It's the MemoryDecays section. Bigger numbers make them less likely to forget - the base chance is one 1 in N each tern where N is the number in the XML.

As I have pointed out before, not all of the memory types have entries. All of the leaders (except the barbarian leader) have the same number of entries and that number is lower than the number of memory types by a noticeable amount. The DLL sets some of them (9, to be specific) to default values if not present in the XML. Anything not set in either place will never decay.

The decay rate values should probably be modified by some game speed modifier, but do not appear to be. It is modified by both the realistic diplomacy and ruthless AI options, both of which should make the decay more likely (and they are multiplicative if both active).

Fiddling with it in the DLL pretty much removes the entire point of having the XML in the first place. (After all, you could specify everything that is in all the XML by hardcoding it all the the DLL. But that would be silly.) By putting the decay info in the leaderhead XML you can give the leaders different values for the various memory types. Some should be (and are, for those memory types which are specified) more forgiving of some, or all, sorts of hostile actions and some leaders remember some, or all, friendly actions longer. This is a good thing.
 
I can just sya that my headache come from those 4

1) You declared war on us
2) You declared war on one of our friend
3) You razed our city

Those 3 seems to never decay.

4) You refused to stop trade with our enemy

I think this does.

In my current game I started after at least RL year and I decided to play on some easy mode and picked prince difficulty. Soon I became dominant force in the world and I decided to continue and I set my target to save all civs on the map and help those small against the big which currently results into 15 from initial 16 civilizations are still on the map, civs 2-7 on scroboard totally hates me (razed multiple cities before I realize I can give the cities to their neighbours, declared wars when needed) and there is no way how to change it unless I erase them from the map.
 
There are values in the leaderhead XML that can control how long they remember things. It's the MemoryDecays section. Bigger numbers make them less likely to forget - the base chance is one 1 in N each tern where N is the number in the XML.

As I have pointed out before, not all of the memory types have entries. All of the leaders (except the barbarian leader) have the same number of entries and that number is lower than the number of memory types by a noticeable amount. The DLL sets some of them (9, to be specific) to default values if not present in the XML. Anything not set in either place will never decay.

The decay rate values should probably be modified by some game speed modifier, but do not appear to be. It is modified by both the realistic diplomacy and ruthless AI options, both of which should make the decay more likely (and they are multiplicative if both active).

Fiddling with it in the DLL pretty much removes the entire point of having the XML in the first place. (After all, you could specify everything that is in all the XML by hardcoding it all the the DLL. But that would be silly.) By putting the decay info in the leaderhead XML you can give the leaders different values for the various memory types. Some should be (and are, for those memory types which are specified) more forgiving of some, or all, sorts of hostile actions and some leaders remember some, or all, friendly actions longer. This is a good thing.

Agreed. However, there's a generic way to tweak this in the code so that it does adjust to gamespeed, difficulty, and mapsize. I'm thinking at least gamespeed and difficulty should apply... Just need to recall how to set that up. AIAndy made a mechanism for that.

Not programming for a little bit here so I'll try to remember this topic in a bit when I get back to it.
 
Fiddling with it in the DLL pretty much removes the entire point of having the XML in the first place. (After all, you could specify everything that is in all the XML by hardcoding it all the the DLL. But that would be silly.) By putting the decay info in the leaderhead XML you can give the leaders different values for the various memory types. Some should be (and are, for those memory types which are specified) more forgiving of some, or all, sorts of hostile actions and some leaders remember some, or all, friendly actions longer. This is a good thing.

I disagree. XML is useful but it is possible to put too many things in the XML. There is no point in adding XML to things that are so verbose. The memory rands are a prime example. Updating the memory decays for all of the leaders (including leader expansions) is a herculean task that amounts to a vast amount of copying and pasting. This is silly - why should the XML be duplicated in so many places, with such a high chance for errors and missed updates? Especially when it only takes a small C++ edit to set the values for what would be tens of thousands of lines of XML.

100 lines of C++ > 10000+ lines of XML.
 
I disagree. XML is useful but it is possible to put too many things in the XML. There is no point in adding XML to things that are so verbose. The memory rands are a prime example. Updating the memory decays for all of the leaders (including leader expansions) is a herculean task that amounts to a vast amount of copying and pasting. This is silly - why should the XML be duplicated in so many places, with such a high chance for errors and missed updates? Especially when it only takes a small C++ edit to set the values for what would be tens of thousands of lines of XML.

100 lines of C++ > 10000+ lines of XML.

Which is in part one of the motivations for developing an archetype system. This would allow us to create leader personality xml templates and mix and match batched setups to expediate this process (and others) as well as set us up for a random leader generation system.
 
I can just sya that my headache come from those 4

1) You declared war on us
2) You declared war on one of our friend
3) You razed our city

Those 3 seems to never decay.

4) You refused to stop trade with our enemy

I think this does.

In my current game I started after at least RL year and I decided to play on some easy mode and picked prince difficulty. Soon I became dominant force in the world and I decided to continue and I set my target to save all civs on the map and help those small against the big which currently results into 15 from initial 16 civilizations are still on the map, civs 2-7 on scroboard totally hates me (razed multiple cities before I realize I can give the cities to their neighbours, declared wars when needed) and there is no way how to change it unless I erase them from the map.

I think it keeps a count of how many times you've done each thing. When one "decays" it just subtracts one from the number of times you've done that thing.

So if you've declared war on someone 5 times it has to decay 5 times before the modifier of that type goes away. That can take a long time since most of them average anywhere from once every 100 turns to once every 250 turns (or something like that - there are some outside that range but I think that covers most of them for most leaders).

As for the DLL vs. XML issue, the DLL is a good place to set defaults which the XML overrides to make each type different. The question is, is "never" an OK default for the memory types that currently have it, particularly for the types no leader overrides?
 
Top Bottom