
            Dynamix's ACES OF THE PACIFIC Data File Structures

                 Data decoded, collected, and written by
                       Tim Kilgore (CIS:72760,1022)

                         Revision 1.10, 06-20-93


The following information is, to the best of my knowledge, accurate.  If you
have any info about other file structures that you'd like to share, I'll be
glad to include it in this document.  Please contact me on CIS at the
FSForum.

NOTE: This document is NOT formatted for printing as these are working notes
that I have not cleaned-up for reading pleasure.  Be sure to add page breaks
where ever you want them prior to printing.

-------------------------------------------------------------------------------

HISTSN_0.DAT, HISTSN_1.DAT  (Historic mission selection descriptions)
HISTBF_0.DAT, HISTBF_1.DAT  (Briefings)
HISTOV_0.DAT, HISTOV_1.DAT  (Historic overview)
    Purpose: Historic Mission Descriptions
    Layout:
        Byte 1-4  Total number of bytes in records section (no header or array)
        Byte 5-6  Number of records
        OFFSET START ARRAY(Number of records * 4)
            4-byte offset start, read from offset until a null is encountered
            Note: offset 0 is referenced as : (records * 4) + 6
        Variable length null-terminated strings follow to EOF

        NOTE: Mission date appears to be extracted from the MISSx.DAT file
              (Confirmed 06-09-93)

-------------------------------------------------------------------------------

ROSTER.DAT Structure Information -
2  <Header Size (number of active records)
122  <Record Size
ASCII   <Data Type
    1 , c , Name                                 Width:  15         
   16 , c , Unused                               Width:  1          
   17 , c , Comment                              Width:  15         
   32 , c , Unused                               Width:  1          
   33 , t , Roster Position                      Width:  1          
   34 , t , Jap/American                         Width:  1          
   35 , t , Service & Branch                     Width:  1          
   36 , t , Rank                                 Width:  1          
   37 , t , Pilot status                         Width:  1          
   38 , c , Unknown                              Width:  2          
   40 , l , DS 1900 - Start date                 Width:  2          
   42 , c , Unknown                              Width:  2          
   44 , l , DS 1900 - Date NOW                   Width:  2          
   46 , c , Unknown                              Width:  3          
   49 , i , Total Missions                       Width:  2          
   51 , i , Successful missions                  Width:  2          
   53 , i , Campaigns completed                  Width:  2          
   55 , t , Plane Type                           Width:  1          
   56 , c , Unknown                              Width:  1          
   57 , t , Duty station (name)                  Width:  1          
   58 , c , Unknown                              Width:  1          
   59 , t , Squadron                             Width:  1          
   60 , c , Unknown                              Width:  1          
   61 , t , Starting location???                 Width:  1          
   62 , c , Unknown                              Width:  4          
   66 , t , AMedal Purple Heart                  Width:  1          
   67 , t , AMedal ???                           Width:  1          
   68 , t , AMedal DF Cross                      Width:  1          
   69 , t , AMedal ???                           Width:  1          
   70 , t , AMedal Silver Star                   Width:  1          
   71 , t , AMedal ???                           Width:  1          
   72 , t , AMedal ???                           Width:  1          
   73 , t , AMedal ???                           Width:  1          
   74 , t , AMedal ???                           Width:  1          
   75 , t , American Medal CMH                   Width:  1          
   76 , t , American Medal ???                   Width:  1          
   77 , t , JMedal 1                             Width:  1          
   78 , t , JMedal 2                             Width:  1          
   79 , t , JMedal 3                             Width:  1          
   80 , t , JMedal 4                             Width:  1          
   81 , t , JMedal 5                             Width:  1          
   82 , t , Unknown                              Width:  20         
  102 , l , Score                                Width:  2          
  104 , c , Unknown                              Width:  4          
  108 , i , Air Victories                        Width:  2          
  110 , i , Ships sunk                           Width:  2          
  112 , c , Unknown                              Width:  11         

-------------------------------------------------------------------------------

