How to add new buildings - step by step instructions

Ukas

Pthooey of Tomainia
Joined
Mar 31, 2002
Messages
1,439
Location
Oulu, Finland
Wrote these instructions to be used with my improvements and wonders. These are written for newcomers in Civediting/modding.

The new version 1.1 will help you with PTW and some known problems in 1.29f.

Ukas


EDIT:Here's a link to same tutorial for Civ3 Conquest


Here's the 1.1, you'll find instructions in rich text format.
 

Attachments

  • how to add buildings v1.1.zip
    6.6 KB · Views: 2,473
I don't suppose you could just post it as text in a post? If you're using rich text format, you can use the [color], , and tags to format your post. I just can't be arsed downloading...;)
 
How To Add Improvements And Wonders In Civ3.

With these step-by-step instructions you shouldn't fail. If you do somehow and can't get civ3 to work or it appears as corrupted use your back up files to resurrect it. You can try to do it again - if you are doing this for the first time it's possible you've done something wrong. But I tried to write this for the first timers, since people experienced with civ3 modding probably just get bored reading this as they already know the procedure, some may have developed better techniques or even programs to help. This is how I do it. It may be confusing at first but after couple of times you'll probably learn to do it in two minutes.

Sorry about possible typos and grammatic errors. My English is not always as good as is might be.

Anyway if you somehow ruin your files or/and blow up your computer with my graphics I will NOT take any responsibility. Remember to back up.


Index
1.Add the building in Civ3Edit
2.Copy images to folders
3.Add the Wonder Splash to PediaIcons.txt
4.Add the building icons to PediaIcons.txt
5.Difference between Era specific building and Single building
6.Add the Civilopedia entry
7.Copy and paste the buildings.pcx's


PRECAUTION! BACK UP FOLLOWING FILES:

Civ3\text\PediaIcons.txt
Civ3\text\Civilopedia.txt
Civ3\Art\City Screen\Buildings-large.pcx
Civ3\Art\City Screen\Buildings-small.pcx


I've used the Ziggurat wonder as an example, you can download it from Civ Fanatics Forum Graphics Modpacks thread:

http://forums.civfanatics.com/showthread.php?s=&threadid=47773



1.Add the building in Civ3Edit

Add a building in Civ3edit Improvements and Wonders tab, name it Ziggurat, in civilopedia entry type BLDG_Ziggurat. Give the Ziggurat wonder charasteristics of your choice. If you are unsure how to do it study the way the original Civ3 buildings are marked.




2.Copy images to folders

Copy Zigguratlarge.pcx and Zigguratsmall.pcx found in the zip package into your Civ3\art\civilopedia\icons\buildings folder.
Copy Zigguratsplash.pcx into your Civ3\art\wonder splash\ -folder.




3.Add the Wonder Splash to PediaIcons.txt

In the zip package there's ziggurat.txt with lines:

#WON_SPLASH_xx
art\wonder splash\Zigguratsplash.pcx

NOTE: xx is number of the wonder splash, last one of civ3's own wonder splashes is numbered 63; for battlefield medicine. Then there are slots for spacecraft parts (I think) and first available for you to use is 74 - so if Ziggurat is your first self added wonder the line should look like this:

#WON_SPLASH_74
art\wonder splash\Zigguratsplash.pcx


Add the lines to your Civilopedia.txt after lines battlefield medicine lines in #WONDER_SPLASH_ART begin -section. The battlefield medicine lines will look like this:

#WON_SPLASH_63
art\wonder splash\Battlefield Medicine.pcx


After the lines for Battlefield Medicine splash there is a long row of #'s. The Ziggurat part should be added in between.

So, the result should look like this:


#WON_SPLASH_63
art\wonder splash\Battlefield Medicine.pcx
#WON_SPLASH_74
art\wonder splash\Zigguratsplash.pcx
############################################################################

Wonder splash is the image Civ3 shows when you build a wonder therefore Zigguratsplash.pcx is the pic Civ3 shows when you build the Ziggurat wonder.
Your Civ3\art\wonder splash\ -folder is the place these images are located. By adding lines to PediaIcons.txt you will show Civ3 where it can find images for it's purposes.


