====== PMC Tactical Ultimate Theater Tutorial ====== [[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]] (post any additional questions in [[https://www.pmctactical.org/forum/viewtopic.php?t=18957|PMC Tactical forums]] about this tutorial). This tutorial teaches you the steps of how to produce **Falcon 4.0 Theater Addon**. In our example theater we have chosen default sized (64 segments) European Theater. ====== Part 1, TERRAIN ====== - surf to the DEM data pages [[http://www.ngdc.noaa.gov/cgi-bin/mgg/ff/nph-newform.pl/mgg/topo/customdatacd|here]]. - Choose Your Type Of Area Selection: Text-Entry ( ) ( ) Map-Based (uses a Java applet) click Map-Based. use your mouse to select the region. we have chosen a 10 by 10 degree datas for europe, so we will download JUST IN CASE 30 x 30 degree datas so we have room to manuevre in the dem2terrain selections. Our location is N 65.0, S 35.0, W -5.0, E 25.0 - Now select compression method: compressed TAR file. filename: europe5 and unique name: europe5. (europe5 is because I already downloaded 1-4 hehe). When you update the data in the web page, it sets the coordinates to XX.99999 style, don't worry about it as 64.999999 is 65 ;) fig 1. {{ https://www.pmctactical.org/f4/images/THR_Tut-01.jpg |fig 1.}} - click Get Data. it takes while to compress the DEM data, follow the screen intructions if you want to disconnect and come back later to grab the packet. but when the wait is over, packet is ready for download you see "Processing Complete" and it then can be clicked for download. - use [[:editing_tools#archivers|RAR]] to uncompress the europe5.tgz file. - surf to a DCW feature data site [[http://www.maproom.psu.edu/dcw/|here]] select region europe, then select for germany and click continue. Next you will be prompted for Download Data, Produce Image and Download Points, you must select download data. Now you get to choose the datas to download, these are: * Political/Ocean (point) * Populated Places (polygon) * Populated Places (point) * Roads (line) * Drainage (network) * Aeronautical (point) Click continue and then Compute Data (dont change the default settings on compression / arc view). Wait until the datas are ready, this will take a while. Next click Download Coverages and when it asks you filename to save, you should write like -features.tgz to the save box. When you use .tgz as save name, you do not need to fiddle the unpacking of the tar, RAR recognizes .tgz correctly. Do this download / save procedure to all the countries included in your theater's terrain. Make a note that you dont only download the datas for the countries that will fight a war, but also those countries that borders comes into your terrain area. - start [[falcon4:tools:dem2terrain|Dem2Terrain]], click Open - Browse to the europe5.HDR file for DEM data and open it. First you should see a screen like in fig 2. {{ https://www.pmctactical.org/f4/images/THR_Tut-02.jpg |fig 2.}} - select your theater size using the drop down menu on Segment L2 X. It defaults to 64 so in this tutorial theater you do not need to change it, but if you are creating 128 theater then select 128. fig 2.2. {{ https://www.pmctactical.org/f4/images/THR_Tut-02-2.jpg |fig 2.2.}} - write down the coordinates, move the red box by mouse in the MAP. Our Center coordinates are as the example image shows. 49/9. You can also select various other items to go along and fine tune your produced terrain or how you view it, but all those are just fine tunes. Most important is the coordinates as of now. {{ https://www.pmctactical.org/f4/images/THR_Tut-02-3.jpg |fig 2.3.}} - select Data -> Load E00 File. select your uncompressed DCW feature datas for lets say germany. you will find these files in the DCW tgz packet (remember how to uncompress tar packets) : aepoint.e00, dnnet.e00, ponet.e00, popoint.e00, pppoint.e00, pppoly.e00 and rdline.e00 yeah lots of features. You need to select aepoint, dnnet, ponet, pppoint, pppoly and rdline features. (fig 3). You need to complete this for each country until all land masses in your terrain selection is "featured". {{ https://www.pmctactical.org/f4/images/THR_Tut-03.jpg |fig 3.}} - When all features are selected, you should see something like the fig 3.1 but the coloration might change according to the order how you loaded the E00 files. It might be rivers that are more visible (blue) or features or cities. you'll find out and its not important which way they are loaded. What is important is that you load ALL the countries involved in your theater, just like you see in the example figure. {{ https://www.pmctactical.org/f4/images/THR_Tut-03-1.jpg |fig 3.1.}} - Next use File -> Generate Terrain to build the files (fig 3.2). Do not select the "Large Terrain" option, its the 4 Byte L2 saving mode, CATE does not read that format and neither does normal terrainview. This option "Large Terrain" is very miss leading as its nothing to do with 128 theaters, its just the fartiles limit in textures. You cannot have many textures with 2 byte fartiles, the limit is 65355 or something, but with 4 byte you can have pretty much. Codec just added this because he can and maybe in some weird setup someone wants to use 4 byte directly, but basically if you tick Large Terrain, you are saying that "I'm not going to use this terrain with CATE or with normal Terrainview, thanks" :) Also you have to edit theater.map with pathmaker to make 4 byte work in falcon. If you want to create the .MAP file dem2terrain asks for .PAL file, this is not the fartiles.pal that can be found in falcon terrain dir, its paint shop pro color palette file! How to create a PSP .pal color palette file, please read our [[falcon4:textures|texture category]] for detailed instructions. {{ https://www.pmctactical.org/f4/images/THR_Tut-03-2.jpg |fig 3.2.}} We suggest you only select Mea, Description and TDF files options. Mea is the terrain elevation model so to speak which is used by low flying aircrafts to plan flight... plans and also the Radars read it to check line of sight. Anyways, when you click OK the next dem2terrain asks a filename to save where you can use anything you like but in our example its "europe5". It then saves europe5.L2, europe5.O2, .map and .mea if you selected so, europe5.txt and if selected the .TDF files. ====== Part 2, THEATER DIRECTORIES ====== First you should read about [[falcon4:dirstruct|unified directory structure]], which all the recent well known theaters use now, it would be very good for unified look and file structure if your theater used the same directory (dir) struct. In our example case, the unified theater dir is Theaters\, then our own theaters dir is Theaters\Europe and everything goes below that sub dir. - Edit your europe5.L2 file the way you want (more about this in [[falcon4:tools:cate|CATE]] tutorial). Then change the fartile bits according to your texture amount. If you have lot of different textures, then you choose 4 bytes, but if you have limited texture set, then go for 2 bytes. Note that if you're using SP3 then you have no reason to go with 2 bytes... Ok to change. Start [[falcon4:tools:theatermaker|LODFixer]], load your L2 file and then select the Action -> convert 2-byte offsets to 4-byte offsets, like this (fig 19): {{ https://www.pmctactical.org/f4/images/THR_Tut-19.jpg |fig 19.}} then it asks you to save the L2 file. Place the newly saved L2 and O2 files into Theaters\Europe\terrain dir under names theater.l2 and theater.o2 also copy europe5.map and europ5.mea into this dir but rename them to theater.map and theater.mea. If your theater is 64 and 4 byte, 128 or 128 and 4 byte, then you need to start PathMaker, select File -> Edit theater.map file. The browse your Theaters\Europe\terrain dir and click theater.map file. You see fig 18 screen: {{ https://www.pmctactical.org/f4/images/THR_Tut-18.jpg |fig 18.}} Edit the "Flags (future use)" part. Here is the explanations: 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 So basically if you had 64 seg 2 byte theater, change nothing. When you're done editing, click the button on top right corner "Apply Changes". - copy original korean weather dir into Theaters\Europe\weather dir. Yes include subdirectories. This original korean weather dir can be found on terrdata\korea dir, under the name hmm "weather". - copy original korean terrdata\korea\texture dir into Theaters\Europe\texture dir. - copy original SP3 campaign\Save dir in whole into your Theaters\Europe\campaign dir. delete .trn, korea.idx, korea.pak, korea.thr, korea.wch and also any other .tac files. - create europe.tdf and europe.tga files into Theaters\Europe root dir. open europe.tdf info notepad or similiar editor, for now write only these lines into it: name Europe desc European Theater bitmap Theaters\Europe\europe.tga campaigndir Theaters\Europe\campaign terraindir Theaters\Europe\terrdata artdir Theaters\Europe\art the europe.tga file specs are 300x375 16m colors TGA. Read more about in [[falcon4:ui|UI]] page. - edit theater.lst file in falcon dir, add this line into it: Theaters\Europe\europe.tdf Dont get confused about this file and the dem2terrain created TDF files used for Terrainview. They are not the same at all. - run [[falcon4:tools:sptinstall|terrain rebuilder]], point it to the Theaters\Europe\terrdata dir and click Create. Note that this version of SPTinstall is only for 4 byte fartiles terrains. If you are creating your terrain to 2 byte then you need to use ntF4PTinstall.exe to rebuild the terrain files, this this should not happen anymore. ====== Part 3, IA/TE/CAMPAIGN MAPS ====== - open terrainview, load europe5.L2 file, load up all feature files and you should be seeing something like this (fig 5). {{ https://www.pmctactical.org/f4/images/THR_Tut-05.jpg |fig 5.}} - Now clear the features and load only Coast, River, City and Road features, then select the Operations -> Save Bitmap and enter europe5-features.bmp as filename (yes add the .bmp). You can also change the overlapping of these features. Leave the most important feature load last. For example I always like to load rivers coast first, then rivers, then roads and lastly cities. This does not effect any way your theater build, its just cosmetics. Then clear all features again, select only Coast and City files and finally save that bitmap into filename "europe5-tacedit.bmp". please do not concern yourself with little bugs like the Netherlands being underwater, there is nobody except Widowmaker and latest SIGINT tells us that he is actually a Fish :) - Start your paint program, open europe-features.bmp, resize it to 256x256 256 colors GIF and save it into the Theaters\Europe\campaign dir under the name of kneemap.gif - this is your kneemap ingame. - open europe-features.bmp, resize it to 2048x2048 256 color TGA, flip it (vertical), save it to **BIG_MAP_ID**.tga filename (8bit, uncompressed). open the europe-features.bmp file again (not sure if this is needed we could always manipulate the same opened file, yet this is how I do it) and resize it to 344x344 256 color TGA, flip it (vertical) and save it to **BID_3FLY_DIS**.tga filename. Open the europe-features.bmp file again and resize it to 172x172 256 color TGA, flip it (vertical) and save it to **IA_MAP_TGA**.tga filename. open the europe-features.bmp file, resize it to 370x370 256 color TGA, flip it (vertical) and save it to **JSTARS_MAP**.tga - ok one more time we open europe-features.bmp, resize it to 256x256 256 color TGA and save it to **KOREA_256**.tga filename. Finally all map art files done. - Copy existing korean files of: campmap.idx/.rsc, intel.idx/.rsc and main.idx/.rsc into Theaters\Europe\art\resource dir. You will find these files from falcon art\resource dir. unpack them with ./procidx1.pl campmap.idx and you have BIG_MAP_ID.tga file, replace this korean tga with your own BIG_MAP_ID.tga you created a minute ago. run the next script like: ./irc2res1.pl campmap.irc note the .IRC end, it should now say: ./irc2res1.pl campmap.irc Add BIG_MAP_ID.tga as ID BIG_MAP_ID Converted palette now is 256 Next do main, first unpack it with ./procidx1.pl and you have tons of TGA files. replace korean files with your own: IA_MAP_TGA.tga and BID_3FLY_DIS.tga, then run the ./irc2res1.pl main.irc again (note the .IRC end). next unpack intel.idx with the command ./procidx1.pl intel.idx and you have few tga's in the dir again. now replace korean tga's with your own, which are: JSTARS_MAP.tga and KOREA_256.tga files. now run the command: ./irc2res1.pl intel.irc Add CAMP_SH_TOP.tga as ID CAMP_SH_TOP Add SH_ARROW.tga as ID SH_ARROW Add JSTARS_MAP.tga as ID JSTARS_MAP Converted palette now is 256 Add KOREA_256.tga as ID KOREA_256 Converted palette now is 256 Add PAK_REGION_OVERLAY.tga as ID PAK_REGION_OVERLAY Add PAK_OUTLINE_OVERLAY.tga as ID PAK_OUTLINE_OVERLAY Add PRIORITY_RANGE_BAR.tga as ID PRIORITY_RANGE_BAR Done with the art files so far. These TE/IA/Camp instructions are missing PAK map image stuff, as well as other UI stuff should be found from [[falcon4:ui|UI]] page. ====== Part 4, CAMPAIGN ====== - go to Theaters\Europe\campaign dir and edit the save0.tri file, make it look like this: #TOTAL_EVENTS 22 #SET_EVENT 9 #SET_TEMPO 150 #ENDINIT #IF_CAMPAIGN_DAY G 30 #PLAY_MOVIE 115 #DO_EVENT 16 #END_GAME 16 #ENDIF #ENDSCRIPT - start [[falcon4:tools:theatermaker|Pathmaker]], select L2 file and texture.bin (both europe of course), now you must select the old 2 byte L2 file because pathmaker does not read 4 byte files. then select file -> generate .thr map. Save the europe.thr file into Theaters\Europe\campaign dir. - open tacedit, change the file -> properties to "europe", it should read like /campaign/save or something. so make it to this: \Theaters\Europe\campaign\ click ok and exit tacedit. start tacedit and see if the config changed. now open save0.cam file from Theaters\Europe\campaign dir (make sure you choose right dir). first in campaign view choose edit -> delete all. change Theater to "europe" and click update. select map -> colours -> clear and click ok. save and restart tacedit (exit and start it again). now select object list view, select edit -> delete all. select plt and click reset all. select units view, select edit -> delete all. save and restart tacedit. Make sure the theater is europe and campaign, object list & units views are totally empty. now select map view and Objectives -> import Objectives, select the dem2terrain created .csv file. Now you see blue squares in the map view, save and it asks you theater strings filename. browse to the campaign/europe dir and write "europe.wch" and click save. restart tacedit. select map view and you should see tons of city, village and airport objectives in the screen like this. fig 9: {{ https://www.pmctactical.org/f4/images/THR_Tut-09.jpg |fig 9.}} Now make sure all objectives are selected (view -> objectives -> view all) and use your left mouse button to draw box around the objectives on screen. please note that if you press left mouse button on top of some object and drag... well then you'll drag that object around and not a box, so be careful and use Edit -> Undo (CTRL-Z) if you mess up. in the Objective Operation window you set the Objective Data, Current and Orig owners. Use the team number and click Set Viewed button. Do this to all the teams/countries in your theater. Then select View -> Show Links and Edit -> Link Mode, to get into the link creating mode. now use your left mouse button to draw a line between two objectives, these objectives are the two opposing teams. First time you do this tacedit asks the THR file which you point to the europe.THR file. these links must be made for each team in your campaign. Try to draw the links near or top of roads (brown lines shown on the example image). Its not necessary but it will help tacedit/campaign operation in ground unit movements fig 14. {{ https://www.pmctactical.org/f4/images/THR_Tut-14.jpg |fig 14.}} More detailed PAK tutorial [[falcon4:campaign:pak|here]]. Next view cities only, View -> Show Primary and Show Parent Links. This will display all priority PAK cities for you. PAK cities are with priority 81 - 89 (I never used pri over 89), it means that if city has pri 81 or above it can be found on the campaign priority PAK menu list fig16. {{ https://www.pmctactical.org/f4/images/THR_Tut-16.jpg |fig 16.}} Now select certain important cities/areas which you want to become a PAK cities, double click on the city to get Objective Dump view and change the priorities to somewhere between 81-90. After all priority cities are set, use Objectives -> Reset Parents, then click once on any objective on the map to update the display for parent links. {{ https://www.pmctactical.org/f4/images/THR_Tut-17.jpg |fig 17.}} These green lines show you roughly the area of PAKs. - Now run create.PAK.objectives.tcl script (can be found on default Tacedit download also read [[https://www.pmctactical.org/forum/viewtopic.php?t=20773|Tacedit TCL Corner]] from the forum). it will produce the additional PAK objectives for you. After you have created them, it would be good time to run the following Objectives -> Remove Bad Links, Check Objectives, Repair Objectives, Auto Flag Objectives and finally Clean Objective Flags -> Yes. now save and exit. - Painting occupation map. in the campaign view click Map, then select the tacedit suggested map size and click "Set New Map Size". Then select map view and Insert -> Build Occupation Map when tacedit asks your THR file which you point to it. It takes few moments to process so be patient and wait. - Next we build PAK map. Select Insert -> Build PAK Map. The PAK is created pretty much instantly and it will be displayed on the screen for you to view. If it looks ok to you, select File -> Save PAK Map and point to europe.pak filename in your Theaters\Europe\campaign dir. (Remember, more detailed PAK tutorial [[falcon4:campaign:pak|here]]) - Then select Operations -> Export objectives and save it to safe place. then click object list view, use edit -> delete all and save & restart tacedit. now import the objectives back from operations -> import objectives and save & restart tacedit. - now add few air defence units to prevent campaing capturing loops. check the two objectives on opposing sides with LINKS. Right mouse click one of them and select add unit -> batallion -> air defense -> ks-19 for example. now in batallion base object tab put owner correct one and flag: 2. at unit properties tab insert name as number (any number will do), unit flags: 44. at ground page tab orders: air defense and click apply. battalion page tab you enter morale: 100. the go back to ground page and click AObj to get the objective menu. read the X/Y coordinates and click cancel/hit esc. now enter these coordinates to base object tab X/Y slots and click apply. - now that everything seems to be done. add one squadron to your campaign, usually F-16 on U.S./ROK airbase. select insert -> add unit -> squadron etc etc. - as your campaign basic objectives are now ready, export them (as you already have done) and restart tacedit, load Instant.cam and delete all objectives and setup the cam file like we previously instructed (delete all, theater: europe, map paint). when the instant is totally clean of korean objectives, import the europe objective CSV file into it by operations -> import objectives, save and exit. - do same cleaning operation for te_new.tac file and import europe CSV objectives into it. but here its not that simple anymore; we need to change the ownerships again (sigh) to the following; blue objectives: 1 and red objectives: 2. again make sure all owner/control values are the same or you can expect crashes. ====== End Comments, Crashing Campaign... ====== If your intel says that city1 captured by DPRK, city1 recaptured by ROK and it just keeps on looping this over and over again... it will eventually crash. to recover this situation you need to place ground troops (tanks for example) to those objectives that are being captured. usually in new campaign this happens only on the objects where the path/link has been made. After you exit the campaign and it CTD's on you, then you need to restore the objects. restoring the objects is done with tacedit, first export objectives and units. then delete all objects and units, save and exit. restart tacedit, make sure everything is deleted and then import the objectives and units back. save & exit. now when you play campaign it should not CTD when exiting.