User Tools

Site Tools


falcon4:addvehicle_tutorial

This is an old revision of the document!


Adding New Vehicles

Adding New Vehicles to the TE and Dogfight Modules tutorial by Jerry “Pookie” Davis.

This tutorial explains the steps required in order to activate a new aircraft for the TE Editor and the Dogfight planner. This tutorial adds the Su-33 from the Balkans theater as an example.

Special thanks to Julian “Codec” Onions for the help!

NOTE: IF you plan to add aircraft to the Dogfight menu, you MUST have a CT record for each of the four dogfight team modes (CRIMSON, SHARK, etc). You will CTD when starting a dogfight match if you DO NOT have a CT record for the different dogfight modes for the aircraft you are adding!

NOTE: Steps IX.- XII. are for DOGFIGHT mode ONLY and can be skipped if you do not have CT records for the dogfight modes. If you wish, you can temporarily change the “Mode” via F4Browse for the aircraft's CT record from “NORMAL” to any of the dogfight-only modes. This will allow the “NORMAL” aircraft to be activated in Dogfight mode for testing purposes until a new CT record can be created for the aircraft.

Steps to add the record data:

  • I. CT Record for Vehicle
  • II. CT Record for Vehicle's Flight Unit
  • III. falcon4\art\dgft\userids.id
  • IV. falcon4\art\main\textids.id
  • V. falcon4\art\main\lcktxtrc.irc
  • VI. falcon4\art\common\acicons.irc
  • VII. falcon4\art\main\imageids.id
  • IIX. falcon4\campaign\save\te-planes.lst
  • IX. falcon4\art\dgft\play\Df_flght.scf
  • X. falcon4\art\dgft\play\menus\flights.scf
  • XI. falcon4\art\dgft\play\menus\tm_new.scf
  • XII. falcon4\art\dgft\play\menus\fb_new.scf
  • XIII. Test!

Make backups of your files before you begin!

Notes on .SCF Files

All of the files in steps III. to XI. can be edited via a text editor like Notepad (but we recommend EditPadPro or Notepad++). The *.scf files must be opened from directly within the text editor. They will appear to have no file extension - for example “Df_flght.scf” will appear only as “Df_flght” even when the “show file extensions” option is enabled.

Steps

I. CT Record for Vehicle

Open the vehicle in F4Browse and click on the “CT Record” button. Record the following information:

  • Type
  • Subtype
  • Unit Records that contain the vehicle.
  • The name of the vehicle object *exactly* as it appears in F4Browse.

II. CT Record for Vehicle's Flight Unit

Find the vehicle's Flight (not Squadron) Unit in F4Browse as defined in step I. Record the following information:

  • Inside the Flight's record, record the “Unit Icon” number.
  • Open the CT Record and note the Subtype number.

III. falcon4\art\dgft\userids.id

Add a unique record to this file for the aircraft, using this naming convention:

DF_AC_<ACTITLE> 12345

Where <ACTITLE> is the label of your aircraft record as found in step I.

For the Su-33, it was added as follows:

DF_PLAYER_POPUP 21261
MID_DF_ADD 21262
DF_AC_SU33 21275 >>> Added for Su-33
CRIMSON_TREE 21800
SHARK_TREE 21801

… added as 21275 since a large gap of numbers is available before consecutive numbering begins again at 21800. It has not yet been tested to add more numbers to the bottom of the file, but that should work too.

IV. falcon4\art\main\textids.id

Add the text pointer for the aircraft in this file. This resolves to the string used to populate the menus. Editing this file is required.

The Su-33 was added to the bottom, so the file changed from:

TXT_B1B 419
TXT_THIS_FLIGHT_SCRUBBED 420
TXT_LAST_TEXT_ID 421

To:

TXT_B1B 419
TXT_SU33 420 
TXT_THIS_FLIGHT_SCRUBBED 421
TXT_LAST_TEXT_ID 422

Be sure to re-number the following entries! New numbers should be added before the TXT_LAST_TEXT_ID record.

Update 3-2002: There is a finite number that can be used. This index builds an array and the executable is hard-coded to read that array.

Array size:

  • Pre-eF 1.10 = 421
  • eF1.10 = 500
  • F4UT = 1000

V. falcon4\art\main\lcktxtrc.irc

Add the text pointer for the aircraft in this file. This resolves the string used in the menus to a 'friendly name' that you see on-screen. Editing this file is required.

