====== Falcon 4 Theater Maker ====== [[https://www.pmctactical.org/forum/viewforum.php?f=47|Falcon 4.0 Forum]], [[:falcon4|Falcon 4 Home]], [[falcon4:campaign|Falcon 4 Campaign]], [[falcon4:cockpits|Falcon 4 Cockpits]], [[falcon4:database|Falcon 4 Database]], [[falcon4:file_formats|Falcon 4 File Formats]], [[falcon4:srtm|Falcon 4 SRTM Terrain]], [[falcon4:terrain|Falcon 4 Terrain]], [[falcon4:textures|Falcon 4 Textures]], [[falcon4:tools|Falcon 4 Tools]] **Falcon 4 TheaterMaker** is a package of tools by Fred "BaldEagle" Balding. Quick information for Fred "BaldEagle" Balding created programs. Quick list for files in TheaterMaker-??.rar package: * ATCUtility / unknown. * L2CMover / Moves the terrainview exported segment files (.L2C) into different coordinates. * LODFixer / Terrain Autotiler, 4byte converter. * LODInstaller / unknown. * ObjectMover / Moves objectives out of the water (I think:) * ObjectPlacer / Bridge place, road/river checker, many uses. * PathMaker / Creates "paths" to the texture.bin from tiles, edits theater.map data. * Tlkutil / unknown. * TVConverter / Converts terrainview coordinates to tacedit coordinates (or other way around). * Witchfix / Converts .wch files to .txt and the other way around. ====== Object Placer & Tiler Utility ====== The Object Placer & Tiler Utility is a multifunction program. The Object Placer functions currently places bridge objects automatically, generating a Tacedit compatible CSV (Comma Delimited Variables) file which can be imported into Tacedit. Tacedit export CSV files can be edited (selected objects exported or deleted) and reimported into Tacedit. The Tiler Utility scans the L2 terrain file to find road and river tiles which are not aligned or terminated. It also finds improper transitions between cover types (e.g., farm to forest). For each type of scan, a report is generated in CSV and/or text format. ====== LODFixer ====== A script-driven program which simplifies the L2 Level Of Detail file in order to lower the number of Fartile.raw tiles below the 2-bytes maximum (65,535) F4 can address. Or it can be used to lay incredible amount of tiles into terrain, making it auto tiling tool in case of 4-tile-sets. You can specify your own patterns of what tiles to use or you can lay the basic cover tiles. You can also tell LODFixer which areas of the map you want to process. This utility works on 64, 128 and 256 segment maps. Cover types to choose from:\\ Ocean Cover Type\\ Forest Cover Type\\ Farm Cover Type\\ Makija Cover Type\\ Rock Cover Type\\ Mountain 1 Cover Type\\ Mountain 2 Cover Type\\ Valley Cover Type This will pretty nicely auto tile your theater very fast. We can achieve very nice results when we load untiled map to terrainview, load river features an apply Auto Stuff -> Compute Feature Tiles. Then we select File -> Clear Features, and again we load features but this time road & city features. The the final Auto Stuff -> Compute Feature Tiles. Now we have pretty nicely those important features tiled. Its time for LODFixer. By the default script you can get nice results on korean/Balkans type of terrain. Start it up, select your theater from the Theater menu (you need to add it to the .ini file first. Simply copy paste Korea for example and change the name with lat/long coords for your theater). Load your L2 map from File -> Open L2 File, wait for it to build terrain matrix. When the map is loaded, choose what cover types you wish to use and which areas you want them to be applied. LODFixer defaults to whole map which is: Map Work Area\\ Start at Map X coordinate: 0\\ Start at Map Y coordinate: 0\\ End at Map X coordinate: 1023\\ End at Map Y coordinate: 1023 Sector Work Area\\ Start at Sect X coordinate: 0\\ Start at Sect Y coordinate: 63\\ End at Sect X coordinate: 63\\ End at Sect Y coordinate: 0 Please note that the numbers are always one short from the actual map sizes because the count begins from 0, so 64 segments is 63. When you are ready to autotile, just click the 4-Tile Replace. After the process is complete (amount of time depends how detailed script you have created), select File -> Save L2 file. You should save it to "theater.l2". The scripts are pretty complicated first and we are hoping to get some nice ones done, if you have made good scripts, please let us know. ====== WitchFix ====== WitchFix is a utility that converts .wch/idx file to a text file that you can edit. It then converts the edited text file back to a .wch/idx. The pointers in the .idx file are adjusted to point to all the strings, original and edited/added strings. ====== TVConverter ====== This program (TVC) converts the terrainview tile coordinates into tacedit coordinates and the other way around. For example you can look airbase location from tacedit, enter the coordinates into TVC and it tells you which terrainview segment and which tile has the exact spot of the airbase. ====== PathMaker ====== This will make your day on texture.bin editing. You can draw different types of data into the texture's records (texture.bin) itself like where there is road, river, water and rough areas in the texture. The other useful and very critical part of theaters are the THR file creation, its created from reading the different types of tiles from theater.L2 file, so you need to have correct texture.bin set up before you get real picture of your terrain. Create the THR file only after your tiling has been completed. Theater.map editing does not require anything configured like theater or loading of L2/texture.bin, you just start to edit. Most useful its for changing the theater sizes and Flags. Flags are very important when we change the terrain 2 byte to 4 byte and theater size, many things are depending on the correct flag in here. This is the description of the flag meaning:\\ **0 = 2 byte\\ 1 = 4 byte\\ 2 = 128 theater 2 byte\\ 3 = 128 theater 4 byte\\ As 1 + 2 = 3, 3 = 128 theater + 4 byte\\ As 0 + 2 = 2, 2 = 128 theater + 2 byte\\** Use this util also to create MEA file (MEA = Minimum Enroute Altitude) for your terrain, its used for planning and height checks. Also Tacedit's recalculate radars option reads this file to see the terrain. These great programs are made by Dr. Fred "BaldEagle" Balding, who will be monitoring [[https://www.pmctactical.org/forum/viewforum.php?f=26|PMC Tactical forum]] topic from time to time, so if you have some problem with any of these utils please post a message to the forums and not sent email to Dr. Balding. This way we can save his valuable time to build us even better utilities :) The staff off PMC Tactical will be helping you out too. Be noticed that this page is no way complete, we will add more detailed info... soon :) ====== PathMaker Manual ====== PathMaker User's Manual A Utility for Falcon 4.0 Theater Building By: Fred "BaldEagle" Balding baldeagle@zianet.com ===== Introduction ===== PathMaker is a multi-function utility designed to help Falcon 4 theater builders with the tasks of generating and editing the Texture.bin file. Also there are functions to edit the Theater.map file, generate the .thr and Theater.mea files. If you have problems with this program, please feel free to contact me at baldeagle@zianet.com. I will be happy to assist you with understanding how to use Pathmaker, or take under consideration any changes or enhancements you feel might improve Pathmaker. ===== Texture.bin Path and Area Generation ===== Setup PathMaker.ini – The theater dimensions for the selected theater will be used to generate the .thr file. Be sure your theater has a section in PathMaker.ini, and that you select the theater you are working on in the Theater menu item. Tile Images – PathMaker uses the H*.pcx files to display the tile images. Unzip Texture.zip into a folder and delete the files which are not H*.pcx. Texture.bin – Back up your Texture.bin file before starting work on it. If you forget to back it up, you will be given the option to save the modified .bin file with a different file name. Screen Resolution – For best viewing use a screen resolution of 1024x768 or greater. Using the Small Font selection for the 1024x768 and lower resolutions will help reduce an oversized PathMaker window. ===== Getting Started ===== The following is the preferred order of opening files: Click on Open Texture.bin file in the File menu item. The Texture.bin file can be have any name or extension. Click on Show Tile List in the Edit menu item. The Tile List window will be displayed and information for all the tiles in the Texture.bin file will be added and displayed. Load a tile image (pcx file). You can load the tile image by clicking on the Load Tile button or clicking on the Tile ID (Offset) in the Tile List window. The first time you try to load a tile image, the Open Tile Image File dialog box will be displayed in order to get the tile pcx folder (directory) name. Subsequent Tile List window selections will use this folder (directory) to find the pcx file. When using the Load Tile button, the Open Tile Image File dialog box will always be displayed. You can either select the pcx file you want to load, type its name in the File Name box or enter the Tile ID (Offset). To select files from the Tile List window, either click on the Tile ID#, use the up/down arrow keys or the spinbox arrow located on the right side of the Tile Image window. ===== Editing the Tiles ===== Paths Paths are used in Falcon 4 to draw roads and rivers on the Ground Radar display. There are 4 Path Types available: River, Road, Bridge and Railway. The .thr's Road along with Cover Type and Relief information are used to calculate the Cost to travel various routes from their current position to the Objective. When the units encounter a Bridge Path segment, a request to transmitted for the status of the bridge object over the river. The River Path delineates areas in the tile where the ground units cannot go without a means to cross the river. Although Railway type is checked in Falcon 4, I am not sure how ground units will use this type of path. From this discussion you can see how important it is to lay down good paths. Look at the original Korea tiles to get an idea of how the F4 developers defined paths. Be aware that not all of the F4 people did a good job. I have found many errors with the way paths and areas were defined. ===== Adding Paths ===== Click on the New Path button and select the Path Type and its Path Width in feet. Click OK to accept the entered values. To add a path, left-click on the tile image at the point where the path begins. Move the mouse to the next location and left-click the mouse again. Continue with this sequence until the end of the path is reached. After clicking on the last point, right-click the mouse to end path generation. To add another path with the same Type and Width, follow the previous procedure. To add a path with a different Type or Width, click on the New Path button and select the new Type and/or Width. Follow the procedure for defining a path. When generating the Road & River paths, begin/end segments at the junctions of the paths. When a Road path crosses a River path, terminate the Road segment at the river bank, and start another segment on the opposite bank. After finishing the road path. Start a New Path with a Bridge type. Join the Road segments across the river. ===== Deleting Paths ===== To assist in identifying path segments, you can double-click on the path number in the Paths list box at the bottom of the window. The selected path segment will blink. To delete a path segment, either right-click on the Paths List box paths number, or double-click on the PathMaker window outside of the Tile image window while in Path generation mode. You can also select Delete last segment in the Edit menu item, or click on the Undo Segment button. Reducing Clutter To reduce clutter while defining paths, click on the Show Areas button located above the Areas List box. ===== Areas ===== Areas are used in Falcon 4 to determine the cost for ground units to follow a path through the Area type defined in a tile. There are 10 Area Types available: Water, Swamp, Plains, Brush, Thin Forest, Thick Forest, Rocky, Urban, Runway and Station. The defined Areas with Cover Type are used to calculate the Cost to travel various routes from their current position to the Objective. When there are high cost areas between the ground unit and its objective, the unit will try to take a lower cost route. Thus, high-cost areas in the tile might block the route through an area they should not travel, such as ocean, lakes, rocky areas or thick forest. The use of Runway and Station types is unknown. Station type sounds like a railway station area. Runway type may be for airbases, but it is not used in the original tile's areas. From this discussion you can see how important it is to lay down good areas. Look at the original Korea tiles to get an idea of how the F4 developers defined paths. Be aware that not all of the F4 people did a good job. I have found many errors with the way paths and areas were defined. Adding Areas Click on the New Area button and select the Area Type. Click OK to accept the entered values. To add an area, left-click on the tile image at the center point of the area circle. Move the mouse away from the center until the circle encompasses the are you want to define. Left-click to define the area. To add another area with the same Type, follow the previous procedure. To add a path with a different Type, click on the New Area button and select the new Type. Follow the procedure for defining an area. Define area in the tiles where you do not think that group units should travel. Also define areas which are very different from the Tile Set Terrain Type displayed above the Tile image window. Transition tiles have very different Terrain Types. For instance, a Farm-to-Forest tile has a Terrain Type of Plains. The forest portion should be delineated as Light/Heavy Forest. Deleting Areas To assist in identifying areas, you can double-click on the area number in the Areas list box at the bottom of the window. The selected area will blink. To delete an area, either right-click on the Areas List box areas number, or double-click on the PathMaker window outside of the Tile image window while in Area generation mode. You can also select Delete last segment in the Edit menu item, or click on the Undo Segment button. (Misnamed, I know ? ) Reducing Clutter To reduce clutter while defining areas, click on the Show Paths button located above the Paths List box. ===== Saving Your Work ===== Each time you load a new tile image, the previous tile will be saved into memory, if it was modified. To save your additions and changes, click on the Save button or select Save Texture.bin file in the File menu item. Each tile modified will be marked for export. This mark will last until the PathMaker is shutdown. If you want to export your changes so that they can be imported into a master Texture.bin file, select Export .bin Tiles in the File menu item. The export file is not compatible with Julian's Perl Texture.bin text file. To import a PathMaker export file, select Import .bin Tiles in the File menu item. ===== Adding New Tiles to an Existing Set ===== Use this function to add new tiles to an existing Set. (Note: If there is a gap in the Tile List Sets, in Texture.bin there is a null-Set entry. Use this function to fill null-Sets.) Select Add Tiles to Set in the Edit menu. In the Set Number edit box enter the Set number you want to add the tile to. Select the tiles you want to add using your SHIFT or CTRL key and the mouse in the Open dialog box. The new tiles will be displayed in the selected Set in the Tile List window. ===== Adding New Tiles to a New Set ===== Use this function to add new tiles to an new Set. The Set and tiles will be added at the end of the Texture.bin Sets. Select Add Tiles to Texture.bin in the Edit menu. In the Set Number edit box accept the default Set number, which is the next available Set number. In the Terrain Type edit box select the Terrain Type that best describe this Set of tiles Cover Type. Select the tiles you want to add using your SHIFT or CTRL key and the mouse in the Open dialog box. The new tiles will be displayed in the new Set in the Tile List window. ===== Changing a Set's Terrain Type ===== Select a tile from the Set you want to change. Select Change Set Terrain Type from the Edit menu. Select from the list of Terrain Types the cover type which best describes the tile in the Set. ===== Building a New Texture.bin file ===== This feature is for used to build a new Texture.bin from a folder of tile images (pcx files). Use the Add Tiles or Add Sets features to add new tiles to an existing Texture.bin file. Setup Unzip the Texture.zip file into an empty folder. Delete all the files except those starting with "H" (h*.pcx). Open up a MSDOS window and change to the folder where the H*.pcx files are located. Type and execute this command: dir /B /ON > tiles.txt This command creates a list of the new tiles in alphabetical order. The file must be named tiles.txt. To stay with the convention of making the shared tile (an ocean tile ‘shared" by all the L2 ocean tiles) have the Offset number of zero, cut and paste the shared tile name to the top of the list and rename it to match the other tiles in the first Set. If there are already 16 tiles in the first Set, move a Set with fewer tiles to the top and place the shared tile in this Set. The Set are distinguished by the first 2 Hex digits in the last 3 digits (e.g., FARMD34 is the 4th tile in the D3 Set. Originally the Set number was actually the number of the Set, but that convention was abandoned sometime during the development of Falcon 4). The "shared" tiles "Water" Cover Type is defined by placing an area circle around the tile. The builder function takes the Sets as they appear in the list and numbers them sequentially. The order of the tile Sets is not important until the tiling of the theater begins, at which time the tile that goes at X,Y is identified by the Tile ID (Offset) in the Texture.bin file. Building the File When the above Setup procedure is completed, select Generate New Texture.bin file from the File menu. Point to the folder with the H*.pcx and the tiles.txt files. After the Texture.bin is built in memory, you will enter the texture.bin file name and location. The function gives all Sets the Terrain Type of "Water". You need to select a tile from each Set and use the Change Set Terrain Type function to change the Set's type to a Cover Type that best describes the tile in that Set. ===== Building the .thr File ===== The .thr map along with the PAK, SAM and Radar maps (built before stating a campaign) are the prime sources of information for the campaign. If the .thr is accurately represent the terrain, the campaigns will not run correctly. Setup The .thr builder uses the Theater.L2 and the Texture.bin files to build the .thr map. Anytime either file is changed, the .thr file needs to be rebuilt. The .thr file contains a byte for each tile in the theater (1024 x 1024 for most theaters). Each byte contains 4 bits for Cover Type (8 types), 2 bits for Relief (4 categories) and a bit for Road tile and a bit for Rail tile. PathMaker get the Cover Type and Road/Rail info from Texture.bin and Relief from the Theater.L2 records. It is important that you let Terrainview Compute Normals (in the Operations menu) for the Theater.L2 file you are using in PathMaker. It is also important that your Tile Set's Terrain Type be representative of the Cover Type of the tiles it contains. Building the File Load either the Theater.L2 file or the L2 matrix you previously saved. Load the Texture.bin file. Select Generate .thr file from the File menu. Select the file to save it to. Be sure to back up your old .thr file. ===== Building the Theater.mea File ===== The Theater.mea map contain Minimum Egress Altitudes for the terrain map. The information is used by "low-flying" aircraft, mainly helicopters, to plan the best low-altitude route to fly. The Theater.mea should be built for a new theater at least once. The Theater.l2 elevations are used to determine the highest elevation in a 8 km by 8 km area (1/4 Section), which represent one Theater.mea map point. Building the File Load either the Theater.L2 file or the L2 matrix you previously saved. Select Generate .mea file from the File menu. Select the file to save it to. Be sure to back up your old .mea file. ===== Editing the Theater.map file ===== The Theater.map file in the original Falcon 4 is not used other than to verify the location of the \terrdata\\Terrain folder. The upcoming version of eFalcon will use some of the info in the file for theater map lat/long location. The other entries can be edited to match your theater dimensions and terrain LOD's. Editing the File Load the Theater.map file by selecting Edit Theater.map file from the File menu. Enter the values in each of the edit boxes you wish to change. Click on Apply Changes to save the changes. Back up your old Theater.map file before making the changes.