Pre-built buildings?

nokmirt

Emperor
Joined
Feb 14, 2009
Messages
5,088
Location
Iowa USA
Is there a way to have cities have certain buildings in the cities at the outset of the game? We are working on a new mod with a lot of cities. So, we would like the general buildings up to the medieval era, inside the cities at the outset of the game. Is there a way to do this with xml, so the buildings are added to all cities? Thanks for any feedback.
 
Assuming all players will actually be starting gameplay in the Ancient Era, and that the player will be building new cities (ie, you aren't talking about pre-placed cities already on a Worldbuilder map), you can add or redirect to have this as part of the definition of the building(s) under the <Buildings> table:
Code:
<FreeStartEra>ERA_ANCIENT</FreeStartEra>
You would just update each building that you would want placed in all cities always and add that tag to the building.

If you are talking about pre-placed cities on a worldbuilder map you either have to add all the buildings to the cities manually as part of the map (ie, in the city create/edit tab of WorldBuilder), or you would have to add all the buildings to the cities for all players via lua.

For lua methods I'm not sure if the GameEvents.PlayerCityFounded event fires on placing each city 'into the game' for a WorldBuilder map, or if it would be necessary to try to use LoadScreenClose.
 
Assuming all players will actually be starting gameplay in the Ancient Era, and that the player will be building new cities (ie, you aren't talking about pre-placed cities already on a Worldbuilder map), you can add or redirect to have this as part of the definition of the building(s) under the <Buildings> table:
Code:
<FreeStartEra>ERA_ANCIENT</FreeStartEra>
You would just update each building that you would want placed in all cities always and add that tag to the building.

If you are talking about pre-placed cities on a worldbuilder map you either have to add all the buildings to the cities manually as part of the map (ie, in the city create/edit tab of WorldBuilder), or you would have to add all the buildings to the cities for all players via lua.

For lua methods I'm not sure if the GameEvents.PlayerCityFounded event fires on placing each city 'into the game' for a WorldBuilder map, or if it would be necessary to try to use LoadScreenClose.

Thanks LeeS. The cities are pre-placed in WB and there are a lot of them. I suppose we are just going to do them manually. Would it be hard to code that?
 
It wouldn't be horribly hard to code. It would just be more a matter of 1st finding the best lua 'hook event' to tack it on to in lua.

I would make a quick try with the <FreeStartEra> added as an update to a couple of buildings to see if it will actually work for pre-placed cities added in worldbuilder, but my suspicions based on some of the wierdness we encountered with re:units in the Guadalcanal Scenario is that the pre-placed cities won't get the buildings unless you manually place them as part of the map.
 
It wouldn't be horribly hard to code. It would just be more a matter of 1st finding the best lua 'hook event' to tack it on to in lua.

I would make a quick try with the <FreeStartEra> added as an update to a couple of buildings to see if it will actually work for pre-placed cities added in worldbuilder, but my suspicions based on some of the wierdness we encountered with re:units in the Guadalcanal Scenario is that the pre-placed cities won't get the buildings unless you manually place them as part of the map.

Well thanks for getting back to me. We will just manually place the buildings.
 
Back
Top Bottom