Tsentom1 Python Wonders

one quick model :)

tiglumini_M2g_thumb.jpg


http://forums.civfanatics.com/downloads.php?do=file&id=10577

Btw, can you, please, edit you Eden Project to the a little version for me, so that tile effect approve oneself in city radius where project has been built only?

thanks for answer

HROCHland
 
Yeah, everything in this thread is going in the next version of Thomas War (which should be released in say a week)
 
You're right, plastics should be a pre-req. I didn't even think about that, just assumed you'd have all the build techs by refrigeration. I'll update the code shortly.
 
Fixed the plastic / oil platform thing

Uhmm, I have a Sun Tzu's Art of War if I can figure out why the python works in my updated (not yet released) version of Thomas War and not when I separate it. Another future era project. I have a national wonder that I thought of and coded last night which basically builds an infrastructure in a city. it doesn't have a name yet but for movie ideas showing general construction, infrastructure such as roads, sewage, electricity. A wonder I'm currently working on I don't want to say much about cause I might not be able to get it to work and I don't want to let people down. Uhmm, I thought of some code that could work for something like the Louvre so maybe that.

Haha, there's still a few to go. Also, I requested a name change for the thread. Hope that happens soon.
 
Hey Tsentom,

Do you know if it's possible to display an intromovie ie I made one for the Wolfshanze Mod (here) when the mod is loaded?

I took a look at CvEventManager.py and is it possible to add some code here??? :

Code:
def onInit(self, argsList):
        'Called when Civ starts up'
        CvUtil.pyPrint( 'OnInit' )
 
Arian, I know it is possible to have an intro movie, though I've never done it.

I found this thread:

http://forums.civfanatics.com/showthread.php?t=191978

that seems to be what you're looking for. If that doesn't work I'll look into it deeper at the end of the week when I have some free time.

Kao'chai, I'll try to think of something for the Olympic Stadium. I'm sorry to hear you're having trouble merging these. I've only included the bare minimum of files needed so make sure you're either adding or editing every single one of the files I have in the mod folders.

Others things to look out for. If you change the BuildingClass to something different than what I have, the code won't work. Also, in mods such as the Sphinx and Djenne you need to chage the buldingcostmod line in the xml python callbacks file to 1 or it won't fire.

Besides that, any XML change is at the bottom of the file. The Python code is labeled with ## Djenne/Ice Hotel/ etc Start ## (searching for start or ## or start ## should find it). For the most part these changes will be in EventManager under onBuildingBuilt or GameUtils under BuildingCostMod. If you already have modded code there, just make sure to copy paste it either directly before or after the code you added. I could put these mods in the form of a custom event manager calling a separate mod python file but I actually think that method is more complicated.

Let me know if this works, if not I'll see what I can do
 
Your wonders are wonderful , though i am having a hard time merging it with other mods. BTW , hrochland made a wonderful beijing olympic stadium , can you do a python thats goes well with it ,please...............

It's shouldn't be too hard, even I did it...:p
I consider the Python to be the trickiest part! Indentation errors can cause the whole interface to disappear :lol: (actually that really sucks!)
 
Hi, tsentom1
please, I was a bit confused. I was reading "Eden project" but I was surmised this is wonder.
I tried edit your code and remade all xml for wonder but python effect is without effect :)
Can you, please check if I by right way edited and pasted code, please, so that all be functional as wonder?
(if you need, I can post you compelte my CvEventManager.py file)

thank you very much
Hroch

Code:
def onBuildingBuilt(self, argsList):
		'Building Completed'
		pCity, iBuildingType = argsList
		game = gc.getGame()
		
		
		
