LoneGazebo / Community-Patch-DLL

Community Patch for Civilization V - Brave New World
Other
291 stars 160 forks source link

Wrong Units Total Strength Calculation #6498

Closed Aqinu closed 3 years ago

Aqinu commented 4 years ago

_1. Mod version (i.e Date - 3/15): 4/10

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

3. Error description:

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. Make sure you have enabled logging before experiencing an error! Go here to find out how: http://forums.civfanatics.com/showthread.php?t=487482):

  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):

  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):

Here should be 30.1 (14 + 14 * 115%) for the hoplite, but it's 25.9 (14 + 14 +85%) b

Here should be 34.7 (14 + 14 148%) for the hoplite, but it's 30.5 (14 + 14 118%) here it's also +40% combat bonus as above but it's under the hoplite panel) a

The bonuses do add up correctly

LoneGazebo commented 4 years ago

It's because some penalties show up on the friendly side, and some bonuses show up on the enemy side. It's a firaxis choice, for whatever reason, but the actual calculation is not happening based on the UI.

Aqinu commented 4 years ago

So how the actual calculation is done if not from promotions gained and showed in panel, what's the point of the ui combat panel if it's not accurate and what's the point of promotions if some of those are not applied?

On the friendly side is calculated correctly (both screenshots) on the enemy side it's the problem, still I don't understand how those bonuses are gained are not applied (-30% bonus for hoplite in each case)

I don't understand what 'firaxis choice', I think some bonuses are not being applied...

LoneGazebo commented 4 years ago

It's not a matter of the bonus being applied, it's that the enemy side UI elements are sometimes applied to the friendly values.

Aqinu commented 4 years ago

But how are applied to friendly values if the 'friendly bonuses' add up correctly (total strength is calculated correctly it's not bigger than it should with shown friendly bonuses), where are applied?

Aqinu commented 4 years ago

but the actual calculation is not happening based on the UI.

The UI Shows the promotions (icons) for enemy unit (the bonuses for those promotions/icon are shown correctly in enemy panel), it means that those promotions are not in fact gained/applied, then those are misleading...

Stalker012345 commented 4 years ago

So the million dollar questions...

1) Is it fixable? 2) If not, is it possible to change the bonus to a different "type" that does show up correctly? 3) If neither, can we get a list of bonuses that do that so we aren't putting up false alarms?

LoneGazebo commented 4 years ago

We'd need to dissect the enemy unit panel lua...which is very complex, redundant, and awful.

ilteroi commented 4 years ago

should i ever lie in a hospital bed with two broken legs, i might implement a sane system where all the bonuses are reported directly from the gamecore instead of being reverse-engineered on lua side. until then, we'll have to live with the occasional inconsistency.

Aqinu commented 4 years ago

After some testing I found out the following:

Adjacent friendly unit bonus doesn't work/apply for both player and enemy: Stage1a: with adjacent bonus 9 total damage from chariot a1

Stage1b: WITHOUT adjacent bonus still 9 total damage from chariot a2

Stage2a: Hoplite WITH adjacent bonus 17.5 c1

Stage2b: Hoplite WITHOUT adjacent bonus 17.5 c2

General bonus DOESN'T WORK ONLY for the enemy units Stage2a: WITHOUT GENERAL 22.1 damage from hoplite b1

State2b: WITH GENERAL STILL 22.1 damage from hoplite b2

RecursiveVision commented 4 years ago

I'll consider working on this when I get back.

RecursiveVision commented 3 years ago

Going to do some work on this :)

Stalker012345 commented 3 years ago

Was this fixed?

RecursiveVision commented 3 years ago

No, but there was two issues open for this. Will fix soon, hopefully.