Anyway, I haven't been able to figure out how to get it to do what I really want, which is automatic embassies with anyone you have a trade route with, so as filler, I gave it a sheaf of minor trade-related abilities. One of them was +1 MP to trader units, so Caravans with Marco Polo have 2 MP and Freight has 3 MP. I just copied the Lighthouse effect, changed "UnitClass", "Sea" to "UnitFlag", "TradeRoute", and changed the Wonder name. And this works fine, except that... it doesn't appear to be checking the Wonder requirement at all. It grants the bonus MP if you have Marco Polo. It also grants it if someone else has Marco Polo. It grants it if Marco Polo is obsolete. It even grants it if Marco Polo hasn't even been built yet. It always grants it. The effect is just a permanent extra MP for anything with the TradeRoute flag.
The Lighthouse still works fine. It grants the MP when you build it, not before, not if someone else builds it, and it goes away when it goes obsolete.
Code: Select all
[building_marco_polos_embassy]
name = _("Marco Polo's Embassy")
genus = "GreatWonder"
reqs =
{ "type", "name", "range"
"Tech", "Trade", "Player"
}
graphic = "b.marco_polos_embassy"
graphic_alt = "-"
obsolete_by =
{ "type", "name", "range", "survives"
"Tech", "Communism", "World", TRUE
}
build_cost = 200
upkeep = 0
sabotage = 0
sound = "w_marco_polos_embassy"
sound_alt = "w_generic"
helptext = _("\
Caravans and Freight gain 1 MP, trade route limit is increased by 2\
(to a maximum of 5, due to hard limits in the code),\
and immediate revenue from establishing a trade route is doubled.\
")
Code: Select all
[effect_marco_polos_caravans]
type = "Move_Bonus"
value = 1
reqs =
{ "type", "name", "range",
"Building", "Marco Polo's Embassy", "Player"
"UnitFlag", "TradeRoute", "Local"
}