Resource icon

Delnar's AI Cleanup 2016-11-06

Don't be stupid, this is confirmation bias. I haven't used this mod and computers I haven't met have declared war on me multiple times.

Being stupid? I have found the AI declare on me early in vanilla but never started by an unknown civ. Played almost 10 games, half without the mod then half with. I have no problem being proven wrong if vanilla has that bug too but I posted never seeing it.
 
Hi Delnar really TY for Your mod. I have some ideas/suggestions to further improve single player fun and challenge.
Can U tell me what U think about them and maybe U can add some more changes to this mod. So in my opinion the major gameplay
problems are and maybe sollutions to help AI are:

- ranged units (as always) are too strong witch favors highly human players.
- road movement is too slow
- too fast tech progress from mid to late game eras
- looks like AI's ignoring military techs too often
- need for better see/coast tiles witch will be good for both human and AI

There are probably some more wchich i forgot.
 
Delnar TY very much, your work is highly appreciated.

The word ""hopefully"" appeared in mist important part of change log for me. :) I hate those AI's not upgraded units. Did anyone test this? Do AIs with this mod upgrade their units faster?
I honestly do not know. For one, Unit gold spending could just be gold spent on quickbuying units, not gold spent on upgrading them. The gold priorities also seem a bit weird to begin with, too, since in most systems, higher number = higher priority, but splurge spending is set to 3 while plot buying is set to 1, so it may be the other way around for gold spending priorities.
Also, the problem is likely tied into the upgrading selection algorithm as well, which would only be accessible through DLL modding. It's likely they are using a similar algorithm as what was present in Civ5, but unit upgrades in Civ5 cost a lot less gold than upgrades in Civ6, so the algorithm they are using probably cannot handle the comparatively huge gold costs when upgrading from ancient/classical to medieval units. The algorithm also extends to military strength evaluation: it's likely that the scaling of unit strengths through the ages isn't non-linear enough, so the AI might think that having five chariots that cost no maintenance is good enough against a single tank.
Being stupid? I have found the AI declare on me early in vanilla but never started by an unknown civ. Played almost 10 games, half without the mod then half with. I have no problem being proven wrong if vanilla has that bug too but I posted never seeing it.
As I said, I encountered the bug an hour into my very first game of Civ6, so I'm extremely certain that it is present in vanilla. Besides, the logic behind when an AI can declare war on the player is completely on the DLL side, so there's no way I could affect the system through XML/SQL modding alone.
- ranged units (as always) are too strong witch favors highly human players.
- road movement is too slow
- too fast tech progress from mid to late game eras
- looks like AI's ignoring military techs too often
- need for better see/coast tiles witch will be good for both human and AI
We're getting a bit off-topic here, but...
Number 1 is something I have written essay-length posts about for Civ5: it's not that ranged units are too strong by themselves, it's that ranged combat doesn't feature counterattacks, so ranged units stay alive longer and get twice as many attacks in when fighting against melee units. Ranged counterattacks aren't something that can be added without DLL modding unfortunately, but thankfully, my Civ5 ranged counterattacks mod is waiting in the wings, so assuming that Firaxis didn't change much in the combat classes system, it can be ported and released for Civ6 shortly after the DLL source code is released. Number 2 is tied to eurekas and how population = science, and while the former can be changed through XML/SQL modding (remove all eurekas, alter tech costs to compensate), the latter needs DLL modding. Number 3, if true, would be due to the way the AI researches techs in Civ6 combined with the structure of the tech tree: the AI beelines towards a few key (lategame) techs most of the time due to favored lists, and because military techs aren't usually pre-requisites to non-military techs, if the AI is beelining towards a non-military tech, they obviously will not pick up any military techs along the way. Number 4 is purely a yield balancing issue, so until yield balance itself is fixed (e.g. food still being super-valuable, gold not being very valuable, internal trade routes being the best choice most of the time), it would be a waste to try to address it.
 
