Resource icon

AI+ v13.1

[1106127.274] [Localization]: Validating Foreign Key Constraints...
[1106127.274] [Localization]: Passed Validation.
[1106127.427] [Configuration]: Validating Foreign Key Constraints...
[1106127.428] [Configuration]: Passed Validation.
[1106135.438] [FullTextSearch]: Initializing FullTextSearch
[1106141.263] [Gameplay]: Validating Foreign Key Constraints...
[1106141.274] [Gameplay]: Passed Validation.
[1106142.559] [Configuration]: Validating Foreign Key Constraints...
[1106142.559] [Configuration]: Passed Validation.
[1106171.490] [Configuration]: Validating Foreign Key Constraints...
[1106171.490] [Configuration]: Passed Validation.
[1106274.680] [Gameplay] ERROR: FOREIGN KEY constraint failed
[1106274.680] [Gameplay] ERROR: FOREIGN KEY constraint failed
[1106274.680] [Gameplay]: Validating Foreign Key Constraints...
[1106274.688] [Gameplay] ERROR: Invalid Reference on OpTeamRequirements.AiType - "UNITTYPE_CIVILIAN_LEADER" does not exist in UnitAiTypes
[1106274.688] [Gameplay] ERROR: Invalid Reference on OpTeamRequirements.AiType - "UNITTYPE_CIVILIAN_LEADER" does not exist in UnitAiTypes
[1106274.693] [Gameplay]: Failed Validation.
[1106274.696] [Gameplay] ERROR: Database::XMLSerializer (ResearchTimeX2_GamePlayData.xml): <Update> element requires a child <Set> element.
[1106274.696] [Gameplay]: In XMLSerializer while updating table Technologies from file ResearchTimeX2_GamePlayData.xml.
[1106274.724] [Gameplay]: Validating Foreign Key Constraints...
[1106274.736] [Gameplay]: Passed Validation.
[1106276.805] [Configuration]: Validating Foreign Key Constraints...
[1106276.805] [Configuration]: Passed Validation.
 
@ctudor

Sounds like you don't have the winter patch installed succesfully, or you did something to your units.xml file. The UNITTYPE_CIVILIAN_LEADER bit was added there.

The mod that uses ResearchTimeX2_GamePlayData.xml also seems broken somehow.

If you can't figure out a way to get the right units.xml, then you may want to just remove this line in military.xml of AI+ and reload the mod fully (close game, change versionnumber in modinfo, then reapply tick in additional content)

<Row TeamName="Simple City Attack Force" AiType="UNITTYPE_CIVILIAN_LEADER" MaxNumber="1" />
 
i don't have winter dlcs yet, just 0.38. but i use more units! mod. he made some changes there. tbh i just added researchtime, but i had problems also before that.

upload_2016-12-27_22-38-18.png
 
Okay, installing the patch will solve the problem then. If you can't/don't want to get the winter patch then you should probably just remove that line from military.xml and at least ai+ will load succesfully.
 
Confirming that AI is much better at providing a reasonable military threat. Watched my neighbour Spain destroy one of Norway's walled cities with Bombards; their constant war declarations against my civilization (Kongo) and growing military strength actually prompted me to put in work towards an alliance. You're definitely on the right path towards providing challenging AI players.

Also, I haven't seen any issues regarding district creation. There just seems to be a (reasonable) bias towards Harbors, Encampments and Industrial Zones, but most districts are represented by a few civilizations.

Currently using the NQ Modpack and Smoother Difficulty mods, while playing on Deity.
 
I fired up a game on King with v9 and yeah, the AI is rolling over City-states (and neighboring Civs). I haven't been attacked yet (early Medieval Era) but Kongo and at least one other Civ have been wiped out in addition to a few City-states.

It's refreshing to actually have to bother building a military to defend with. :)
 
Just started a new Deity game w/ v9, and by turn 60 or so there are barely any CSs left! My neighbor France took out 3 or 4 already.. Will be a fun time liberating them later and I am eager to see how the AI fights once I engage in my first war. I am taking extra caution prepping for war as the AI definitely seems more threatening. May have to wait until medieval era. Haven't seen unescorted settlers yet either. Great job.

