Table of Contents
Important Notice!
These tutorials in this page are OBSOLETE, do not use them as they do not work present day Falcon 4 installations!
You should also reference User Interface page.
Map / Flag Tutorial
Falcon 4.0 Forum, Falcon 4 Home, Falcon 4 Campaign, Falcon 4 Cockpits, Falcon 4 Database, Falcon 4 File Formats, Falcon 4 SRTM Terrain, Falcon 4 Terrain, Falcon 4 Textures, Falcon 4 Tools
TE Map Image Creation
Create bmp file with terrainview - load only road, river and city TDF's. Convert this bmp file to a TARGA image using following guideline: 8bit uncompressed 2048×2048 - 256 color tga for large mission planner map. 8bit uncompressed 172×172 - 256 color tga format for small “menu” map. Do Vertical Flip for the images.
Use tga2res.pl perl script to convert the map to idx/rsc files, download TerrainScripts.rar. PMCTODO download missing!?
./tga2res.pl thing.tga resource-id
For the large map, do it with resource-id “BIG_MAP_ID” like this:
./tga2res.pl vietnam-big.tga BIG_MAP_ID
For the small map choose other id like “SMALL_MAP_ID”, like this:
./tga2res.pl vietnam-small.tga SMALL_MAP_ID
Create vietnam-big.irc file and insert line:
[LOADRES] BIG_MAP_ID "art\resource\vietnam-big"
Create vietnam-small.irc file and insert line:
[LOADRES] SMALL_MAP_ID "art\resource\vietnam-small"
Copy all these files to your falcondir\art\resource directory.
Go to your theater dirs files directory (falcondir\terrdata\yourmap\files). Edit CMN_res.lst file next, insert edit it to read:
art\resource\common.irc art\resource\vietnam-big.irc
Edit cp_sua.scf file and replace IA_MAP_TGA with SMALL_MAP_ID
Edit cs_map.scf file and replace IA_MAP_TGA with SMALL_MAP_ID
Edit df_map.scf file and replace IA_MAP_TGA with SMALL_MAP_ID
Edit df_sua.scf file and replace IA_MAP_TGA with SMALL_MAP_ID
Edit ia_map.scf file and replace IA_MAP_TGA with SMALL_MAP_ID
Edit tac_psua.scf file and replace IA_MAP_TGA with SMALL_MAP_ID
Edit tac_sua.scf file and replace IA_MAP_TGA with SMALL_MAP_ID
Edit tac_team.scf file and replace IA_MAP_TGA with SMALL_MAP_ID
Edit transfer.scf file and replace IA_MAP_TGA with SMALL_MAP_ID
Edit MAIN_res.lst file, edit it to read:
art\resource\mainbg.irc art\resource\main.irc art\resource\local.irc art\resource\imagerc.irc art\resource\pilots.irc art\resource\patches.irc art\resource\vietnam-small.irc
Lastly at falcondir\art\main\imagerc.irc file you need to search the line:
[LOADIMAGE] IA_MAP_TGA "art\main\Map_Sec.tga" 0 0
And change it to:
[LOADIMAGE] BIG_MAP_ID "art\main\Map_Sec.tga" 0 0
Done, your TE map images are finished.
JSTARS Map Tutorial
Create two map targa (.tga) images. The resolutions for maps are: intel map, flipped image 256 x 256 - 8bits 256 colors. jstars map, flipped image 370 x 370 - 8bits 256 colors. In our example we use the familiar Vietnam Theater naming, the intel map you should name to “VIETNAMINTEL.tga” and jstars map rename to “VIETNAMJSTARSMAP.tga”. Next we use perl like:
./tga2res.pl VIETNAMINTEL.tga VIETNAMINTEL ./tga2res.pl VIETNAMJSTARSMAP.tga VIETNAMJSTARSMAP
Create vietnamintel.irc file and make it look like this:
[LOADRES] VIETNAMINTEL "art\resource\VIETNAMINTEL" [LOADRES] INTEL_RESOURCE "art\resource\intel" [LOADRES] VIETNAMJSTARSMAP "art\resource\VIETNAMJSTARSMAP"
Place the files
VIETNAMINTEL.idx VIETNAMINTEL.irc VIETNAMINTEL.rsc VIETNAMJSTARSMAP.idx VIETNAMJSTARSMAP.rsc
To your falcondir art\resource directory.
Edit files in your F4Patch\Vietnam\New directory like the following file CP_RES.LST:
art\resource\campbg.irc art\resource\campaign.irc art\resource\Mission.irc art\resource\Records.irc art\resource\VIETNAMINTEL.irc
File HISTORY.SCF: replace string
"[SETUP] NID 0 JSTARS_MAP"
with
"[SETUP] NID 0 VIETNAMJSTARSMAP"
File: STRATEGY.SCF replace string
"[IMAGES] KOREA_256 KOREA_256 KOREA_256 KOREA_256"
with
"[IMAGES] VIETNAMINTEL VIETNAMINTEL VIETNAMINTEL VIETNAMINTEL"
Use the theater with these new edited files and you should see new map at your Campaign → Intel → JSTARS view.
How To Replace Country Flags
Please read the whole “How to” first. If something is not understood - feel free to mail me at mnelles@gmx.de
General information:
All graphics in Falcon4 are flipped upside down, as you may already know from the big campaign map. Thus don't forget to flip the flag graphics, too.
Before you start, you have to know which korean country you want to exchange with a country from your theater.
The korean graphic files contain some more country flags as needed, so you can find Germany, Brasilia, Switzerland and others, so if one of these countries is in your theater, you don't need to create new graphics for it.
Requirements:
irc2res.pl (by Julian “Codec” Onions)
Scriptfile for irc2res.pl (more of that later..)
Paint Shop Pro or another good paint program (not Windows Paint )
4 graphics for each country:
- horizontal flag (53*31 pixels)
- vertical flag (31*53)
- vertical flag dark or grided (for “deactivated” in order of battle) (31*53)
- horizontal small flag (for TE) (20*12)
The graphics must be 8bit/256 colors and saved as Truevision Targa (.tga) - 8 bit uncompressed. The script file:
irc2res.pl needs a script file to work. It allows to put more than one graphic into a Falcon4 resource file.
Example:
We have six “countries” and for each of it four graphics as described above.
They are Albania and FRY, NATO and Italy, Greece and Hungary.
FRY for example has the following graphics files:
- OOB_FLAGS_FRY.tga (vertical version of the flag)
- OOB_FLAGS_FRY_DRK.tga (dark vertical version of the flag)
- OOB_FLAGS_FRY_HRZ.tga (horizontal version)
- SMALLFRY.tga (small TE flag version)
You are totally free in naming these files, but it makes sense to name them in a way that reminds you of what they are showing.
Now we create the script file. Open Notepad text editor.
The image script, I name it for example “balkanflags.irc”, looks like the following:
[LOADIMAGE] SMALLALBANIA "SMALLALBANIA.tga" 0 0 [LOADIMAGE] OOB_ALBANIA "OOB_FLAGS_ALBANIA.tga" 0 0 [LOADIMAGE] OOB_ALBANIA_DRK "OOB_FLAGS_ALBANIA_DRK.tga" 0 0 [LOADIMAGE] OOB_ALBANIA_HRZ "OOB_FLAGS_ALBANIA_HRZ.tga" 0 0 [LOADIMAGE] SMALLFRY "SMALLFRY.tga" [LOADIMAGE] OOB_FRY "OOB_FLAGS_FRY.tga" [LOADIMAGE] OOB_FRY_DRK "OOB_FLAGS_FRY_DRK.tga" [LOADIMAGE] OOB_FRY_HRZ "OOB_FLAGS_FRY_HRZ.tga" [LOADIMAGE] SMALLNATO "SMALLNATO.tga" 0 0 [LOADIMAGE] OOB_NATO "OOB_FLAGS_NATO.tga" 0 0 [LOADIMAGE] OOB_NATO_DRK "OOB_FLAGS_NATO_DRK.tga" 0 0 [LOADIMAGE] OOB_NATO_HRZ "OOB_FLAGS_NATO_HRZ.tga" 0 0 [LOADIMAGE] SMALLITALY "SMALLITALY.tga" 0 0 [LOADIMAGE] OOB_ITALY "OOB_FLAGS_ITALY.tga" 0 0 [LOADIMAGE] OOB_ITALY_DRK "OOB_FLAGS_ITALY_DRK.tga" 0 0 [LOADIMAGE] OOB_ITALY_HRZ "OOB_FLAGS_ITALY_HRZ.tga" 0 0 [LOADIMAGE] SMALLGREECE "SMALLGREECE.tga" [LOADIMAGE] OOB_GREECE "OOB_FLAGS_GREECE.tga" [LOADIMAGE] OOB_GREECE_DRK "OOB_FLAGS_GREECE_DRK.tga" [LOADIMAGE] OOB_GREECE_HRZ "OOB_FLAGS_GREECE_HRZ.tga" [LOADIMAGE] SMALLHUNGARY "SMALLHUNGARY.tga" [LOADIMAGE] OOB_HUNGARY "OOB_FLAGS_HUNGARY.tga" [LOADIMAGE] OOB_HUNGARY_DRK "OOB_FLAGS_HUNGARY_DRK.tga" [LOADIMAGE] OOB_HUNGARY_HRZ "OOB_FLAGS_HUNGARY_HRZ.tga"
The name of the image script determines the name the Perl script will give the .idx and .rsc files which will be used by Falcon4. Be sure to use the extension “.irc” for the image script file, or it WON'T work!
The Perl script irc2res browses this image script until all [LOADIMAGE] commands are performed. So this command has to be at the beginning of each new line.
The second entry per line is the Falcon4 ID the picture shall get (SMALLALBANIA, OOB_ALBANIA, OOB_ALBANIA_DRK and so on…).
The third is the file name of the TGA graphic, the fourth and fifth value is always “0”.
Running the script:
I assume that you have a Windows or Unix/Linux Perl installation available. Copy all files (the graphics, irc2res.pl and balkanflags.irc) to a temporary folder.
Open a DOS-box, go to the temporary folder and start the script with:
perl irc2res.pl balkanflags.irc
Now you have two new files in this folder, balkanflags.idx and balkanflags.rsc.
These need to be placed into “art/resource” during the install shield installation process.
Setting up F4 to use the new flags:
At first copy your whole art\ folder to somewhere else for restoring korean originals.
For testing purposes copy the 2 new files into art/resource.
First of all the new flags have to be loaded by Falcon4. Open another Notepad and enter the following line:
[LOADRES] BALKANFLAGS_RESOURCE "art\resource\balkanflags"
Save it as “balkanflags.irc”.
You see that this file has the same name as the image script file, but now it has another function.
Open another Notepad and load “art\Main_res.lst”. Add the following line to it:
art\resource\balkanflags\balkanflags.irc
Now the flags will be loaded at the main screen, but are not yet used.
There are various files that need to be updated so that F4 shows the new flag graphics. These mostly have the extension “.scf”. Unfortunately Windows Explorer commands have the same extension. To make things easier, go into Windows Explorer and open View/Folder options. Go to “File Types” and search “Windows Explorer Commands”. Click on that once and hit “Edit” button. Press “Add”, name it “View file” or something like that and select NotePad as executable.
Now if you have to change a .scf file, don't double click, but right click and use “View file” from the popup menu.
Edit and save the following files (save them twice - once to the original place and once to a backup place to put them in the install shield later).
art\campaign\intel\int_win.scf
- search for “BITMAP”. There are two entries.
The first contains OOB_FLAGS_NKOREA, the second OOB_FLAGS_SKOREA. Exchange these with the picture ID's of the two major opponents, in our example it would be OOB_FRY and OOB_ITALY (compare to the above image script).
art\campaign\select\ChalLvl.scf
Do the same as above.
art\planner\oob.scf
- search for “BUTTONIMAGE”. You'll find a bunch of entries.
These sets are ordered by teams, starting with the team 0 that is non-existent, so don't change this one (OOB_FLAGS_NONE). The second group contains OOB_FLAGS_USA, which is Team 1 in Korea:
[BUTTON] [SETUP] GROUP2_FLAG C_TYPE_SELECT 82 42 [BUTTONIMAGE] C_STATE_0 OOB_FLAGS_USA_DRK [BUTTONIMAGE] C_STATE_1 OOB_FLAGS_USA [FLAGBITON] C_BIT_ABSOLUTE
In our example we change that to OOB_NATO. So the whole GROUP2 will look like:
[BUTTON] [SETUP] GROUP2_FLAG C_TYPE_SELECT 82 42 [BUTTONIMAGE] C_STATE_0 OOB_NATO_DRK [BUTTONIMAGE] C_STATE_1 OOB_NATO [FLAGBITON] C_BIT_ABSOLUTE
Do these changes for each of your country until GROUP8, which is again not used (OOB_FLAGS_NONE).
art\taceng\tac_load\tac_pua.scf
- search for “BUTTONIMAGE”.
You'll find “OOB_FLAGS_USA_HRZ” there. This is Team1. In our example it would then be exchanged with “OOB_NATO_HRZ”.
art\main\imageids.id
- scroll down until you find the first occurrence of “OOB_FLAGS_USA”:
OOB_FLAGS_USA 52000 OOB_FLAGS_NKOREA 52001 OOB_FLAGS_CHINA 52002 OOB_FLAGS_CIS 52003 OOB_FLAGS_SKOREA 52004 OOB_FLAGS_JAPAN 52005 OOB_FLAGS_USA_DRK 52006 OOB_FLAGS_NKOREA_DRK 52007 OOB_FLAGS_CHINA_DRK 52008 OOB_FLAGS_CIS_DRK 52009 OOB_FLAGS_SKOREA_DRK 52010 OOB_FLAGS_JAPAN_DRK 52011 SMFLGS_USA 52012 SMFLGS_SKOREA 52013 SMFLGS_JAPAN 52014 SMFLGS_CIS 52015 SMFLGS_CHINA 52016 SMFLGS_NKOREA 52017 SMFLGS_GERMAN 52018 SMFLGS_FRANCE 52019 OOB_FLAGS_SWISS 52020
You can see that here are, as mentioned, also flags from other countries that are not used in F4-Korea, but can of course be used for other theaters.
Change the USA, SKOREA, NKOREA, CHINA, CIS and JAPAN related ones to the appropriate ID's of your new country flags.
Our example would be:
OOB_NATO 52000 OOB_FRY 52001 OOB_ALBANIA 52002 OOB_HUNGARY 52003 OOB_ITALY 52004 OOB_GREECE 52005 OOB_NATO_DRK 52006 OOB_FRY_DRK 52007 OOB_ALBANIA_DRK 52008 OOB_HUNGARY_DRK 52009 OOB_ITALY_DRK 52010 OOB_GREECE_DRK 52011 SMALLNATO 52012 SMALLITALY 52013 SMALLGREECE 52014 SMALLHUNGARY 52015 SMALLALBANIA 52016 SMALLFRY 52017 SMFLGS_GERMAN 52018 SMFLGS_FRANCE 52019 OOB_FLAGS_SWISS 52020
Now run F4 and enjoy your new flags .
Manfred “Schumi” Nelles
F4 Terrain Team
Important Notice!
These tutorials in this page are OBSOLETE, do not use them as they do not work present day Falcon 4 installations!