[SDK] Difference between CvDeal::startTrade and CvPlayer::handleDiploEvent

Joined
Sep 15, 2006
Messages
511
What is the difference between between CvDeal::startTrade and CvPlayer::handleDiploEvent. Is startTrade a regular trade when you open up the window and cause a trade, and handleDiploEvent for when a civilization approaches you with an offer?

Thanks,
ClassicThunder
 
It's a bit difficult to tell exactly what they are for since handleDiploEvent is only called from outside the SDK. As I understand it handleDiploEvent is for onesided diplomatic events. Any form of demand or request. CvDeal::addTrades (which is what calls startTrade) is for all trades where both offer something aswell as anything not handled by handleDiploEvent. For example if civ A demands a tech from civ B then handleDiploEvent is what makes the AI upset that you make a demand or refuse their demand while addTrades is what gives you/them the tech (if they/you accept).

Why do you ask?
 
I'm working on my Good/Evil component for my mod and want to make it so when you bully for war and trade embargoes it adds to the players Evil, while encouraging peace and offering gifts to lower civs adds to your Good.

Thanks for clearing that up for me.
 
Back
Top Bottom