*** H2 Database Builder ***
Revised 1/24/2000

CONTENTS:
FEATURES
MENU COMMANDS
OTHER FUNCTIONS
HELPFUL HINTS
NOTES ABOUT INDIVIDUAL ANNEX SCREENS
NOTES ABOUT HCF FILES
NOTES ABOUT INSTALLATIONS
NOTES ABOUT TEXT DESCRIPTION FILES
NOTES ABOUT VALIDATION REPORTS
NOTES ABOUT PROPULSION FUEL CONSUMPTION


FEATURES

*Editing of H2 .DAT files, including COUNTRY.DAT
*Editing of H2 text description files (.RES)
*Identification of unused components
*Exchanging platforms & components with other databases
*Display list of component users
*Data validation/error detection reports
*Capability to merge duplicate components


MENU COMMANDS

All menus except the Harpoon menu are MS Access default menus. 
Consult MS Access Help for details on the default menu items. Many 
commonly used menu items also have a toolbar button. Hold the 
mouse over a button to see its function. The following is a list 
of notable commands under the default menus:

Edit | Delete Record - This is the easiest way to delete a 
platform or component which is displayed full-screen. (Facilities, 
Sensors, Ships, Weapons, etc.) The cursor must NOT be in one of 
the list windows on the screen for this to work, or else only the 
current list item will be deleted.

Edit | Find - Use this command liberally to locate items in the 
database. Find will search the field that the cursor was in when 
Find was invoked. Double-clicking on an ID number will also invoke 
Find.

View | Datasheet View - For full-screen items, this is a 
convenient way to display items in a list. Choose View | Form View 
to switch back.

Records | Remove Filter/Sort - Use this to show all items and sort 
them in ID number. For instance, after viewing only unused items, 
use this command to display the full list again.

Tools | Database Utilities | Compact Database - Use this each time 
you import a database to compact the database, which will result 
in a smaller file size and better performance. In MS Access 7.0, 
you must exit the database before compacting it.

The Harpoon menu contains custom commands specific to this 
application:

Copy Item - Creates a copy of the currently-selected item, 
including all list items. For example, copying a ship will also 
copy all comms, sensors, mounts, etc. which are loaded on the 
ship. Using Edit | Copy does not copy list items.

Import & Export sub-menus:
Entire Database - Imports/Exports all .DAT files. When importing 
or exporting, you may mark the "Import/Export Text" check box to 
automatically import or export the text description .RES files in 
addition to the .DAT files. If you mark "Use Default Locations," 
files will be imported/exported using the current default 
locations for .DAT and .RES files. Otherwise, you will be prompted 
to specify locations for the files via the file browser dialog 
box. To see the current default locations, double-click on "Use 
Default Locations."
Annex - Imports/Exports the .DAT file for the current annex. If 
you have defined default file locations, you will have the option 
to use them. For annexes with text descriptions, you will also be 
given the option to import/export them also.
HCF File - Imports/Exports a Harpoon Component File based upon the 
contents of the export list.

Clear Export List - Clears the list of items waiting to be 
exported to an HCF file.

Add to Export List - Adds the current item to the list of items to 
be exported to an HCF file. If you have multiple items selected 
either in Form View or Datasheet View, choosing this menu action 
will add the entire selection to the list. CTRL-A also performs 
this action. To view a list of the components in the export list, 
view the report rExportList. If viewed prior to export, the report 
only shows the items manually added to the list. After the export 
has finished, the report shows all components belonging to each 
item added to the export list (unless the export list has been 
emptied).

Merge Record - Opens a dialog box which prompts you to select a 
destination record. All database references to the current item 
will be changed to refer to the destination record.

Recalc Unused - Recalculates which items in the current annex are 
not used by any other database item. The results are displayed in 
the Used checkbox on each annex screen.

Show Unused - Filters the current annex to display only unused 
items.

Delete Unused - Deletes all unused items in the current annex.

Validation Report - Runs data validation and error detection 
functions and displays the results. This option may take several 
minutes to run for some annexes.