### The School of Confucius Start ###

		if ( iBuildingType == gc.getInfoTypeForString("BUILDING_PALACE_CHINA") ):

			pPlayer = gc.getPlayer(pCity.plot().getOwner())
			iPID = pPlayer.getID()
			iTID = pPlayer.getTeam()
			iX = pCity.getX()
			iY = pCity.getY()
			b_school = gc.getInfoTypeForString("BUILDING_PALACE_CHINA")
			u_prophet = gc.getInfoTypeForString( 'UNIT_PROPHET' )
			u_artist = gc.getInfoTypeForString( 'UNIT_ARTIST' )
			u_scientist = gc.getInfoTypeForString( 'UNIT_SCIENTIST' )
			u_merchant = gc.getInfoTypeForString( 'UNIT_MERCHANT' )
			u_engineer = gc.getInfoTypeForString( 'UNIT_ENGINEER' )
			u_general = gc.getInfoTypeForString( 'UNIT_GREAT_GENERAL' )
			u_spy = gc.getInfoTypeForString( 'UNIT_GREAT_SPY' )

			self.iGreatPeopleNumberOne = self.getRandomNumber( 6 )
			self.iGreatPeopleNumberTwo = self.getRandomNumber( 6 )

			for i in range(1):
				if self.iGreatPeopleNumberOne == 0:
					pNewUnit = pPlayer.initUnit( u_prophet, iX, iY, UnitAITypes.UNITAI_PROPHET, DirectionTypes.NO_DIRECTION )
					szTitle = localText.getText( "TXT_KEY_SCHOOL_PROPHET", ( ) )
					CyInterface().addImmediateMessage( szTitle , None)
				if self.iGreatPeopleNumberOne == 1:
					pNewUnit = pPlayer.initUnit( u_artist, iX, iY, UnitAITypes.UNITAI_ARTIST, DirectionTypes.NO_DIRECTION )
					szTitle = localText.getText( "TXT_KEY_SCHOOL_ARTIST", ( ) )
					CyInterface().addImmediateMessage( szTitle , None)
				if self.iGreatPeopleNumberOne == 2:
					pNewUnit = pPlayer.initUnit( u_scientist, iX, iY, UnitAITypes.UNITAI_SCIENTIST, DirectionTypes.NO_DIRECTION )
					szTitle = localText.getText( "TXT_KEY_SCHOOL_SCIENTIST", ( ) )
					CyInterface().addImmediateMessage( szTitle , None)
				if self.iGreatPeopleNumberOne == 3:
					pNewUnit = pPlayer.initUnit( u_merchant, iX, iY, UnitAITypes.UNITAI_MERCHANT, DirectionTypes.NO_DIRECTION )
					szTitle = localText.getText( "TXT_KEY_SCHOOL_MERCHANT", ( ) )
					CyInterface().addImmediateMessage( szTitle , None)
				if self.iGreatPeopleNumberOne == 4:
					pNewUnit = pPlayer.initUnit( u_engineer, iX, iY, UnitAITypes.UNITAI_ENGINEER, DirectionTypes.NO_DIRECTION )
					szTitle = localText.getText( "TXT_KEY_SCHOOL_ENGINEER", ( ) )
					CyInterface().addImmediateMessage( szTitle , None)
				if self.iGreatPeopleNumberOne == 5:
					pNewUnit = pPlayer.initUnit( u_general, iX, iY, UnitAITypes.UNITAI_GENERAL, DirectionTypes.NO_DIRECTION )
					szTitle = localText.getText( "TXT_KEY_SCHOOL_GENERAL", ( ) )
					CyInterface().addImmediateMessage( szTitle , None)
				if self.iGreatPeopleNumberOne == 6:
					pNewUnit = pPlayer.initUnit( u_spy, iX, iY, UnitAITypes.UNITAI_MERCHANT, DirectionTypes.NO_DIRECTION )
					szTitle = localText.getText( "TXT_KEY_SCHOOL_SPY", ( ) )
					CyInterface().addImmediateMessage( szTitle , None)

			for i in range(1):
				if self.iGreatPeopleNumberTwo == 0:
					pNewUnit = pPlayer.initUnit( u_prophet, iX, iY, UnitAITypes.UNITAI_PROPHET, DirectionTypes.NO_DIRECTION )
					szTitle = localText.getText( "TXT_KEY_SCHOOL_PROPHET", ( ) )
					CyInterface().addImmediateMessage( szTitle , None)
				if self.iGreatPeopleNumberTwo == 1:
					pNewUnit = pPlayer.initUnit( u_artist, iX, iY, UnitAITypes.UNITAI_ARTIST, DirectionTypes.NO_DIRECTION )
					szTitle = localText.getText( "TXT_KEY_SCHOOL_ARTIST", ( ) )
					CyInterface().addImmediateMessage( szTitle , None)
				if self.iGreatPeopleNumberTwo == 2:
					pNewUnit = pPlayer.initUnit( u_scientist, iX, iY, UnitAITypes.UNITAI_SCIENTIST, DirectionTypes.NO_DIRECTION )
					szTitle = localText.getText( "TXT_KEY_SCHOOL_SCIENTIST", ( ) )
					CyInterface().addImmediateMessage( szTitle , None)
				if self.iGreatPeopleNumberTwo == 3:
					pNewUnit = pPlayer.initUnit( u_merchant, iX, iY, UnitAITypes.UNITAI_MERCHANT, DirectionTypes.NO_DIRECTION )
					szTitle = localText.getText( "TXT_KEY_SCHOOL_MERCHANT", ( ) )
					CyInterface().addImmediateMessage( szTitle , None)
				if self.iGreatPeopleNumberTwo == 4:
					pNewUnit = pPlayer.initUnit( u_engineer, iX, iY, UnitAITypes.UNITAI_ENGINEER, DirectionTypes.NO_DIRECTION )
					szTitle = localText.getText( "TXT_KEY_SCHOOL_ENGINEER", ( ) )
					CyInterface().addImmediateMessage( szTitle , None)
				if self.iGreatPeopleNumberTwo == 5:
					pNewUnit = pPlayer.initUnit( u_general, iX, iY, UnitAITypes.UNITAI_GENERAL, DirectionTypes.NO_DIRECTION )
					szTitle = localText.getText( "TXT_KEY_SCHOOL_GENERAL", ( ) )
					CyInterface().addImmediateMessage( szTitle , None)
				if self.iGreatPeopleNumberTwo == 6:
					pNewUnit = pPlayer.initUnit( u_spy, iX, iY, UnitAITypes.UNITAI_MERCHANT, DirectionTypes.NO_DIRECTION )
					szTitle = localText.getText( "TXT_KEY_SCHOOL_SPY", ( ) )
					CyInterface().addImmediateMessage( szTitle , None)