_Now Civ3 is able to play the wonder splash during the game._




4.Add the building icons to PediaIcons.txt

Next locate line #Start buildings in your PediaIcons.txt file.First line after it is #ICON_BLDG_Airport for Airport improvement. The buildings are in alphapedical order so the last lines for buildings will be for wealth "improvement".

#ICON_BLDG_Wealth
SINGLE
art\civilopedia\icons\buildings\wealthlarge.pcx
art\civilopedia\icons\buildings\wealthsmall.pcx


Again look at Ziggurat.txt file in the package, and add following lines after the last Wealth line and before #HomelessIcons line.


#ICON_BLDG_Ziggurat
SINGLE
art\civilopedia\icons\buildings\Zigguratlarge.pcx
art\civilopedia\icons\buildings\Zigguratsmall.pcx


The result should look like this:


#ICON_BLDG_Wealth
SINGLE
art\civilopedia\icons\buildings\wealthlarge.pcx
art\civilopedia\icons\buildings\wealthsmall.pcx
#ICON_BLDG_Ziggurat
SINGLE
art\civilopedia\icons\buildings\Zigguratlarge.pcx
art\civilopedia\icons\buildings\Zigguratsmall.pcx
#HomelessIcons
etc.
etc.


_Now you are able to see appropriate icons and images in science advisor screen and when viewing civilopedia._




5.Difference between Era specific building and Single building

In era specific building graphics may vary when changing the era. Then you must make it appear four times, once for every era. Let's imagine that the Brothel improvement is available from the industrial era. There's only one icon but you choose to do some art work and make it look different for modern ages. Then the lines should look like this:

#ICON_BLDG_Brothel
ERA
art\civilopedia\icons\buildings\Brothellarge.pcx
art\civilopedia\icons\buildings\Brothellarge.pcx
art\civilopedia\icons\buildings\Brothellarge.pcx
art\civilopedia\icons\buildings\Brothellarge.pcx
art\civilopedia\icons\buildings\Brothelsmall.pcx
art\civilopedia\icons\buildings\Brothelsmall.pcx
art\civilopedia\icons\buildings\Brothelsmall.pcx
art\civilopedia\icons\buildings\Brothelsmall.pcx

Note that


My Gallows graphics are era specific. Different image and different name for the image for every era (gallows for ancient times, guillotine for middle ages, electric chair for industrial and firing squad for modern times. Gallows improvement needs following lines:


#ICON_BLDG_Gallows
ERA
art\civilopedia\icons\buildings\Gallowslarge.pcx
art\civilopedia\icons\buildings\Guillotinelarge.pcx
art\civilopedia\icons\buildings\Electricchairlarge.pcx
art\civilopedia\icons\buildings\Firingsquadlarge.pcx
art\civilopedia\icons\buildings\Gallowssmall.pcx
art\civilopedia\icons\buildings\Guillotinesmall.pcx
art\civilopedia\icons\buildings\Electricchairsmall.pcx
art\civilopedia\icons\buildings\Firingsquadsmall.pcx


With improvements there are no need for Splashes. In my ---.txt file in the package there are always needed additions for both civilopedia.txt and pediaicons.txt - no need for more.


6.Add the Civilopedia entry

Civilopedia entries are not necessarily needed, since Civ3 works well without them. But if you want to add them for gameplay's sake I've taken the trouble to write the civilopedia entry for you. Or sometimes taken the trouble to copy parts of texts found in the internet ;-)

In Civilopedia.txt file found again in your Civ3\text\ folder there are sections for City Improvements, Spaceship Parts, Small and Great Wonders. Ziggurat is a Great wonder so find great wonders section. Last of the great wonders is the Seti Program. Looks like this:



#BLDG_SETI_Program
^
^Doubles $LINK<scientific research=GCON_Research> in the city where it is built.
^
^
^
^May trigger $LINK<Golden Age=GCON_Golden_Age> for Expansionist civilizations.
#DESC_BLDG_SETI_program
^
^
^The Search for Extraterrestrial Intelligence (SETI) was officially initiated by the United States in the latter half of the 20th Century. The purpose of the program was to find some sort of conclusive evidence that intelligent life existed beyond the confines of our planet. Employing banks of radio telescopes and other detection equipment, SETI scans the skies hoping to find proof of extraterrestrial life in the form of radio transmissions and other activity. Although the program has yet to find such proof, the effort has produced many useful benefits to astronomy, telecommunications, and other high-tech fields.


NOTE: The #BLDG_SETI_Program part is for the screen when you click Seti Program icon to view it in civilopedia. #DESC_BLDG_SETI_program is viewed when you click the description button in that screen. So, we will give the Ziggurat wonder similar entry to just below Seti Program. In Ziggurat.txt you will find next lines:


#BLDG_Ziggurat
^
^
^Doupless the happines of a temple in your every city on the continent.
^
^
^
^
^May trigger $LINK<Golden Age=GCON_Golden_Age> for Religious civilizations.
#DESC_BLDG_Ziggurat
^
^
^
^Ziggurat is a Sumerian word given by the ancient Babylonians and Assyrians to their temples around 2200 until
500 BC. The word means "terraced pyramid," and ziggurats were precursors to the Egyptian pyramids. Found in
many ancient Mesopotamian cities, ziggurats were step-shaped, representing the ascent into the heavens where
the gods reigned. The outside was constructed of materials that were resistant to the elements, and the terraces
were often landscaped with shrubs and trees.


When giving charasteristics and effects for Ziggurat in Civ3edit I gave it the douples happiness of a temple Oracle effect and religious charasteristics. If you give it different effects, like 'adds one happy face in every city on the same continent' then change the following line:

^Doupless the happines of a temple in your every city on the continent.

to this one:

^Adds one happy face in every city on the same continent.

--

If you gave it militaristic characteristics for some reason then change:

^May trigger $LINK<Golden Age=GCON_Golden_Age> for Religious civilizations.

to:

^May trigger $LINK<Golden Age=GCON_Golden_Age> for Militaristic civilizations.


If these were your choices then Ziggurat wonder entry would look like this:

#BLDG_Ziggurat
^
^Adds one happy face in every city on the same continent.
^
^
^
^May trigger $LINK<Golden Age=GCON_Golden_Age> for Militaristic civilizations.
#DESC_BLDG_Ziggurat
etc. etc.



NOTE: If you are adding an improvement or minor wonder instead of a great wonder then put it in correct place (although I've I've had no problems so far if I've had
improvements in wonder section etc.). If you are adding an improvement put it as the last improvement before spaceship components start line. In civilopedia.txt sections are divided with lines like these:

; City Improvements_____________________City Improvements
; SPACESHIP COMPONENTS___________________SPACESHIP COMPONENTS
;GREAT WONDERS_________________________________ GREAT WONDERS
; END GREAT WONDERS_____________________END GREAT WONDERS





7.Copy and paste the buildings.pcx's

Ok, then the all important buildings-large.pcx and buildings-small.pcx. You will need some kind of image editor for the purpose - make sure the editor you use works with pcx-files. Paint program which comes with windows will not work, at least one with windows XP I'm using doesn't. I can't exactly tell you how to do it since different programs use different ways. But copying and pasting should be available in the simplest image editor and commands are often similar. Learn from a help file or something how to copy and paste in the program if you don't already know. This is how it can be done usually:

a. In the program open my buildings-large.pcx and then Civ3's buildings-large.pcx found in Civ3\Art\City Screen\ folder. In my file there is usually one building graphics or if era specific there will be four of them in a row. In Civ3's file there's the whole building list as images ment for game's city screen queue list and build button.

b. Select my single icon.

c. Copy it by pressing ctrl-c keyboard shortcut or with copy command in edit tab or something. My icon is now in the clipboard to be used soon.

d. Select civ3's building-large.pcx, zoom in until you see few icons appearing larger. Roll down until you seen empty slot under the last Spaceship Component icon.

