Walkthough Request: Creating a New Wonder

Captain

Chieftain
Joined
Mar 17, 2003
Messages
47
Location
Canada
I am completely new to the concept of modding. I have no idea how to go about editing XML files or if I need a special program to do so. I would greatly appreciate if a member could post some instructions on how and where to get started.

I took some time to look around these boards and there isn't much type about how wonders can be made. To begin small with modding, I'd like to know how a wonder can be made from scratch with the image when it is created (replacing the animated movie of an default wonder), the little graphic by a city of the building and how to have it's effects take hold in the game. Basically the whole bit.

I am certain that if I develop the knowhow I could get into modding in a big way. Thanks very much.
 
The only thing you need to edit XML is Notepad. As per creating wonders, it is pretty easy. Wonders are just special buildings that are found in the BuildingInfos.xml file. I have made a tutorial on modifying the movies for wonders and the ilk. I think there is a good building tutorial in the Tutorials section.

Finally, if you have any specific questions, just ask around the forums. I am pretty new to modding the civilization series myself, but everyone here is very helpful.

<edit>
Nevermind, I don't see a building tutorial.
Okay then, to start with. What do you want to do?
</edit>
 
XML files canbe edited with a plain text editor such as Notepad. I use Notepad++ which has context-sensitive coloring.

There is a tutorial on the forums somewhere about adding a building to the game. That's the same as adding a wonder except that a wonder requires one more step to make it unique. I'd search myself but I'm using a friend's laptop and any typing on this keyboard is a real pain.

Roger Bacon
 
Well, I've just opened up the CIVBuildingInfos file in notepad and I see a whole lot of code that I can't make much heads or tails of.

I'm assuming that
</BuildingInfo>
<BuildingInfo>

separates the buildings in the code. I suppose the help I would need at this point would be for someone to translate the parts of this code section for me (that I think goven the properties of one building).

I would like to know basic first, like where to change the name. The technology required for it, its cost, and most importantly its effect. What I am after is for this observatory to become a wonder that produces a great scientist for the creator and a lab in every city.

I'd also like to know how in this text I could possibly incorporate an image of it to appear when it is built with the stats and how a little graphic could be made to be seen by the city in which it is built. :S

------------------------------------------------------------------------

