On city capture event

It does. There is a boolean value which CityCaptureComplete passes which is true if the city is captured in combat, and false if it was gained via diplomacy (including peace deals). It may return false via culture flipping, but culture flipping basically never happens in any game I play, so I can't say for sure.

GameEvents.CityCaptureComplete.Add(function(iOldOwner, bIsCapital, iX, iY, iNewOwner, iPop, bConquest) -- the bConquest variable is the boolean you're looking for. Make your function check for it to be true if you want it only to trigger from a military capture.
 
Back
Top Bottom