Modern Alliances

Seriously, since you never test your python at all, I suggest testing one feature at a time rather than the whole chunk.

Make a copy of the EventManager, delete all new codes and try adding one at a time

@Special Building
Yes, why not test that feature in the original BTS with cathedrals and temples first
If it works, then try it out in your mod with ancient wonders
 
Nothing wrong when I try it on my computer with this small version lol
Even text and movie displayed

Note:
I added a small test code in python just to see whole map and view opponent cities.
Remove it after you done

Anyway, why do you set global instance to 0, it looks ugly when you hover over it and display World Wonder Left: -1 lol

Also, why is there a need for Tech Requirements?
Just set iCost to -1 will do
 
There is a tech requirement because that is what triggers them to be in a seperate civilopedia page (they all require the tech taht all civs start with, its more/less a balance tech)

Wonder 0 because tahts how i get it so it can't be built, is tehre an easier way?
 
Doubt so, unless you have codes in pythonCallBacks that enable them to be built.
If you look at Great People, they are all iCost = -1

The only case I encountered are Techs, even when iCost = -1, they are Researchable
 
So have you tried the uploaded Ancient Wonders and see if any problems?
If it works on my computer but not on yours, I not sure what is wrong lol
 
Something you wanted:

Code:
## Ice Hotel Start ##
		if iBuildingType == gc.getInfoTypeForString("BUILDING_ICE_HOTEL"):
			iPlayer = pCity.getOwner()
			pPlayer = gc.getPlayer(iPlayer)
			pTeam = gc.getTeam(pPlayer.getTeam())
			iX = pCity.getX()
			iY = pCity.getY()
			tt_snow = gc.getInfoTypeForString("TERRAIN_SNOW")
			tt_tundra = gc.getInfoTypeForString("TERRAIN_TUNDRA")

			for x in range(iX - 2, iX + 3, 1):
				for y in range(iY - 2, iY + 3, 1):
					pPlot = CyMap().plot(x,y)
					if abs(x - iX) != 2 or abs(y - iY) != 2:
						if pPlot.isWater():
							if pPlot.getBonusType(-1) == gc.getInfoTypeForString("BONUS_FISH") or pPlot.getBonusType(-1) == gc.getInfoTypeForString("BONUS_CLAM") or pPlot.getBonusType(-1) == gc.getInfoTypeForString("BONUS_CRAB"):
								pPlot.setImprovementType(gc.getInfoTypeForString("IMPROVEMENT_FISHING_BOATS"))
								CyGame().setPlotExtraYield(x, y, YieldTypes.YIELD_FOOD, 1)
							elif pPlot.getBonusType(-1) == gc.getInfoTypeForString("BONUS_OIL") and pTeam.isHasTech(gc.getInfoTypeForString("TECH_PLASTICS")):
								pPlot.setImprovementType(gc.getInfoTypeForString("IMPROVEMENT_OFFSHORE_PLATFORM"))
							elif pPlot.getBonusType(-1) == gc.getInfoTypeForString("BONUS_WHALE"):
								pPlot.setImprovementType(gc.getInfoTypeForString("IMPROVEMENT_WHALING_BOATS"))
								CyGame().setPlotExtraYield(x, y, YieldTypes.YIELD_FOOD, 1)
							if pPlot.getFeatureType() == gc.getInfoTypeForString("FEATURE_ICE"):
								pPlot.setFeatureType(-1, 0)
						else:
							if pPlot.getTerrainType() == tt_desert or pPlot.getTerrainType() == tt_tundra:
								CyGame().setPlotExtraYield(x, y, YieldTypes.YIELD_COMMERCE, 2)
								if pPlot.getBonusType(-1) == gc.getInfoTypeForString("BONUS_MARBLE") or pPlot.getBonusType(-1) == gc.getInfoTypeForString("BONUS_STONE"):
									pPlot.setImprovementType(gc.getInfoTypeForString("IMPROVEMENT_QUARRY"))
								elif pPlot.getBonusType(-1) == gc.getInfoTypeForString("BONUS_OIL"):
									pPlot.setImprovementType(gc.getInfoTypeForString("IMPROVEMENT_WELL"))
								elif pPlot.getBonusType(-1) == gc.getInfoTypeForString("BONUS_ALUMINUM") or pPlot.getBonusType(-1) == gc.getInfoTypeForString("BONUS_COAL") or pPlot.getBonusType(-1) == gc.getInfoTypeForString("BONUS_COPPER") or pPlot.getBonusType(-1) == gc.getInfoTypeForString("BONUS_IRON") or pPlot.getBonusType(-1) == gc.getInfoTypeForString("BONUS_URANIUM") or pPlot.getBonusType(-1) == gc.getInfoTypeForString("BONUS_GEMS") or pPlot.getBonusType(-1) == gc.getInfoTypeForString("BONUS_GOLD") or pPlot.getBonusType(-1) == gc.getInfoTypeForString("BONUS_SILVER"):
									pPlot.setImprovementType(gc.getInfoTypeForString("IMPROVEMENT_MINE"))
								elif pPlot.getBonusType(-1) == gc.getInfoTypeForString("BONUS_DEER") or pPlot.getBonusType(-1) == gc.getInfoTypeForString("BONUS_FUR") or pPlot.getBonusType(-1) == gc.getInfoTypeForString("BONUS_IVORY"):
									CyGame().setPlotExtraYield(x, y, YieldTypes.YIELD_FOOD, 1)
									pPlot.setImprovementType(gc.getInfoTypeForString("IMPROVEMENT_CAMP"))
									pPlot.setFeatureType(gc.getInfoTypeForString("FEATURE_FOREST"), 1)
								elif pPlot.getImprovementType() == -1:
									pPlot.setFeatureType(gc.getInfoTypeForString("FEATURE_FOREST"), 1)
			CyInterface().addMessage(iPlayer,false,15,CyTranslator().getText("TXT_KEY_ICE_HOTEL_PYTHON",()),'',0,'Art/Ice Hotel/Ice Hotel.dds',ColorTypes(44), iX, iY, True,True)