</BuildingInfo>
<BuildingInfo>
<BuildingClass>BUILDINGCLASS_OBSERVATORY</BuildingClass>
<Type>BUILDING_OBSERVATORY</Type>
<SpecialBuildingType>NONE</SpecialBuildingType>
<Description>TXT_KEY_BUILDING_OBSERVATORY</Description>
<Civilopedia>TXT_KEY_BUILDING_OBSERVATORY_PEDIA</Civilopedia>
<Strategy>TXT_KEY_BUILDING_OBSERVATORY_STRATEGY</Strategy>
<Advisor>ADVISOR_SCIENCE</Advisor>
<ArtDefineTag>ART_DEF_BUILDING_OBSERVATORY</ArtDefineTag>
<MovieDefineTag>NONE</MovieDefineTag>
<HolyCity>NONE</HolyCity>
<ReligionType>NONE</ReligionType>
<StateReligion>NONE</StateReligion>
<PrereqReligion>NONE</PrereqReligion>
<GlobalReligionCommerce>NONE</GlobalReligionCommerce>
<VictoryPrereq>NONE</VictoryPrereq>
<FreeStartEra>NONE</FreeStartEra>
<MaxStartEra>NONE</MaxStartEra>
<ObsoleteTech>NONE</ObsoleteTech>
<PrereqTech>TECH_ASTRONOMY</PrereqTech>
<TechTypes/>
<Bonus>NONE</Bonus>
<PrereqBonuses/>
<ProductionTraits/>
<PowerBonus>NONE</PowerBonus>
<FreeBonus>NONE</FreeBonus>
<iNumFreeBonuses>0</iNumFreeBonuses>
<FreeBuilding>NONE</FreeBuilding>
<FreePromotion>NONE</FreePromotion>
<CivicOption>NONE</CivicOption>
<GreatPeopleUnitClass>NONE</GreatPeopleUnitClass>
<iGreatPeopleRateChange>0</iGreatPeopleRateChange>
<bTeamShare>0</bTeamShare>
<bWater>0</bWater>
<bRiver>0</bRiver>
<bPower>0</bPower>
<bDirtyPower>0</bDirtyPower>
<bAreaCleanPower>0</bAreaCleanPower>
<bDiploVote>0</bDiploVote>
<bForceTeamVoteEligible>0</bForceTeamVoteEligible>
<bCapital>0</bCapital>
<bGovernmentCenter>0</bGovernmentCenter>
<bGoldenAge>0</bGoldenAge>
<bMapCentering>0</bMapCentering>
<bNoUnhappiness>0</bNoUnhappiness>
<bNoUnhealthyPopulation>0</bNoUnhealthyPopulation>
<bBuildingOnlyHealthy>0</bBuildingOnlyHealthy>
<bNeverCapture>0</bNeverCapture>
<bNukeImmune>0</bNukeImmune>
<bPrereqReligion>0</bPrereqReligion>
<bCenterInCity>0</bCenterInCity>
<iAIWeight>0</iAIWeight>
<iCost>150</iCost>
<iHurryCostModifier>0</iHurryCostModifier>
<iMinAreaSize>-1</iMinAreaSize>
<iConquestProb>66</iConquestProb>
<iCitiesPrereq>0</iCitiesPrereq>
<iTeamsPrereq>0</iTeamsPrereq>
<iLevelPrereq>0</iLevelPrereq>
<iMinLatitude>0</iMinLatitude>
<iMaxLatitude>90</iMaxLatitude>
<iGreatPeopleRateModifier>0</iGreatPeopleRateModifier>
<iGlobalGreatPeopleRateModifier>0</iGlobalGreatPeopleRateModifier>
<iAnarchyModifier>0</iAnarchyModifier>
<iGlobalHurryModifier>0</iGlobalHurryModifier>
<iExperience>0</iExperience>
<iGlobalExperience>0</iGlobalExperience>
<iFoodKept>0</iFoodKept>
<iAirlift>0</iAirlift>
<iAirModifier>0</iAirModifier>
<iNukeModifier>0</iNukeModifier>
<iNukeExplosionRand>0</iNukeExplosionRand>
<iFreeSpecialist>0</iFreeSpecialist>
<iAreaFreeSpecialist>0</iAreaFreeSpecialist>
<iGlobalFreeSpecialist>0</iGlobalFreeSpecialist>
<iMaintenanceModifier>0</iMaintenanceModifier>
<iWarWearinessModifier>0</iWarWearinessModifier>
<iGlobalWarWearinessModifier>0</iGlobalWarWearinessModifier>
<iHealRateChange>0</iHealRateChange>
<iHealth>0</iHealth>
<iAreaHealth>0</iAreaHealth>
<iGlobalHealth>0</iGlobalHealth>
<iHappiness>0</iHappiness>
<iAreaHappiness>0</iAreaHappiness>
<iGlobalHappiness>0</iGlobalHappiness>
<iStateReligionHappiness>0</iStateReligionHappiness>
<iWorkerSpeedModifier>0</iWorkerSpeedModifier>
<iMilitaryProductionModifier>0</iMilitaryProductionModifier>
<iSpaceProductionModifier>0</iSpaceProductionModifier>
<iGlobalSpaceProductionModifier>0</iGlobalSpaceProductionModifier>
<iTradeRoutes>0</iTradeRoutes>
<iCoastalTradeRoutes>0</iCoastalTradeRoutes>
<iGlobalTradeRoutes>0</iGlobalTradeRoutes>
<iTradeRouteModifier>0</iTradeRouteModifier>
<iGlobalPopulationChange>0</iGlobalPopulationChange>
<iFreeTechs>0</iFreeTechs>
<iDefense>0</iDefense>
<iAllCityDefense>0</iAllCityDefense>
<iAsset>5</iAsset>
<iPower>0</iPower>
<fVisibilityPriority>1.0</fVisibilityPriority>
<SeaPlotYieldChanges/>
<GlobalSeaPlotYieldChanges/>
<YieldChanges/>
<CommerceChanges/>
<ObsoleteSafeCommerceChanges/>
<CommerceChangeDoubleTimes/>
<CommerceModifiers>
<iCommerce>0</iCommerce>
<iCommerce>25</iCommerce>
</CommerceModifiers>
<GlobalCommerceModifiers/>
<SpecialistExtraCommerces/>
<StateReligionCommerces/>
<CommerceHappinesses/>
<ReligionChanges/>
<SpecialistCounts>
<SpecialistCount>
<SpecialistType>SPECIALIST_SCIENTIST</SpecialistType>
<iSpecialistCount>1</iSpecialistCount>
</SpecialistCount>
</SpecialistCounts>
<FreeSpecialistCounts/>
<CommerceFlexibles/>
<CommerceChangeOriginalOwners/>
<ConstructSound>AS2D_BUILD_OBSERVATORY</ConstructSound>
<BonusHealthChanges/>
<BonusHappinessChanges/>
<BonusProductionModifiers/>
<UnitCombatFreeExperiences/>
<DomainFreeExperiences/>
<DomainProductionModifiers/>
<BuildingHappinessChanges/>
<PrereqBuildingClasses/>
<BuildingClassNeededs/>
<SpecialistYieldChanges/>
<BonusYieldModifiers/>
<Flavors>
<Flavor>
<FlavorType>FLAVOR_SCIENCE</FlavorType>
<iFlavor>10</iFlavor>
</Flavor>
</Flavors>
<HotKey/>
<bAltDown>0</bAltDown>
<bShiftDown>0</bShiftDown>
<bCtrlDown>0</bCtrlDown>
<iHotKeyPriority>0</iHotKeyPriority>
 