SCRIPT.DAT, MISSx.DAT
    Purpose: Mission control file, holds plane, ship, and pilot references
             as well as locations of said items.  Also hold planes per flight,
             a mission type identifier (career, historic, single mission),
             weapon load-outs, and location/altitude info for each waypoint.
             Understanding this file is the key to creating a true mission
             designer.

    Layout: (partial, but getting more and more complete all the time)
        Byte 001-002  Unknown (always seems to be a 04 00)
        Byte 003-008  Unknown
        Byte 009      Map used, where -
                           01 = Japan
                           02 = Formosa, Northern Philippines
                           03 = Western New Guinea, South Philippines
                           04 = Marianas and Caroline Islands
                           05 = New Guinea, New Britian, New Ireland
                           06 = Solomons, New Britian, New Ireland
                           07 = Marshall and Gilbert Islands
                           08 = Marcus and Wake Islands
                           09 = Hawaii
                           0A = Midway
                           0B = Japan (WWII:1946! addition, I think)
        Byte 010      Unknown
        Byte 011      Cloud cover, where -
                           00 = Clear
                           01 = Partly Cloudy
                           02 = Cloudy
                           03 = Overcast
        Byte 012-018  Unknown
        Byte 019-020  Days since 1900 (date info, matches pilot record)
        Byte 021-022  Time of day (00 00 to 07 00 is pre-dawn)
        Byte 023-028  Unknown (may contain global mission settings)
        Byte 029      Somehow related to fire control.  Setting this to
                      2F (examine MISS1.DAT) will prevent ships from
                      firing.
        Byte 030-096  Unknown (may contain cloud data)
        Byte 097-098  Unknown (07 00, data type identifier?)
        Byte 099-100  The number of 14 byte records to follow
        Byte 101-???  Array of 14 byte waypoint record(s).  (See WAYPOINT
                      DATA, below, for details.)

        Random positioning from this point on due to the variable number of
        records above.  Proceeding from the end of the 14 byte records we
        have:

        Word          Unknown (01 00, data type identifier?)
        Word          The number of planes involved
        PlaneRec *    Number of planes (22 bytes per plane record).  (See
                      PLANE DATA, below, for details.)

        Word          Unknown. (Possibly identifies the type of data structure
                      to follow.  Seems to be a 02 00 when ship data is pending.
                      Since the plane records are proceeded by a 01 00, this
                      sorta makes sense.)

        Word          The number of records (seems to be ship records when
                      the proceeding word is 02 00) to follow.

        shiprecords * number of records.  Again, this seems to hinge upon the
                      the first word following the plane records.  If a mission
                      has no ships, obviously there will be no ship records.
                      See the section on SHIP DATA, below.

        Unknown from this point on except that the waypoint text is immediately
        proceeded by a word telling the length of the text used.

-------------------------------------------------------------------------------

WAYPOINT DATA from SCRIPT.DAT/MISSx.DAT

Here is extracted data from a SCRIPT.DAT file.  These are the 14 byte records
mentioned in the description of SCRIPT.DAT.

Mission info -  Solo patrol, 4 flights of 4 enemy planes appear


         WAYPT  SML X  BIG X  SML Y  BIG Y  ALTITUDE  XX
Rec 01 - 00 00  31 6D  66 00  7E 6A  81 FF  00 00 00  00   START
Rec 02 - 00 01  02 E2  56 00  7E 6A  81 FF  40 9C 00  00   WP #1
Rec 03 - 00 02  31 6D  66 00  AD F5  90 FF  40 9C 00  00   WP #2
Rec 04 - 00 03  60 F8  75 00  7E 6A  81 FF  40 9C 00  00   WP #3
Rec 05 - 00 04  31 6D  66 00  4F DF  71 FF  40 9C 00  00   WP #4
Rec 06 - 00 05  02 E2  56 00  7E 6A  81 FF  40 9C 00  00   WP #5
Rec 07 - 00 06  31 6D  66 00  7E 6A  81 FF  10 27 00  00   END

Rec 08 - 00 FF  65 8A  62 00  E1 12  8D FF  00 FA 00  00   Group1
Rec 09 - 00 FF  31 6D  66 00  7E 6A  81 FF  00 FA 00  00   end

Rec 10 - 00 FF  94 15  72 00  49 4D  85 FF  00 FA 00  00   Group2
Rec 11 - 00 FF  31 6D  66 00  7E 6A  81 FF  00 FA 00  00   end

Rec 12 - 00 FF  FC 4F  6A 00  1A C2  75 FF  00 FA 00  00   Group3
Rec 13 - 00 FF  31 6D  66 00  7E 6A  81 FF  00 FA 00  00   end