e. Paste my icon in the first empty space immediately under the last Spaceship Component icon. Be sure that green lines are symmetrically joined in every corner and it looks to be in its right place compared to original Civ3 icons.

f. My icon may view as selected, so unselect it (learn how to from your program).

g. Save it as building-large.pcx into Civ3\Art\City Screen\ folder.

h. Repeat the procedure with buildings-small.pcx


NOTE: If the building you are adding is era specific (like most improvements), not a single building which will look the same in every era (like most wonders) and poor me have supplied you with only one icon you have to make a horizontal row of four icons in your buildings-large and -small.pcx's.


--------------------------- End of instructions ---------------------


So, now you are able to see the buildings and use them for your civ3 games, scenarios and mods. Note that you can't see added buildings in City View since it's hardcoded and people rarely use it anyways, I guess.

Have fun,

Ukas
 
Version changes: Just got my copy of PTW and was happy to see that it has no numbered slots for wonder splashes. I also added known problems chapter based on what I and couple of my pals have experienced.



8.Play The World makes our life easier


A welcomed change is that in PTW numbered slots have been abandoned. This caused some problems like sometimes palace, center of your empire, wanted to behave just like wonders so when you established your first city or changed the location of the palace it wanted a splash to be played for it.

So, now you just give a name similar to Civ3XEdit entry instead of a number for the splash. Like with Ziggurat here:

#WON_SPLASH_BLDG_Ziggurat
art\wonder splash\Zigguratsplash.pcx


It will find it there. Great! I naturally hoped for couple things more what they could've done in PTW but it's a start.






9.Known problems


Usually problems will be typos and empty spaces in Pediaicons.txt and Civilopedia.txt entries.

The program is rather picky how entries have been typed: For example if you have typed line #ICON_BLDG_Ziggurat and then hit space one time after last t-letter it will not find it. Then when you are resolving the problem and studying the entry you can't even see the error - unless you select or go through the lines with arrowkeys. IIRC there was this kind of empty space bug in some patch's pediaicons.txt.


Other problem is that some of the wonder splash slots are reserved by the program (I think) for example after #WON_SPLASH_80 you can't add line #WON_SPLASH_81 or #WON_SPLASH_82 because next available slot is 83 - so what it will accept is #WON_SPLASH_83. My PediaIcons.txt looks like this:
...
#WON_SPLASH_80
art\wonder splash\Freudspsychoanalysis.pcx
#WON_SPLASH_83
art\wonder splash\Maginotsplash.pcx
#WON_SPLASH_84
art\wonder splash\Zigguratsplash.pcx
#WON_SPLASH_86
art\wonder splash\Winterwarsplash.pcx
...

So you see there are no slots 81,82 and 85 used by my additions. I still don't know the logic behind it so I can't say are they reserved slots or what, but if it's wrong it will appear in following way: I start the game (or my personal mod) civ3 will crash but before that it leaves a message on screen which tells you about missing entry. From the message you can read what it tries to search, so if you gave Ziggurat a slot 81 the message says it looks for 83. So, open your pediaicons.txt, give new number for zigguratsplash:

FROM:

#WON_SPLASH_81
art\wonder splash\Zigguratsplash.pcx

TO:

#WON_SPLASH_83
art\wonder splash\Zigguratsplash.pcx

And it should work. My splashes start from number 77 and last one is 98. In my PediaIcons.txt slots I can't use are 81,82,85,91 and 93. Of what I'm not sure is that does it affect if you insert improvements in your buildings-large.pcx and buildings-small.pcx. In this case your available and unavailable slots are different than mine. Perhaps someone can explain how it works and this feature will be added in "HOW TO ADD BUILDINGS v1.2".



At some point when I was adding new buildings I experienced following problem: The entry for new splash was ok, but when I started with civ3 it wanted that there must be splash graphics for palace. The original entry for palace is:

#WON_SPLASH_0
art\wonder splash\palace.pcx
So the slot for it is number 0. It should mean that it will not play a splash for it everytime when you start a game and establish your first city. I tried to solve the problem by giving it new splash graphics but then civ3 started to treat palace building as a wonder. Well, this remained unsolved by me, but a friend told that it can be corrected by giving new number for the building which was added when the problem appeared in the first place.