### The School of Confucius End ###
## Eden Start ##

		if iBuildingType == gc.getInfoTypeForString('BUILDING_EDEN'):

			pPlayer = gc.getPlayer(pCity.plot().getOwner())
			pPID = pPlayer.getID()
			pTID = pPlayer.getTeam()
			iX = pCity.getX()
			iY = pCity.getY()
			tt_desert = gc.getInfoTypeForString( 'TERRAIN_DESERT' )
			tt_plain = gc.getInfoTypeForString( 'TERRAIN_PLAINS' )
			tt_grass = gc.getInfoTypeForString( 'TERRAIN_GRASS' )
			tt_tundra = gc.getInfoTypeForString( 'TERRAIN_TUNDRA' )
			tt_snow = gc.getInfoTypeForString( 'TERRAIN_SNOW' )
			tt_ocean = gc.getInfoTypeForString( 'TERRAIN_OCEAN' )

			for iXLoop in range(iX - 2, iX + 3, 1):
				for iYLoop in range(iY - 2, iY + 3, 1):
					pPlot = CyMap().plot(iXLoop, iYLoop)
					#if ( pPlot.isPlayerCityRadius(pPID)==true ):
					if ( pPlot.getTeam()==pTID ):
						if ( pPlot.getTerrainType()==tt_grass ):
							if ( pPlot.getImprovementType()!=gc.getInfoTypeForString( 'IMPROVEMENT_FARM' )) and ( pPlot.getImprovementType()!=gc.getInfoTypeForString( 'IMPROVEMENT_WINDMILL' )) and ( pPlot.getImprovementType()!=gc.getInfoTypeForString( 'IMPROVEMENT_MINE' )) and ( pPlot.getImprovementType()!=gc.getInfoTypeForString( 'IMPROVEMENT_WATERMILL' )) and ( pPlot.getImprovementType()!=gc.getInfoTypeForString( 'IMPROVEMENT_WORKSHOP' )) and ( pPlot.getImprovementType()!=gc.getInfoTypeForString( 'IMPROVEMENT_LUMBERMILL' )) and ( pPlot.getImprovementType()!=gc.getInfoTypeForString( 'IMPROVEMENT_PLANTATION' )) and ( pPlot.getImprovementType()!=gc.getInfoTypeForString( 'IMPROVEMENT_QUARRY' )) and ( pPlot.getImprovementType()!=gc.getInfoTypeForString( 'IMPROVEMENT_PASTURE' ))and ( pPlot.getImprovementType()!=gc.getInfoTypeForString( 'IMPROVEMENT_CAMP' )) and ( pPlot.getImprovementType()!=gc.getInfoTypeForString( 'IMPROVEMENT_WELL' )) and ( pPlot.getImprovementType()!=gc.getInfoTypeForString( 'IMPROVEMENT_WINERY' )) and ( pPlot.getImprovementType()!=gc.getInfoTypeForString( 'IMPROVEMENT_COTTAGE' )) and ( pPlot.getImprovementType()!=gc.getInfoTypeForString( 'IMPROVEMENT_HAMLET' )) and ( pPlot.getImprovementType()!=gc.getInfoTypeForString( 'IMPROVEMENT_VILLAGE' )) and ( pPlot.getImprovementType()!=gc.getInfoTypeForString( 'IMPROVEMENT_TOWN' )) and ( pPlot.getImprovementType()!=gc.getInfoTypeForString( 'IMPROVEMENT_FOREST_PRESERVE' )) and ( pPlot.getImprovementType()!=gc.getInfoTypeForString( 'IMPROVEMENT_FORT' )):
								if ( pPlot.getFeatureType()!=gc.getInfoTypeForString( 'FEATURE_JUNGLE' )):	
									pPlot.setFeatureType(gc.getInfoTypeForString( "FEATURE_FOREST" ), 1)
						elif ( pPlot.getTerrainType()==tt_plain ):
							pPlot.setTerrainType(gc.getInfoTypeForString( "TERRAIN_GRASS" ), 1, 1)
						elif ( pPlot.getTerrainType()==tt_tundra ):
							pPlot.setTerrainType(gc.getInfoTypeForString( "TERRAIN_PLAINS" ), 1, 1)
						elif ( pPlot.getTerrainType()==tt_snow ):
							pPlot.setTerrainType(gc.getInfoTypeForString( "TERRAIN_TUNDRA" ), 1, 1)
						elif ( pPlot.getTerrainType()==tt_ocean ):
							pPlot.setTerrainType(gc.getInfoTypeForString( "TERRAIN_COAST" ), 1, 1)
						elif ( pPlot.getTerrainType()==tt_desert ):
							pPlot.setTerrainType(gc.getInfoTypeForString( "TERRAIN_PLAINS" ), 1, 1)
			
			CyInterface().addMessage(pPID,false,15,CyTranslator().getText("TXT_KEY_EDEN_PYTHON",()),'',0,'Art/Eden.dds',ColorTypes(44), iX, iY, True,True)

