RT3 Image Modification

Editing RT3 images is a fun way to personalize your game or allow others to customize theirs with your works. And as it turns out, extracting, editing, and reinstalling RT3 images is really not that complicated! Whether you are a digital Michelangelo who wants to repaint entire canvases, or a complete novice like me who just wants to add his initials to the front end of a locomotive, all you really need is a decent paint program and a few simple tools to get the job done.

Amtrak FP45 Example Modification

The FP45 example mod is a repaint of the original FP45 paint scheme to Amtrak livery. To install, simply download "AmtraxFP45L.zip", unzip the package, open the "AmtraxFP45L" folder, run "PK4FileReplace.exe" from that folder, press the "Browse" button and navigate to your main RT3 folder, select "OK", press "Install". To view this work, start a new "Tex-Mex" scenario, run some trakage between two cities and purchase a new FP45 goods/people mover.

AmtraxFP45L Image Mod


RT3 Images

Railroad Tycoon images files come in two types, compressed and uncompressed, Truevision Targa (*.TGA) and DirectDraw Surface (*.DDS) respectively. I would imagine that most paint programs support TGA formats, and the DDS formats can be edited with paint programs that support plugins and have the nVidia DDS plugin for Adobe Photoshop installed. I'm using an older version of Paint Shop Pro with the nVidia plugin, you do not need a nVidia video card for the plugin to work.

Paint Shop Pro
nVidia Plugin

Both formats contain a Alpha Channel that is used to adjust pixel transparency/colour blending. You may not have to edit the Alpha Channel if you are only making minor changes to the images, though I suggest that you familiarize yourself with "Layers", "Masks" and loading and saving "Alpha Channels" before starting a project.

Most of the images packed into the PK4 files are smaller versions, or mipmaps, of an original larger image. The height and width of any given mipmap is a multiple of the main image's height and width values and is exactly half the size of it's parent. Progressively smaller mipmaps are used as the camera moves away from a 3D object, or when changes are made to the video settings. You will find the files sorted in the PK4 file in alphabetical order with a letter suffix denoting image size, "A" is the largest or main image.

loco_A.dds 1024*1024
loco_B.dds 512*512
loco_C.dds 256*256
loco_D.dds 128*128
loco_E.dds 64*64...

To extract the images and overwrite the originals you can use the "RT3 PK4" tool. This is a very basic program that lists all of the files in the PK4 compilation for individual selection, extraction and replacement. RT3 PK4 will not replace a file with another unless the files are identical in size. For instance, the replace action would fail if the replacement file is 512*512 and the original is 1024*1024. Note also that RT3 DDS images use the "DXT3" format, so make sure to save DDS files in that format if prompted by your paint program.

RT3 PK4


Example Image Modification with Installation Program

In order to allow others to share their image modifications I have created a reusable installation program that replaces specific files located in any given PK4 file. All the developer has to do is (a)edit the "pk4fr.ini" files [RT3PK4File] and [RT3PK4ReplacementFiles] text entries, (b)include the edited DDS/TGA/??? files, and (c)include the "PK4FileReplace.exe" installation program. All the person installing the mod has to do is run "PK4FileReplace.exe", point it to the main RT3 folder and press the "Install" button. The program with replace a file only if the replacement file's name, as written in "pk4fr.ini", matches one of original file names in the PK4 file (CASE SENSITIVE) and the file sizes match exactly.

AmtraxFP45L Image Mod




Links

hirundo's French RT3 Website