Table of Contents
Rebuild terrain files with MakeTerrain
The purpose of this tutorial is to show step by step how to recreate all the terrain files after we have finished editing and adding new tiles in our theater, in order to have a fully functional terrain system to test it in game.
The assumption is that you have finished tiling the L2 terrain file, and finished adding any custom tiles in the
texture.bin file. Furthermore, you have finished editing the L0 elevation of your theater (you can use the old one if you haven't a new one).
The files you need to recreate the terrain are:
- The L2 tile information (
- The L0 elevation information (
- TGA image with palette information (
- Day and night Master Fartiles.
L2 Tile Information
First step is to create the L2 tile information file. Open the
ModTerrain GUI Window and check the options shown in the image above. Alternatively, you can use the following command-line:
ModTerrain.exe -x =t #2 %"<TerrainFolder>" *"<OutFolder>"
You'll get a file called
theater.t2 in your
L0 Elevation information
Again with the
ModTerrain GUI Window, checking the options showed above in the image, you'll get a
theater.e0 file, containing the L0 elevation data. The corresponding command-line is:
ModTerrain.exe -x =e #0 %"<TerrainFolder>" *"<OutFolder>"
ModTerrainis exactly the same format as the
ELVfile used in editing the L0 elevation in
TerrainEditor. You can either create one with
ModTerrainas described above, or create an
TerrainEditor(opening the L0 file and saving it as
ELV) and use it instead.
The first one is to use the existing data stored in your L2. For this option, just select under the
Tools menu, the
Save PAL info as TGA command. This will create a TGA Image with the palette that already exists in
theater.map file and as pixels the palette offset values in L2.
The second one is to create a new TGA Image, taking the new tiling under consideration, by selecting the
Tools menu and clicking on the
Make New PAL TGA command. This command will make a picture from all tiles and convert it to 256 colors TGA. This method is recommended, especially if you have new tiles in your tiling.
Day and Night Master Fartiles
For this we need the
MakeTerrain GUI Window. Select from the dropdown list the
Make Master Fartiles option and define the day and night files that are going to be created, as well the
texture.bin file and the DDS Folder. The day and night master fartiles files can be named as you like with any extension. The command-line you can use is the following:
MakeTerrain.exe c -"<DDS_Folder>" +"<texture.bin>" *"<Day_Master_Fartile_file>" /"<Night_Master_Fartile_file>"
Now that we have all the files we need, we can proceed and create the terrain. The files that are going to be created (or overwritten if already exist) are:
- Terrain Folder:
- All Lx and Ox files.
- Texture Folder:
All we have to do is to select the files needed, in the
MakeTerain GUI Window, as shown in the image above, while we have selected
Make Terrain in the dropdown list. Especially for the
Elevation File the dialog will ask you for a
ELV file. If you have a
theater.e0 file from the above steps, you can either rename it to
theater.elv, or type
*.* in the dialog and press
Enter. This will allow you to display all files and then select the
theater.e0 file. The filename passed to
MakeTerrain program doesn't make any difference, only the data are important.
Remember that the
Terrdata Path mentioned above is the folder that contains both the
The command-line you can use directly is:
MakeTerrain.exe -"<Terrdata_Path>" +"<L0_Elevation_File>" %"<L2_Tile_Offset_File>" *"<Day_Master_Fartile_File>" /"<Night_Master_Fartile_File>" $"<TGA_Image>" @<Elevation_Method> !<Max_Angle>