===================================== Guide to adding a new language to C&C ===================================== by Nyerguds This guide explains how to add a new language pack to C&C95. After a language pack is added, the language can be enabled in the game by editing the configuration file "conquer.ini", and changing the Language setting: [Language] Language=Eng Note that this will only work on C&C95 versions starting from v1.06c. Officially included languages are English (eng), French (fre), German, (ger) and Japanese (jap). Japanese is audio-only though. Anyway, let's get started! 1. Game strings file -------------------- Source contents in: text_eng.ini - English strings file in ini format text_XXX.ini - English strings file, with language-irrelevant things removed text_fre.ini - French strings list, as extra reference text_ger.ini - German strings list, as extra reference This is the internal strings file, with all unit/building/etc names, map selection screen information, game menu text, etc. The new system no longer needs a strings file in C&C's internal format, but accepts a simple ini file containing only the strings that need to be replaced. Notes: -If any special characters are used in this file, it needs to be converted to the correct character encoding, with a program like EditPad Pro. The standard special characters set is DOS-437. Fonts for Central European (DOS-852), Portuguese (DOS-860) and Cyrillic (win-1251) are also available. -The ` characters in the text represent new lines, so make sure you keep them in when translating. -Only entries that are in the file will be used. Any missing ones will default to the game's configured base language. -The "Mission" at line 647 is the first line of the "Mission Accomplished" string. The second part of that is at line 22. -The "Mission" at line 741 is the first line of the "Mission Failed" string. The second part of that is at line 23. -The Mission Accomplished/Failed font has no characters with accents. In the French version, the accent is added by adding a line of spaces with a comma at the correct spot before the string, with an added NewLine character behind it. (see text_fre.ini) 2. Mission briefings file ------------------------- Source contents in: missionini_briefings.txt - Mission briefings & names missionini_mpnames.txt - multiplayer map names The mission briefings file contains the following things: -briefings of the campaign missions -briefings of the Funpark dino missions -briefings of the Covert Operations missions -Mission names of the Covert Operations missions -briefings of the N64 and Playstation Special Ops missions -Mission names of the N64 and Playstation Special Ops missions -Multiplayer map names (optional) If you have opened mission.ini before, you'll see this one is slightly different. It has ALL mission briefings of all addon missions, and it has Name= tags under the header of each addon mission. This system allows a language addon to even translate the mission names. If you want, you can even translate the multiplayer map names, though that's purely optional. To avoid confusion in multiplayer, it might be easier to leave them as they are. If you do want to translate them, simply paste them at the end of the briefings file. Make sure your briefings file has an extra open line at the end, or C&C will not be able to read the last line. Note that just like the strings file, if any special characters are used in this file, it needs to be converted to DOS ASCII with a program like EditPad Pro. However, it does NOT need to be converted to a C&C strings file. 3. Interface graphics --------------------- Source contents in: (game file) hsell.shp - Sell button on sidebar (game file) hrepair.shp - Repair button on sidebar (game file) hmap.shp - Map button on sidebar (game file) hpips.shp - Building & sidebar messages (game file) attraceng.cps (formerly attract2.cps) - "Coming Attraction" screen Right. Graphics. I'm not going to write a tutorial on editing SHP files here; learn that somewhere else, or ask me to do it. Anyway, the buttons to translate are these: -"Sell", for the button on the sidebar -"Repair", for the button on the sidebar -"Map", for the button on the sidebar Besides that, there's also hpips.shp. This contains the building and sidebar messages, and a bunch of other stuff. Strings to translate: -the "Primary" on the Primary Buildings, -the "On Hold" and "Ready" text for the sidebar icons Keep in mind that you should use the very last colour on the palette to make the "On Hold" and "Ready" text, since that's the animated blinking white. You should consider changing that colour on the colour palette while editing to make sure it is saved correctly. The last file is the "Coming Attraction" screen. This is a 320x200 CPS-type image. Using XCC Mixer, it can easily be converted to png or pcx for editing, and converted back after it's done. So if you feel the need to make your own "Coming Attraction" screen, go right ahead. This file doesn't use any existing game palette, so there are no colour restrictions on it. It will work fine as long as you reduce the final image to 256 colours. It is advised to make the first palette colour black, though, since the game uses that to fill space around it when stretching. 4. Sidebar Icons ---------------- Files in: blank_icons.rar - blank icons icon_alphabet.png - C&C icons alphabet icon_alphabet-trans.png - C&C icons alphabet on transparent background If you don't want to go through the effort of making translated icons, but also don't want the English text to remain, you can use the blank icons mixfiles in blank_icons_mix.rar In case you do want to make them, blank_icons.rar contains the icons to use in C&C95. After translating the strings, use the alphabet png file to cut & paste names together that fit on the icons (62 pixels wide). For large words, you can either use the thinner font in the alphabet file, or abbreviate the words. Since both the shadow of the letters and the right-side border of the icons is black, you could make words that are 63 pixels wide, if you make the last letter's shadow blend into the border. It is advised to make the words on a separate image, since you always have to paste it on both the Desert version (????icnd.png) and the Temperate / Winter / Snow version (????icnt.png). Since these last 3 theaters all use the same colour palette, you only have to make these once. After you finish this, follow these steps: 1. Open XCC Mixer and pull open the hidden second file browser section 2. Browse the first file browser to the place where the PNG icons are, and the second to the place where you want to put the SHP icons. 3. Select all the files, right click, and select "Copy as SHP" (NOT "SHP TS"!) 4. Now the tricky part. I usually use the command prompt for this. Rename all "????icnd.shp" files to "????icnh.des", and all "????icnt.shp" files to "????icnh.tem". It might be best to separate them in different folders. 5. Copy all the .tem icons to .win and .sno icons 6. Put them in the correct mixfile (dese/temp/wint/snowicnh.mix) 5. Sounds --------- Source contents in: (game file) speech.mix - EVA voices (game file) talkeng.mix - Unit voices This is usually purely optional. If you have a dub of the EVA and unit voices, you can make a speech.mix and talkeng.mix replacement. Make sure it includes all sounds though. Replacement mixfiles are NOT supplemented with the english defaults if they're incomplete. So if you want to keep some English voices, simply put them in your mixfile. Note that some audio files that used to be in transit.mix are now inside speech.mix. These are: gdi_slct.aud - "Global Defense Initiative Selected" from side choice screen nod_slct.aud - "Brotherhood of Nod selected" from side choice screen kanefinl.aud - Kane's end speech after winning the final Nod mission. 6. Fonts -------- Unless Siberian GRemlin releases a usable version of his font editor, these normally can't be edited. But anyway, these can be replaced: grad6fnt.fnt - normal game font, for menus, briefings, etc 12green.fnt - Active (non-fading) font for the world map and options bar text. 12grngrd.fnt - The more commonly used fading variant of the 12green font. 8fat.fnt - Font used to display item name tags and sidebar mouse-over info. vcr.fnt - The huge "Mission Accomplished" / "Mission Failed" font 7. Renaming your language files ------------------------------- Source contents in: lang_XXX.ini - suggested name formats Now here comes the real magic. You probably have translated versions of a bunch of files now. Well, the first thing you need to do now is rename them: text_XXX.ini - Change XXX to the 3-letter code for your language mission.ini - change to whatever you want. The format "miss_???.ini" is advised. hpips.shp / hrepair.shp / hsell.shp hmap.shp: - Keep recognisable, keep the 'h' at the start, and the extension. attrceng.cps - Simply replace the "eng" part by the language code deseicnh.mix / tempicnh.mix winticnh.mix / snowicnh.mix: - Only change the 'icnh.mix' part, normally to i+[language code]+.mix speech.mix / talkeng.mix - change to whatever you want, but keep the extension grad6fnt.fnt 12green.fnt / 12grngrd.fnt 8fat.fnt / Vcr.fnt - change to whatever you want, but keep the extension There's one more file that can be replaced, namely the multiplayer score WSA animation file, but since no reliable converters exist for this format, I'll leave this off. It is used for the official German and French versions, but will probably not be usable in custom languages unless someone makes a reliable converter for it. 8. Wrapping up -------------- Source contents in: lang_eng.ini lang_XXX.ini This is the part where the magic happens. First, make the language ini file: -Create a new file called "lang_???.ini", where ??? is your language code. This filename is what actually defines the code that will be accepted by the game. -Copy the contents of lang_XXX.ini into your file. Open lang_eng.ini for the full explanation on each entry. -Adapt the names as indicated. -Remove all lines that can be kept to the English defaults. This will usually be the fonts, multiplayer score screen, and the speech and talk mixfiles. -The 'CDDir' tag specifies a folder to use as CD for this language. This setting is meant to add language-specific video replacements, if NoCD mode is enabled and the "LangPath" variable in conquer.ini is activated. You should set this tag in case someone wants to make dubbed or subtitled versions of the game briefing videos for your language pack. That's it... the usual translation ini file will probably look something like this (for language 'XXX'): [Language] MisNametag=NameXXX MisBrieftag=BriefXXX CustomStringsFile=text_xxx.ini Brieffile=miss_XXX.ini MIXIcnh=iXXX.mix SHPPips=pipsXXX.shp SHPRepair=reprXXX.shp SHPSell=sellXXX.shp SHPMap=mapXXX.shp Notes: -MisNametag and MisBrieftag are replacements for the "Name=" mission name option and the [Briefing] header in the mission files. These are technically not used for language addons, but they HAVE TO BE SET to make the game read the versions from the adapted briefings ini file. -MIXIcnh is the 4-character suffix plus the ".mix" part for the icon mixfiles. -SHPPips, SHPRepair, SHPSell, SHPMap are the sidebar and UI files. IMPORTANT: Remember to REMOVE THE "h" AT THE START OF THESE FILENAMES! So if you have the file called "hpipsXXX.shp", your ini should have it as "pipsXXX.shp". The loading system of the game adds the "h" automatically. Now, put all the loose non-mix files (including your new ini file) inside one mixfile called "lang_???.mix", where ??? is your language code. Note that this file has special priority. The game does not read all "lang_???.mix" files on startup, it ONLY reads the one of the language that is selected in conquer.ini. That's it! All your current mixfiles together are the new language pack. All you need to do to enable the new language is drop these files in the Command & Conquer folder, and change the Language= setting in conquer.ini to your new language code. It's advised to make an installer that makes this ini change automatically. 9. Configuration translation ---------------------------- Source contents in: ccconfigeng.lan Patch 1.06c revision 2 adds a new game configuration tool that supports translations added by language packs. This is purely optional, but it's a nice extra to add to the translation pack. The strings format is basically just an ini file in UTF-8 text encoding, so you don't need anything special edit it. Note that any "\n" you encounter in the text is a new line in the final text, so make sure you leave those in when translating. Simply add ccconfigXXX.lan (where XXX is your language code) to the translation pack, and the setup will be able to use the text inside it to translate the configuration tool. Make sure to test this on the tool though, to make sure all text fits in the place where it is supposed to be shown. 10. Making an Installer ----------------------- Source contents in: lang_bare_installer.zip 106c_addon_XXX.iss smallimage-clear.bmp node-clear.ico readme.rtf insert.bmp An installer is a clean way to distribute a language pack, and it makes it easy to uninstall. I've included a bare InnoSetup script to make a simple installer. Note that you should use the UTF-8 version of InnoSetup for this. The basic steps are: In the script: -Generate a new AppId for the installer, to replace the "{#REGENERATETHIS}". You can normally do that simply by creating a new InnoSetup script in an innoSetup script editor like ISTool or InnoIDE, and copying the new ID into your "106c_addon_XXX.iss". -Under [Languages], configure the MessagesFile to the language you're adding. This can normally be done through the IDE. Give it your 3-letter code as name. -Replace "XXXX" by the language name, and "XXX" by the language code. -Translate the other strings under [Messages] and [CustomMessages] -Under [Files], remove all entries for files that aren't in your pack (for example, if you don't have unit voices or EVA voices) Images: -Edit insert.bmp to add the language name. The used font is Kudos black, included in "KUDO21.TTF". -Edit node.ico and smallimage.bmp to put the flag for the language in the lower right corner. You can remake the node.ico from the three included png files. Use max. 50% of the icon's height for the flag. Readme: -Edit readme.rtf and fill in all necessary information. Translate the file, and save the translation in readme_XXX.rtf (XXX being your language code). When all this is done, compile the script, and you have a fantastic new language addon installer!