In my mod I currently use a number of fake buildings to provide leader trait effects that I'm unable to achieve via xml or directly in Python. This works well via onCityBuilt and onCityAcquired. However, there are some civilization-wide building effects (extra commerce from specialists, reduced hurry costs, etc) that I'd like to use but obviously having one of these 'fake wonders' in every city would cause these effects to stack undesirably. So I need to adapt my python code to handle just one instance of such a building.
I figure the most straightforward method is to leave the fake wonder in the starting city and should the player lose the starting city, place a new version of the fake wonder in another city (capital?). I don't want to replace the Palace itself as that leads to a lot of misleading information in tooltips and the pedia. Anyway, this has lead to a few questions:
Firstly, is there a more appropriate way of doing this?
To detect the loss of a fake wonder could I use onCityLost instead of onCityAcquired
and onCityRazed?
Is one of the those events triggered early enough to allow a check to see whether a certain building was present?
Are xml tags like <iMaxPlayerInstances> obeyed when placing a building via setNumRealBuilding?
Is there some method of finding out where the former capital was when the Palace is moved to a new city?
Is there some method of identifying a player's capital without looping through all cities?
Is there anything else I need to consider?
I figure the most straightforward method is to leave the fake wonder in the starting city and should the player lose the starting city, place a new version of the fake wonder in another city (capital?). I don't want to replace the Palace itself as that leads to a lot of misleading information in tooltips and the pedia. Anyway, this has lead to a few questions:
Firstly, is there a more appropriate way of doing this?
To detect the loss of a fake wonder could I use onCityLost instead of onCityAcquired
and onCityRazed?
Is one of the those events triggered early enough to allow a check to see whether a certain building was present?
Are xml tags like <iMaxPlayerInstances> obeyed when placing a building via setNumRealBuilding?
Is there some method of finding out where the former capital was when the Palace is moved to a new city?
Is there some method of identifying a player's capital without looping through all cities?
Is there anything else I need to consider?