How to make a unit buildable from one city only?

MatthewH86

Chieftain
Joined
Aug 25, 2007
Messages
44
Hey, I'm making a mod for RFC, and have no idea how to make a unit buildable from one city only. Can anyone help?
 
You could make a unit dependent on having a specific building and then only have that building buildable once, ie - National Wonder. I assume that would work.
 
There are 2 steps:

1)Make a building that can only be built in one city - one of iMaxGlobalInstances, iMaxTeamInstances, or iMaxPlayerInstances is set at one. An existing wonder can serve this purpose.

2)When making the Unit, set PrereqBuilding to the building in step 1.

Now, the unit can only be made where the building is and only 1 city can have the building. What mechanism is used to get the building into that city is up to you.
 
thanks to both of you!

is it possible to make the button to build the unit appear to any civilization, but only when they own/select the city? otherwise it seems a bit messy.
 
I think you need to explain more about why you want to do this... why would you want the button to appear to all civilizations if only the city owner can build the unit??
 
Top Bottom