There isn't an event when a trade route is created (you'd also need one when a trade route ends or is plundered), but you can get the information you need via pPlayer:GetTradeRoutes() which returns an array of tables holding trade route info - where the FromID and FromCity members hold the info you will need.
Code:
local pPlayer = Players[iPlayer]
for tr in pPlayer:GetTradeRoutes() do
if (tr.FromID == iPlayer) then
-- tr.FromCity has (at least one) outbound trade route
end
end
Hook up a handler for the PlayerDoTurn event, clear all the players cities of any dummy buildings adding the effects you want, then loop the trade routes and add back dummy buildings.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.