huh, tall order. Alright, lets start at the begining. First off, you are correct. The <BuildingInfo> tag marks the start of each building and the </BuildingInfo> tag marks the end.

The name is controlled through the <Description>TXT_KEY_BUILDING_OBSERVATORY</Description> tag. It links to an identical tag in the

C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Mods\HP ERROR G108\Assets\XML\Text\CIV4GameTextInfos_YOURMODNAMEHERE.xml

the matching tag will look like this.

<TEXT>
<Tag>TXT_KEY_BUILDING_OBSERVATORY</Tag>
<English>Observatory</English>
</TEXT>

So the programming looks for the matching text tag and places that text in the game.

Now for the images. As you might have gathered it is located in the.
<ArtDefineTag>ART_DEF_BUILDING_OBSERVATORY</ArtDefineTag>
It links to another file that controls what the buildings look like.

For movies
<MovieDefineTag>NONE</MovieDefineTag>

Any of the tags that start with a b are boolean tags. Like this one
<bPower>0</bPower>

Insted of being a link it is just an on or off switch. If it say 0 then the related information does not apply. If it is a 1 then it does apply.

I am not honestly sure what each of the tags mean but there is a civ 4 wikipedia that has all that info. I will see if I can find the link for you.

<edit>

WHICH REMINDS ME. VERY IMPORTANT. NEVER NEVER NEVER NEVER edit the original files of the game itself. Build yourself a mod folder here.

C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Mods\

Then create a similer folder structure and copy files you want to edit into the corresponding directories. Thusly

the CIV4BuildingInfos file copies from
C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Assets\XML\Buildings\
to
C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Mods\Harry Potter\Assets\XML\Buildings

Only edit the copies you make, that way the original files will not be damaged if you make a mistake.
 
I would recommend XML marker. You can Google it to find where to download it for free.

Yes you can use notepad, but XML marker will alert you when you've buggered up a tag in some way, shape, or form.
 
Captain said:
I suppose the help I would need at this point would be for someone to translate the parts of this code section for me (that I think goven the properties of one building).

Civ4wiki.com has a lot of information about what all the <tags> do. Here's the page on the buildinginfos.xml file:

http://civ4wiki.com/wiki/index.php/CIV4BuildingInfos
 
Ok, I just downloaded Notepad++ to see what all the fuss was about. WHY DIDN'T ANYONE TELL ME IT HAD TABBED BROWSING? I am converted. Tabbed browsing is one of the main things I love about firefox.
 
Attached is a step by step process someone used to add a building. I followed this procedure when I added my first building. Hope it helps.

Roger Bacon
 

Attachments

Back
Top Bottom