Kailric
Jack of All Trades
We can talk about all kinds of AI improvements here.
I recently took the time to cypher out why the AI will attempt to produce things even though it doesn't have all the materials. This was due to the multi yields code of course but I finally took some time to pin point where. When the AI checks for Profession value it was only programed to check for 1 of the multi yield inputs, so I added code to cycle all of them, keeping the lowest amount as the modifier. This fixed two issues the AI was having in my current saved game as they changed those Units professions. A Minor Civ was still attempting to produce Hammers even with out Lumber though, so I'll need to check into that. Natives and Minor Civs get treated a bit different lots of times in the AI. I added an Assert to the UnsatisfiedProfessions code that will trip if an AI has unsatisfied yields to test this out for a bit. I'll push the changes when I have tested a bit more.
One handicap the AI has is that it uses way to many units as Defenders. These units could be set to work in the Cities instead of just standing around gawking at each other.
And they need improvements at war times so they don't send defenseless units walking past the enemy.
I recently took the time to cypher out why the AI will attempt to produce things even though it doesn't have all the materials. This was due to the multi yields code of course but I finally took some time to pin point where. When the AI checks for Profession value it was only programed to check for 1 of the multi yield inputs, so I added code to cycle all of them, keeping the lowest amount as the modifier. This fixed two issues the AI was having in my current saved game as they changed those Units professions. A Minor Civ was still attempting to produce Hammers even with out Lumber though, so I'll need to check into that. Natives and Minor Civs get treated a bit different lots of times in the AI. I added an Assert to the UnsatisfiedProfessions code that will trip if an AI has unsatisfied yields to test this out for a bit. I'll push the changes when I have tested a bit more.
One handicap the AI has is that it uses way to many units as Defenders. These units could be set to work in the Cities instead of just standing around gawking at each other.
And they need improvements at war times so they don't send defenseless units walking past the enemy.