Show Platform/Component sub-menus - These are shortcuts to display 
other annex forms.


OTHER FUNCTIONS

Usage List - Double-clicking the record selector at the left edge 
of a component on its annex screen will display a list of all the 
users of that component. For example, double-clicking on a mount 
listed on the Edit Mounts screen will show all facilities, planes, 
ships, and submarines that use that mount. This list will be 
updated each time you select a different component. For platforms 
and facilities, the usage list displays what countries "own" the 
selected platform or facility. NOTE: This function slows down 
system performance, so use it only when needed. To invoke the list 
for Weapon Records, right-click on the record selector and choose 
Show Users from the popup menu. For full-screen components like 
sensors, ships, and weapons, double-click in any blank space on 
the screen.

Component Cross-Link - Double-clicking the record selector at the 
left edge of a component list item will display the annex record 
for that component. For example, double-clicking on one of a 
ships mount records will display that mount on the Edit Mounts 
form. This function also works in the Weapon Record annex. For 
warheads, you can double-click on weapon-type warheads to display 
the linked weapon, or double-click on sensor-type warheads to 
display the linked sensor. The cross-link function also works in 
reverse by double-clicking on an item in the previously-mentioned 
Usage List.


HELPFUL HINTS

*To delete a component or code value from a platform, right-click 
on it and select Delete Record from the menu.
*To sort data on a certain category, right-click on the category 
and select Sort Ascending or Sort Descending from the popup menu.
*When adding a new component or platform, leave the ID number 
blank. The database will automatically enter the next available ID 
number. The editor will fill in any holes in the existing index 
numbers.
*In the drop-down boxes, if you begin typing, the box will 
continue to move to the first entry which matches the characters 
you typed.  Once the value you want is visible, press Tab.  You 
don't have to type the entire value.
*If you want to work on multiple H2 databases, simply copy the 
Access database file to another file name and import the other 
database into that copy.  I keep one copy of the Access database 
in the database directory for each H2 database I use.
*If you want to set all the arcs for either a mount or a sensor, 
double-click in the center of the arcs display.
*During imports, you may notice that messages appear to inform you 
that a name in the imported file was too long and had to be 
truncated. You may want to write the ID numbers down for later 
reference.
*You can edit the default file import/export locations from the 
menu screen by clicking the "Edit Defaults" button. You may 
specify either or both default locations. If leave one of them 
blank, you will be prompted for the required file location even if 
you request that the default locations be used.
*Annexes with text descriptions contain a drop-down list which 
displays text descriptions and the name of the first "user" of 
each text description. Text description ID numbers can also be 
entered directly into the field, even if they are not yet used.


NOTES ABOUT INDIVIDUAL ANNEX SCREENS

Aircraft:
The "Aircraft Ranges" button will open up a dialog box that 
displays the endurance of each loadout for the currently displayed 
aircraft.  Endurance is calculated based upon the most fuel-
efficient cruising speed and altitude.  If no ranges are 
displayed, run the Validation report in the Propulsion annex and 
fix any errors - certain errors will cause problems with range 
calculations.

Magazines and Mounts:
*Capacity figures can be quickly calculated by right-clicking on 
the capacity figure needing recalculation.  From the popup menu, 
select either "Set Default Capacity" or "Set Max Capacity."  The 
default capacity is the sum of the default loads from each weapon 
record attached to the mount or magazine.  Max capacity is the sum 
of each weapon record's maximum capacity figure.

Loadouts:
*Capacity figures are calculated automatically based upon the sum 
of the Default Loads of weapon records contained in each. Whenever 
a weapon is added or removed, the capacity will automatically 
recalculate. Also, if you double-click on a capacity number, it 
will force a recalculation. To recalculate the capacity figure for 
all items in an annex, double-click on the word "Capacity" at the 
top of the screen. The capacity figure can be manually altered if 
desired.
*Target types are added to each loadout automatically when new 
weapons are added. Note that target types are not deleted in this 
fashion, only added.
*There are two buttons ("+" and "-") which add and delete missing 
or extra target types respectively. The extra/missing 
determination is made by examining the aggregate list of target 
types used by the weapons in each loadout. Single-clicking on one 
of the buttons will perform the appropriate action only for the 
current loadout. Double-clicking on one of these buttons will 
perform the action for all loadouts in the annex.

