Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
But it struck me that the code you are showing here could be used to create a unit(s) special to each religion, and then allow your code shown here to control which of thee units can be trained within an individual city at any given time. So if a city went from Islam to Catholicism that city would no longer be able to train the Islam unit(s) but would be able to train the Catholicism unit(s) instead.
This just happened to synergize with a project I've been thinking about for a while. So I wondered if I could use this to control and keep track of which Religion-based unit(s) can be trained within a city at any given time. But the other code methods you suggest may look to be 'cleaner' so far as units are concerned. Though I do like the idea of extra side-benefits to a city (such as 10% more GPP) based on which religion it has.
The second part of this post [forums.civfanatics.com] has code for a building that can only be built in majority Buddhism city. There is a CityCanTrain event that you would need to use instead but the code is 95% the same.
You can use a "CityCanBuild" check for the Stupa that returns false unless the city.GetMajorityReligion is Buddhism.