This can be added to the bottom, but the Su-33 was added after the Su-27 record:

[ADDTEXT] TXT_SU25 "SU-25"
[ADDTEXT] TXT_SU27 "SU-27"
[ADDTEXT] TXT_SU33 "SU-33" >>>> Added this for Su-33
[ADDTEXT] TXT_SU7 "SU-7"

VI. falcon4\art\common\acicons.irc

This maps the correct icon as seen in the map edit view. This points to the coordinates of the appropriate icons in the “ACicons.tga” image file. I do not know if this file can be edited. Editing this file is required.

I chose to copy the image pointers of the Su-27 for the Su-33. This means making a copy of the Su-27's line, and editing the pointer to refer to the proper aircraft string, “SU33” in this case. Paste the new line to the end of the file:

[ADDIMAGE] ICON_UH60 82 231 37 45 18 22
[ADDIMAGE] ICON_AN24 120 236 40 36 20 18
[ADDIMAGE] ICON_E3 168 233 33 34 16 17
[ADDIMAGE] ICON_SU33 197 190 26 38 13 19 >>>> Added for the Su-33.

VII. falcon4\art\main\imageids.id

NOTE: This file is replaced by alternate theater installations, and editing this file may cause the theater installations to fail! Testing was done with both editing this file, and NOT editing this file. No problems were encountered during testing when this file was NOT edited.

It is recommended that if you do edit this file, that you make a backup copy to replace when switching theaters. Editing this file is apparently NOT required.

This refers to the aircraft's image ID. Its function is not completely known. It is believed to relate to the map view icons.

The Su-33 was added where a gap in the numbers occurred:

ICON_EA6B 10123
ICON_TU95 10124
ICON_B1B 10125
ICON_SU33 10150 >>> Added for Su-33

Again, in my testing, everything functioned normally when this file was not edited!

IIX. falcon4\campaign\save\te-planes.lst

This is the master list file that contains all the record data.

Here's the record data structure in the file:

Type Stype Sptype UnitSType ID textid iconid

As seen on the first few lines:

// Type Stype Sptype UnitSType ID textid iconid
0 0 0 0 21101 0 0
1 2 1 3 21104 1 10066
...etc.

This is the Su-27 record:

1 6 1 8 21145 54 10093

This is a breakdown of how these entries relate to the aircraft:

Type = 1

Vehicle Type. This is found in the “Type Info” section of the CT record for the vehicle. For the fixed-wing aircraft this number should always be a “1”. If you look at a similar aircraft record, you will notice that all the combat aircraft start with a “1”.

Stype = 6

Vehicle SubType. This is found in the “Type Info” section of the CT record for the vehicle. This correlates to the primary function of the aircraft - Fighter vs. Attack, etc. I believe this is “6” for the Fighter aircraft class.

Sptype = 30

Vehicle Specific Type. This is found in the “Type Info” section of the CT record for the vehicle's Unit record in F4Browse. This must be a unique number, but I have discovered that these don't need to be listed consecutively. I think the last used number in a default RP4.1 installation for Fighters is in the lower 20s. That means the next available number is about 22. I chose “30” to ensure no other updates will conflict with the Su-33.

UnitSType = 8

Unit SubType. This is found in the “Type Info” section of the CT record for the vehicle's Unit record in F4Browse. “8” refers to the Fighter class. This normally (I think always) is the same for any class.

ID = 21275

This is the Dogfight ID. Its function is currently unknown. Must be unique for each aircraft. This data is found in the file:

falcon4\art\dgft\userids.id 

This is a text file and can be edited in notepad.

The record for the Su-27:

DF_AC_SU27 21145
I added the Su-33:
DF_AC_SU33 21275

I chose “21275” because there is a gap of numbers at this location.

textid = 420

Text ID that links to the definition of what will be displayed on-screen. I inserted the Su-33 record toward the bottom of the file, but before the 'end of file' definition.

This is edited in the following files:

falcon4\art\main\textids.id
art\main\lcktxtrc.irc

(Su27 textid = 54)
(Su33 textid = 420)

iconid

Icon image mapping for the unit. This can be found in the Unit's “Unit Icon” field via F4Browse.

This must point to a valid icon in the image tga file, otherwise you won't see an icon in the map edit view! I do not know if this TGA file can be edited, but looking at the other aircraft will allow you to choose a close match.