## Eden End ##
		
		if ((not gc.getGame().isNetworkMultiPlayer()) and (pCity.getOwner() == gc.getGame().getActivePlayer()) and isWorldWonderClass(gc.getBuildingInfo(iBuildingType).getBuildingClassType())):
			# If this is a wonder...
			popupInfo = CyPopupInfo()
			popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_PYTHON_SCREEN)
			popupInfo.setData1(iBuildingType)
			popupInfo.setData2(pCity.getID())
			popupInfo.setData3(0)
			popupInfo.setText(u"showWonderMovie")
			popupInfo.addPopup(pCity.getOwner())

		CvAdvisorUtils.buildingBuiltFeats(pCity, iBuildingType)

		if (not self.__LOG_BUILDING):
			return
		CvUtil.pyPrint('%s was finished by Player %d Civilization %s' 
			%(PyInfo.BuildingInfo(iBuildingType).getDescription(), pCity.getOwner(), gc.getPlayer(pCity.getOwner()).getCivilizationDescription(0)))
 
Hey HROCHLAND, this code might be useful:

Code:
[quote="Zebra 9, post: 6897853"]Here is the code that Arian requested.  It will add a building to a city when it completes a project.
[code]def onProjectBuilt(self, argsList):
	'Project Completed'
	pCity, iProjectType = argsList
	game = gc.getGame()
	if ((not gc.getGame().isNetworkMultiPlayer()) and (pCity.getOwner() == gc.getGame().getActivePlayer())):
		popupInfo = CyPopupInfo()
		popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_PYTHON_SCREEN)
		popupInfo.setData1(iProjectType)
		popupInfo.setData2(pCity.getID())
		popupInfo.setData3(2)
		popupInfo.setText(u"showWonderMovie")
		popupInfo.addPopup(pCity.getOwner())

	## ------------- ## CHANGE HERE ## ------------- ##
	sProject	= "PROJECT_SDI"			# The type tag of the project that gives the building
	sBuilding	= "BUILDING_BOMB_SHELTER"	# The type tag of the building to be given


	## ------------- ## DO NOT CHANGE ## ------------- ##
	if iProjectType == gc.getInfoTypeForString(sProject):
		pCity.setNumRealBuilding(gc.getInfoTypeForString(sBuilding), 1)