## Ice Hotel End ##

But seriously, is there a need for all these codes to add improvements to the plots?
By the time you can build this wonder, what is the chances that the plots with all these bonuses are unimproved?

If you feel those are redundant, you can chop it further to:
Code:
## Ice Hotel Start ##
		if iBuildingType == gc.getInfoTypeForString("BUILDING_ICE_HOTEL"):
			iPlayer = pCity.getOwner()
			pPlayer = gc.getPlayer(iPlayer)
			iX = pCity.getX()
			iY = pCity.getY()
			tt_snow = gc.getInfoTypeForString("TERRAIN_SNOW")
			tt_tundra = gc.getInfoTypeForString("TERRAIN_TUNDRA")

			for x in range(iX - 2, iX + 3, 1):
				for y in range(iY - 2, iY + 3, 1):
					pPlot = CyMap().plot(x,y)
					if abs(x - iX) != 2 or abs(y - iY) != 2:
						if pPlot.isWater():
							if pPlot.getBonusType(-1) != gc.getInfoTypeForString("BONUS_OIL") and pPlot.getBonusType(-1) != -1:
								CyGame().setPlotExtraYield(x, y, YieldTypes.YIELD_FOOD, 1)
							elif pPlot.getFeatureType() == gc.getInfoTypeForString("FEATURE_ICE"):
								pPlot.setFeatureType(-1, 0)
						else:
							if pPlot.getTerrainType() == tt_snow or pPlot.getTerrainType() == tt_tundra:
								CyGame().setPlotExtraYield(x, y, YieldTypes.YIELD_COMMERCE, 2)
								if pPlot.getBonusType(-1) == gc.getInfoTypeForString("BONUS_DEER") or pPlot.getBonusType(-1) == gc.getInfoTypeForString("BONUS_FUR") or pPlot.getBonusType(-1) == gc.getInfoTypeForString("BONUS_IVORY"):
									CyGame().setPlotExtraYield(x, y, YieldTypes.YIELD_FOOD, 1)
									pPlot.setFeatureType(gc.getInfoTypeForString("FEATURE_FOREST"), 1)
								elif pPlot.getImprovementType() == -1:
									pPlot.setFeatureType(gc.getInfoTypeForString("FEATURE_FOREST"), 1)
			CyInterface().addMessage(iPlayer,false,15,CyTranslator().getText("TXT_KEY_ICE_HOTEL_PYTHON",()),'',0,'Art/Ice Hotel/Ice Hotel.dds',ColorTypes(44), iX, iY, True,True)
## Ice Hotel End ##
 
The small standalone module I sent you don't work as well?
Don't put it in your mod, try it standalone first
 
No idea lol, probably BUG interference, do any of those python wonders work in your mod?
 
Add this line in and see what is the result
Code:
			for iWonder in range(gc.getNumBuildingInfos()):
				Wonderinfo = gc.getBuildingInfo(iWonder)
				WonderBuildingClass = Wonderinfo.getBuildingClassType()
				WonderSpecialBuilding = Wonderinfo.getSpecialBuildingType()
				if WonderSpecialBuilding == gc.getInfoTypeForString("SPECIALBUILDING_CATHEDRAL") and CyGame().getBuildingClassCreatedCount(WonderBuildingClass) == 0:
					AncientWonder.append(iWonder)

			[COLOR="Red"]CyInterface().addImmediateMessage(CyTranslator().getText("TXT_NUM_ANCIENTS",(len(AncientWonder)),), None)[/COLOR]
			if len(AncientWonder) > 0:

Make a new text tag "TXT_NUM_ANCIENTS" in a text file
Number of Ancient Wonders not built: %d1
 
Top Bottom