Also became official friends w my neighbor before turn 50 (after aligning w her agenda) so that change is definitely noticeable as well. Didn't happen before.
 
Just finished a Deity game; lost to Japan's Science Victory. There was warfare throughout the eras, with most civilizations gunning for Japan near the end in a bid to deny the victory. I saw every type of unit, including air-craft! Great job, I'm going to attempt an Immortal game and see how the AI handles that.
 
I am playing an Emperor game (Smoother Difficulties)
with AI+ v9 and Omnibus 1.2.3 Enhanced rules,
small detailed pangea map with 8 AI civs, I am Scythia (by random)

I saw 3-4 war declarations in ancient+classical era, and maybe 2-3 CS captured by AI - great!

I started on west edge of the map, so settled 4 cities on coast. My neighbour to the east is Russia.

Russia DoW on Egypt (to his east), and captured (!) one of her cities. Wow!
Just at this time I DoW Russia with my 6 UU horses and 2 spears (I prepared for this timing of war).
Russia had no units in his homeland, all units fought at the east in Egypt…
I captured 2 Russian non-walled (?) cities when his units from east appeared: swords, cats, chariots… that was quite a force, but I had advantage, as I turned my 2nd GG into a Knight, and this single unit created BIG advantage for me…
Russian concentrated forces to capture my allied CS and did capture it (!).
He defended his cities with 1-2 units… and had no chance against me - but still, this at least WAS some fight for me, something like a civ game should be…

Russia had 6 cities in total: 4 own + 1 Egypt + 1 CS
(I left Peter alive with one pathetic snow coastal city)

What is not good: AI still doesn’t attack with ranged unit from the city I attack…

BTW, AI USA leads, ahead of me in techs… (my tech score is 30, USA is 48) in ca. AD 1050
 
