LoneGazebo / Community-Patch-DLL

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

AI Offers Harmful WC Votes in Trade Request #4538

Closed RecursiveStar closed 6 years ago

RecursiveStar commented 6 years ago

_1. Mod version (i.e Date - 4/23): 6/14 Beta

_2. Mod list (if using Vox Populi only, leave blank): Quick Turns + Trade Route Overview Filters

_3. Error description: Brazil proposes to give delegate support to sanction me in exchange for a technology.

NOTE: I later experienced a similar issue in the same game: the AI proposed to vote Nay on a proposal I made to the World Congress as part of another trade offer.

AIs should never offer in trade: -Yea votes for sanctioning you -Yea votes for decolonizing you -Yea votes for Open Door: Your CS Ally -Yea votes for Sphere of Influence: Your CS Ally, when the person proposing the sphere of influence isn't you -Yea votes to repeal a Sphere of Influence, when you have the Sphere of Influence -Nay votes for repealing a sanction on you -Nay votes on your proposal -Votes for Global Hegemony: someone else

Other things they probably shouldn't offer to you in a trade deal: -Yea votes for City-State Sanctions if you have trade routes with City-States and/or Statecraft policies -Yea votes for World Religion: a religion that isn't yours (if you founded a religion) -Yea votes for World Religion: not your majority religion (if you didn't found a religion) -Yea votes to repeal World Religion: your religion (if you founded a religion) -Yea votes to repeal World Religion: your majority religion (if you didn't found a religion) -Nay votes for World Religion: your religion (if you founded a religion) -Nay votes for World Religion: your majority religion (if you didn't found a religion) -Yea votes for World Ideology: an ideology that isn't yours -Yea votes to repeal World Ideology: your ideology, unless someone else would have the most Global Hegemony votes if it passes and Diplomatic Victory is enabled -Nay votes for World Ideology: your ideology, if you proposed it OR would have the most Global Hegemony votes if the ideology passes (your votes+your vassals' votes) and Diplomatic Victory is enabled

The above generally assumes that it was someone else who proposed it. If you proposed it, that's different.

*It might be valuable if someone else would have the most Global Hegemony votes, to block this third party from obtaining a Diplomatic Victory; if Diplomatic Victory is disabled, however, it's irrelevant. If this is too complicated to code, just not offering them, period, would work too.

This is when the AI requests a trade from you, or when you hit the "What do you want for this?" button, not if you request it from them.

Yes, they might value the vote differently, but what should matter is the value to you, i.e. the person they're proposing it to. It seems the AI doesn't consider how valuable the vote is to you, only to them.

If you are the one who makes the offer to e.g. buy their delegates to vote Nay on your own proposal as part of some strategy (like not wanting them to vote on another proposal), that's a different matter, I think that part is fine; but they shouldn't be offering these kinds of deals to you; almost every time a player would say No, and it's insulting and breaks immersion.

Likewise, if you make a proposal to sanction yourself because you want other players not to be able to make trade routes or deals with you for whatever reason, then the AI proposing to vote for you is fine; you're the weird one.

_4. Steps to reproduce (optional): Hit "Next Turn" to see Brazil propose the above-mentioned vote.


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): 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): Proposal Bug.zip

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

  4. Screenshots (optional): screenshot 8579

LoneGazebo commented 6 years ago

The AI has no way of knowing what a player will want. They ask and make offers to see if their bid is tempting enough. I’m not going to hard core logic.

RecursiveStar commented 6 years ago

99% of the time a player will not want themselves to be sanctioned, but okay...

Setting aside the religion/ideology stuff, sanctions against you or spheres of influence against your ally, or voting against your proposal, are not going to be tempting as trade offers. It's just weird for them to offer that.

LoneGazebo commented 6 years ago

Mm, there's a bug in the Deal AI - the AI was supposed to look at whether or not the other party would like a vote item, however they were only looking at their own desire. I'll fix this and see if it adjusts the outcome.