But if you have PTW you will not face numero problem since it doesn't use numbered slots but entry names like #WON_SPLASH_BLDG_Ziggurat.

In short, make sure your entries are correct and don't panic if civ3 crashes - make the changes crash message will spot for you.


So that's that. Hopefully this helps if you've had problems etc.

Ukas
 
Just adding that city view is hardcoded, as are the eras and cultural views for city view..... allthough there are quite a few wonder city views that could be used for culture-specific buildings.

You can edit these too.... in the city view folder.
 
Also I learned possible to add some building graphics to city view since there's a additional_buildings.pcx for user defined building slots. Aaglo used this for his synagogue. Must make use of that feature in the future, don't have that much time as I had earlier - but I'll probably will make some city view graphics for some of my building - probably the ones I like most. ;)
 
And it works?

How does civ III know which file to use? Surely it must be entered somewhere.
 
Haven't tried it though, and don't know more about it. I guess civ3 could recognize it in other ways, perhaps it's not necessarily needed to make an entry for it. Hmm. Must ask Aaglo if he knows.
 
First, thank you for the tutorial it really helped.

My problem is everything shows up right, civilopedia reads and show right, but when I select new wonder from the city screen
what shows up as selected is the wrong icon. What's confusing, to me, is that in the city screen before I select all icons show correct, but when I select it what shows in the small box at the bottom is wrong?
I've checked for typos and added spaces they all appear to be right.

This is with PTW. Any ideas of what am I overlooking?

Also, everything shows right in science advisor and when I right click advisor everything shows right in civilopedia.

Help!
 
The building queue uses buildings-small.pcx and the building box uses buildings-large.pcx in civ3\art\city screen-folder. Compare these two files, buildings should be in similar order.

It sounds like your buildings-small.pcx works the way it should and the problem is in your buildings-large.pcx, so be sure large has buildings graphics exactly in same order from top to bottom. Let me know if this helped.
 
Thanks for the quick reply. Everything matches. But, I remembered that I had added some empty boxes to my buildingslarge because there was no more room. I changed my redone one with one that I downloaded from civfanatics here. All works fine now.

Is there a special way to add blank boxes in the buildingslarge and small? I've added empty boxes in unit's_32 and it works fine.
That seems to be what my problem was. Truthfully, I can't see any difference between mine and the one I downloaded.

Thanks again.
 
Oh yes, forgot to mention this:

Difference between buildings-pcx's and unit_32 is that you don't get to choose the icon from buildings-pcx's in civ3editor. So the order of the icons in pcx's must be similar to the list in the editor, from top to down.

In other words, if you add a new building in the editor it will use the next available slot for graphics in buildings-pcx's. There's no way to point it to use different slot.
 
With the help of your tutorial I have been able to add several buildings. The only problem now is some of the buildings show correcly everywhere but in the science advisor screen. When I click on the advisor screen and go into the civilopedia the buildings are there only they have a yellow background.

I don't know where the yellow is coming from. Loaded in PSP7 everything looks fine. pulling one that's not showing and one that is into PSP7 and compare stats and all and there is no difference.

Any help would be appreciated.

I like your tutorial. Your step-by-step and examples are easy to follow. I appreciate the time it must take for you and others to do the work you offer here.

Thanks again
 
Using the Collosus as an example. I see it's icon in these files...

Civ3\Art\City Screen\Buildings-large.pcx
Civ3\Art\City Screen\Buildings-small.pcx

