View Full Version : Tutorial: Era Specific Unit Graphics


pdescobar
Mar 13, 2003, 05:03 PM
Synopsis:
Here is a brief tutorial on how to make unit graphics change with the change in eras, based on posts by both myself and zulu9812. It is a simple procedure, but it has generated some interest lately so I whipped this up.

Introduction:
Everyone should be familiar with how certain units change graphics at different points in the game. Settlers and Workers get a more modern look once you reach the Industrial Age, while Leaders and Armies have a new look for every Era. This post explains, briefly, how this is accomplished by use of example. First, the PTW procedure is listed, followed by the Vanilla Civ3 procedure.

The Example:
Making Infantry units look and sound like Marines when you reach the modern age. Note that this is simply a cosmetic change; they will still have all the stats and abilities of a standard Infantry.

PTW Procedure:
For PTW, all the work is done by editing the file PediaIcons.txt which exists in the Text Folder of the CIV3PTW Folder. It should go without saying to backup this file before making any changes. Unit graphics are specified in the Unit Animations section near the end of the file, and build queue icons are specified in the Era-Specific Unit Icons section at the very end.

Note: this tutorial uses the following coloring conventions for sample PediaIcons.txt entries:
Dark blue text for items which are standard keywords which are the same for every entry,
Red text for the unit name as specified in the Civilopedia Entry Field of the Units tab in the rules of the scenario file,
Orange text for the era name as specified in the Civilopedia Entry Field of the Eras tab in the rules of the scenario file, and
Green text for the name of the Folder within Art\Units containing the animations we wish to use or for the number of the icon in units_32.pcx for the build queue.
If you look in the standard PediaIcons.txt, you will see the following in the Unit Animations section:

#ANIMNAME_PRTO_Settler
Settler
#ANIMNAME_PRTO_Settler_ERAS_Industrial_Age
Settler Modern Times
#ANIMNAME_PRTO_Settler_ERAS_Modern_Era
Settler Modern Times
[...and later...]
#ANIMNAME_PRTO_Leader_ERAS_Ancient_Times
Leader Ancient Times
#ANIMNAME_PRTO_Leader_ERAS_Middle_Ages
Leader Middle Ages
#ANIMNAME_PRTO_Leader_ERAS_Industrial_Age
Leader Industrial Ages
#ANIMNAME_PRTO_Leader_ERAS_Modern_Era
Leader Modern Times

This illustrates everything you need. For a unit which only changes later in the game, follow the Settler example where you only need a standard entry and era-specific entries for the later eras. However, if you wish to have a unit change graphics for every era, follow the Leader example by creating entries for all 4 eras with no default entry necessary.

For this example, we are only specifying different graphics for the Modern Era, so we can follow the Settler template and use a default entry followed by a single era-specific entry for the modern era. Within PediaIcons.txt, the default entry for Infantry already exists so we would add our modern era entry right after it, like so:


#ANIMNAME_PRTO_Infantry
Infantry
#ANIMNAME_PRTO_Infantry_ERAS_Modern_Era
Marine


That's it! Since we are using Marine graphics which already exist in the standard game, making that addition alone will cause the change. In addition, PTW allows you to specify new build queue icons for the era to match the unit animations. This is done in the Era-Specific Unit Icons section at the very end of PediaIcons.txt. A sample of that section:

#UNITICON_PRTO_Settler_ERAS_Industrial_Age
72
#UNITICON_PRTO_Settler_ERAS_Modern_Era
72


Note that there are only entries defined for the era-changed graphics as the defaults are already listed in the scenario file. For our example we would make the following addition (the Marine icon is #4):

#UNITICON_PRTO_Infantry_ERAS_Modern_Era
4


Below is a composite image showing the unit in-game and the build queue before and after the change:
http://www.civfanatics.net/uploads3/pdescobar_EraChangeTutorialComposite.jpg

Vanilla CIV3 Procedure:
Regular civ3 doesn't use ANIMNAME entries and instead relies on folder names for units exactly matching their unit names. So, you don't need to touch PediaIcons.txt but instead create new folders for the new graphics. The procedure:

Go into your civ3 units folder and create a new folder called "Infantry Modern Times".
Copy the Marine.INI from the Marine folder into this new folder and rename to "Infantry Modern Times.INI"
Edit this new INI file and change all the entries which point to a file to point to the files in the original marine folder. Example:

DEFAULT=MarineDefault.flc
becomes
DEFAULT=..\Marine\MarineDefault.flc



Note that the proper era suffixes for units with this method are "Ancient Times", "Middle Ages," "Industrial Ages," and "Modern Times", as seen on the folders for Leader graphics. Also, I do not know how you would change the build queue icons under vanilla civ3.

aaglo
Jul 29, 2003, 05:07 AM
Cool, this was unknown to me.

Thanks for the advice, Pdescobar... :D

Ukas
Sep 24, 2003, 05:06 AM
Same here, this is great. Thanks Pd!

PTB
Oct 02, 2003, 08:25 AM
Could you add something to the PTW notepad line to make a unit change its look depending on the era and the civilization its in? That way you could have a different look to a unit for a certain civilization while not having to change its name and the unit remaining essentially the same.

I was thinking about trying to add something like _RACE_BABYLON to the line you changed but i thought i'd ask if you think'd work.

Krayzeenbk
Oct 02, 2003, 08:29 AM
Welcome to CFC :)

I would suggest you test it and post the result... If not, I will test it for you, since it would be great if something like that worked.

PTB
Oct 02, 2003, 08:59 AM
Thanks,

I don't have my copy of civ3 on my computer though. Because of its addictive characteristics I've had to leave it at my folks house while I'm at college concentrating on my studies. But I'm going to smuggle it out when I go back in a few weeks. So to cope with my withdrawal I'm just brainstorming about things to do with the game.

Yevgenius
Nov 29, 2003, 09:14 PM
Thanks pdescobar, You are Great Tither