Place this code into an unchanged CvEventManager.py replacing onProjectBuilt. Or if you are using either Dr. Elmer Giggle's event manager or zModular Python the code will look like this.
Code:
def onProjectBuilt(self, argsList):
	'Project Completed'
	pCity, iProjectType = argsList


	## ------------- ## CHANGE HERE ## ------------- ##
	sProject	= "PROJECT_SDI"			# The type tag of the project that gives the building
	sBuilding	= "BUILDING_BOMB_SHELTER"	# The type tag of the building to be given


	## ------------- ## DO NOT CHANGE ## ------------- ##
	if iProjectType == gc.getInfoTypeForString(sProject):
		pCity.setNumRealBuilding(gc.getInfoTypeForString(sBuilding), 1)
Just place in your Event Manager file and away you go. If you would like multiple projects to give buildings just duplicate the code that comes after "## ------------- ## CHANGE HERE ## ------------- ##". Enjoy and just give a post if you need help. :thumbsup:

I'll be working on the promo's for Ambreville over the weekend. And about your newest Q, yes it's possible. Is it worth it? Depends on how complex it turns out to be. I would have to write code to calculate how much should go for science and treasury (don't need culture since they don't have cities). I'll see what I can do, but I can tell this much, it isn't going to be a snippet (try MOD COMP or maybe small MOD). :goodjob::cool::king:;):):D:crazyeye::scan:[/QUOTE]

[/CODE]

This way you can complete the Eden Project and add an Eden Building to the city that completed the project. I did use it for the International Space Station. After completing that project the ISS was hovering above it's city!
It works like a charm...:)

Credit for the code goes to Zebra9
 
Yes, it sounds good but I have st. in mind possibility make it all as wonder and not as project. It is, please possible?
EDIT:I´m not programer, I edited code only if... :(
 
I'm not a programmer also, that's why I asked Zebra9 if he could make the code and he did :)
If you make it as a wonder just need a model and you can add it through XML but that's not what you mean, I guess. If Python is involved maybe Tsentom can help.
 
Hrochland, just doing a rough look of your code I can't really see what's wrong so I converted the code from the project to fire for a building below:

Code:
	def onBuildingBuilt(self, argsList):
		'Building Completed'
		pCity, iBuildingType = argsList
		game = gc.getGame()