Last edited:
[1153541.921] [Localization]: Validating Foreign Key Constraints...
[1153541.939] [Localization]: Passed Validation.
[1153542.086] [Configuration]: Validating Foreign Key Constraints...
[1153542.086] [Configuration]: Passed Validation.
[1153555.597] [FullTextSearch]: Initializing FullTextSearch
[1153637.490] [Gameplay]: Validating Foreign Key Constraints...
[1153637.506] [Gameplay]: Passed Validation.
[1153641.514] [Configuration]: Validating Foreign Key Constraints...
[1153641.514] [Configuration]: Passed Validation.
[1153703.234] [Configuration]: Validating Foreign Key Constraints...
[1153703.234] [Configuration]: Passed Validation.
[1153706.444] [Configuration]: Validating Foreign Key Constraints...
[1153706.444] [Configuration]: Passed Validation.
[1153709.367] [Configuration]: Validating Foreign Key Constraints...
[1153709.368] [Configuration]: Passed Validation.
[1153714.457] [Configuration]: Validating Foreign Key Constraints...
[1153714.458] [Configuration]: Passed Validation.
[1153716.290] [Configuration]: Validating Foreign Key Constraints...
[1153716.291] [Configuration]: Passed Validation.
[1153719.983] [Configuration]: Validating Foreign Key Constraints...
[1153719.983] [Configuration]: Passed Validation.
[1153729.685] [Configuration]: Validating Foreign Key Constraints...
[1153729.685] [Configuration]: Passed Validation.
[1153731.482] [Configuration]: Validating Foreign Key Constraints...
[1153731.483] [Configuration]: Passed Validation.
[1153739.692] [Configuration]: Validating Foreign Key Constraints...
[1153739.692] [Configuration]: Passed Validation.
[1153741.239] [Configuration]: Validating Foreign Key Constraints...
[1153741.239] [Configuration]: Passed Validation.
[1153743.063] [Configuration]: Validating Foreign Key Constraints...
[1153743.063] [Configuration]: Passed Validation.
[1153744.679] [Configuration]: Validating Foreign Key Constraints...
[1153744.679] [Configuration]: Passed Validation.
[1153748.003] [Configuration]: Validating Foreign Key Constraints...
[1153748.004] [Configuration]: Passed Validation.
[1153749.552] [Configuration]: Validating Foreign Key Constraints...
[1153749.552] [Configuration]: Passed Validation.
[1153755.908] [Configuration]: Validating Foreign Key Constraints...
[1153755.908] [Configuration]: Passed Validation.
[1153758.555] [Configuration]: Validating Foreign Key Constraints...
[1153758.556] [Configuration]: Passed Validation.
[1153762.540] [Configuration]: Validating Foreign Key Constraints...
[1153762.541] [Configuration]: Passed Validation.
[1153763.748] [Configuration]: Validating Foreign Key Constraints...
[1153763.748] [Configuration]: Passed Validation.
[1153771.510] [Configuration]: Validating Foreign Key Constraints...
[1153771.510] [Configuration]: Passed Validation.
[1153954.514] [Configuration]: Validating Foreign Key Constraints...
[1153954.514] [Configuration]: Passed Validation.
[1153956.926] [Configuration]: Validating Foreign Key Constraints...
[1153956.926] [Configuration]: Passed Validation.
[1153958.189] [Configuration]: Validating Foreign Key Constraints...
[1153958.189] [Configuration]: Passed Validation.
[1153962.946] [Configuration]: Validating Foreign Key Constraints...
[1153962.946] [Configuration]: Passed Validation.
[1153964.139] [Configuration]: Validating Foreign Key Constraints...
[1153964.140] [Configuration]: Passed Validation.
[1153966.506] [Configuration]: Validating Foreign Key Constraints...
[1153966.506] [Configuration]: Passed Validation.
[1153967.769] [Configuration]: Validating Foreign Key Constraints...
[1153967.769] [Configuration]: Passed Validation.
[1153971.348] [Configuration]: Validating Foreign Key Constraints...
[1153971.348] [Configuration]: Passed Validation.
[1153972.706] [Configuration]: Validating Foreign Key Constraints...
[1153972.706] [Configuration]: Passed Validation.
[1154201.455] [Configuration]: Validating Foreign Key Constraints...
[1154201.455] [Configuration]: Passed Validation.
[1154204.138] [Gameplay] ERROR: Database::XMLSerializer (ResearchTimeX2_GamePlayData.xml): <Update> element requires a child <Set> element.
[1154204.138] [Gameplay]: In XMLSerializer while updating table Technologies from file ResearchTimeX2_GamePlayData.xml.
[1154204.245] [Gameplay]: Validating Foreign Key Constraints...
[1154204.260] [Gameplay]: Passed Validation.


after update seems to be fine, just that tiny problem.
 
Awesome to hear all the positive feedback!

For the next patch I just hope I can figure out a way to make them attack city states a little less so they don't just eliminate that game mechanic from the game. I'd rather they focus a little more on players and gain their land that way.

No idea what to do about the range units not attacking issue yet, there might not be anything I can do. It feels like they basically just have the same logic for determining whether to attack as melee, so if a melee wouldn't attack they won't either. Which is silly of course as range attacks are always free.
 
Me trying to use this mod with my own: [1159313.294] [Gameplay] ERROR: Invalid Reference on UnitAiInfos.UnitType - "UNIT_EGYPTIAN_CHARIOT_ARCHER" does not exist in Units
Yeah of course, I delete them all. So I go to my mod's modinfo and add AI+ to References, which makes my mod load afterwards, and I can create a game fine.
Now I try to load a saved game, and I get those foreign key constraint errors again, game doesn't load, back to main menu.
Obviously References only works on game setup not on save game loading?

One more observation: that table, AiFavoredItems has a column, Value, which is INTEGER. Yet I see lines like
<Row ListType="ModdedSettleSpot" Item="Inner Ring Yield" Value="0.75" StringVal="YIELD_CULTURE"/>
in core.xml. It's actually stored in the database, because sqlite doesn't really care it seems, but I'd say there's a good chance that the game logic itself expects integer values and coverts 0.75 to 0 when trying to use it. Or have you seen in those revealing logs that it all actually works as intended?
 
