Adding a Wonder?

ZachScape

King
Joined
Aug 26, 2008
Messages
617
Location
New York
I was wondering how to add wonders to mods, and I couldn't find any recent tutorials to walk me through it.

I have Notepad++
I read this tutorial. Is it the same thing except the building class and only in the wonders folder?
I'm also adding a wonder as a step to learn C++ and modding.
Also, to avoid other question threads like this, can somebody just add a quick tutorial in the tutorial threads for this?

Thanks in advance
 
More or less the same as adding in a regular building.
But when you make the building class you turn on this:

<iMaxGlobalInstances>0</iMaxGlobalInstances>

And change the 0 to a 1.
 
I'm having a little trouble adding a Python wonder. It may be harder that I am using a mod (Quot Capita).
I put the downloaded file in:
C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\Mods\Quot Capita\Assets\Art\Structures\Buildings
Then when I tried to do the second part of that tutorial, I was lost.
Here is what I am looking at:

<Button>,Art/Interface/Buttons/Buildings/PoliceStation.dds,Art/Interface/Buttons/Warlords_Atlas_1.dds,1,5</Button>
</BuildingArtInfo>
- <BuildingArtInfo>
<Type>ART_DEF_BUILDING_STATUE_OF_ZEUS</Type>
<LSystem>LSYSTEM_2x3</LSystem>
<bAnimated>1</bAnimated>
<fScale>0.6</fScale>
<fInterfaceScale>0.8</fInterfaceScale>
<NIF>Art/Structures/Buildings/Zeus/Zeus.nif</NIF>
<KFM />

Can you show me what I am supposed to do now? Also, will I have to make my own Pedia entry, or is that more of a question for the author?
 
I put the downloaded file in:
C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\Mods\Quot Capita\Assets\Art\Structures\Buildings

What file?

Then when I tried to do the second part of that tutorial, I was lost.
Here is what I am looking at:

<Button>,Art/Interface/Buttons/Buildings/PoliceStation.dds,Art/Interface/Buttons/Warlords_Atlas_1.dds,1,5</Button>
</BuildingArtInfo>
- <BuildingArtInfo>
<Type>ART_DEF_BUILDING_STATUE_OF_ZEUS</Type>
<LSystem>LSYSTEM_2x3</LSystem>
<bAnimated>1</bAnimated>
<fScale>0.6</fScale>
<fInterfaceScale>0.8</fInterfaceScale>
<NIF>Art/Structures/Buildings/Zeus/Zeus.nif</NIF>
<KFM />

Can you show me what I am supposed to do now? Also, will I have to make my own Pedia entry, or is that more of a question for the author?

This entry section is not right, it has to begin with BuildingArtInfo.

Normal entry

PHP:
<BuildingArtInfo>
			<Type>ART_DEF_BUILDING_MYBUILDING</Type>
			<LSystem>LSYSTEM_1x1</LSystem>
			<bAnimated>0</bAnimated>
			<fScale>1.15</fScale>
			<fInterfaceScale>0.43</fInterfaceScale>
			<NIF>Art/Structures/Buildings/MyNewBuildingFolder/TheBiggestNifInThatFolder.nif</NIF>
			<KFM/>
			<Button>AFolder/MaybeAnotherFolder/MyButtonForThatBuilding.dds</Button>
		</BuildingArtInfo>
 
Thank you. I am less confused about that now. But now I have other things confusing me.
I am actually starting out by downloading the Sydney Opera House. If it works out, I will move on to add the Flavian Amphitheatre and the Himeji Castle.
In the download, Tsentom says:
All the python is labeled and searching for Sydney or Opera should find the changes. The XML, when possible, is at the bottom of the file. I recommend downloading and using Winmerge to combine python.
Now, where is the python Tsentom is talking about and what do I do with it?

In the code you gave, here is what I made of it:
Code:
<BuildingArtInfo>
            <Type>ART_DEF_BUILDING_SYDNEY_OPERA_HOUSE</Type>
            <LSystem>LSYSTEM_1x1</LSystem> [B]<- What is this?[/B]
            <bAnimated>0</bAnimated>
            <fScale>1.15</fScale> [B]<- What if this number is wrong? Do I have to guess and check?[/B]
            <fInterfaceScale>0.43</fInterfaceScale>
            <NIF>Art/Structures/Buildings/Sydney Opera House/sydney_opera_house.7z</NIF>
            <KFM/>
            <Button>AFolder/MaybeAnotherFolder/MyButtonForThatBuilding.dds</Button>
        </BuildingArtInfo>  [B]<- I don't have my own button, I thought Tsentom may have provided one. And I don't know what folders to add then.[/B]