If ranged units are made cheaper can that get the AI to build more of them, so an army consists of more ranged units from the AI that might be an easy attempt to fix that problem of your ranged units rarely having a counter. Thanks for the information about the Ai declaring I never noticed in my vanilla games, I thought that person replying to me unnecessarily rude and hostile about such a small thing.
 
The AI actually upgrades units in some cases. I still have runaway victories but the AI is actually researching at a decent enough pace. Last game had Gandhi at 30 researched and Pericles at 28 during the Industrial era.

Things will be great once we can affect how the AI fights wars.
 
I had put a Pasture up on a second horses bringing total to 2. Next turn all my cities had a Horseman queued up to be built and it wiped out all the previous things being built.
 
I had put a Pasture up on a second horses bringing total to 2. Next turn all my cities had a Horseman queued up to be built and it wiped out all the previous things being built.
Unless something is incredibly messed up in the way Civ6 reads its SQL data, I'm fairly certain this isn't caused by the mod.

For future reference, most behavioral issues (i.e. issues with how the game behaves), especially ones that affect the human player, are DLL-side issues. Instances where the AI behaves in a way that should be illegal (e.g. declaring war on you before it has met you) are also DLL-side issues. What could be caused by the mod are weird variations in legal AI behavior, e.g. the AI including a type of unit in its army that it shouldn't and usually doesn't without the mod. Once us modders get to DLL modding, then our mods might be able to generate the types of bugs you're mentioning... and if it turns out the bug isn't caused by the mod in question, we might still be able to fix it anyway, but again, that's only once we start modding the DLL, which means we need DLL source code, and Firaxis does not have a good reputation for releasing DLL source code early in its latest games (Civ5's came out after G&K, CivBE's never came out).
 
Unless something is incredibly messed up in the way Civ6 reads its SQL data, I'm fairly certain this isn't caused by the mod.

For future reference, most behavioral issues (i.e. issues with how the game behaves), especially ones that affect the human player, are DLL-side issues. Instances where the AI behaves in a way that should be illegal (e.g. declaring war on you before it has met you) are also DLL-side issues. What could be caused by the mod are weird variations in legal AI behavior, e.g. the AI including a type of unit in its army that it shouldn't and usually doesn't without the mod. Once us modders get to DLL modding, then our mods might be able to generate the types of bugs you're mentioning... and if it turns out the bug isn't caused by the mod in question, we might still be able to fix it anyway, but again, that's only once we start modding the DLL, which means we need DLL source code, and Firaxis does not have a good reputation for releasing DLL source code early in its latest games (Civ5's came out after G&K, CivBE's never came out).

Im new to Civ modding, rarely did any in 4 and 5. Thanks for the information. I am using QuickUI and MadDjinns Tech Tree mods maybe there is a conflict.
 
Indian Varu does not have a Calvary move speed.
 
Im new to Civ modding, rarely did any in 4 and 5. Thanks for the information. I am using QuickUI and MadDjinns Tech Tree mods maybe there is a conflict.
I would guess it's a Quick UI issue, though, because that mod is focused on minimizing the actions needed to be taken by the player.

Edit: Confirmed it was a Quick UI issue. It has been fixed/addressed in the latest commits, as they added check boxes to toggle this function in the map options. It is now off by default.
 
Last edited:
I had put a Pasture up on a second horses bringing total to 2. Next turn all my cities had a Horseman queued up to be built and it wiped out all the previous things being built.
Quick UI mod does something like this.

Delnar, check your database.log. There are errors in your mod.
 
Last edited:
Question for you on a couple of the changes in the mod. you adjust a couple of items in the defaultflavorlist for offence and expansion. If I understand correctly lower values are more highly favored by the ai than higher values... so I think you tried to lower aggression and raise expansion and actually did the oppositte? not sure but you might want to look into that. Also I starting to test a game right now with these values
<Update>
<Where ListType="DefaultFlavorList" Item="Offense">
<Set Value="9">
</Update>
<Update>
<Where ListType="DefaultFlavorList" Item="Defense">
<Set Value="4">
</Update>
<Update>
<Where ListType="DefaultFlavorList" Item="Expansion">
<Set Value="1">
</Update>
<Update>
<Where ListType="DefaultCitySettlement" Item="SETTLEMENT_MIN_VALUE_NEEDED"/>
<Set Value="5"/>
</Update>