Weapon Records:
*To open the usage list, right-click on the record selector and 
choose Show Users from the popup menu


NOTES ABOUT HCF FILES

I created the HCF (Harpoon Component File) file format to serve my 
database in the same way as the TPF file serves PFEdit.  I chose 
to create another format because I could not reverse-engineer the 
TPF file, and because I wanted to add more flexibility to the file 
format.

The HCF file format allows you to export a single platform or many 
platforms.  Technically, you could export an entire database into 
an HCF file.  The way this works is that the application keeps a 
list of the components you want to export. You add items to this 
list using the "Add to Export List" command under the Harpoon 
menu.  You can clear the list by choosing "Clear Export List" from 
the same menu.  To export everything in the current list, choose 
"Export HCF" from the Export sub-menu.  If you want to see what 
was exported, click the reports tab in the Database window and 
open the report named rExportList.

Importing an HCF file is a little more involved because the 
application will try to prevent duplication of components. You 
initiate the process by choosing "Import HCF" from the Export 
submenu.  Once you pick the file, the application will begin 
reading it.  Here is a review of how it handles various 
situations:

*If a component can be found which has the same composition, but 
not necessarily the same name, a list will be presented to you 
where you can choose to import the component as-is or to 
substitute a component which already exists in the database. This 
does not apply to facilities, installations, planes, ships, and 
subs because I'm assuming that you will check before importing a 
duplicate platform. Some components, like comms and warheads, have 
very few data entries, so many of these components will be listed 
as potential duplicates.

*For aircraft facilities, fuel, and weapon records, if a duplicate 
is found, it will automatically be substituted since these 
components are not given free-text names.

*When import begins, you will be given a choice about how to 
handle components that are found to have the same or a very 
similar name as components already in the database, but for which 
the composition is different. If you choose, these items will be 
automatically imported and you will be notified of the potential 
duplication in the final report, including the potential 
duplicate's ID number, once import is finished. You can then use 
the final report to investigate these yourself. The other choice 
will allow you to determine whether or not to import each item of 
this type during the import process.

The final report displays all components that were actually 
imported, not those for which a substitute was chosen.  If want to 
keep a record of what you imported, print this out.


NOTES ABOUT INSTALLATIONS

Installations are the only annex that contain latitude and 
longitude data. Each coordinate is specified by its value in 
degrees, minutes, and seconds, combined with a direction. For 
example, a latitude might be 45 degrees, 2 minutes, 1 second North 
latitude. In the editor, you type in the various numbers in 
separate boxes and select the direction from a list (N or S for 
latitude, E or W for longitude). A degree equates to 60 nm at the 
equator, while a minute equates to 1 nm at the equator and each 
second is 1/60 nm at the equator.

Installations themselves can be given an absolute position, 
although this data is not used by the game engine. Each facility 
in an installation should be given a relative latitude/longitude 
offset value in relation to the center of the installation. In the 
editor, these offsets values do not include degrees, although you 
may specify minute values in excess of 60 to create a larger 
offset. Normally, the first facility in an installation should not 
have an offset value.


NOTES ABOUT TEXT DESCRIPTION FILES

Before you are allowed to distribute modified text description 
files, you must mail the following message to AGSI at 
harpoon1st@aol.com:

I, {name}, hereby request permission to modify and distribute the 
resource files which contain pictures and text descriptions 
corresponding to various items in modified versions of AGSI's 
Harpoon II/III platform database.  I assert that I will not sell 
or otherwise generate revenue through the distribution of these 
files. This agreement in no way diminishes or revokes any of 
AGSI's rights to the Harpoon II/III software or data.

Once you've mailed this message, you can modify and distribute the 
files.  However, if you want to edit one of the text descriptions 
from the original files, you can only add text onto the end as 
long as you separate your additions from the original text and 
annotate clearly what is original text and what is appended by 
you.

