[UTILITY] Converter of PediaIcons.txt files from English to other Languages

Lanzelot

Moderator
Moderator
Joined
Jun 25, 2007
Messages
6,329
Location
Heidelberg
Many Civ3 players from non-English speaking countries may know this problem: nearly all of the wonderful Scenarios available for download in this forum have been created on an English installation of Civ3, and when you install them on a non-English installation and try to start a game, Civ3 exits with an error like the following:

load_error.png


This is due to the boneheaded idea of Firaxis that when they translated Civ3 into other languages, they not only translated the texts that appear on screen, but also some file & directory names in the installation, including the files & directory containing unit animations...

Here is now a solution to this problem. The attached program reads the non-English names from the standard PediaIcons.txt file of your installation and then updates the PediaIcons.txt file contained in the Scenario with these names. Then when starting a game, the Scenario will be able to find the required unit animation files in the non-English Civ3 installation.

Here is how it can be used:
Code:
Usage: PediaConverter [-h] [-f <fileName>] [-d <scenarioDirectory] [-a] [-n <scenarioName>] [-p <scenarioFile>] [-r]

        -f      File name of the localized (non-English) standard unmodified C3C v1.22 PediaIcon.txt file.
                If a localized C3C version in the desired language is installed on the machine, this
                parameter can be omitted. PediaConverter then reads the Civ3 installation path from the
                registry and attempts to use the file <installDir>\Conquests\Text\PediaIcons.txt

        -d      Directory containing the scenarios you want to convert.
                If this parameter is omitted, PediaConverter reads the Civ3 installation path from the
                registry and attempts to use the directory <installDir>\Conquests\Scenarios

        -a      Convert all scenarios.
                Converts the PediaIcons.txt files of all scenarios found in the given directory (-d),
                or in the Scenarios folder of the Civ3 Conquests installation if the -d parameter is omitted.
                Additional PediaIcons.txt files outside of the Scenarios directory can still be specified
                via the -p parameter.

        -n      Name of a scenario to convert. For example "AoI"
                Can be specified multiple times.
                Instead of converting all scenarios in the given Scenarios directory, you can specify the names
                of certain scenarios to be converted.
                Additional PediaIcons.txt files outside of the Scenarios directory can still be specified
                via the -p parameter.

        -p      File name of a PediaIcon.txt to be converted.
                Can be specified multiple times. Specify the absolute path to a PediaIcons file to be converted.
                Can be used, if you want to convert the PediaIcons file of a scenario that is not
                installed in your Civ3 directory. In this case the parameters -d and -n can be omitted.

        -r      Remove the backup file.
                By default, PediaConverter keeps a backup of the original file with the name
                PediaIcons.txt.bak. That way, if anything does not work as expected, you can compare the
                original and the converted file to check for any errors, or you can restore the original
                file. If you specify the - r flag, this backup is not kept, so there is no way back!

        -h      Print this help.

The program should work fine with all Western European languages (Iso-Latin-1). If someone has e.g. an Eastern European, Cyrillic or Greek installation and would like to do some tests for me, I would very much appreciate it! (I hope it will also work there, as it takes the current Windows codepage into account, but as I was not able to test this, there is no guarantee that I didn't make any mistakes in the codepage handling... ;))

Prerequisite:

On today's Windows versions this should already be pre-installed, but if you get an error when starting the program, download and install the Microsoft VC runtime 2017 for x64:
https://go.microsoft.com/fwlink/?LinkId=746572
 

Attachments

  • PediaConverter.zip
    39.7 KB · Views: 58
Last edited:
Top Bottom