Pablostuka
King
I've answered this here, since this is a more general Q&A and discussion thread than the Lua Function Reference.
To add a wonder to a city, you set the 'city' property of the wonder
city (get/set)
wonder.city -> city
Returns the city that has built the wonder, `nil` if not built yet or destroyed.
That is, for example
This sets the Pyramids (I believe) to the first city built (Id numbers start at 0, hence the first city and first wonder have ID 0).Code:local myCity = civ.getCity(0) civ.getWonder(0).city = myCity
Although wonders and improvements are sometimes interchangeable in the rules and macro style events, they are distinct in Lua.
Thanks for the reply, so yes, it's appaerently easy to force creation of specific wonders by event. This is just what i wanted
I've also deleted my post in the reference thread to keep it clean.