LoneGazebo / Community-Patch-DLL

Community Patch for Civilization V - Brave New World
Other
285 stars 157 forks source link

AI units move much farther than they should be able to #8391

Closed Thurhame closed 2 years ago

Thurhame commented 2 years ago

1. Mod version (X.Y.Z, e.g. 1.2.0): I used the version 1.0.3 installer from https://drive.google.com/drive/folders/1C4EUItogZx-3XpkzyPA52WLaDSWZqxVZ, but for some reason Civ lists it as version 0.94: Mod version

2. Mod list (if using Vox Populi only, leave blank): Community Patch ai and bugfix mod only.

3. Error description: An AI Knight and Musketman both crossed several forested hills to reach and kill a wounded unit I had retreated. Civ5 CP ai movement bug

4. Steps to reproduce (optional): Load save and click end turn, then watch enemy movements: Bug Report Save.zip


Supporting information: Please note that you can attach .zip files by dragging-and-dropping them. If possible, zip up all supporting data and post that way.

  1. Log files (always attach your Logs folder, located at My Documents/My Games/Sid Meier's Civilization 5. For instructions, go to the repository's main page, under "To enable logging for bug reports"):

  2. Save game (always attach a save that was made a turn before the error; located at My Documents/My Games/Sid Meier's Civilization 5/ModdedSaves; you can change autosave frequency in the game's Options menu):

  3. CvMiniDump.dmp file (attach if experiencing a game crash. Located at Program Files/Steam/steamapps/common/Sid Meier's Civilization V):

  4. Screenshots (optional):

LessRekkless commented 2 years ago

It looks like the Iroquois, who use forests as roads, used forests as roads to attack your unit. However, a bunch of those forests are outside of their territory.

Thurhame commented 2 years ago

It looks like the Iroquois, who use forests as roads, used forests as roads to attack your unit.

According the Civilopedia, they only use forests in friendly territory as roads. Neither the hexes belonging to Antananarivo (who is my ally and at war with the Iroquois), nor the neutral hex the knight crosses a river to reach, should count as roads based on that description.

Thurhame commented 2 years ago

Show us the promotions of those two units.

How do I do that? I can't select enemies, and even if I target them for a combat preview it disappears when I move the mouse, so I can't hover over the promotion icons to see what they are.

20211114174238_1 20211114174240_1

RecursiveVision commented 2 years ago

In full VP, the Iroquois treat all forests and jungles as roads, even those outside their territory. I'll correct the text.

LessRekkless commented 2 years ago

@RecursiveVision, Iroquois units also get the Woodsman promotion: https://github.com/LoneGazebo/Community-Patch-DLL/blob/d345671cd429de86b37f24507186af890ed1b4ba/Community%20Balance%20Overhaul/Balance%20Changes/Units/UniqueUnits.sql#L484-L499 Isn't this double dipping with IsWoodlandMovementBonus? Or is the tile not considered both Road and Forest when it comes to movement?

LessRekkless commented 2 years ago

Ah, @RecursiveVision : Thurhame isn't playing with VP, he's only playing with the AI patch. Should the relevant movement code be behind an if statement with regards to Balance changes?

Or is this considered a balance change relative specifically to AI improvement? https://github.com/LoneGazebo/Community-Patch-DLL/blob/b044a6d077d79476149aa3bfb223c5b2dea7b9ce/CvGameCoreDLL_Expansion2/CvUnitMovement.cpp#L46-L54

Thurhame commented 2 years ago

In full VP, the Iroquois treat all forests and jungles as roads, even those outside their territory. I'll correct the text.

I'm not using VP, only the basic ai/bugfix patch that supposedly doesn't change any game mechanics.

ilteroi commented 2 years ago

i fixed this for city connections but apparently i forgot about unit movement.

RecursiveVision commented 2 years ago

@ilteroi fix awaited then :)

also I merged #8373 as you didn't respond but let me know if there's an issue with it

RecursiveVision commented 2 years ago

@LessRekkless Road movement + Woodsman is intended, see their trait.

RecursiveVision commented 2 years ago

In full VP, the Iroquois treat all forests and jungles as roads, even those outside their territory. I'll correct the text.

I'm not using VP, only the basic ai/bugfix patch that supposedly doesn't change any game mechanics.

@Thurhame There are small game mechanic changes (e.g. No More Civilian Traffic Jams). However some bugs have crept in and there are surely a few unintended balance changes in the code. Since not that many players play CP only we rely on bug reports to fix them.

Thurhame commented 2 years ago

Thank you I really enjoy the interface qol fixes in CP, so I'm glad this issue is resolvable.

@Thurhame There are small game mechanic changes (e.g. No More Civilian Traffic Jams). However some bugs have crept in and there are surely a few unintended balance changes in the code. Since not that many players play CP only we rely on bug reports to fix them.

Is there a list of the intended changes for reference?

LessRekkless commented 2 years ago

@Thurhame my only remaining question is: did the musketman in your screenshot moved over the river and then attack in the same turn? Or did it end its turn there?

Thurhame commented 2 years ago

@Thurhame my only remaining question is: did the musketman in your screenshot moved over the river and then attack in the same turn? Or did it end its turn there?

If you mean the knight, yes it moved over the river and then attacked. I assume Bridge Building applied to the fake road. (The musketman attacked directly over the river, so it doesn't count for your question.)