How to add free buildings to all cities?

Watsonnn

Chieftain
Joined
Jul 5, 2018
Messages
4
I have seen a similar post on here regarding this topic but on a slightly different matter.

I want to know how to get a wonder/building (pyramids) to create free buildings (granaries) in all cities. I have tried the <FreeBuidling> approach but that is more for traits so removes buildings when captured and I think creates them in cities settled after the creation of the building.

Thanks
 
<FreeBuilding> is in fact the way to do it. See the definition of BUILDING_CN_TOWER in the xml files for Buildings and Wonders. It has
Code:
<FreeBuilding>BUILDINGCLASS_BROADCAST_TOWER</FreeBuilding>
Within the <Buildings> table, the specification for <FreeBuilding>:
  1. must be done by the CLASS of the Building
  2. Ignores any and all terrain, resource. and technology prerequisites
  3. provides the specified CLASS of building for free in every city belonging to the owner of the Wonder/Building so long as the Wonder/Building that is giving the FreeBuilding does not become obsolete, destroyed, or captured. The free building is given in existing cities and in all newly-founded or newly-captured cities.
This behavior is different than that which is implemented by the similarly-named column <FreeBuilding> in table <Traits>.
 
I want to know how to get a wonder/building (pyramids) to create free buildings (granaries) in all cities. I have tried the <FreeBuidling> approach but that is more for traits so removes buildings when captured and I think creates them in cities settled after the creation of the building.
So you want to add the building ONLY in cities that are yours the moment the wonder is created but not in future cities? That's not possible in XML.

You could do it with Lua though.
 
Back
Top Bottom