Help modifying Diplomacy

DeathMaker900

Chieftain
Joined
Jun 12, 2009
Messages
51
in a mod comp im making i want to make it so that resources that are used to train units can no longer be traded like other resources can. In this mod those resources are flagged in the XML as being special and special resources build up in stockpiles over time (already 100% working). I want to make it so that you can trade those resources in the same fashion that gold is traded, a lump sum or a scheduled payment. i have 2 int**s in CvPlayer whose first dimension is PlayerTypes and whose second dimension is BonusTypes. one int** is for imports and one is for exports (for use in scheduled payments of course). i have functions set up to get values for trade agreements given the resource and player, and functions to set/modify those same values. all functions are exposed to python.

What i dont have is the knowledge about diplomacy required to do the rest. I want to make it so that those resources are no longer listed in the resources section of the diplomatic window, and instead have their own section. Any resource you have at least 1 of is listed as an option. Each resource is listed twice (lump and payment). i also need to make the AI weight amounts of those resources instead of just how many of them are on the table (like they do with gold). i figure this weight can be a quotient of they bonus' regular AI weight and a global defined constant. The AI also needs to be instructed to ask for these lumps and payments as part of negotiations. I guess i also need to know how to cancel the deal from the DLL if CvPlayer::doTurn() detects that the player no longer has the resources to continue payment.

If anyone could help me out by showing me whereabouts i need to do these things and maybe even help me along that would be super awesome....

Moderator Action: Moved to the SDK section.
 
Back
Top Bottom