Now I try to load a saved game, and I get those foreign key constraint errors again, game doesn't load, back to main menu.
Obviously References only works on game setup not on save game loading?

Saved games seem to at least partially remember the state of the mods as they were when it was saved. Id recommend trying to see how this goes with newly saved games.

One more observation: that table, AiFavoredItems has a column, Value, which is INTEGER. Yet I see lines like
<Row ListType="ModdedSettleSpot" Item="Inner Ring Yield" Value="0.75" StringVal="YIELD_CULTURE"/>
in core.xml. It's actually stored in the database, because sqlite doesn't really care it seems, but I'd say there's a good chance that the game logic itself expects integer values and coverts 0.75 to 0 when trying to use it. Or have you seen in those revealing logs that it all actually works as intended?

Hmm, good point here, the vanilla files only ever seem to use integers as well. The differences are small enough that it's hard for me to tell whether they actually work in their correct relationships, there's no good logs for this either. They may be rounding to 1 directly, or may round after calculations. I'm pretty sure it at least doesn't get rounded to 0 before the calculation, as they do seem to value culture etc.
One small indicator that it might work, is that at least some of the weighted choice points are not fully done through integers, the citybuilds log for example shows numbers after the decimal point frequently.

A bit of a problem here is that these numbers don't exist in a vacuum. If I'd multiply them all by 10 to allow for better integer based precision, it changes the total valuation score, and with that the desire to settle. The sort of weirdly precise numbers you see now are only there because I had higher numbers first that I divided down.
I'll keep this in mind and will see if it causes anything odd. At it's worst it's just going to be the same as in vanilla
 
Saved games seem to at least partially remember the state of the mods as they were when it was saved. Id recommend trying to see how this goes with newly saved games.
I am talking about a newly saved game (autosave) from a newly started game - I couldn't even have started a game with AI+ if I didn't add AI+ modid to my mod's References list in the .modinfo file. I did that, started the game, tried to load an autosave from the last turn ..
It sent me back to main menu.
 
Last edited:
Siesta:

V9 - huge gameplay improvement. AI is making attack moves that I haven't seen it try before. Really good work.
Balance mods for late game city strength and anything else you feel should be adjusted would be welcome.
If, for example, you think it would be simpler to make a mod that increases CS early game defending rather than trying to decrease the AI's desire to capture CS, then go with the easier fix.

Have you sent your resume and copy of this mod to the developers yet? Maybe they will hire you and give you access to the full game code. Because if you can make these huge improvements with the limited tools available, imagine what you could do with the full code and compensation for your efforts.

Thanks again for the great work.
 
Played my first post-winter patch with the AI+ ver9. Really like it so far. Lost 3 games on immortal in the ancient and classical era before finally getting into the swing of the aggressive AI.

I did notice a few circumstances where a pair of warriors would attack my archer. I had a high ground advantage and shot at them while they approached. They then just got next to me and fortified. Once each one was low enough to be killed on the next shot they started running away. Other than this small detail the AI has been behaving quite well!!!

Thanks so much!
 
Hello there, thanks for the work, I've been trying the v9 @ immortal level.
Something I noticed:

1) I was fighting vs Roosevelt and noticed that he was using AT Crew units only. A spamload of them. Few siege weapons..

2) In fact Roosevelt wasn't able to capture one of my city state ally after he killed all the city state units.. America's AT crews were just wandering clueless in the city state territory, waiting to be killed by the city-state defense.

3) I got most of the trouble from a barbarian camp, which was constantly spawning different types of units (musketman, cannons, bombards).
I don't mean it's wrong. I actually liked to have to clean some crazy nest of barbarians. Is that a vanilla behaviour? Or it comes with this mod?

3) Noticed in v9 and v8: AIs don't build at all Campus districts.. I'm playing in a small map and AIs have built just 2 o 3 campus in total... Is that normal? Didn't noticed this in vanilla..


thanks again, will keep playing with this mod on.
 
Last edited:
Back
Top Bottom