Do I even have a chance?
 
The sidney opera house from tsentom is a 7zip file, it's a compressed format like .zip or .rar, you have to extract the archiv.
Here to download

After that, you'll see, that there are different files in it.
In the .xml-files (like the ArtDefines_Buildings.xml), normally the changes are added at the bottom of the file, so you can find it easily.
You can just copy the whole entry over in your file.

In the python files, you have to search for the name, normally the coders sign their code with "###modname start" and "###modname end###" or something similar.


fScale: That's the size of the building in the game.
fInterscale: That's the size for the civilopedia and the buildings-menu in the city.
Button: Yes, there's one.
The path should be the same like for the opera house nif, but with the "opera_house_button.dds" instead of the .nif.
 
OK. I am this close:
start [ ]end

I am getting wrapped up with the python now. I have found and selected what I needed.
Here it is:
Spoiler :
Code:
## Sydney Opera House Start ##

		if iHurryType == gc.getInfoTypeForString( "HURRY_GOLD" ):

			pPlayer = gc.getPlayer(pCity.plot().getOwner())
			b_Sydney = gc.getInfoTypeForString("BUILDING_SYDNEY_OPERA_HOUSE")
			obsoleteTech = gc.getBuildingInfo(b_Sydney).getObsoleteTech()
			pPID = pPlayer.getID()

			if ( gc.getTeam(pPlayer.getTeam()).isHasTech(obsoleteTech) == false or obsoleteTech == -1 ):
				for iCity in range(pPlayer.getNumCities()):
					ppCity = pPlayer.getCity(iCity)
					if ppCity.getNumActiveBuilding(b_Sydney) == true:

						iRelCivicOption = CvUtil.findInfoTypeNum(gc.getCivicOptionInfo,gc.getNumCivicOptionInfos(),'CIVICOPTION_RELIGION')
						iPacifist = CvUtil.findInfoTypeNum(gc.getCivicInfo,gc.getNumCivicInfos(),'CIVIC_PACIFISM')
						iRelCivic = pPlayer.getCivics(iRelCivicOption)
						iPhi = CvUtil.findInfoTypeNum(gc.getTraitInfo,gc.getNumTraitInfos(),'TRAIT_PHILOSOPHICAL')
						iNational = CvUtil.findInfoTypeNum(gc.getBuildingInfo,gc.getNumBuildingInfos(),'BUILDING_NATIONAL_EPIC')

						if (iRelCivic == iPacifist):
							if (pPlayer.hasTrait(iPhi)):
								if pCity.getNumActiveBuilding(iNational) == true:
									pCity.changeGreatPeopleProgress( +12 )
								elif pCity.getNumActiveBuilding(iNational) == false:
									pCity.changeGreatPeopleProgress( +9 )
							else:
								if pCity.getNumActiveBuilding(iNational) == true:
									pCity.changeGreatPeopleProgress( +9 )
								elif pCity.getNumActiveBuilding(iNational) == false:
									pCity.changeGreatPeopleProgress( +6 )
						elif (iRelCivic != iPacifist):
							if (pPlayer.hasTrait(iPhi)):
								if pCity.getNumActiveBuilding(iNational) == true:
									pCity.changeGreatPeopleProgress( +9 )
								elif pCity.getNumActiveBuilding(iNational) == false:
									pCity.changeGreatPeopleProgress( +6 )
							else:
								if pCity.getNumActiveBuilding(iNational) == true:
									pCity.changeGreatPeopleProgress( +6 )
								elif pCity.getNumActiveBuilding(iNational) == false:
									pCity.changeGreatPeopleProgress( +3 )
						else:
							pCity.changeGreatPeopleProgress( +3 )


Where do I put this?
 
What i do is i search in the target file for the stuff above those lines, then try to place it in exactly the same place.
 
I don't know what the target file is.
Here are the Python Files I am looking at:
Spoiler :
 
Well, the target file is the file with the same name as the one you are copying from.
 
I can't find the target file anywhere.
It's CvEventManager.py
But I can't find it anywhere in my python file.
 
Well then you could just copy the CvEventManager in tsentom's building and just copy it over to your mod.
 
Could that possibly interfere with the game, though? What if there is the inards of the file, but with a different title?
 
I highly doubt that it will in anyway interfere with your mod, especially if there is no file with that name.
 
I'm going to try it now, if it doesn't work, we can make more progress in the mourning. After this, I'm calling it a night. Give me 5
 
Didn't work. Didn't even show up. Let's try again tomorrow.
I appreciate all of your help, hard work, and especially patience.
'nite
 
If you're using BUG, you need the BugEventManager.py file found in the Bug folder in your python folder ;)
 
Top Bottom