Engie File Converter

From ModdingWiki
Jump to navigation Jump to search

The Engie File Converter is a game formats conversion tool created by Nyerguds.

Platform and license

The program is written in C# on the .Net framework v3.5. All code in the editor that was specifically written for the editor is released under the WTF Public License, meaning it can be used without restriction. A few components taken from online resources, as well as an ini reader originally written by Nyerguds for another project, have similarly permissive licenses, mentioned in the tool's readme and/or the actual source code files.

Development history

The tool started out as the C&C64 Image Viewer, a small tool to view and identify images in the .IMG format extracted from the Nintendo 64 version of Command & Conquer. When it was expanded to support viewing the game's tilesets, a rudimentary system was added to view multiple frames inside one file, and with the addition of saving features, the tool changed to v1.0 of the C&C64 File Converter.

When Nyerguds started cooperating with the people of the OldGamesItalia community, and decided to help with the graphics formats in the Sierra/Dynamix adventure games, the tool was the obvious platform to add this into, since it already contained all the basics for opening, viewing and saving images, with support for the use of externally-loaded colour palettes, and also already had an easily expandable file format autodetection system. As cooperation continued, and the file formats of King Arthur's K.O.R.T. were added, the tool got better support for handling frame-based files, and grew into a graphics and sprites converter with support for many more games.

At v1.3, the name of the tool was changed again, to reflect the fact that the newer functions and formats in it were no longer related to C&C64. The originally intended name was Nyerguds's Game File Converter, or NGFC. This eventually mutated into the actual new name, Engie File Converter. The icon replacing the old green-and-black Nintendo 64 logo is the Engineer unit icon from a prerelease screenshot of Command & Conquer Gold, in which the whole UI looked like a higher resolution version of the DOS game, with simpler cleaner build icons instead of the final game's small scene renders. The version numbering was not reset, meaning the first version of Engie File Converter is v1.3.


The tool is distributed as a simple .zip file to be unpacked in a new folder. Once unpacked, the included .exe file runs the program.

The general usage is simple: open a file, either through the menus or via drag and drop, and a graphical representation of the file will appear. This can then be copied to the clipboard or saved in any supported formats that are compatible with it (e.g. with the same colour depth).

If the file is comprised of frames, the frame changer at the bottom will be unlocked, and the user can look through the frames, and save them as other image formats. In this frames view, frame "-1" will represent the entire frameset, and will be the only entry that will allow saving the entire frameset to other frame-based formats. If the file type does not warrant the generation of an overall single-image representation, this "-1" frame will be empty, but on some formats, a preview of the combined frames will be generated.

Framesets can also be exported as a set of single image files, and when opening any file that ends on a number, the program will check whether it belongs to a range of numbered frames, and will offer to open it as frameset, to allow converting it back to frame-based file formats.

The tool can view indexed formats that do not contain their own colour palette, using the same system Nyerguds previously implemented in the Westwood Font Editor, which offers a variety of generated palettes for every type of indexed image colour depth, plus added 4-bit and 8-bit palettes read from palette files in the classic 6-bit VGA format.

Some file types can automatically load missing information from other files in the folder, including certain paletteless images and animations reading palettes with the same name, C&C maps reading extra info from an accompanying .ini file, and animations that lack an initial state reading the missing information from previous files in the sequence they belong to.

Additional functions

Besides the main purpose of converting files, the tool has a number of functions implemented for specific file types. These functions are:

  • For framesets: from v1.3 onwards, two tools were added to allow a loaded frameset to be combined into a single image, and to split a single image into frames. This allows easier editing of sprite sheets as a single large image. The frames-to-image feature allows the frame dimensions to be enlarged in the process. Starting from v1.3.1, the image-to-frames one allows cropping on a specified colour to allow frames of unequal sizes, and conversion of high-colour images to a chosen palette.
  • For Tiberian Sun SHP files: shadow splitting / combining. Unlike in the older C&C games, in Tiberian Sun and Red Alert 2, graphics have the areas that should be processed with a shadow filter as additional frames behind the main frames. This is rather unwieldy for actually editing graphics, though, so two functions are provided for this; one to combine the shadow before converting to frames, and one to split it off before saving as Tiberian Sun SHP file. For the sake of compatibility with older SHP formats and other tools, the combining function will change the shadow colour pixels from colour index 1 to colour index 4, and the shadow splitting one will likewise look for colour index 4 pixels, and split them off as index 1 shadow.
  • For Visage Animation Format, though usable for cutscene animations in general: pasting a still image on a range of frames at specified coordinates. This can be used to easily clear existing text from static-background cutscenes, and to paste text onto cutscenes. If the original frames are paletted, this palette is always preserved, even if the pasted image is high-colour.
  • For Nintendo 64 maps: height map generation. This follows a few steps. The map is first converted to a bare terrain heights image based on the cliffs, which must be edited by the user to create a plateaus image. The converter can then use the original game map to apply additional terrain height details to the plateaus image, like the slopes of rock ridges and river beds, to create the final 64x64 height map. And finally, this needs to be converted to a 65x65 height map. A tutorial for the process was posted here.

Supported types

As of version 1.5.13, the converter supports the following types: