LoneGazebo / Community-Patch-DLL

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

Strategic resource subtotals mis-reported in mouse-over text #4824

Closed squidgeny closed 5 years ago

squidgeny commented 6 years ago

1. Mod version (i.e Date - 4/23):

5-20

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

3. Error description:

The subtotal for Local resources incorrectly shows the total of Local resources + resources from Policies, Religion and Corporations, when it should show just the total of Local resources.

Similarly, the subtotal for Resources from Policies, Religion and Corporations incorrectly shows the total of Local resources + resources from Policies, Religion and Corporations, when it should show just the total of resources from Policies, Religion and Corporations.

4. Steps to reproduce (optional):

  1. Select a policy "foreign service"
  2. Ally 3 city states
  3. View the mouse-over information box for strategic resources

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

20181017190242_1

LoneGazebo commented 5 years ago

@Infixo care to tackle this?

Infixo commented 5 years ago

I will look into this one in a couple of days.

Infixo commented 5 years ago

@squidgeny Please explain what should be correct values in your opinion. This is version 5-20, so basically there is no way to re-create the situation. So, the screen shows

Infixo commented 5 years ago

@squidgeny Another question - what does Foreign Service have to do with it? It increases quest rewards, science and tourism - nothing to do with resources. Are you saying that after choosing FS you saw changes in resources?

squidgeny commented 5 years ago

Hi Infixo,

I'm trying to figure this out from my screenshot. It looks like that particular screenshot isn't very clear and I should have included more examples, but I remember the issue anyway, so let me describe an example:

Let's say I have 2 iron from a mine near my capital, and 2 iron from a mine near my second city - 4 iron total. And let's say I have 2 iron from Policies, Religion or Corporations. And for the sake of it let's say I'm importing 2 iron from a city state too.

The tool-tip would say:

8 IRON

6 Local Resources

  • Capital 2
  • Second city 2

6 Resources from Policies, Religion or Corporations

  • 2

2 Resources imported

  • Citystate 2

Obviously it should say "4 Local Resources" and "2 Resources from Policies..."

This bug is evident from the screenshot I included, but in that case, I didn't have any local resources anywhere in my empire, so it's a little harder to diagnose from the screenshot alone.

Regarding your followup question, the Patronage policy "Foreign Service" grants 1 of each strategic resource for every 3 citystate alliances held - however maybe that is true only of 5-20 and has been changed since.

Infixo commented 5 years ago

Notes (ignore) Building_ResourceQuantity - some buildings provide resources Belief_ResourceQuantityModifiers - Strategic Resource quantities increase by 1% per following City (up to 25%).' Policy_FreeItems - empty Policy_ResourcefromCSAlly - POLICY_NATIONALISM Commerce Raiders +1 Oil and Coal for every City-State Alliance POLICY_PHILANTHROPY Foreign Service ~[there is still 34% from CSAlly but the description doesn't include that]~ Ok, this is original CBP, however CSD updates it into "1 res per 3 CSAllay" Policy.StrategicResourceMod - POLICY_THIRD_ALTERNATIVE 200 Quantity of Strategic Resources produced is increased by 100% Policy.MinorResourceBonus - POLICY_CULTURAL_DIPLOMACY 1 Exchange Markets Resources from City-States count towards Monopolies. Corporation_NumFreeResource - empty Corporation_UnitResourceProductionModifier - +15% for unit production Building_ResourceQuantityPerXFranchises - +1 additional Oil and Coal for every three Global Franchises

Infixo commented 5 years ago

I believe it should be like this. A note. Before the fix it really showed the same value for local and others, (for Iron it was 1 and for Horses 7 in the attached example) obraz @squidgeny Foreign Service in fact does provide 1 res per 3 CS ally. This is a CSD feature that changes original CBP behavior. Sorry for a confusion :)