Tutorial: Era Specific Unit Graphics

pdescobar

Moo, baby. Moo.
Joined
Nov 30, 2002
Messages
1,364
Location
CFC or playing DyP
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:
Code:
[color=darkblue]#ANIMNAME[/color]_[COLOR=red]PRTO_Settler[/color]
[COLOR=green]Settler[/color]
[COLOR=darkblue]#ANIMNAME[/color]_[COLOR=red]PRTO_Settler[/color]_[color=orange]ERAS_Industrial_Age[/color]
[COLOR=green]Settler Modern Times[/color]
[COLOR=darkblue]#ANIMNAME[/color]_[COLOR=red]PRTO_Settler[/color]_[color=orange]ERAS_Modern_Era[/color]
[COLOR=green]Settler Modern Times[/color]
   [...and later...]
[COLOR=darkblue]#ANIMNAME[/color]_[COLOR=red]PRTO_Leader[/color]_[color=orange]ERAS_Ancient_Times[/color]
[COLOR=green]Leader Ancient Times[/color]
[COLOR=darkblue]#ANIMNAME[/color]_[COLOR=red]PRTO_Leader[/color]_[color=orange]ERAS_Middle_Ages[/color]
[COLOR=green]Leader Middle Ages[/color]
[COLOR=darkblue]#ANIMNAME[/color]_[COLOR=red]PRTO_Leader[/color]_[color=orange]ERAS_Industrial_Age[/color]
[COLOR=green]Leader Industrial Ages[/color]
[COLOR=darkblue]#ANIMNAME[/color]_[COLOR=red]PRTO_Leader[/color]_[color=orange]ERAS_Modern_Era[/color]
[COLOR=green]Leader Modern Times[/color]

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:

Code:
[COLOR=darkblue]#ANIMNAME[/color]_[COLOR=red]PRTO_Infantry[/color]
[COLOR=green]Infantry[/color]
[COLOR=darkblue]#ANIMNAME[/color]_[COLOR=red]PRTO_Infantry[/color]_[color=orange]ERAS_Modern_Era[/color]
[COLOR=green]Marine[/color]

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:
Code:
[COLOR=darkblue]#UNITICON[/color]_[COLOR=red]PRTO_Settler[/color]_[color=orange]ERAS_Industrial_Age[/color]
[COLOR=green]72[/color]
[COLOR=darkblue]#UNITICON[/color]_[COLOR=red]PRTO_Settler[/color]_[color=orange]ERAS_Modern_Era[/color]
[COLOR=green]72[/color]

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):
Code:
[COLOR=darkblue]#UNITICON[/color]_[COLOR=red]PRTO_Infantry[/color]_[color=orange]ERAS_Modern_Era[/color]
[COLOR=green]4[/color]

Below is a composite image showing the unit in-game and the build queue before and after the change:


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:
  1. Go into your civ3 units folder and create a new folder called "Infantry Modern Times".
  2. Copy the Marine.INI from the Marine folder into this new folder and rename to "Infantry Modern Times.INI"
  3. 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:
    Code:
    [color=darkblue]DEFAULT=MarineDefault.flc[/color]
        becomes
    [color=darkblue]DEFAULT=..\Marine\MarineDefault.flc[/color]

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.
 
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.
 
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.
 
Thanks pdescobar, You are Great Tither
 
Top Bottom