Also, you should include a disclaimer in a text file when you 
distribute modified files.  Use the following text:

The accompanying files which contain text descriptions for and/or 
pictures of items in the Harpoon II/III database were modified 
with the consent of AGSI under the condition that they not be sold 
or otherwise be used to generate revenue. These files may 
otherwise be freely distributed in their current form.  Requests 
to modify text description and picture files should be addressed 
to AGSI at harpoon1st@aol.com.


NOTES ABOUT VALIDATION REPORT

The validation report under the Harpoon pull-down menu runs simple 
checks on the annex currently being viewed.  These are by no means 
exhaustive - they reflect only the errors I know to check for. 
Depending upon the annex, the report may take several minutes to 
run. Errors are reported in four levels:

*Critical Errors - these are errors which will result in a corrupt 
database
*Errors - serious problems which will cause platforms or 
components to function incorrectly or not function at all
*Warnings - warnings indicate less-serious data errors
*Notifications - this category is used to record atypical or 
unusual database values which MAY be erroneous

The report checks for the following: 

*Zero ID Detect - Checks for items with an ID number of 0.

*Component Verify - Checks that components (comms, mounts, 
sensors, etc.) of an item actually exist. This applies to 
installations, loadouts, mounts, magazines, weapons, weapon 
records, facilities, planes, ships, and submarines. Also checks 
ships, subs, and aircraft to verify that each has a comm device 
and an engine.

*Arc Verify - Checks all attached mounts and sensors that have 
directional arcs to verify that at least one arc is selected.

*Text Verify - Checks to make sure that text description ID 
numbers refer to existing descriptions. Applies to weapons, 
sensors, facilities, ships, submarines, and planes.

*Damage Points Verify - Checks damage points values to make sure 
they are greater than zero. Weapon- and sensor-type warheads are 
checked to make sure that the damage points value identifies an 
existing weapon or sensor.

*Duplication Check - Identifies duplicate aircraft facilities, 
fuel, and weapon records.

*Name Length Check - Checks the length of platform names (the 
model name combined with the name) to see if any exceed the limit 
of 30 characters.

*Country Verify - Checks the country annex to verify that all 
platforms referenced in the country annex refer to existing 
platforms in the appropriate annex (facilities, installations, 
ships, submarines, and planes). Also checks for duplicate usage of 
the same linked item.

*Propulsion Verify - Checks to see if an items propulsion is of 
an acceptable type for the platform. For planes, two categories 
are checked. If the Is Helicopter flag is set, any propulsion 
which is not Helo Turboshaft is reported. For other aircraft, 
propulsion which is not Jet or Turboprop is reported. Torpedoes 
are checked for appropriate propulsion, and other weapons are 
checked as well. Ships and submarines are also checked for non-
standard propulsion.

*Landing Code Verify - Checks the plane annex to verify that each 
plane has a specified landing facility size.

*Weapon Director Verify - Checks weapons that require illumination 
to verify that they have a director. Also checks for weapons not 
flagged for illumination which have an "extra" director.


NOTES ABOUT PROPULSION FUEL CONSUMPTION

The fuel consumption data in the propulsion is represented with a 
"primary" rating for each altitude band and a "boost" modifier for 
each altitude band. If the boost modifier is greater than 1.00, 
fuel consumption increases when boost is engaged. For 
demonstration purposes, here are the equations for aircraft fuel 
consumption:

"Speed" is in knots
"Range" is in nautical miles
"Time" is in minutes
"Primary" is the fuel consumption rating for a given altitude
"Boost" is the boost modifier for a given altitude

Fuel Usage at Loiter:
(9 * Primary) * (Time / 60)

Fuel Usage at Cruise:
(36 / Speed) * Range * Primary

Fuel Usage at Full:
(36 / Speed) * Range * Primary * Boost

Fuel Usage at Reheat:
(18 / Speed) * Range * Primary * (Boost ^ 2)
