It seems that the trade screen in the EXE doesn't allow both sides of a trade to add items to the table while at war; screenshot attached. At first I thought the EXE might show this popup based on CvDeal::isEndWar, but, in a test, modifying that function didn't help. Might still be possible to work around the problem by feigning peace at just the right moment, but that'll require some open-ended experimentation.Can someone help me out with modding the diplo AI? I am wondering how feasible what I am thinking about is, and where I would best need to make those changes.
Maybe this question is moot, but I still want to mention CvPlayer::updateTradeList as a function where context could be stored (at the CvPlayer object I guess) for the duration of some trade interaction. updateTradeList gets called whenever an item is added to or removed from the table.[...] CvPlayer::canTradeItem would need to be modified to limit the cities that can be offered in this specific situation [...], but how can I tell what the context of the trade is? Do I need to add another custom boolean argument?
The AI could always make a capitulation offer through a non-diplo popup, but that wouldn't allow for negotiation.
Or perhaps collapse could be suspended somehow, for a while, when a civ is close to capitulation?