[QoL] Not for Sale: Disable trade requests for selected items and diplo actions

L. Vern

Warlord
Joined
Sep 5, 2022
Messages
110
Location
Ontario, Canada
Current Status: The AI trade code was heavily modified since I started this modmod and it no longer really works. I might circle back to this and make this functional in the future but for now consider this unsupported and non-working

Download Here

Please note that I haven't been able to test this on 3.10 due to ctds, so please consider it unstable and let me know if any problems arise
Worked well when built off of an earlier version so I don't anticipate any problems, although deal renewals and some diplo actions may not work correctly (haven't been able to test these in a real game still, let me know if these work for you so I can cross them off the list)

1694758041345.png

Should be pretty much self-explanatory, AIs will not send deal requests containing the things you select
 
Last edited:
Mostly? working with 3.10.4, I checked Horses and then the next turn AI asked to trade for it, however they stopped after that. Will try again with 3.10.7.
 
Mostly? working with 3.10.4, I checked Horses and then the next turn AI asked to trade for it, however they stopped after that. Will try again with 3.10.7.
do you have a save file by any chance? I just tested it on a fresh install by playing until someone offered a horse deal, reloading to check it was offered again (5 people actually wanted it), then checking horse box and it does stop it from going through for me, so it must be a case that isn't going through the games "request strategic resource" function. It would be a valuable resource to figure out what went wrong if you can send it
I don't expect there to be any change on 3.10.7, the code in the dll for this modmod hasn't changed since late 3.9
 
Playing the game right now on 3.10.8 version, and i just got a trade request for my horses that i have ticked as not for sale, i see 2 possible causes:
  • I have just loaded the game I've started yesterday, and after loading it did not work;
  • the trade request was for multiple items (Arabia wanted to give me some GPT for Gold luxury + 1 iron + 1 horse), so maybe the locked items can get requested when it's multiple things
 
Happened again, with iron this time; i locked iron today, and AI was able to request it in multiple items deal; i'm not getting any requests for horses/iron individually.
 
Happened again, with iron this time; i locked iron today, and AI was able to request it in multiple items deal; i'm not getting any requests for horses/iron individually.
thanks for the report, I'll take a look at other mechanisms through which the AI evaluates deals to propose and add the same logic to all of them, I think it's a case where it wants something unrelated to the strategics and is adding them in an attempt to equalize the deal values
 
thanks for the report, I'll take a look at other mechanisms through which the AI evaluates deals to propose and add the same logic to all of them, I think it's a case where it wants something unrelated to the strategics and is adding them in an attempt to equalize the deal values
@L. Vern The AI uses CvDealAI::DoAddItemsToThem and CvDealAI::DoAddItemsToUs to equalize deals. Check the functions to add individual deal items that are called within those.
 
Seeing the same as reported above; in every case I've seen, it's part of a deal renewal. They also like to request the last copies of my luxuries to renew the deal, in addition to the strategics I've marked as not for sale.
 
Top Bottom