dacubz145
Deity
You have too much time, don't you?
-> good for us .
Definatly good for us
You have too much time, don't you?
-> good for us .
## World Trade Center Start ##
pPlayer = gc.getPlayer(iPlayer)
bc_WTC = gc.getInfoTypeForString("BUILDINGCLASS_WORLD_TRADE_CENTER")
if pPlayer.getBuildingClassCount(bc_WTC) == 1:
if pPlayer.isNoCorporations() == false:
pTeam = gc.getTeam(pPlayer.getTeam())
b_WTC = gc.getInfoTypeForString("BUILDING_WORLD_TRADE_CENTER")
#### Check which city has active WTC
(loopCity, iter) = pPlayer.firstCity(false)
while(loopCity):
if loopCity.getNumActiveBuilding(b_WTC) == true:
#### Gold
GoldChange = loopCity.getCorporationCommerce(0)
GoldModifier = loopCity.getCommerceRateModifier(0)
GoldChange = int(GoldChange * (100 +GoldModifier)/100)
pPlayer.changeGold(GoldChange)
#### Research
ResearchChange = loopCity.getCorporationCommerce(1)
ResearchModifier = loopCity.getCommerceRateModifier(1)
iCurrentTech = pPlayer.getCurrentResearch()
ResearchChange = int(ResearchChange * (100 +ResearchModifier)/100)
pTeam.changeResearchProgress(iCurrentTech, ResearchChange, iPlayer)
#### Culture
CultureChange = loopCity.getCorporationCommerce(2)
CultureModifier = loopCity.getCommerceRateModifier(2)
CultureChange = int(CultureChange * (100 +CultureModifier)/100)
loopCity.changeCulture(iPlayer, CultureChange, true)
#### Food
FoodChange = loopCity.getCorporationYield(0)
#### Not used for BTS FoodModifier = loopCity.getYieldRateModifier(0) ## Not used for BTS
#### Not used for BTS FoodChange = int(FoodChange *(100 +FoodModifier)/100) ## Not used for BTS
loopCity.changeFood(FoodChange)
#### Production
ProductionChange = loopCity.getCorporationYield(1)
ProductionModifier = loopCity.getYieldRateModifier(1) ## Bonus From Buildings like Forge
iCoal = gc.getInfoTypeForString("BONUS_COAL") ## Coal Bonus for IronForge
ProductionModifier += loopCity.getBonusYieldRateModifier (1, iCoal)
iIron = gc.getInfoTypeForString("BONUS_IRON") ## Iron Bonus for IronForge
ProductionModifier += loopCity.getBonusYieldRateModifier (1, iIron)
ProductionModifier += loopCity.getProductionModifier()
ProductionChange = int(ProductionChange *(100 +ProductionModifier)/100) ## Others like Industrious Trait or Military Academy
loopCity.changeProduction(ProductionChange)
break
(loopCity, iter) = pPlayer.nextCity(iter, false)
## World Trade Center End ##
## World Trade Center Start ##
pPlayer = gc.getPlayer(iPlayer)
bc_WTC = gc.getInfoTypeForString("BUILDINGCLASS_WORLD_TRADE_CENTER")
if pPlayer.getBuildingClassCount(bc_WTC) == 1:
pTeam = gc.getTeam(pPlayer.getTeam())
b_WTC = gc.getInfoTypeForString("BUILDING_WORLD_TRADE_CENTER")
(loopCity, iter) = pPlayer.firstCity(false)
while(loopCity):
if loopCity.getNumActiveBuilding(b_WTC) == true:
for icommerce in range (0, 3):
iCorpCom = loopCity.getCorporationCommerce(icommerce)
loopCity.setBuildingCommerceChange (bc_WTC, icommerce, iCorpCom)
for iyield in range (0, 2):
iCorpYield = loopCity.getCorporationYield(iyield)
loopCity.setBuildingYieldChange (bc_WTC, iyield, iCorpYield)
break
(loopCity, iter) = pPlayer.nextCity(iter, false)
## World Trade Center End ##
What did you do that went wrong?
If all you do is change the name, it should be ok
Hi Is possible write some what enable capture city style choosing?
Example.
I´m european - eu_cityset
I build wonder XY
when i capture arabian city, will new city looks as arabian
variant B/ I capture city - dialog say: do you want convert city to the european, or may city stay oriental...
Is it possible?
Torre de Belem
Spoiler :
What it does:
Adds 25% defense in all coastal cities, which cannot be bombarded away.
What it actually does:
Adds invisible feature in all coastal cities, which adds the 25% defense.
Well, not actually invisible, it is floodplains
Of course, when rival takes over the city, 25% is gone.
But if Belem owner takes over rival's coastal city, 25% will be there
Artwork by Hrochland
Take it as planting a forest in the city. The defense bonus cannot be bombarded to 0 unlike walls or culture. And doesn't care whether the attacker is advanced units like tanks and planes, or crappy ones like warriors
not for the time being, lazy to explore the effects of events