Rec 14 - 00 FF  7E 74  65 00  33 AC  78 FF  00 FA 00  00   Group4
Rec 15 - 00 FF  31 6D  66 00  7E 6A  81 FF  00 FA 00  00   end

Rec 16 - 00 FF  31 6D  66 00  7E 6A  81 FF  00 00 00  00  Landing?


WAYPOINTS -   FF = a stationary group (landing fields (?) or enemy flight
              locations)

COORDINATES - I don't know what the rules for these coordinates are just yet,
              I just know that they work.  It probably breaks down into an
              X-Y system.

SML X/Y   -   Works as BIG X and BIG Y, but the second byte is used for things
              other than positive/negative determination.  I'd guess that the
              method is based on a normal grid -

                         Max X
                           |
                           |
                           |
                           |
                        0,0|_____________ Max Y

              Again, the scale is unknown, but enemy planes are generally
              visible with large changes in either X or Y coordinates.


BIG X/Y   -   The first byte is the unit and the second byte will be either
              a FF (negative, going left on the X axis, down on the Y axis)
              or a 00 (positive, going right on the X axis, up on the Y axis).
              I haven't determined the unit of measurement yet, but it appears
              to be several miles per increment.

              This means that larger maps are broken into four quadrants as
              shown below -

                                      0-0
                                       |
                                       |
                                 00----+-----FF   Y axis
                                       |
                                       |
                                      F-F
                                    X axis

              Note: Big X and Big Y apply only to the current campaign map
                    (to change maps, see Byte 9 in SCRIPT.DAT above).

ALTITUDE -    is calculated in the following fashion -

                            40 9C 00   is reversed to become
                            00 9C 40   convert to decimal
                            40,000     and divide by 4
                            10,000     (done)

              I'd like to thank Nicholas Bell (72162,1667) for providing
              me with the correct 'formula' for determining/setting the
              correct altitude.

              What's an FA in the altitude column?  I think it means to match
              the altitude of the players flight. (Less sure of this, now.)

   NOTE: Placing a null in the first byte has unexpected results if the
         second byte is not null.  A 00 01 results in over 18,000 feet
         while a 01 01 results (as expected) in about 16,450 feet.  Go
         figure...

XX is probably a null terminator for the record and can be ignored.

What's missing?  Heading, but this could be garnered from tracing the
flight path.  Speed, but this could be based on 90% of throttle or
something like that.  There is information following the plane records
that I have not examined, but the answers may be in this section of
the file.

One extremely important piece of information that I'm missing is the
data that breaks down each flight and assigns the number of planes to
a given flight.  This is probably elsewhere in the mission file and
not in this section of the data.

Another important piece of information is a byte declaring the number of
waypoints a mission has.  It is possible to count all the non-FF waypoints
to arrive at this total, but that's a royal pain.

NOTE: From time to time AOTP generates missions in which the player's
      waypoints are NOT the first ones listed.  Do _not_ assume that the
      first record read will be the starting location for the player's
      flight.

--------------------------------------------------------------------------
PLANE DATA from SCRIPT.DAT/MISSx.DAT

The following information was determined largely by James "Jaybird" Johnson
with a little help from Keith Heitmann when it came to drop tanks.  All I
did was to bring it up to date with WWII:1946! aircraft.

Plane records are always 22 bytes in length.  A 2C in the PT column indicates
the player's aircraft.

The following data comes from a DUEL AN ACE mission -

AC SV PT DT  ?? ?? ?? ?? ?? ?? ?? ??  RT #R  TT #T  MB #M  SB #S  ?? ??
27 00 2C 00  80 00 80 02 00 00 FF FF  FF FF  FF FF  FF FF  FF FF  FF FF
2C 03 4A 00  80 00 80 0C 00 00 FF FF  FF FF  FF FF  FF FF  FF FF  FF FF

