LoneGazebo / Community-Patch-DLL

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

Issues with the RoughAttack and RoughRangedAttackMod flags #8157

Closed monkeystick closed 3 years ago

monkeystick commented 3 years ago

1. Mod version (i.e Date - 4/14): 7-1-3

2. Mod list (if using Vox Populi only, leave blank): (overhaul) More Wonders for VP v11 Ingame Editor (v 39)

3. Error description: The two flags behave strangely and cause disparities between the bonuses stated in the combat preview and the final calculated attack strength of a unit. These bonuses are used by the "Imperial Army" promotion from the More Wonders mod.

a) RoughAttack and RoughRangedAttackMod don't work in the same way because they alter final attack strength under different circumstances. RoughAttack works when the enemy is in rough terrain and RoughRangedAttackMod works when you are in rough terrain. Is this behavior intended? b) When they appear in the combat preview, RoughAttack and RoughRangedAttackMod do so simultaneously for both melee and ranged units even though no more than one of them is ever involved in the calculation for final attack strength. c) RoughRangedAttackMod appears in the combat preview for ranged units only when the enemy is in rough terrain but actually alters final attack strength only when your unit is in rough terrain.

Is it possible and would it be useful to make RoughAttack affect both melee and ranged units (but for ranged affect RCS instead of regular strength) and discard RoughRangedAttackMod?

4. Steps to reproduce (optional):


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"): Logs.zip

  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): Gustavus Adolphus_0002 BC-3920.zip

  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): Issue b) issueB1 issueB2

Issue c) issueC1 issueC2

LoneGazebo commented 3 years ago

The ranged rough attack discrepancy sounds like a bug

adaneslavo commented 3 years ago

There are also issues with Flanking parameter in the unit combat UI. It shows some odd percentages which after calculation are not taken into account. Sometimes it shows 50% bonus, but uses only part of it etc. I can't tell you if the calculations are correct or the UI. It's easy to reproduce.

RecursiveVision commented 3 years ago

EnemyUnitPanel still busted...I'll fix eventually

adaneslavo commented 3 years ago

Fixed? What about logical differences between these two methods?

a) RoughAttack and RoughRangedAttackMod don't work in the same way because they alter final attack strength under different circumstances. RoughAttack works when the enemy is in rough terrain and RoughRangedAttackMod works when you are in rough terrain. Is this behavior intended?
LoneGazebo commented 3 years ago

I fixed the DLL issue with ranged being based on your location, not enemy.

RecursiveVision commented 3 years ago

@adaneslavo I believe so? Gazebo changed the code for it.

Edit: Yes ^

As for the display issue, I still need to fix that. The display code is broken in general, but there's already an issue open for that.