But where is the truly large Collosus that displayed via Aerial View? :(

I'm wanting to change the wonders, if that's possible.
 
Originally posted by stormbind
Using the Collosus as an example. I see it's icon in these files...

Civ3\Art\City Screen\Buildings-large.pcx
Civ3\Art\City Screen\Buildings-small.pcx

But where is the truly large Collosus that displayed via Aerial View? :(

I'm wanting to change the wonders, if that's possible.

City view files can be found in Civ3\Art\City View\Buildings

Read pesoloco's tutorial on changing city view graphics. Not the easiest thing there is and for example, I have opted not to meddle with them.

In case you meant the civilopedia files of Colossus (ones shown in civilopedia and science advisor screen), they are in Civ3\Art\Civilopedia\Icons\buildings
 
Originally posted by Cobweb
With the help of your tutorial I have been able to add several buildings. The only problem now is some of the buildings show correcly everywhere but in the science advisor screen. When I click on the advisor screen and go into the civilopedia the buildings are there only they have a yellow background.

I don't know where the yellow is coming from. Loaded in PSP7 everything looks fine. pulling one that's not showing and one that is into PSP7 and compare stats and all and there is no difference.


This is a bit late reply but needs an answer since it's a common problem - so I answer generally.


PEOPLE WITH GRAPHICS PROBLEMS READ THIS!!!


I think it's again the problem with index numbers which cause behaviour you described. Pcx's Civ3 use demand that magenta (background color in buildings.pcx) and green (border color) must have always same index numbers. They are used by the game as transparent colors.

In photoshop make sure color number 0 is magenta (red255,green0,blue255) and number 1 is green (red0,green255,b0). In Jasc PSP and some other programs magenta has to be last color and green one before it.

I don't know how to change it in PSP since I'm using photoshop but I describe how I do it.

In photoshop you can check this from image -> mode -> color table. Use forced: custom in indexed color, and add magenta and green. Magenta must be in top left box (which is number 0) and green next to the right.

----------

Another problem:

If you see magenta dots or lines when playing civ, like in building queues or in civilopedia you may have colors close to magenta in graphics you are using. This happens easily in RGB mode if you are using paintbrush etc. since many graphics programs will add some shades on edges when you draw a line.

If you have given correct index values to magenta and green and still see some magenta it's because of there are dots or splashes with index number close to correct magenta - something like r255,g0,b253. So, two shades closer to blue and it's showing in the game.

Use some color replacement tool (not paintbucket) to give correct values. Or give same r255,g0,b255 value to all wrong color/colors in color table.

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


Note that you can use other colors like black (red255,green255,blue255 and white (r0,g0,b0) for transparency as photoshop does by default, but then you must make sure that the darkest color in the pic is much lighter like r233,g233,b233 and lightest much darker like r11,g,14,b22. This results a pic with dull shades so it's not recommended.


When you add custom graphics it's always possible that something may go wrong and you won't even see it. And everytime when you get creative without knowing exactly what you are doing it's almost certain something will happen. But if you follow the instructions there should be no problems.
 
Is there a limit to how many features a wonder can have? I'm trying to add a wonder with the following features:

Temple of Solomon

Tech required: Revelation (I added it as a Tech available to all).

Building required: Tabernacle (I added it too, as a BLDG requiring Revelation tech.

Culture:8 Production:2 Cost:20

Never obsolete. Doubles happiness of: Tabernacle. Grants Temple in every city.

Other features:
Gain any advances owned by 2 civs
Doubles research output
+2 free advances
Increases chance of leader appearance
Reduces corruption
Allows healing in enemy territory
Flagged as religious wonder
Continental mood effects.

Here's the problem: My Revelation and Tabernacle mods work, but Temple of Solomon doesn't show up in the game. I've triple checked my civilopedia and pediaicons entries, and they all check out--they match entries of other similar buildings.

I'm wondering if maybe there is a limit to how many features you can give a wonder? Or maybe some features can't be given in the Ancient era, for example allowing healing in enemy territory?
 
Again late but still:

Camber, did you manage to solve it? I tested this by giving one building almost all features and it worked. I'd suggest that you check how the tech is linked.

You can test the building by making it appear to all civs in the start, give it 1 cost and start a test game. If it works as it should the problem is somewhere else.
 
Thankyou for the most excellent tutorial. This is just what the doctor ordered since I am working on a massive mod project. And I had troubles with adding buildings, I wanted to add some structures such as a hockey areana, etc. Now I can continue this phase of the project thanks to your guys help. :D
 
Top Bottom