Personally I don't think that the AI builds any where close to enough settlers and way over builds military. So I took the SETTLEMENT_MIN_VALUE_NEEDED from 30 down to 5 (for reference the expansionist has a value of -10). But have you figured out what values would encourge the AI to build less military and focus more on tech and industry?
 
Hey Delnar, good to see you at work already in Civ VI. Although currently this mod seems to be broke. I saw this in Modding.log
Code:
[124557.762] Status: Applying Component - AICLEANUP_COMPONENT
[124557.762] Status: Creating database save point.
[124557.762] Status: UpdateDatabase - Loading AICleanup_Units.xml
[124557.763] Status: UpdateDatabase - Loading AICleanup_GlobalParameters.xml
[124557.763] Warning: UpdateDatabase - Error Loading XML.
[124557.763] Status: UpdateDatabase - Loading AICleanup_Leaders.xml
[124557.764] Warning: UpdateDatabase - Error Loading XML.
[124557.764] Status: UpdateDatabase - Loading AICleanup_Victories
[124557.764] Warning: UpdateDatabase - Could not load file. Unknown extension.
[124557.764] Status: Successfully released save point.
[124557.764] Status: Applied component to game.

So to fix these, in the .modinfo file you reference AICleanup_Victories twice but doesn't have its extension
Code:
<File>AICleanup_Victories</File> <-- causes error
<File>AICleanup_Victories.xml</File> <-- fixed

In GlobalParameters and Leaders, you have update blocks but forgot some slashes in all of them
Code:
Error:
<Update>
     <Where Name="AI_CURRENT_TASK_BIAS">
     <Set Value="50">
</Update>

Fixed:
<Update>
     <Where Name="AI_CURRENT_TASK_BIAS"/>
     <Set Value="50"/>
</Update>

Mod seems to load correctly once all these fixes are made.
 
@Delnar_Ersike Hey was reading through some of your stuff and like you've already said we will have to wait and see what the mod tools allow us to do. I was brainstorming and I think the agendas could be more powerful if used correctly, I think dynamically.

My thinking is the player usually goes in a game with a particular strategy in mind of how they will win the game diplo, science, culture or war. A human adjusts that strategy based on what happens as the game progresses, whereas the AI has a static strategy.

My way around this if we can get to the agendas AND edit them in real time. We could have the cpu reevaluate their agenda say ~20 - 30 turns and based on strategic resources, land, alone on an island or packed with 5 different civs, closeness to their UU, and things like that we could have them choose a new agenda that more appropriately reflects their current situation. Anyhow since you already were able to find things in the AI figured you might have more of an idea of what we could do to flesh them out some more.

And as you said if any of this stuff is even editable, hopefully we can create our own agendas and be able to edit them without having to reload the map.
 
In GlobalParameters and Leaders, you have update blocks but forgot some slashes in all of them
Code:
Error:
<Update>
     <Where Name="AI_CURRENT_TASK_BIAS">
     <Set Value="50">
</Update>

Fixed:
<Update>
     <Where Name="AI_CURRENT_TASK_BIAS"/>
     <Set Value="50"/>
</Update>

Not a programmer so do all sections in the GlobalParameters file need "/" at the end of their line?
 
Not a programmer so do all sections in the GlobalParameters file need "/" at the end of their line?
Only the ones that are standalone (like <Where ListType="DefaultFlavorList" Item="Offense"/>) and don't have their own closing tag (like <Update></Update>) need the "/" at the end. This is the case for all XML files, as it is basic XML markup syntax.
 
Top Bottom