User Tools

Site Tools


falcon4:database

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
falcon4:database [2007-12-13 13:06]
ranger822 Added text for Part 1-3
falcon4:database [2016-11-05 19:52] (current)
snakeman removed obsolete pmctodo.
Line 1: Line 1:
 ====== Database ====== ====== Database ======
  
-Database Editing (<​THEATER>​\objects dir or terrdata\objects for Korea).+Falcon 4 Database Editing (<​THEATER>​\objects dir or terrdata\objects for Korea). 
 + 
 +[[falcon4:​database:​background|Background]]
  
 [[falcon4:​database:​files|Object files]] - descriptions and functions. [[falcon4:​database:​files|Object files]] - descriptions and functions.
Line 9: Line 11:
 [[falcon4:​database:​sp42database|SP4.2 Database]] - list of bunch of items in database like squadrons and battalions. [[falcon4:​database:​sp42database|SP4.2 Database]] - list of bunch of items in database like squadrons and battalions.
  
-====== Background ====== +[[falcon4:​database:​ff55database|FreeFalcon 5.5 Database]]
- +
-The Falcon 4 database is edited with [[falcon4:tools:​f4browse|F4Browse]] by Julian "​Codec"​ Onions, you can always download the latest from our [[http://​tactical.nekromantix.com/​f4/​downloads.php|downloads]] page. Using this program you can access pretty much all the database ​stuff in theterrdata\objects directory. New theaters use their own objects directories,​ for example [[http://​tactical.nekromantix.com/​f4/​desertstorm.php|ODS]] uses "​Theaters\DesertStorm\objects",​ [[http://​tactical.nekromantix.com/​f4/​vietnam.php|Vietnam]] uses "​Theaters\Vietnam\objects"​ and finally  +
-[[http://​tactical.nekromantix.com/​f4/​europe.php|Europe]] uses "​Theaters\Europe\objects"​ directory. +
- +
-The F4Browse measurements are in for example fuel: **lbs**, range: **nautical miles** values. In the view option you cannot see measurements,​ also F4Browse view is mirror image of real world. There is export and import function in F4Browse which you can use the transfer individual edits in and out of the database you are working on with someone. Just make sure that when you're importing stuff in, its correctly edited, always make backups of the original database you're creating so if wrong data is imported, you can revert back to the "​working"​ database. +
- +
- +
- +
- +
- +
- +
  
 +[[falcon4:​database:​unit_move_type|Unit move type]]
  
 +[[falcon4:​database:​rack_dat|Rack.dat explanation]]
  
  
 ====== Adding, Deleting and Editing ====== ====== Adding, Deleting and Editing ======
  
-Database Editing is perhaps one of the most interesting and rewarding parts of Falcon development. ​ This is the place where new models, skins, weapons, etc get integrated into the database for use in Falcon. ​ There is nothing quite as satisfying and taking a brand new model with a brand new skin set and being able to take this new aircraft for a test flight. While, there is a lot more this this simple act than simply adding a few things, and database is more than just aircraft, it include, all vehicle types, units, weapons, flight models, parent, models, CTs, radar, and much more.  Unfortunately,​ because Falcon is such a demanding woman - your performance as a database editor must be nearly flawless or things go horribly wrong. ​ While PMC is dedicated to providing support for different Falcon.exe, and the requirements for different executables is slightly different I will only be addressing the specific edits as they apply to FF Cobra.exe and RV.exe. ​ I have limited experience with other Falcon.exe and therefore don't want to provide inaccurate info for those folks choosing to use other Falcon.exe. ​ Perhaps other database developers will be willing to contact me and I will include supplementary instructions as they apply for different exe.  In general most of the principles that I layout here should apply almost universally for the other exe's.  Also, is should be said that the two most important tools for database editing are LOD Editor (Fred Balding) and F4Browser (Julian Onions). ​ With the advent of RV I would also include DXEdit.exe and DXDBTools.exe,​ and LODConvert.exe all three of which I will also discuss in some detail. +Read ranger822'​s ​[[falcon4:database:editingtutorial|Database AddingDeleting ​and Editing]] ​tutorial.
- +
-Lets first discuss the various parts of what you see in the database, what it represents, how it all fits together, how to add, delete, and modify and of course troubleshooting problems. ​  +
- +
-When opening F4Browser the first thing that I would advise is to ensure that you always, always establish for yourself a Falcon4 folder where you do all your DB edits. ​ Thru the use of Windows folder renaming function you can rename a Falcon4 folder whatever you like such as Falcon4 DB Edit.  Second I recommend that you keep a second Falcon install which contains a working Falcon installation which you can use as your test-bed for all edit.  These two install folders should then be kept separate; perhaps partitioning a hard-drive for such a thing would be a great idea, but it entirely up to you.  In any case, what I have found is by keeping a folder specifically for DB editing and another for testing helps to avoid corrupted databases for other installations. ​ For those not familiar with DB editing I would also recommend you do one other thing - alwasy make sure that you do all your DB editing in the Falcon4/​terrdata/​objects folder, even if you are working on some other theater besides Korea. ​ The reason is I have found that sometimes the registry can get messed up with changning theaters and source locations for editing. ​ The safest thing to do is to make sure you always have your registry set for Korea theater and you always do your edits in the korea objects folder. ​ If you do this you can avoid corrupting your database when your save edits go someplace you didn't intend and therefore ruining some other install and now making your job of redoing what you just did to your existing DB edit process. ​ So, just replace all the old korea object files with your theater files. ​ When you are ready to test - copy the entire objects folder to your test install objects<​theater>​ folder and run your test.  Now with that said, lets discuss the different parts of the DB as seen in F4Browse.exe.  +
- +
-Perhaps the most significant entry in the database is the CT.  I have no idea what CT stands for but it forms the integral unit of how Falcon communicates or links the objects in the database with the objectives in the campaign engine files and terrain. ​ In most cases Falcon assigns a Falcon ID number of some sort or another for CTs.  This is usually some offset of CT # +100.  This Falcon ID number is then used to relate things together. ​ CTs are used for all sorts of objects in the database. ​ Objects include, vehicles, objectives that are a collection of instructions to build/​render features, taxipoints, etc for a given location on the terrain map and (not to be confused with objectives, per se in a campaign file which are actual locations on a map), features (buildings, runways, bridges, etc, weapons (missiles, bombs, etc).  All these objects need to have an assigned CT in order to exist in Falcon. ​ CT's being at 0 and are sequential. ​ In order to add a new aircraft, for example, you will need to add a new CT for the vehicle entity. ​ Further, in order for the aircraft to show up in game you will also need to add a CT for the unit flight and a CT for the unit squadron entities. ​ The way to go about this is to add the CT using the add/copy function in the Browser. ​ You will find your work easiest by using add/copy and selecting a CT that is most similar to the entity type you are trying to add.  So, if you want to add a fighter with a sub-type of 6 pick a CT for a vehicle-fighter that has the same subtype. ​ Similarly, if you choose to copy the CT for the vehicile, cross reference the CT's unit flight an unit squadron CTs and add/copy those as well.  Now you should have a complete set of CTs from which you will need to change the specific values of the CT in order to "​add"​ a new record and not conflict with any of the existing records. ​ The best way to do this is to go the the CT records in F4Browse and sort the CTs by type or subtype - - this will then group things together in a way to allow you to see the type, subttype and specific values already in use.  The task is merely one of finding a set of specific values that will not conflict. ​ This is something that the Maddog tutorial doesn'​t cover as well.  To better illustrate all this lets take a look at Maddogs'​s tutorial and then review it and then pick up where he left of and finish out the rest of the tutorial to include all the rest of the database entries necessary to get an aircraft to actually fly in TE. +
-  +
-Maddog'​s Tutorial Revised by Ranger - - - (without permission since I can't seem to communicate with Maddog very often) +
- +
-Tools Needed +
- +
-F4Browse - Falcon 4 database ​editor (written by Julian "​Codec"​) +
-LODEditor - Falcon 4 LOD/​database editor (written by Fred "​BaldEagle"​)  +
- +
-Part 1 +
- +
--Fire up LODEditor (LE), browse to your terrdata/​objects folder for the KoreaObj.HDR file +
- +
--File >> Open Model File... _  +
- +
- +
-1.jpg +
- +
-Browser to your finished model and open it. +
- +
-2.jpg +
- +
-You will see this screen below next, play special attention to the detail highlighted in the red block. ​ It is a good idea to write this info down on a separate piece of paper or in Notepad/​Wordpad. ​ This is basically tellingyou what th elast known numbers in th edatabase are and it makes it easier to locate your new entry later as you go along. +
- +
-3.jpg +
- +
-Now, click on th **Edit LOD** button and you will see a screen similar to the one below. ​ Under **Utilities** choose **Model/​Texture SetUp** +
- +
-4.jpg +
- +
-The next screen you see you need to follow these simple steps: +
- +
-- Choose **Append/​Select a Parent** +
-- Then in the **Enter Data** panel that pops upjust click **OK** (it defaults to -1 which mean we want to add/append a new model to the DB. +
-- Then click on **OK** +
- +
-5.jpg +
- +
-Now do the same for the **Append/​Select LOD** the menu will ask you to locate the LOD file of your model on your hard drive and after that some distance view information. ​ I am not sure what these numbers really mean so I follow Maddog'​s advice and type in the number 10000 and click **OK** +
- +
-The distance data can be changed afterwards anyway, so don't worry too much about that for now. +
- +
-6.jpg +
- +
-Now click on **Update Parent Record**  +
-Next click on **Add/​Replace Texture(s)** and another browser screen will pop up which allow you to add whatever textures you have made for this model (CTRL + click to select multiple textures). One of the things about some later editions of LOD Editor is if you try to open a model that doesn'​t have textures loaded into the KO.tex file you may find some odd things going on with your model. ​ Also, if you attempt to change textures in the root diretory of a model (the texture list) and the textures are not present in the database already you wont be able to update your model. ​ Typically, I prefer to add all my textures to the KO.tex __BEFORE__ I append a model. ​ The same applies if you have multiple skin sets.  It is probably better planning to append a model once instead of populating your KO.lod file with lots of models that will need to be remove later. ​ I suggest appending a model a few times as possible and therefore minimizing having to update the parent record and compacting your database multiple times. ​ I will talk about compacting the database further along in this tutorial. +
- +
-That baically comprises the first step in the process. ​ **BUT BEFORE** you click on **Close** make sure you write down the new Parent ID and LOD Number assigned to your model. ​ These are circled in blue on the screen below. ​  +
- +
-You can now close LOD Editor and open F4Browse (as a note I have not found a way to have both programs opened at the same time using the same Objects folder files.) ​  +
- +
-Part 2  +
- +
-In F4Browse go down to Vehicle folder and click on it to open the subfolders and then click on Aircraft. ​ Now find and existing aircraft that best matches the new aircraft you want to add.  In Maddog'​s example he selected a Mirage -IIIE as his template because he was adding a Mirage IIIR2Z which is quite similar. ​ The selection should try to match up an existing aircarft that is closes in role, performance,​ etc since it is entirely likely that parts of a/c data entries can be used with less modification. ​ So, Right click on the list listing and choose **Add Copy** +
- +
-7.jpg +
- +
-The new entry will be copied to the bottom of the a/c list.  So, scroll down to the bottom and locate your copied template +
- +
-- Double click on the entry and change the name, this will help you identify this item, to the name of the a/c you want.   +
-- Next write down the new **Vehicle Ref number** (Vcl No), in the example it is **657** +
-- Also write down the CT ref No of the template you used (in this exmaple CT Recd **2500**) +
-- Click on **Update** +
- +
-8.jpg +
- +
-- Click on Class Table on the left, sort the list by No, then locate the CT Ref No of the template that you copied, in this exmaple it is entry 2500. +
-- Right click and **Add Copy**. +
- +
-9.jpg +
- +
-- You new entry will be added, as always to the bottom of the Class Table list so scroll down and locate it +
-- Double click to edit your new CT entry +
- +
-10.jpg +
- +
-- Write down the new **CT Ref No** (in this example 3508) +
-- In the **File Offset** box enter the new Vehicle Ref Numbers (Vcl No) (in this case is was number 657) that wrote down earlier as explained above. +
-- Leave the rest for now and click on **UPDATE** +
-- Go back to the Vehicles tab >>>>​ Aircraft using the folder tree in the left panel of the Browser +
-- Locate your new model and double click to edit it again. +
- +
-11.jpg +
- +
-- In the CT Recd box enter the CT Ref No you just created in the step before (in this exmaple is was 3508). +
-- Click on **Update** and that concludes Part 2.  You can now close F4Browse for now and reopen LOD Editor again. +
- +
-Part 3 +
- +
-In LOD Editor, browse the Vehicles list and you will now be able to see your new model in the list. +
-- Under the Parent section on th eright ​ (see pic below) next to the **Normal** button, change the **Parent ID** (in this case the old Parent ID is 2132) +
-- Change that parent to the new parent ID (which is 3800 in this example) +
-- Click on **Update** +
-- This is where those who did not write things down will panic. ​ In Part 1 of this tutorial, when you added the new LOD you needed write down the new LOD number and Parent ID number. ​ Remember the screen see pic below. +
- +
-12.jpg +
- +
-13.jpg +
- +
-In the screen below we have changed the template Parent ID to my new Parent ID (3800_ which contains the reference to the actual LOD model. +
- +
-14.jpg +
- +
-If you click on the **Normal** button in the Parent Box (screen above) you will see it takes you to your LOD file you added in Part 1 (in this example it is 6433). ​ You should not have to change anything here. +
- +
-15.jpg +
- +
-That is basically it for adding a model to the database. ​ If you click on the **3d Viewer** you should be able to view your model. ​ Now that you have added the model to the database lets move to Part 4 which will discuss how to get your model to actually fly. +
- +
-Part 4 +
- +
- +
- +
-Now that we have successfully added a new vehicle entity and the two required unit entities lets dig into the the other parts of database editing that will now make the new vehicle entity perform uniquely. ​ You might recall that when you did your add/copy of the vehicle and unit CTs - you also copied all the data that goes with the CT's you copied. ​ Unfortunately,​ a lot of the data loaded into any given CT is going to need to be adjusted in some way.  Further, we will need to take a detailed look at the vehicle data entry and discuss each of the database entry points, what it does, and how it relates to other parts of the database. ​ Just as a side note, parts of the Falcon database are shared across different CTs and records - you must be aware of changes that you make because if you make a change in a record - you must ensure that it doesn'​t affect other records that might share the data record. ​ This also requires the DB editor (you) to thoroughly review a record prior to editing and identify all the users, if any, of the data record. ​ We will talk a little bit more in depth about this when we talk about squadron stores, radars and flags. +
-+++ Editing ​+++ stopped here 11 Dec 07 - Ranger822 +
- +
-=================================================================================================================================== +
- +
-Here is example of how to add new CT record of aircraft squadron so you can use both the old squadron and this new edited squadron you just made. For example if you want to have one theater but with two time periods like Desert Storm. 1991 ODS and present day Black Phoenix. Both used the F-16 aircrafts, but in ODS they didn't have AIM-120'​s or LGB's which Black Phoenix has.  +
- +
-This example shows you how to copy F-4E SK squadron:​\\ +
-  - units -> f4esk -> add copy, update [record UCD number, call it U +
-  - classtable -> no354 -> add copy, change File offset to unit number [U], update note CT number of this new one, call it [C]  +
-  - back to unit view, reedit new unit, change CT Ind to [C], Update  +
-  - bring up dialog for Unit [U], look for SSD record number  +
-  - go to SSD view, and copy SSD used by [U]. remember the new SSD number  +
-  - edit 522, change SSD Ind to new SSD number, update  +
-  - edit 522 again, click on SSD Ind button should see the SSD record click on used by - should see just used by one squadron. +
- +
-====== Rack.da explanation ====== +
- +
-Here is what I have. Shawn is the expert now though :-) +
- +
-The new rack specification. This is defined through the rack.dat file. This file specifies two things.  +
-  * 1) RackGroups - these are groups of common rack definitions +
-  * 2) Racks - this sepcifies an individual rakc, its capacity and visual +
- +
-====== Rack Groups ====== +
- +
-These are number from 0 to N, N being specified in the file as the maximum number currently defined. The specification is\\ +
-Group [n] [racks]\\ +
-as in\\ +
-Group0 0 1 2\\ +
-Group1 3 4 5 6\\ +
-which says rack group 0 contains racks 0, 1 and 2. +
- +
- +
-====== Rack Defintions ====== +
- +
-These define the individual racks, from 0 to N, where again N is defined in the rack.dat file.  +
- +
-The specification is\\ +
-Rack [n] [CTid] [MaxCount]\\ +
-as in\\ +
-Rack0 0 0\\ +
-Rack1 1982 1 # helo one rack +
- +
-Having defined all the avilable racks and rackgroups, then it is time to match them up. This is done in the following way. In the weapon file, a new field (well an old one that wasn't used) is used to specify the rack group for this weapon. Through this, you can specify all the racks that can potentially carry the weapon. E.g., in the above, if the rackgroup was 0, then the weapon could potentially be carried on any of racks 0, 1 or 2.  +
- +
-Then, in the aircraft.dat file, the hardpoint specifies the rack group that this hardpoint can carry. So, for instance, and F-16 might specify hardpoint 7 has rackgroup 1, which in turn says racks 3 4 5 and 6 can be attached to this hardpoint+
  
-Now - all that has to happen is for a the weapon ​and hardpoint to be matched up. So, say we wish to load a 2 mavericks on a F-16 hardpoint 7. We find the rackgroup for hardpoint 7, we find the rack group for the maverick, and then we go through the list of racks in each looking for the first match with enough capacity to carry the given load of weapons.\\ +Read Jerry "​Pookie"​ Davis written [[addvehicle_tutorial|Adding new vehicles ​to the TE and Dogfight modules tutorial]].
-So, the chosen rack must be\\ +
-a) part of the rackgroup for HP7\\ +
-b) part of the rackgroup for maverick\\ +
-c) allow 2 or more weapons to be carried.\\+
  
-Julian+Read [[falcon4:​database:​addweapon_tutorial|How to add a new weapon]] tutorial by Dragon.
  
-This tutorial is under work and we will be adding more stuff to it. Send info/​comments to [[http://​tactical.nekromantix.com/​forum/​|our forum]].+[[falcon4:database:​adding_aircraft_copy|Adding aircraft copy]]
falcon4/database.1197551161.txt.gz · Last modified: 2007-12-13 13:06 (external edit)