LoneGazebo / Community-Patch-DLL

Community Patch for Civilization V - Brave New World
Other
288 stars 159 forks source link

AI having problems with settlers, fortified retinue and in place #3959

Closed Enrico-Swagolo closed 6 years ago

Enrico-Swagolo commented 6 years ago

1. Mod version (i.e Date - 4/23): current, most hotfix up to date (?)

2. Mod list (if using Vox Populi only, leave blank):

3. Error description: I often see AI just move their settlers, often with the right retinue (like warrior/spear/etc) to some weird spot, and then they just fortify the warrior and the settler stands there. The Indian guys were there for half the game, (the lower one way longer). Bismarck has recently sent his guys to do the same thing, they've been sitting there for two turns. It's as if the unit tries to make a city where it can't make a city, but it doesn't change the target/priority. I've seen that with a Danish setttler too this game, and in some previous games on this patch - 'tis not a pure coincidence. I forgot how to logs. Gandhi has been rendered a non-threat as a result, while in Bismarck's case.

arelaMaria I_0184 AD-0160.zip .

Bloodrocution commented 6 years ago

I have witnessed this happen in a game as well. A Songhai settler who, for some reason got separated from his spearman escort, was trying to push up through a gap in the border between 2 of my cities to settle on an island off the northern coast, but I purchased land to close the cap so he couldn't pass without open borders (not available at the time) or a DoW, and instead of going back from where he came or trying to find a new location, he just moved to a hill at the edge of my borders and stood there indefinitely.

He was not blocked off from retracing the route he took after I closed the border, only from proceeding any further, but he still insisted on camping at my border and never moved, and eventually his way back did get closed off from natural border expansion if I recall correctly.

The only thing I can think of is that the route back was too far and/or convoluted for the AI to figure out how to get back to his own territory (probably over 20 tiles and involving multiple embarkation/dis-embarkations).

I have the save file, but I think too many turns have progressed since I first observed this occurrence for it to provide any useful information. If I see it happen again, I will follow up unless this gets resolved in the meantime.

ilteroi commented 6 years ago

never seen that ... screenshot? save doesn't load for me

Enrico-Swagolo commented 6 years ago

screene.zip Here. They've been there for most of the game despite having it possible to settle (like before my cities were erected there), crippling India irreversibly by not settling.

Bloodrocution commented 6 years ago

I think I just found another instance of this.

Austrian settler started moving south towards my lands, then just stopped outside the border of his capital Vienna—undefended and completely exposed to being captured in the [very likely] event that we go to war, I might add—and has stood there for at least three of four turns now, even though he has other locations to the north and east which the AI should find desirable for city locations ( a spot with access to whales, and another with access to horses—screenshot below).

Confused Settler

Screenshot showing where I think he was trying to go: Tabriz I think he was originally trying to settle around where I founded Tabriz, because that was the only open land reachable for him in that direction until I took it, and Maria denounced me for "settling lands she considers to be hers" (yeah, ok Maria) 3 turns after I founded it.

Save file, version 12/15:

Genghis Khan_0061 BC-2475.zip Mods list: mods

P.S. Another two turns and settler hasn't moved, so I don't think he is going to.

Enrico-Swagolo commented 6 years ago

When it comes to me, I only use VP by the way. No other mods.

Bloodrocution commented 6 years ago

Update on my game:

16 turns later from the first screenshots I took, that settler finally founded a city in this less-than-optimal (at least as far as resource access), but nonetheless annoying spot. I was already preparing to go to war with Maria anyway, so I took this, in combination with her unprovoked denouncement of me as sufficient provocation and responded accordingly :)

Remember the Alamo

It could be a coincidence but what I think may have triggered it is that I had declared war on Harold Bluetooth the turn prior, because Brazil and a city state bribed me to (not actually expecting any conflict because of our distance, but I got Brazilwood, CS influence, GPT, and the ability to build mounds out of the deal). Possible clue for what the AI is thinking maybe?

LoneGazebo commented 6 years ago

More useful than speculation here is logs. Specifically the AIOperation and HomelandAI logs. If you don't have AI logging enabled, enable it, run the scenario where the settler freezes, and then post those logs.

G

Bloodrocution commented 6 years ago

I had logging enabled, but not AI logging unfortunately :( . The guide didn't mention that, so I wasn't aware of it. I have it enabled now. The save I uploaded was after the settler had already become frozen so I'll have to encounter another instance of it I'm guessing.

Bloodrocution commented 6 years ago

Loaded the save anyway and played two turns just to see if anything could be gleaned. Is this the correct log you are talking about?

net_message_debug.zip [1212913.984] DBG: UpdateMoves() : player 8 Maria Theresa running AutoMission (NO_MISSIONAI) on Settler id=2223

These are the only logs that I have in my folder (no AIOperation.log or Homeland.log) log list My Config.ini with AI logging enabled: config

bigcat88 commented 6 years ago

LoggingEnabled = 1? MessageLog = 1?

LoneGazebo commented 6 years ago

AILogging needs to be on

Bloodrocution commented 6 years ago

MessageLog =1 ?

AILogging was on, but MessageLog was off.

That was the missing one, thanks. OperationalAILog_Austria.zip PlayerHomelandAILog_Austria.zip

LoneGazebo commented 6 years ago

CvGameCore_Expansion2.zip

Run the same turn set again, see if anything changes.

Bloodrocution commented 6 years ago

Crashes to desktop while loading/configuring the mods from the main menu.

Just to be clear, because you didn't specify, but I assume you wanted me to put that .DLL file into this folder to replace the existing one: replace this?

I tried again after deleting cache and ModUserData folders. Still CTD.

LoneGazebo commented 6 years ago

If you weren't on the very latest DLL it will crash.

Bloodrocution commented 6 years ago

Didn't realize a new version was out! Still using the December release. Can't wait to try it!

Bloodrocution commented 6 years ago

I updated to the latest official version (2-7-3), once again deleting ModUserData and cache folders, replaced the CoreExpansion DLL, and the mods configured successfully, but the save file does not load now unfortunately.

Guessing it's not savegame-compatible considering how massive the changes from Dec to Feb release are. I'm starting a new game and see if I can't encounter the issue again.

Enrico-Swagolo commented 6 years ago

I've used the CvGameCore file and replaced the version 7 feb with it, and I've noticed the AI became absolutely crazy about certain spots. Two games in a row, there's a splendid location somewhere and the AI will send their settlers there trying to put a city there even if it's on the other side of the continent. Usually it has a NW or many resources, like one floodplains + 2 horse + etc city. I'm on 5 cities, but everyone is probably trying to get to the spot on the way to which there's tons of mountains and barbarians, so the settlers + retinue likely perish. All 3 AIs on the continent have no cities but their capital, Casimir because I killed his warrior trying to settle near the El Dorado and then another one. I will try to get lodgs.

LoneGazebo commented 6 years ago

I didn’t touch settling routines or anything so that’s a placebo effect. I just told the AI to retreat civilians that are unable to move.

Enrico-Swagolo commented 6 years ago

Ah, okay. Then I haven't seen the Warrior + Settler sitting on a spot for eternity/until you threaten player with war yet, so good job (though my observations are limited as I'm singular and, for all I know, such a thing could happen next game). On the other hand I think you should probably tighten expansion, though. AI shouldn't be trying to settle so far away early where there's no chance to defend their position when there's an obvious player there who's going to definitely raze their stuff as well as tons of barbies that might kill them.