AC (AIRCRAFT)        Use the following table:
                        00 -  P-38F Lightning
                        01 -  P-38J Lightning
                        02 -  P-39D Aircobra
                        03 -  P-40E Warhawk
                        04 -  P-47D Thunderbolt
                        05 -  P-51D Mustang
                        06 -  F4F-3 Wildcat
                        07 -  F4F-4 Wildcat
                        08 -  F6F-5 Hellcat
                        09 -  F4U-1 Corsair
                        0A -  SBD Dauntless (Dive bomber)
                        0B -  SB2C Helldiver (Dive bomber)
                        0C -  TBD Devastator (Torpedo bomber)
                        0D -  TBF Avenger (Torpedo bomber)
                        0E -  (PBY Catalina)
                        0F -  (B-17D Flying Fortress)
                        10 -  (B-17E Flying Fortress)
                        11 -  (B-24J Liberator)
                        12 -  (B-25D Mitchell)
                        13 -  (B-25J Mitchell)
                        14 -  (B-29A Superfortess)
                        15 -  A6M2 Zeke (JNAF)
                        16 -  A6M3 Zeke (JNAF)
                        17 -  A6M5 Zeke (JNAF)
                        18 -  N1K1 George (JNAF)
                        19 -  Ki-27 Nate (JAAF)
                        1A -  Ki-43 Oscar (JAAF)
                        1B -  Ki-63 Tony (JAAF)
                        1C -  Ki-45 Nick (JAAF)
                        1D -  Ki-84 Frank (JAAF)
                        1E -  Ki-100 (JAAF)
                        1F -  D3A Val (JNAF dive bomber)
                        20 -  D4Y2 Judy (JNAF torpedo bomber)
                        21 -  B5N Kate (JNAF torpedo bomber)
                        22 -  B6N Jill (JNAF Torpedo Bomber)
                        23 -  (G4M Betty (JNAF))
                        24 -  (Ki-21 Sally (JAAF))
                        25 -  (H6K Mavis (JNAF))
                        26 -  (H8K Emily (JNAF))

                        27 -  P-80 Shooting Star
                        28 -  F8F Bearcat
                        29 -  F7F Tigercat
                        2A -  F2G Corsair
                        2B -  Ki-83
                        2C -  Kikka
                        2D -  Shinden

                        NOTE: Planes in parentheses cannot be piloted
                        by the player.


SV (SERVICE)         Use the following table:

                        00 - USN
                        01 - USMC
                        02 - USAAF
                        03 - JNAF
                        04 - JAAF