## Eden Start ##

		if iBuildingType == gc.getInfoTypeForString( 'BUILDING_EDEN' ):

			pPlayer = gc.getPlayer(pCity.plot().getOwner())
			pPID = pPlayer.getID()
			pTID = pPlayer.getTeam()
			iX = pCity.getX()
			iY = pCity.getY()
			tt_desert = gc.getInfoTypeForString( 'TERRAIN_DESERT' )
			tt_plain = gc.getInfoTypeForString( 'TERRAIN_PLAINS' )
			tt_grass = gc.getInfoTypeForString( 'TERRAIN_GRASS' )
			tt_tundra = gc.getInfoTypeForString( 'TERRAIN_TUNDRA' )
			tt_snow = gc.getInfoTypeForString( 'TERRAIN_SNOW' )
			tt_ocean = gc.getInfoTypeForString( 'TERRAIN_OCEAN' )

			for iXLoop in range(iX - 2, iX + 3, 1):
				for iYLoop in range(iY - 2, iY + 3, 1):
					pPlot = CyMap().plot(iXLoop, iYLoop)
					#if ( pPlot.isPlayerCityRadius(pPID)==true ):
					if ( pPlot.getTeam()==pTID ):
						if ( pPlot.getTerrainType()==tt_grass ):
							if ( pPlot.getImprovementType()!=gc.getInfoTypeForString( 'IMPROVEMENT_FARM' )) and ( pPlot.getImprovementType()!=gc.getInfoTypeForString( 'IMPROVEMENT_WINDMILL' )) and ( pPlot.getImprovementType()!=gc.getInfoTypeForString( 'IMPROVEMENT_MINE' )) and ( pPlot.getImprovementType()!=gc.getInfoTypeForString( 'IMPROVEMENT_WATERMILL' )) and ( pPlot.getImprovementType()!=gc.getInfoTypeForString( 'IMPROVEMENT_WORKSHOP' )) and ( pPlot.getImprovementType()!=gc.getInfoTypeForString( 'IMPROVEMENT_LUMBERMILL' )) and ( pPlot.getImprovementType()!=gc.getInfoTypeForString( 'IMPROVEMENT_PLANTATION' )) and ( pPlot.getImprovementType()!=gc.getInfoTypeForString( 'IMPROVEMENT_QUARRY' )) and ( pPlot.getImprovementType()!=gc.getInfoTypeForString( 'IMPROVEMENT_PASTURE' ))and ( pPlot.getImprovementType()!=gc.getInfoTypeForString( 'IMPROVEMENT_CAMP' )) and ( pPlot.getImprovementType()!=gc.getInfoTypeForString( 'IMPROVEMENT_WELL' )) and ( pPlot.getImprovementType()!=gc.getInfoTypeForString( 'IMPROVEMENT_WINERY' )) and ( pPlot.getImprovementType()!=gc.getInfoTypeForString( 'IMPROVEMENT_COTTAGE' )) and ( pPlot.getImprovementType()!=gc.getInfoTypeForString( 'IMPROVEMENT_HAMLET' )) and ( pPlot.getImprovementType()!=gc.getInfoTypeForString( 'IMPROVEMENT_VILLAGE' )) and ( pPlot.getImprovementType()!=gc.getInfoTypeForString( 'IMPROVEMENT_TOWN' )) and ( pPlot.getImprovementType()!=gc.getInfoTypeForString( 'IMPROVEMENT_FOREST_PRESERVE' )) and ( pPlot.getImprovementType()!=gc.getInfoTypeForString( 'IMPROVEMENT_FORT' )):
								if ( pPlot.getFeatureType()!=gc.getInfoTypeForString( 'FEATURE_JUNGLE' )):	
									pPlot.setFeatureType(gc.getInfoTypeForString( "FEATURE_FOREST" ), 1)
						elif ( pPlot.getTerrainType()==tt_plain ):
							pPlot.setTerrainType(gc.getInfoTypeForString( "TERRAIN_GRASS" ), 1, 1)
						elif ( pPlot.getTerrainType()==tt_tundra ):
							pPlot.setTerrainType(gc.getInfoTypeForString( "TERRAIN_PLAINS" ), 1, 1)
						elif ( pPlot.getTerrainType()==tt_snow ):
							pPlot.setTerrainType(gc.getInfoTypeForString( "TERRAIN_TUNDRA" ), 1, 1)
						elif ( pPlot.getTerrainType()==tt_ocean ):
							pPlot.setTerrainType(gc.getInfoTypeForString( "TERRAIN_COAST" ), 1, 1)
						elif ( pPlot.getTerrainType()==tt_desert ):
							pPlot.setTerrainType(gc.getInfoTypeForString( "TERRAIN_PLAINS" ), 1, 1)
			
			CyInterface().addMessage(pPID,false,15,CyTranslator().getText("TXT_KEY_EDEN_PYTHON",()),'',0,'Art/naturopath.dds',ColorTypes(44), iX, iY, True,True)

## Eden End ##

		if ((not gc.getGame().isNetworkMultiPlayer()) and (pCity.getOwner() == gc.getGame().getActivePlayer()) and isWorldWonderClass(gc.getBuildingInfo(iBuildingType).getBuildingClassType())):
			# If this is a wonder...
			popupInfo = CyPopupInfo()
			popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_PYTHON_SCREEN)
			popupInfo.setData1(iBuildingType)
			popupInfo.setData2(pCity.getID())
			popupInfo.setData3(0)
			popupInfo.setText(u"showWonderMovie")
			popupInfo.addPopup(pCity.getOwner())

		CvAdvisorUtils.buildingBuiltFeats(pCity, iBuildingType)

		if (not self.__LOG_BUILDING):
			return
		CvUtil.pyPrint('%s was finished by Player %d Civilization %s' 
			%(PyInfo.BuildingInfo(iBuildingType).getDescription(), pCity.getOwner(), gc.getPlayer(pCity.getOwner()).getCivilizationDescription(0)))

This will make the eden code fire for a wonder and only in the wonder's city radius providing in your XML you have the building labeled as:

BUILDINGCLASS_EDEN
BUILDING_EDEN

~~~~~~~~~~~~~~~~~~~~

TXT_KEY_EDEN_PYTHON

Is the text file it's looking for what it displays on the map once activated (Eden Project has improved the planet)

and

Art/naturopath.dds

where it's looking for the button. Just change that path like you would in the artdefines xml if your button is someplace else.



Hope this helps

For people wondering why I captioned out #if ( pPlot.isPlayerCityRadius(pPID)==true ): thats so the wonder will affect all tiles that the city could potentially work. If I hadn't, if two city's over laped some tiles wouldn't be improved
 
Back
Top Bottom