This is defined in the following files:

art\main\imageids.id and
art\common\acicons.irc

I chose the iconid of 10093 for the Su-33, to match that of the Su-27.

So now that all the values have been collected, add all the data entries to the end of the file like so:

5 3 5 14 21193 69 10095
5 3 6 14 21194 70 10096
1 6 30 8 21275 420 10093 >>>> Added this line for the Su-33

Dogfight Edits Follow

IX. falcon4\art\dgft\play\Df_flght.scf

FOR MODE DOGFIGHT ONLY

Scroll to the “[LISTBOX]” section. Add a recod for the new aircraft. The Su-33 was added as follows:

[ADDITEM] DF_AC_MIG23MS C_TYPE_ITEM TXT_MIG23MS 
[ADDITEM] DF_AC_MIG21 C_TYPE_ITEM TXT_MIG21 
[ADDITEM] DF_AC_MIG19 C_TYPE_ITEM TXT_MIG19
[ADDITEM] DF_AC_SU33 C_TYPE_ITEM TXT_SU33 >>>> Added for Su-33

This populates the drop-down box when adding a new 'color team' flight

X. falcon4\art\dgft\play\menus\flights.scf

FOR MODE DOGFIGHT ONLY

This is probably the file that is used to populate the “Change Aircraft” popup menu in the Dogfight editor. Editing this file is required.

Add your aircraft record as follows:

[ADDITEM] DF_AC_MIG23MS C_TYPE_ITEM TXT_MIG23MS MID_DF_TYPE
[ADDITEM] DF_AC_MIG21 C_TYPE_ITEM TXT_MIG21 MID_DF_TYPE
[ADDITEM] DF_AC_MIG19 C_TYPE_ITEM TXT_MIG19 MID_DF_TYPE
[ADDITEM] DF_AC_SU33 C_TYPE_ITEM TXT_SU33 MID_DF_TYPE >>>> Added for Su-33

XI. falcon4\art\dgft\play\menus\tm_new.scf

FOR MODE DOGFIGHT ONLY

This also populates a menu, but it is unclear which one. Editing this file is required.

Add your aircraft record as follows:

[ADDITEM] DF_AC_MIG25 C_TYPE_ITEM TXT_MIG25 MID_DF_TYPE
[ADDITEM] DF_AC_MIG23MS C_TYPE_ITEM TXT_MIG23MS MID_DF_TYPE
[ADDITEM] DF_AC_MIG21 C_TYPE_ITEM TXT_MIG21 MID_DF_TYPE
[ADDITEM] DF_AC_MIG19 C_TYPE_ITEM TXT_MIG19 MID_DF_TYPE
[ADDITEM] DF_AC_SU33 C_TYPE_ITEM TXT_SU33 MID_DF_TYPE >>>> Added for Su-33

XII. falcon4\art\dgft\play\menus\fb_new.scf

FOR MODE DOGFIGHT ONLY

This also populates a menu, but it is unclear which one. Editing this file is required.

Add your aircraft record as follows:

[ADDITEM] DF_AC_MIG25 C_TYPE_ITEM TXT_MIG25 MID_DF_TYPE
[ADDITEM] DF_AC_MIG23MS C_TYPE_ITEM TXT_MIG23MS MID_DF_TYPE
[ADDITEM] DF_AC_MIG21 C_TYPE_ITEM TXT_MIG21 MID_DF_TYPE
[ADDITEM] DF_AC_MIG19 C_TYPE_ITEM TXT_MIG19 MID_DF_TYPE
[ADDITEM] DF_AC_SU33 C_TYPE_ITEM TXT_SU33 MID_DF_TYPE >>>> Added for Su-33

XIII. Test!

At this point, you should be able to test the new aircraft additions:

In TE:

You should be able to load up TE and see the new aircraft in the Drop-down menu. The icon should appear over the flight plan.

In Dogfight:

You should be able to load up dogfight and add the new aircraft from the Drop-down menu. The icon should appear correctly in the list.

Notes

This tutorial was written by Jerry “Pookie” Davis back in the good old days early 2000, latest update was made 2003. It is unclear how these instruction still apply for present time Falcon versions and patches. You have been warned.

Read the original post from our forum topic.

falcon4/addvehicle_tutorial.1210299033.txt.gz · Last modified: 2008-05-09 02:10 (external edit)