PT (PILOT)           Use the following table:

                        00 - USN Novice
                        01 - USN Regular
                        02 - USN Veteran
                        03 - USN Expert
                        04 - USMC Novice
                        05 - USMC Regular
                        06 - USMC Veteran
                        07 - USMC Expert
                        08 - USAAF Novice
                        09 - USAAF Regular
                        0A - USAAF Veteran
                        0B - USAAF Expert
                        0C - JNAF Novice
                        0D - JNAF Regular
                        0E - JNAF Veteran
                        0F - JNAF Expert
                        10 - JAAF Novice
                        11 - JAAF Regular
                        12 - JAAF Veteran
                        13 - JAAF Expert

                        2C - PLAYER

                        JNAF ACES FOLLOW
                        2D - Nishizawa
                        2E - Iwamoto
                        2F - Sugita
                        30 - Sakai
                        31 - Komachi
                        32 - Muto
                        33 - Sasai
                        34 - Sugino

                        35 - Kobayashi (JAAF's only ace)

                        USAAF ACES FOLLOW
                        36 - Bong
                        37 - McGuire
                        38 - MacDonald
                        39 - Johnson
                        3A - Lynch
                        3B - Welch
                        3C - Wagner

                        USMC ACES FOLLOW
                        3D - Boyington
                        3E - Foss
                        3F - Hanson
                        40 - Walsh
                        41 - Smith
                        42 - Carl

                        USN ACES FOLLOW
                        43 - McCampbell
                        44 - Harris
                        45 - Valencia
                        46 - Vraciu
                        47 - Kepford
                        48 - Blackburn
                        49 - Thatch

                        WWII:1946! UPDATES
                        4A - Iwamoto
                        4B - Sakai


DT (DROP TANK)       Boolean, 01 means that drop tanks are present.


RT (Rocket)          Boolean, 01 means that rockets are present.
#R (Rocket count)    Don't exceed 6 rockets or a lock-up will occur.


TT (Torpedo type)    Use the following table:
                        00 - IJN Type 91 Torpedo
                        01 - USN Mark 13 Torpedo
T# (Torpedo count)   Probably should never exceed 01.


MB (Main bomb)       Use the following table:
                        00 - IJN 132 pounder
                        01 - IJN 551 pounder
                        02 - ????
                        03 - US 100 pounder
                        04 - US 250 pounder
                        05 - US 500 pounder
                        06 - US 1000 pounder
#M (# of MBs)        Probably shound never exceed 02.


SB (Secndry bomb)    Use the table for MB, above.
#S (# of SBs)        Probably should never exceed 02.

--------------------------------------------------------------------------
SHIP DATA from SCRIPT.DAT/MISSx.DAT

First, I pulled a boner and figured out most of this out by myself.  I
didn't know that Jaybird had already gone through the agony of determining
what each ship ID number represented and ended up re-inventing the wheel.

With Jaybird's permission, I've included his description text for each class
of ship.  Without his help, the listing would have been "01 CARRIER, 02
CARRIER, etc" and would not have been as informative or as detailed.
Thanks, Jaybird!


This data comes from the first historic mission - Pearl Harbor.

         ID SV  DAMGE  ?????  ?????  SML X  BIG X  SML Y  BIG Y
Rec 01 - 13 03  00 00  FF FF  00 00  00 00  00 00  00 00  00 00  IJN carrier
Rec 02 - 12 03  00 00  FF FF  00 00  A0 8C  00 00  C0 5D  00 00  IJN carrier

Rec 03 - 05 00  00 00  FF FF  01 01  00 00  00 00  00 00  00 00  USN battleship
Rec 04 - 08 00  00 00  FF FF  01 01  F8 F8  FF FF  30 11  00 00  USN destroyer
Rec 05 - 05 00  00 00  FF FF  01 01  D8 F5  FF FF  68 29  00 00  USN battleship
Rec 06 - 05 00  00 00  FF FF  01 01  48 F4  FF FF  68 42  00 00  USN battleship

ID of Ship  -   Use the following table:

                            US Navy Ships
                    01  Yorktown Class Carrier
                    02  Essex Class Carrier
                    03  Lexington Class Carrier
                    04  Independence Class Light Carrier
                    05  California Class Battleship
                    06  South Dakota Battleship
                    07  Northhampton Class Heavy Cruiser
                    08  Fletcher Class Destroyer
                    09  Flush Class Destroyer
                    0A  Large Patrol Boat (SC 1009 Class Sub chaser)
                    0B  Small Patrol Boat (LCM)
                    0C  Freighter
                    0D  Converted Liner Troop Ship
                    0E  Small Troop Ship (LCI)
                    0F  Armed Troop Ship (LST)
                    10  Tanker
                    11  Tanker w/ booms

                        Imperial Japanese Navy Ships
                    12  Akagi Class Carrier
                    13  Hiryu Class Carrier
                    14  Shokaku Class Carrier
                    15  Zuiho Class Carrier
                    16  Ryujo Class Carrier
                    17  Yamato Class Battleship
                    18  Kongo Class Battleship
                    19  Mogami Class Cruiser
                    1A  Fubuki Class Destroyer
                    1B  Type C Patrol ship
                    1C  Type G Landing Transport / Coastal Transport
                    1D  Freighter
                    1E  Converted-liner Troop Ship
                    1F  Large Patrol Boat (Type 51)
                    20  Small Patrol Boat (Type E landing craft)
                    21  Small Tanker
                    22  Large Tanker


SV (Service) -  00 = USN, 03 = IJN

DAMAGE       -  You can pre-damage ships, but you can NOT apply enough damage
                to the ship to sink it or a system error will occur.  You'll
                know that you've passed this limit if, during take-off, you
                are asked if you want to end the mission.

                I haven't experimented with the amounts of damage that a ship
                can withstand before sinking.  I'm sure that it varies with
                the class of ship involved.

                Using this presents a problem - a player can abort a mission
                and still get credit for the damage that is inflicted by
                using this method.  Dynamix's intended use appears to be that
                of guarding a pre-crippled vessle, with no or little checking
                for situations in which the player might attack a pre-damaged
                ship.

????????     -  Unknown at this time.

Coordinates  -  See the description for WAYPOINTS, above, for more information.
                NOTE: I've noticed missions in which all friendly ships have
                the exact same coordinates.  I think that AOTP sees this and
                places them into a pre-designated formation.

-------------------------------------------------------------------------------

EOF
