Index: oup/current/DataAccess/Access_OUP_ADB.pas
===================================================================
--- oup/current/DataAccess/Access_OUP_ADB.pas	(revision 112)
+++ oup/current/DataAccess/Access_OUP_ADB.pas	(revision 113)
@@ -32,4 +32,5 @@
     procedure UpdateDatFilePart(FileID, Offset, Size: Integer; Src: TStream); overload; override;
 
+    function GetDatLinks(FileID: Integer): TDatLinkList; override;
     function GetRawList(FileID: Integer): TRawDataList; override;
     function GetRawInfo(FileID, DatOffset: Integer): TRawDataInfo; override;
@@ -56,6 +57,4 @@
 
 constructor TAccess_OUP_ADB.Create(DBFilename: String; ConnectionID: Integer; var Msg: TStatusMessages);
-var
-  i: Integer;
 begin
   Msg := SM_UnknownError;
@@ -142,5 +141,5 @@
       Fdat_files[i].Extension := FQuery.FieldByName('extension').AsString;
       Fdat_files[i].Size := FQuery.FieldByName('size').AsInteger;
-      Fdat_files[i].FileType := HexToLong(FQuery.FieldByName('contenttype').AsString);
+      Fdat_files[i].FileType := StrToInt('$'+FQuery.FieldByName('contenttype').AsString);
       Fdat_files[i].DatAddr := 0;
       Inc(i);
@@ -294,5 +293,6 @@
     end;
   end;
-  Result := TStringList.Create;
+  if not Assigned(Result) then
+    Result := TStringList.Create;
   if list.Count > 0 then
   begin
@@ -328,5 +328,8 @@
   i: Integer;
 begin
-  Result := TStringList.Create;
+  if not Assigned(Result) then
+    Result := TStringList.Create;
+  if Result is TStringList then
+    TStringList(Result).Sorted := True;
   for i := 0 to Length(Fdat_extensionsmap) - 1 do
   begin
Index: oup/current/DataAccess/Access_OniArchive.pas
===================================================================
--- oup/current/DataAccess/Access_OniArchive.pas	(revision 112)
+++ oup/current/DataAccess/Access_OniArchive.pas	(revision 113)
@@ -34,4 +34,5 @@
     procedure UpdateDatFilePart(FileID, Offset, Size: Integer; Src: TStream); overload; override;
 
+    function GetDatLinks(FileID: Integer): TDatLinkList; override;
     function GetRawList(FileID: Integer): TRawDataList; override;
     function GetRawInfo(FileID, DatOffset: Integer): TRawDataInfo; override;
@@ -60,16 +61,4 @@
 
 constructor TAccess_OniArchive.Create(DatFilename: String; ConnectionID: Integer; var Msg: TStatusMessages);
-const
-  header_ident1_pc: array[0..$13] of Byte =
-    ($1F, $27, $DC, $33, $DF, $BC, $03, $00, $31, $33, $52, $56, $40, $00,
-    $14, $00, $10, $00, $08, $00);
-  header_ident1_mac: array[0..$13] of Byte =
-    ($61, $30, $C1, $23, $DF, $BC, $03, $00, $31, $33, $52, $56, $40, $00,
-    $14, $00, $10, $00, $08, $00);
-  header_ident1_macbeta: array[0..$13] of Byte =
-    ($81, $11, $8D, $23, $DF, $BC, $03, $00, $31, $33, $52, $56, $40, $00,
-    $14, $00, $10, $00, $08, $00);
-  header_ident2: array[0..$F] of Byte =
-    ($99, $CF, $40, $00, $90, $4F, $63, $00, $F4, $55, $5F, $00, $90, $4F, $63, $00);
 var
   i: Integer;
@@ -94,12 +83,18 @@
   header_mac := True;
   header_macbeta := True;
-  for i := 0 to High(Fdat_header.Ident) do
-  begin
-//    FLevelInfo.Ident[i] := Fdat_header.Ident[i];
-    if Fdat_header.Ident[i] <> header_ident1_pc[i] then
+  for i := 0 to High(Fdat_header.GlobalIdent) do
+    if Fdat_header.GlobalIdent[i] <> HeaderGlobalIdent[i] then
+    begin
+      Msg := SM_IncompatibleFile;
+      Exit;
+    end;
+
+  for i := 0 to High(Fdat_header.OSIdent) do
+  begin
+    if Fdat_header.OSIdent[i] <> HeaderOSIdentWin[i] then
       header_pc := False;
-    if Fdat_header.Ident[i] <> header_ident1_mac[i] then
+    if Fdat_header.OSIdent[i] <> HeaderOSIdentMac[i] then
       header_mac := False;
-    if Fdat_header.Ident[i] <> header_ident1_macbeta[i] then
+    if Fdat_header.OSIdent[i] <> HeaderOSIdentMacBeta[i] then
       header_macbeta := False;
   end;
@@ -259,5 +254,6 @@
     end;
   end;
-  Result := TStringList.Create;
+  if not Assigned(Result) then
+    Result := TStringList.Create;
   if list.Count > 0 then
   begin
@@ -295,5 +291,8 @@
   i: Integer;
 begin
-  Result := TStringList.Create;
+  if not Assigned(Result) then
+    Result := TStringList.Create;
+  if Result is TStringList then
+    TStringList(Result).Sorted := True;
   for i := 0 to Length(Fdat_extensionsmap) - 1 do
   begin
Index: oup/current/DataAccess/DataAccess.pas
===================================================================
--- oup/current/DataAccess/DataAccess.pas	(revision 112)
+++ oup/current/DataAccess/DataAccess.pas	(revision 113)
@@ -44,4 +44,5 @@
     procedure UpdateDatFilePart(FileID, Offset, Size: Integer; Src: Pointer); overload;
 
+    function GetDatLinks(FileID: Integer): TDatLinkList; virtual; abstract;
     function GetRawList(FileID: Integer): TRawDataList; virtual; abstract;
     function GetRawInfo(FileID, DatOffset: Integer): TRawDataInfo; virtual; abstract;
@@ -272,5 +273,5 @@
   data.Write(Src[0], Length(Src));
   data.Seek(0, soFromBeginning);
-  AppendRawFile(LocSep, data);
+  Result := AppendRawFile(LocSep, data);
   data.Free;
 end;
@@ -283,5 +284,5 @@
   data.Write(Src^, Size);
   data.Seek(0, soFromBeginning);
-  AppendRawFile(LocSep, data);
+  Result := AppendRawFile(LocSep, data);
   data.Free;
 end;
Index: oup/current/Global/DatStructureLoader.pas
===================================================================
--- oup/current/Global/DatStructureLoader.pas	(revision 112)
+++ oup/current/Global/DatStructureLoader.pas	(revision 113)
@@ -69,4 +69,6 @@
     100..300:
       Result := datatype - 100;
+    500..614:
+      Result := 4;
     1000..9999:
       Result := datatype - 1000;
@@ -129,5 +131,4 @@
 function LoadStructureDefinition(ConnectionID, FileID: Integer): TStructDef;
 var
-  i:      Integer;
   current_type: Byte; //0: Global, 1: Undynamic, 2: Dynamic
   current_base, current_package, current_package_size: Integer;
@@ -178,5 +179,5 @@
               begin
                 current_type := 1;
-                current_base := HexToLong(fields[2]);
+                current_base := StrToInt(fields[2]);
                 SetLength(Result.Subs, Length(Result.Subs) + 1);
                 Result.Subs[High(Result.Subs)].SubName :=
@@ -187,5 +188,5 @@
               begin
                 current_type    := 2;
-                current_base    := HexToLong(fields[2]);
+                current_base    := StrToInt(fields[2]);
                 current_package := 0;
                 current_package_size := StrToInt(fields[5]);
@@ -194,15 +195,15 @@
                   case StrToInt(fields[4]) of
                     1:
-                      packages := Data[HexToLong(fields[3])];
+                      packages := Data[StrToInt(fields[3])];
                     2:
-                      packages := Data[HexToLong(fields[3])] + Data[HexToLong(fields[3]) + 1] * 256;
+                      packages := Data[StrToInt(fields[3])] + Data[StrToInt(fields[3]) + 1] * 256;
                     4:
-                      packages := Data[HexToLong(fields[3])] + Data[HexToLong(fields[3]) + 1] *
-                        256 + Data[HexToLong(fields[3]) + 2] * 256 * 256 + Data[HexToLong(fields[3]) + 3] * 256 * 256 * 256;
+                      packages := Data[StrToInt(fields[3])] + Data[StrToInt(fields[3]) + 1] *
+                        256 + Data[StrToInt(fields[3]) + 2] * 256 * 256 + Data[StrToInt(fields[3]) + 3] * 256 * 256 * 256;
                   end;
                 end
                 else
                 begin
-                  packages := HexToLong(fields[4]);
+                  packages := StrToInt(fields[4]);
                 end;
                 SetLength(Result.Subs, Length(Result.Subs) + packages);
@@ -238,5 +239,5 @@
                 if current_type in [0, 1] then
                 begin
-                  structentry.offset := HexToLong(fields[1]) + current_base;
+                  structentry.offset := StrToInt(fields[1]) + current_base;
                   if Length(Result.Subs) = 0 then
                   begin
@@ -257,5 +258,5 @@
                   begin
                     structentry.offset :=
-                      current_base + current_package * current_package_size + HexToLong(fields[1]);
+                      current_base + current_package * current_package_size + StrToInt(fields[1]);
                     with Result.Subs[High(Result.Subs) - packages + current_package + 1] do
                     begin
Index: oup/current/Global/Data.pas
===================================================================
--- oup/current/Global/Data.pas	(revision 112)
+++ oup/current/Global/Data.pas	(revision 113)
@@ -12,130 +12,127 @@
   AppSettingsFile: file of TAppSettings;
 
-{
-const
-  header_ident1_pc:Array[0..$13] of Byte=
-      ($1F,$27,$DC,$33,$DF,$BC,$03,$00,$31,$33,$52,$56,$40,$00,$14,$00,$10,$00,$08,$00);
-  header_ident1_mac:Array[0..$13] of Byte=
-      ($61,$30,$C1,$23,$DF,$BC,$03,$00,$31,$33,$52,$56,$40,$00,$14,$00,$10,$00,$08,$00);
-  header_ident2:Array[0..$F] of Byte=
-      ($99,$CF,$40,$00,$90,$4F,$63,$00,$F4,$55,$5F,$00,$90,$4F,$63,$00);
-}
 
 const
+  HeaderOSIdentWin:     TDatOSIdent = ($1F, $27, $DC, $33);
+  HeaderOSIdentMac:     TDatOSIdent = ($61, $30, $C1, $23);
+  HeaderOSIdentMacBeta: TDatOSIdent = ($81, $11, $8D, $23);
+  HeaderGlobalIdent: TDatGlobalIdent = ($DF, $BC, $03, $00, $31, $33, $52, $56,
+                                        $40, $00, $14, $00, $10, $00, $08, $00);
+
 	FileTypes: array[0..113] of TFileType = (
-		(Extension: 'AISA';  StructID: 501; Description: 'AI Character Setup Array';  IdentWin:($E9,$6B,$4C,$22,$2A,$00,$00,$00);  IdentMac:($E9,$6B,$4C,$22,$2A,$00,$00,$00)),
-		(Extension: 'AITR';  StructID: 502; Description: 'AI script trigger array';  IdentWin:($55,$EA,$1A,$00,$00,$00,$00,$00);  IdentMac:($55,$EA,$1A,$00,$00,$00,$00,$00)),
-		(Extension: 'AIWA';  StructID: 503; Description: 'AI Imported Waypoint Array';  IdentWin:($03,$7F,$10,$00,$00,$00,$00,$00);  IdentMac:($03,$7F,$10,$00,$00,$00,$00,$00)),
-		(Extension: 'AKAA';  StructID: 504; Description: 'Adjacency Array';  IdentWin:($77,$DE,$11,$00,$00,$00,$00,$00);  IdentMac:($77,$DE,$11,$00,$00,$00,$00,$00)),
-		(Extension: 'ABNA';  StructID: 505; Description: 'BSP tree node Array';  IdentWin:($A0,$6D,$12,$00,$00,$00,$00,$00);  IdentMac:($A0,$6D,$12,$00,$00,$00,$00,$00)),
-		(Extension: 'AKVA';  StructID: 506; Description: 'BNV Node Array';  IdentWin:($E0,$05,$DF,$00,$00,$00,$00,$00);  IdentMac:($E0,$05,$DF,$00,$00,$00,$00,$00)),
-		(Extension: 'AKBA';  StructID: 507; Description: 'Side Array';  IdentWin:($84,$28,$3A,$00,$00,$00,$00,$00);  IdentMac:($84,$28,$3A,$00,$00,$00,$00,$00)),
-		(Extension: 'AKBP';  StructID: 508; Description: 'BSP node Array';  IdentWin:($49,$F4,$0C,$00,$00,$00,$00,$00);  IdentMac:($49,$F4,$0C,$00,$00,$00,$00,$00)),
-		(Extension: 'AKDA';  StructID: 509; Description: 'Door Frame Array';  IdentWin:($64,$54,$2E,$00,$00,$00,$00,$00);  IdentMac:($64,$54,$2E,$00,$00,$00,$00,$00)),
-		(Extension: 'AKEV';  StructID: 510; Description: 'Akira Environment';  IdentWin:($75,$DE,$14,$30,$88,$00,$00,$00);  IdentMac:($75,$DE,$14,$30,$88,$00,$00,$00)),
-		(Extension: 'AGQC';  StructID: 511; Description: 'Gunk Quad Collision Array';  IdentWin:($91,$CB,$1C,$00,$00,$00,$00,$00);  IdentMac:($91,$CB,$1C,$00,$00,$00,$00,$00)),
-		(Extension: 'AGDB';  StructID: 512; Description: 'Gunk Quad Debug Array';  IdentWin:($17,$2E,$07,$00,$00,$00,$00,$00);  IdentMac:($17,$2E,$07,$00,$00,$00,$00,$00)),
-		(Extension: 'AGQG';  StructID: 513; Description: 'Gunk Quad General Array';  IdentWin:($D2,$03,$1C,$00,$00,$00,$00,$00);  IdentMac:($D2,$03,$1C,$00,$00,$00,$00,$00)),
-		(Extension: 'AGQM';  StructID: 514; Description: 'Gunk Quad Material';  IdentWin:($A6,$4A,$04,$00,$00,$00,$00,$00);  IdentMac:($A6,$4A,$04,$00,$00,$00,$00,$00)),
-		(Extension: 'AGQR';  StructID: 515; Description: 'Gunk Quad Render Array';  IdentWin:($3B,$3A,$08,$00,$00,$00,$00,$00);  IdentMac:($3B,$3A,$08,$00,$00,$00,$00,$00)),
-		(Extension: 'AKOT';  StructID: 516; Description: 'Oct tree';  IdentWin:($08,$DA,$B8,$E7,$11,$00,$00,$00);  IdentMac:($08,$DA,$B8,$E7,$11,$00,$00,$00)),
-		(Extension: 'OTIT';  StructID: 517; Description: 'Oct tree interior node Array';  IdentWin:($D2,$51,$0A,$00,$00,$00,$00,$00);  IdentMac:($D2,$51,$0A,$00,$00,$00,$00,$00)),
-		(Extension: 'OTLF';  StructID: 518; Description: 'Oct tree leaf node Array';  IdentWin:($0B,$AC,$1E,$00,$00,$00,$00,$00);  IdentMac:($0B,$AC,$1E,$00,$00,$00,$00,$00)),
-		(Extension: 'QTNA';  StructID: 519; Description: 'Quad tree node Array';  IdentWin:($CC,$6E,$06,$00,$00,$00,$00,$00);  IdentMac:($CC,$6E,$06,$00,$00,$00,$00,$00)),
-		(Extension: 'BINA';  StructID: 520; Description: 'Binary Data';  IdentWin:($41,$DB,$00,$00,$00,$00,$00,$00);  IdentMac:($11,$5E,$01,$00,$00,$00,$00,$00)),
-		(Extension: 'ENVP';  StructID: 521; Description: 'Env Particle Array';  IdentWin:($C3,$C1,$67,$00,$00,$00,$00,$00);  IdentMac:($C3,$C1,$67,$00,$00,$00,$00,$00)),
-		(Extension: 'FXLR';  StructID: 522; Description: 'FX Laser effect';  IdentWin:($A9,$F8,$83,$95,$06,$00,$00,$00);  IdentMac:($A9,$F8,$83,$95,$06,$00,$00,$00)),
-		(Extension: '3CLA';  StructID: 523; Description: 'RGB Color Array';  IdentWin:($BE,$E6,$04,$00,$00,$00,$00,$00);  IdentMac:($BE,$E6,$04,$00,$00,$00,$00,$00)),
-		(Extension: 'EDIA';  StructID: 524; Description: 'Edge Index Array';  IdentWin:($F7,$B6,$07,$00,$00,$00,$00,$00);  IdentMac:($F7,$B6,$07,$00,$00,$00,$00,$00)),
-		(Extension: 'M3GM';  StructID: 525; Description: 'Geometry';  IdentWin:($36,$E4,$78,$A0,$27,$00,$00,$00);  IdentMac:($36,$E4,$78,$A0,$27,$00,$00,$00)),
-		(Extension: 'GMAN';  StructID: 526; Description: 'Geometry Animation';  IdentWin:($A5,$F5,$72,$A6,$09,$00,$00,$00);  IdentMac:($A5,$F5,$72,$A6,$09,$00,$00,$00)),
-		(Extension: 'M3GA';  StructID: 527; Description: 'GeometryArray';  IdentWin:($B2,$20,$6B,$20,$05,$00,$00,$00);  IdentMac:($B2,$20,$6B,$20,$05,$00,$00,$00)),
-		(Extension: 'PLEA';  StructID: 528; Description: 'Plane Equation Array';  IdentWin:($38,$BC,$07,$00,$00,$00,$00,$00);  IdentMac:($38,$BC,$07,$00,$00,$00,$00,$00)),
-		(Extension: 'PNTA';  StructID: 529; Description: '3D Point Array';  IdentWin:($6C,$67,$37,$00,$00,$00,$00,$00);  IdentMac:($6C,$67,$37,$00,$00,$00,$00,$00)),
-		(Extension: 'QUDA';  StructID: 530; Description: 'Quad array';  IdentWin:($6A,$5E,$03,$00,$00,$00,$00,$00);  IdentMac:($6A,$5E,$03,$00,$00,$00,$00,$00)),
-		(Extension: 'TXCA';  StructID: 531; Description: 'Texture Coordinate Array';  IdentWin:($1A,$14,$09,$00,$00,$00,$00,$00);  IdentMac:($1A,$14,$09,$00,$00,$00,$00,$00)),
-		(Extension: 'TXMP';  StructID: 532; Description: 'Texture Map';  IdentWin:($81,$75,$18,$91,$08,$00,$00,$00);  IdentMac:($5F,$EB,$1E,$91,$08,$00,$00,$00)),
-		(Extension: 'TXAN';  StructID: 533; Description: 'Texture Map Animation';  IdentWin:($87,$43,$13,$8B,$0A,$00,$00,$00);  IdentMac:($87,$43,$13,$8B,$0A,$00,$00,$00)),
-		(Extension: 'TXMA';  StructID: 534; Description: 'Texture map array';  IdentWin:($90,$7F,$DE,$99,$05,$00,$00,$00);  IdentMac:($90,$7F,$DE,$99,$05,$00,$00,$00)),
-		(Extension: 'TXMB';  StructID: 535; Description: 'Texture Map Big';  IdentWin:($52,$6A,$16,$8B,$0A,$00,$00,$00);  IdentMac:($52,$6A,$16,$8B,$0A,$00,$00,$00)),
-		(Extension: 'TXPC';  StructID: 536; Description: 'Texture Procedure Data';  IdentWin:($7E,$A7,$0B,$00,$00,$00,$00,$00);  IdentMac:($7E,$A7,$0B,$00,$00,$00,$00,$00)),
-		(Extension: 'M3TA';  StructID: 537; Description: 'Triangle array';  IdentWin:($C1,$F7,$02,$00,$00,$00,$00,$00);  IdentMac:($C1,$F7,$02,$00,$00,$00,$00,$00)),
-		(Extension: 'VCRA';  StructID: 538; Description: '3D Vector Array';  IdentWin:($39,$47,$05,$00,$00,$00,$00,$00);  IdentMac:($39,$47,$05,$00,$00,$00,$00,$00)),
-		(Extension: 'Impt';  StructID: 539; Description: 'Impact';  IdentWin:($16,$4F,$04,$00,$00,$00,$00,$00);  IdentMac:($16,$4F,$04,$00,$00,$00,$00,$00)),
-		(Extension: 'Mtrl';  StructID: 540; Description: 'Material';  IdentWin:($0D,$8E,$02,$00,$00,$00,$00,$00);  IdentMac:($0D,$8E,$02,$00,$00,$00,$00,$00)),
-		(Extension: 'NMSA';  StructID: 541; Description: 'Network Spawn Point Array';  IdentWin:($9C,$09,$0C,$00,$00,$00,$00,$00);  IdentMac:($9C,$09,$0C,$00,$00,$00,$00,$00)),
-		(Extension: 'CONS';  StructID: 542; Description: 'Console';  IdentWin:($DD,$0B,$8B,$DA,$13,$00,$00,$00);  IdentMac:($DD,$0B,$8B,$DA,$13,$00,$00,$00)),
-		(Extension: 'DOOR';  StructID: 543; Description: 'Door';  IdentWin:($67,$FD,$72,$31,$06,$00,$00,$00);  IdentMac:($67,$FD,$72,$31,$06,$00,$00,$00)),
-		(Extension: 'OFGA';  StructID: 544; Description: 'Object Furn Geom Array';  IdentWin:($62,$C3,$FA,$74,$13,$00,$00,$00);  IdentMac:($62,$C3,$FA,$74,$13,$00,$00,$00)),
-		(Extension: 'OBLS';  StructID: 545; Description: 'Object LS Data';  IdentWin:($3D,$70,$0B,$00,$00,$00,$00,$00);  IdentMac:($3D,$70,$0B,$00,$00,$00,$00,$00)),
-		(Extension: 'TRIG';  StructID: 546; Description: 'Trigger';  IdentWin:($2C,$CD,$D0,$DC,$21,$00,$00,$00);  IdentMac:($2C,$CD,$D0,$DC,$21,$00,$00,$00)),
-		(Extension: 'TRGE';  StructID: 547; Description: 'Trigger Emitter';  IdentWin:($3C,$B9,$A6,$71,$08,$00,$00,$00);  IdentMac:($3C,$B9,$A6,$71,$08,$00,$00,$00)),
-		(Extension: 'TURR';  StructID: 548; Description: 'Turret';  IdentWin:($BE,$05,$58,$C8,$49,$00,$00,$00);  IdentMac:($BE,$05,$58,$C8,$49,$00,$00,$00)),
-		(Extension: 'OBAN';  StructID: 549; Description: 'Object animation';  IdentWin:($24,$0C,$4E,$00,$00,$00,$00,$00);  IdentMac:($24,$0C,$4E,$00,$00,$00,$00,$00)),
-		(Extension: 'OBDC';  StructID: 550; Description: 'Door class array';  IdentWin:($0B,$CA,$9E,$BD,$07,$00,$00,$00);  IdentMac:($0B,$CA,$9E,$BD,$07,$00,$00,$00)),
-		(Extension: 'OBOA';  StructID: 551; Description: 'Starting Object Array';  IdentWin:($E1,$86,$89,$4F,$13,$00,$00,$00);  IdentMac:($E1,$86,$89,$4F,$13,$00,$00,$00)),
-		(Extension: 'CBPI';  StructID: 552; Description: 'Character Body Part Impacts';  IdentWin:($C2,$D6,$F9,$0B,$0C,$00,$00,$00);  IdentMac:($C2,$D6,$F9,$0B,$0C,$00,$00,$00)),
-		(Extension: 'CBPM';  StructID: 553; Description: 'Character Body Part Material';  IdentWin:($1F,$35,$A4,$6B,$02,$00,$00,$00);  IdentMac:($1F,$35,$A4,$6B,$02,$00,$00,$00)),
-		(Extension: 'ONCC';  StructID: 554; Description: 'Oni Character Class';  IdentWin:($EF,$59,$C7,$AA,$A5,$04,$00,$00);  IdentMac:($EF,$59,$C7,$AA,$A5,$04,$00,$00)),
-		(Extension: 'ONIA';  StructID: 555; Description: 'Oni Character Impact Array';  IdentWin:($9A,$2F,$2B,$00,$00,$00,$00,$00);  IdentMac:($9A,$2F,$2B,$00,$00,$00,$00,$00)),
-		(Extension: 'ONCP';  StructID: 556; Description: 'Oni Character Particle Array';  IdentWin:($21,$73,$2F,$00,$00,$00,$00,$00);  IdentMac:($21,$73,$2F,$00,$00,$00,$00,$00)),
-		(Extension: 'ONCV';  StructID: 557; Description: 'Oni Character Variant';  IdentWin:($F5,$99,$02,$00,$00,$00,$00,$00);  IdentMac:($F5,$99,$02,$00,$00,$00,$00,$00)),
-		(Extension: 'CRSA';  StructID: 558; Description: 'Corpse Array';  IdentWin:($CC,$D4,$43,$15,$0C,$00,$00,$00);  IdentMac:($CC,$D4,$43,$15,$0C,$00,$00,$00)),
-		(Extension: 'DPge';  StructID: 559; Description: 'Diary Page';  IdentWin:($6B,$68,$8A,$BA,$07,$00,$00,$00);  IdentMac:($6B,$68,$8A,$BA,$07,$00,$00,$00)),
-		(Extension: 'FILM';  StructID: 560; Description: 'Film';  IdentWin:($AD,$62,$1B,$33,$0B,$00,$00,$00);  IdentMac:($AD,$62,$1B,$33,$0B,$00,$00,$00)),
-		(Extension: 'ONFA';  StructID: 561; Description: 'Imported Flag Node Array';  IdentWin:($E7,$0C,$1B,$00,$00,$00,$00,$00);  IdentMac:($E7,$0C,$1B,$00,$00,$00,$00,$00)),
-		(Extension: 'ONGS';  StructID: 562; Description: 'Oni Game Settings';  IdentWin:($B6,$EB,$26,$02,$00,$00,$00,$00);  IdentMac:($B6,$EB,$26,$02,$00,$00,$00,$00)),
-		(Extension: 'HPge';  StructID: 563; Description: 'Help Page';  IdentWin:($3B,$71,$2F,$4B,$04,$00,$00,$00);  IdentMac:($3B,$71,$2F,$4B,$04,$00,$00,$00)),
-		(Extension: 'IGHH';  StructID: 564; Description: 'IGUI HUD Help';  IdentWin:($DE,$58,$8E,$E5,$08,$00,$00,$00);  IdentMac:($DE,$58,$8E,$E5,$08,$00,$00,$00)),
-		(Extension: 'IGPG';  StructID: 565; Description: 'IGUI Page';  IdentWin:($7D,$88,$67,$CE,$11,$00,$00,$00);  IdentMac:($7D,$88,$67,$CE,$11,$00,$00,$00)),
-		(Extension: 'IGPA';  StructID: 566; Description: 'IGUI Page Array';  IdentWin:($05,$09,$BE,$DD,$04,$00,$00,$00);  IdentMac:($05,$09,$BE,$DD,$04,$00,$00,$00)),
-		(Extension: 'IGSt';  StructID: 567; Description: 'IGUI String';  IdentWin:($25,$77,$A4,$A2,$02,$00,$00,$00);  IdentMac:($25,$77,$A4,$A2,$02,$00,$00,$00)),
-		(Extension: 'IGSA';  StructID: 568; Description: 'IGUI String Array';  IdentWin:($08,$A4,$BE,$DD,$04,$00,$00,$00);  IdentMac:($08,$A4,$BE,$DD,$04,$00,$00,$00)),
-		(Extension: 'IPge';  StructID: 569; Description: 'Item Page';  IdentWin:($BA,$69,$83,$93,$02,$00,$00,$00);  IdentMac:($BA,$69,$83,$93,$02,$00,$00,$00)),
-		(Extension: 'KeyI';  StructID: 570; Description: 'Key Icons';  IdentWin:($AD,$57,$47,$3F,$40,$00,$00,$00);  IdentMac:($AD,$57,$47,$3F,$40,$00,$00,$00)),
-		(Extension: 'ONLV';  StructID: 571; Description: 'Oni Game Level';  IdentWin:($A3,$2E,$9A,$B7,$7D,$00,$00,$00);  IdentMac:($A3,$2E,$9A,$B7,$7D,$00,$00,$00)),
-		(Extension: 'ONLD';  StructID: 572; Description: 'Oni Game Level Descriptor';  IdentWin:($A1,$12,$04,$00,$00,$00,$00,$00);  IdentMac:($A1,$12,$04,$00,$00,$00,$00,$00)),
-		(Extension: 'ONMA';  StructID: 573; Description: 'Imported Marker Node Array';  IdentWin:($79,$47,$12,$00,$00,$00,$00,$00);  IdentMac:($79,$47,$12,$00,$00,$00,$00,$00)),
-		(Extension: 'ONOA';  StructID: 574; Description: 'Object Gunk Array';  IdentWin:($7C,$5C,$E7,$4B,$06,$00,$00,$00);  IdentMac:($7C,$5C,$E7,$4B,$06,$00,$00,$00)),
-		(Extension: 'OPge';  StructID: 575; Description: 'Objective Page';  IdentWin:($FB,$BB,$30,$4B,$04,$00,$00,$00);  IdentMac:($FB,$BB,$30,$4B,$04,$00,$00,$00)),
-		(Extension: 'ONSK';  StructID: 576; Description: 'Oni Sky class';  IdentWin:($67,$10,$26,$C2,$14,$00,$00,$00);  IdentMac:($67,$10,$26,$C2,$14,$00,$00,$00)),
-		(Extension: 'ONSA';  StructID: 577; Description: 'Imported Spawn Array';  IdentWin:($34,$46,$04,$00,$00,$00,$00,$00);  IdentMac:($34,$46,$04,$00,$00,$00,$00,$00)),
-		(Extension: 'TxtC';  StructID: 578; Description: 'Text Console';  IdentWin:($27,$8B,$AC,$B7,$01,$00,$00,$00);  IdentMac:($27,$8B,$AC,$B7,$01,$00,$00,$00)),
-		(Extension: 'ONTA';  StructID: 579; Description: 'Trigger Array';  IdentWin:($C0,$FC,$A0,$00,$00,$00,$00,$00);  IdentMac:($C0,$FC,$A0,$00,$00,$00,$00,$00)),
-		(Extension: 'ONVL';  StructID: 580; Description: 'Oni Variant List';  IdentWin:($8A,$C5,$34,$44,$05,$00,$00,$00);  IdentMac:($8A,$C5,$34,$44,$05,$00,$00,$00)),
-		(Extension: 'WPge';  StructID: 581; Description: 'Weapon Page';  IdentWin:($B5,$89,$58,$6F,$04,$00,$00,$00);  IdentMac:($B5,$89,$58,$6F,$04,$00,$00,$00)),
-		(Extension: 'OSBD';  StructID: 582; Description: 'Oni Sound Binary Data';  IdentWin:($6C,$DB,$00,$00,$00,$00,$00,$00);  IdentMac:($3C,$5E,$01,$00,$00,$00,$00,$00)),
-		(Extension: 'PSpc';  StructID: 583; Description: 'Part Specification';  IdentWin:($48,$26,$08,$00,$00,$00,$00,$00);  IdentMac:($48,$26,$08,$00,$00,$00,$00,$00)),
-		(Extension: 'PSpL';  StructID: 584; Description: 'Part Specification List';  IdentWin:($05,$CC,$0C,$00,$00,$00,$00,$00);  IdentMac:($05,$CC,$0C,$00,$00,$00,$00,$00)),
-		(Extension: 'PSUI';  StructID: 585; Description: 'Part Specifications UI';  IdentWin:($FB,$96,$4E,$54,$CD,$03,$00,$00);  IdentMac:($FB,$96,$4E,$54,$CD,$03,$00,$00)),
-		(Extension: 'SNDD';  StructID: 586; Description: 'Sound Data';  IdentWin:($78,$05,$37,$00,$00,$00,$00,$00);  IdentMac:($EB,$11,$04,$00,$00,$00,$00,$00)),
-		(Extension: 'SUBT';  StructID: 587; Description: 'Subtitle Array';  IdentWin:($68,$6C,$04,$00,$00,$00,$00,$00);  IdentMac:($68,$6C,$04,$00,$00,$00,$00,$00)),
-		(Extension: 'UUEA';  StructID: 588; Description: 'Error Binding Array';  IdentWin:($BC,$EE,$0A,$00,$00,$00,$00,$00);  IdentMac:($BC,$EE,$0A,$00,$00,$00,$00,$00)),
-		(Extension: 'TMFA';  StructID: 589; Description: 'Float Array';  IdentWin:($24,$53,$02,$00,$00,$00,$00,$00);  IdentMac:($24,$53,$02,$00,$00,$00,$00,$00)),
-		(Extension: 'IDXA';  StructID: 590; Description: 'Index Array';  IdentWin:($8F,$70,$02,$00,$00,$00,$00,$00);  IdentMac:($8F,$70,$02,$00,$00,$00,$00,$00)),
-		(Extension: 'TStr';  StructID: 591; Description: 'String';  IdentWin:($A0,$64,$00,$00,$00,$00,$00,$00);  IdentMac:($A0,$64,$00,$00,$00,$00,$00,$00)),
-		(Extension: 'StNA';  StructID: 592; Description: 'String Array';  IdentWin:($20,$B5,$8C,$99,$05,$00,$00,$00);  IdentMac:($20,$B5,$8C,$99,$05,$00,$00,$00)),
-		(Extension: 'TMRA';  StructID: 593; Description: 'Template Reference Array';  IdentWin:($21,$35,$07,$00,$00,$00,$00,$00);  IdentMac:($21,$35,$07,$00,$00,$00,$00,$00)),
-		(Extension: 'TRAS';  StructID: 594; Description: 'Totoro Aiming Screen';  IdentWin:($30,$A9,$21,$FA,$01,$00,$00,$00);  IdentMac:($30,$A9,$21,$FA,$01,$00,$00,$00)),
-		(Extension: 'TRAM';  StructID: 595; Description: 'Totoro Animation Sequence';  IdentWin:($18,$C9,$3C,$7E,$10,$00,$00,$00);  IdentMac:($18,$C9,$3C,$7E,$10,$00,$00,$00)),
-		(Extension: 'TRAC';  StructID: 596; Description: 'Animation Collection';  IdentWin:($2F,$FB,$E9,$26,$0F,$00,$00,$00);  IdentMac:($2F,$FB,$E9,$26,$0F,$00,$00,$00)),
-		(Extension: 'TRCM';  StructID: 597; Description: 'Totoro Quaternion Body';  IdentWin:($4E,$05,$DE,$92,$23,$00,$00,$00);  IdentMac:($4E,$05,$DE,$92,$23,$00,$00,$00)),
-		(Extension: 'TRBS';  StructID: 598; Description: 'Totoro Body Set';  IdentWin:($39,$42,$92,$A2,$02,$00,$00,$00);  IdentMac:($39,$42,$92,$A2,$02,$00,$00,$00)),
-		(Extension: 'TRMA';  StructID: 599; Description: 'Texture Map Array';  IdentWin:($57,$6D,$DE,$99,$05,$00,$00,$00);  IdentMac:($57,$6D,$DE,$99,$05,$00,$00,$00)),
-		(Extension: 'TRFT';  StructID: 600; Description: 'Totoro Facing Table';  IdentWin:($AF,$21,$02,$00,$00,$00,$00,$00);  IdentMac:($AF,$21,$02,$00,$00,$00,$00,$00)),
-		(Extension: 'TRGA';  StructID: 601; Description: 'Totoro Quaternion Body Geometry Array';  IdentWin:($F8,$20,$6B,$20,$05,$00,$00,$00);  IdentMac:($F8,$20,$6B,$20,$05,$00,$00,$00)),
-		(Extension: 'TRIA';  StructID: 602; Description: 'Totoro Quaternion Body Index Array';  IdentWin:($82,$C4,$0A,$00,$00,$00,$00,$00);  IdentMac:($82,$C4,$0A,$00,$00,$00,$00,$00)),
-		(Extension: 'TRSC';  StructID: 603; Description: 'Screen (aiming) Collection';  IdentWin:($17,$6B,$78,$99,$05,$00,$00,$00);  IdentMac:($17,$6B,$78,$99,$05,$00,$00,$00)),
-		(Extension: 'TRTA';  StructID: 604; Description: 'Totoro Quaternion Body Translation Array';  IdentWin:($E8,$59,$07,$00,$00,$00,$00,$00);  IdentMac:($E8,$59,$07,$00,$00,$00,$00,$00)),
-		(Extension: 'TSFT';  StructID: 605; Description: 'Font';  IdentWin:($EA,$DE,$91,$BA,$16,$00,$00,$00);  IdentMac:($EA,$DE,$91,$BA,$16,$00,$00,$00)),
-		(Extension: 'TSFF';  StructID: 606; Description: 'Font Family';  IdentWin:($8A,$48,$6C,$8A,$0A,$00,$00,$00);  IdentMac:($8A,$48,$6C,$8A,$0A,$00,$00,$00)),
-		(Extension: 'TSFL';  StructID: 607; Description: 'Font Language';  IdentWin:($29,$DE,$08,$00,$00,$00,$00,$00);  IdentMac:($29,$DE,$08,$00,$00,$00,$00,$00)),
-		(Extension: 'TSGA';  StructID: 608; Description: 'Glyph Array';  IdentWin:($98,$4E,$2A,$00,$00,$00,$00,$00);  IdentMac:($98,$4E,$2A,$00,$00,$00,$00,$00)),
-		(Extension: 'UVDL';  StructID: 609; Description: 'UV Data List';  IdentWin:($E5,$16,$0A,$00,$00,$00,$00,$00);  IdentMac:($E5,$16,$0A,$00,$00,$00,$00,$00)),
-		(Extension: 'WMCL';  StructID: 610; Description: 'WM Cursor List';  IdentWin:($76,$D0,$09,$00,$00,$00,$00,$00);  IdentMac:($76,$D0,$09,$00,$00,$00,$00,$00)),
-		(Extension: 'WMDD';  StructID: 611; Description: 'WM Dialog Data';  IdentWin:($C4,$F3,$1D,$00,$1C,$00,$00,$00);  IdentMac:($C4,$F3,$1D,$00,$1C,$00,$00,$00)),
-		(Extension: 'WMMB';  StructID: 612; Description: 'WM Menu Bar';  IdentWin:($37,$67,$0C,$D2,$06,$00,$00,$00);  IdentMac:($37,$67,$0C,$D2,$06,$00,$00,$00)),
-		(Extension: 'WMM_';  StructID: 613; Description: 'WM Menu';  IdentWin:($38,$1A,$0C,$00,$00,$00,$00,$00);  IdentMac:($38,$1A,$0C,$00,$00,$00,$00,$00)),
-		(Extension: 'ONWC';  StructID: 614; Description: 'Oni Weapon Class';  IdentWin:($B5,$EE,$E0,$A3,$93,$01,$00,$00);  IdentMac:($B5,$EE,$E0,$A3,$93,$01,$00,$00))
+		(Extension: 'AISA';  StructID: 501; Name: 'AI Character Setup Array';  IdentWin:($E9,$6B,$4C,$22,$2A,$00,$00,$00);  IdentMac:($E9,$6B,$4C,$22,$2A,$00,$00,$00)),
+		(Extension: 'AITR';  StructID: 502; Name: 'AI script trigger array';  IdentWin:($55,$EA,$1A,$00,$00,$00,$00,$00);  IdentMac:($55,$EA,$1A,$00,$00,$00,$00,$00)),
+		(Extension: 'AIWA';  StructID: 503; Name: 'AI Imported Waypoint Array';  IdentWin:($03,$7F,$10,$00,$00,$00,$00,$00);  IdentMac:($03,$7F,$10,$00,$00,$00,$00,$00)),
+		(Extension: 'AKAA';  StructID: 504; Name: 'Adjacency Array';  IdentWin:($77,$DE,$11,$00,$00,$00,$00,$00);  IdentMac:($77,$DE,$11,$00,$00,$00,$00,$00)),
+		(Extension: 'ABNA';  StructID: 505; Name: 'BSP tree node Array';  IdentWin:($A0,$6D,$12,$00,$00,$00,$00,$00);  IdentMac:($A0,$6D,$12,$00,$00,$00,$00,$00)),
+		(Extension: 'AKVA';  StructID: 506; Name: 'BNV Node Array';  IdentWin:($E0,$05,$DF,$00,$00,$00,$00,$00);  IdentMac:($E0,$05,$DF,$00,$00,$00,$00,$00)),
+		(Extension: 'AKBA';  StructID: 507; Name: 'Side Array';  IdentWin:($84,$28,$3A,$00,$00,$00,$00,$00);  IdentMac:($84,$28,$3A,$00,$00,$00,$00,$00)),
+		(Extension: 'AKBP';  StructID: 508; Name: 'BSP node Array';  IdentWin:($49,$F4,$0C,$00,$00,$00,$00,$00);  IdentMac:($49,$F4,$0C,$00,$00,$00,$00,$00)),
+		(Extension: 'AKDA';  StructID: 509; Name: 'Door Frame Array';  IdentWin:($64,$54,$2E,$00,$00,$00,$00,$00);  IdentMac:($64,$54,$2E,$00,$00,$00,$00,$00)),
+		(Extension: 'AKEV';  StructID: 510; Name: 'Akira Environment';  IdentWin:($75,$DE,$14,$30,$88,$00,$00,$00);  IdentMac:($75,$DE,$14,$30,$88,$00,$00,$00)),
+		(Extension: 'AGQC';  StructID: 511; Name: 'Gunk Quad Collision Array';  IdentWin:($91,$CB,$1C,$00,$00,$00,$00,$00);  IdentMac:($91,$CB,$1C,$00,$00,$00,$00,$00)),
+		(Extension: 'AGDB';  StructID: 512; Name: 'Gunk Quad Debug Array';  IdentWin:($17,$2E,$07,$00,$00,$00,$00,$00);  IdentMac:($17,$2E,$07,$00,$00,$00,$00,$00)),
+		(Extension: 'AGQG';  StructID: 513; Name: 'Gunk Quad General Array';  IdentWin:($D2,$03,$1C,$00,$00,$00,$00,$00);  IdentMac:($D2,$03,$1C,$00,$00,$00,$00,$00)),
+		(Extension: 'AGQM';  StructID: 514; Name: 'Gunk Quad Material';  IdentWin:($A6,$4A,$04,$00,$00,$00,$00,$00);  IdentMac:($A6,$4A,$04,$00,$00,$00,$00,$00)),
+		(Extension: 'AGQR';  StructID: 515; Name: 'Gunk Quad Render Array';  IdentWin:($3B,$3A,$08,$00,$00,$00,$00,$00);  IdentMac:($3B,$3A,$08,$00,$00,$00,$00,$00)),
+		(Extension: 'AKOT';  StructID: 516; Name: 'Oct tree';  IdentWin:($08,$DA,$B8,$E7,$11,$00,$00,$00);  IdentMac:($08,$DA,$B8,$E7,$11,$00,$00,$00)),
+		(Extension: 'OTIT';  StructID: 517; Name: 'Oct tree interior node Array';  IdentWin:($D2,$51,$0A,$00,$00,$00,$00,$00);  IdentMac:($D2,$51,$0A,$00,$00,$00,$00,$00)),
+		(Extension: 'OTLF';  StructID: 518; Name: 'Oct tree leaf node Array';  IdentWin:($0B,$AC,$1E,$00,$00,$00,$00,$00);  IdentMac:($0B,$AC,$1E,$00,$00,$00,$00,$00)),
+		(Extension: 'QTNA';  StructID: 519; Name: 'Quad tree node Array';  IdentWin:($CC,$6E,$06,$00,$00,$00,$00,$00);  IdentMac:($CC,$6E,$06,$00,$00,$00,$00,$00)),
+		(Extension: 'BINA';  StructID: 520; Name: 'Binary Data';  IdentWin:($41,$DB,$00,$00,$00,$00,$00,$00);  IdentMac:($11,$5E,$01,$00,$00,$00,$00,$00)),
+		(Extension: 'ENVP';  StructID: 521; Name: 'Env Particle Array';  IdentWin:($C3,$C1,$67,$00,$00,$00,$00,$00);  IdentMac:($C3,$C1,$67,$00,$00,$00,$00,$00)),
+		(Extension: 'FXLR';  StructID: 522; Name: 'FX Laser effect';  IdentWin:($A9,$F8,$83,$95,$06,$00,$00,$00);  IdentMac:($A9,$F8,$83,$95,$06,$00,$00,$00)),
+		(Extension: '3CLA';  StructID: 523; Name: 'RGB Color Array';  IdentWin:($BE,$E6,$04,$00,$00,$00,$00,$00);  IdentMac:($BE,$E6,$04,$00,$00,$00,$00,$00)),
+		(Extension: 'EDIA';  StructID: 524; Name: 'Edge Index Array';  IdentWin:($F7,$B6,$07,$00,$00,$00,$00,$00);  IdentMac:($F7,$B6,$07,$00,$00,$00,$00,$00)),
+		(Extension: 'M3GM';  StructID: 525; Name: 'Geometry';  IdentWin:($36,$E4,$78,$A0,$27,$00,$00,$00);  IdentMac:($36,$E4,$78,$A0,$27,$00,$00,$00)),
+		(Extension: 'GMAN';  StructID: 526; Name: 'Geometry Animation';  IdentWin:($A5,$F5,$72,$A6,$09,$00,$00,$00);  IdentMac:($A5,$F5,$72,$A6,$09,$00,$00,$00)),
+		(Extension: 'M3GA';  StructID: 527; Name: 'GeometryArray';  IdentWin:($B2,$20,$6B,$20,$05,$00,$00,$00);  IdentMac:($B2,$20,$6B,$20,$05,$00,$00,$00)),
+		(Extension: 'PLEA';  StructID: 528; Name: 'Plane Equation Array';  IdentWin:($38,$BC,$07,$00,$00,$00,$00,$00);  IdentMac:($38,$BC,$07,$00,$00,$00,$00,$00)),
+		(Extension: 'PNTA';  StructID: 529; Name: '3D Point Array';  IdentWin:($6C,$67,$37,$00,$00,$00,$00,$00);  IdentMac:($6C,$67,$37,$00,$00,$00,$00,$00)),
+		(Extension: 'QUDA';  StructID: 530; Name: 'Quad array';  IdentWin:($6A,$5E,$03,$00,$00,$00,$00,$00);  IdentMac:($6A,$5E,$03,$00,$00,$00,$00,$00)),
+		(Extension: 'TXCA';  StructID: 531; Name: 'Texture Coordinate Array';  IdentWin:($1A,$14,$09,$00,$00,$00,$00,$00);  IdentMac:($1A,$14,$09,$00,$00,$00,$00,$00)),
+		(Extension: 'TXMP';  StructID: 532; Name: 'Texture Map';  IdentWin:($81,$75,$18,$91,$08,$00,$00,$00);  IdentMac:($5F,$EB,$1E,$91,$08,$00,$00,$00)),
+		(Extension: 'TXAN';  StructID: 533; Name: 'Texture Map Animation';  IdentWin:($87,$43,$13,$8B,$0A,$00,$00,$00);  IdentMac:($87,$43,$13,$8B,$0A,$00,$00,$00)),
+		(Extension: 'TXMA';  StructID: 534; Name: 'Texture map array';  IdentWin:($90,$7F,$DE,$99,$05,$00,$00,$00);  IdentMac:($90,$7F,$DE,$99,$05,$00,$00,$00)),
+		(Extension: 'TXMB';  StructID: 535; Name: 'Texture Map Big';  IdentWin:($52,$6A,$16,$8B,$0A,$00,$00,$00);  IdentMac:($52,$6A,$16,$8B,$0A,$00,$00,$00)),
+		(Extension: 'TXPC';  StructID: 536; Name: 'Texture Procedure Data';  IdentWin:($7E,$A7,$0B,$00,$00,$00,$00,$00);  IdentMac:($7E,$A7,$0B,$00,$00,$00,$00,$00)),
+		(Extension: 'M3TA';  StructID: 537; Name: 'Triangle array';  IdentWin:($C1,$F7,$02,$00,$00,$00,$00,$00);  IdentMac:($C1,$F7,$02,$00,$00,$00,$00,$00)),
+		(Extension: 'VCRA';  StructID: 538; Name: '3D Vector Array';  IdentWin:($39,$47,$05,$00,$00,$00,$00,$00);  IdentMac:($39,$47,$05,$00,$00,$00,$00,$00)),
+		(Extension: 'Impt';  StructID: 539; Name: 'Impact';  IdentWin:($16,$4F,$04,$00,$00,$00,$00,$00);  IdentMac:($16,$4F,$04,$00,$00,$00,$00,$00)),
+		(Extension: 'Mtrl';  StructID: 540; Name: 'Material';  IdentWin:($0D,$8E,$02,$00,$00,$00,$00,$00);  IdentMac:($0D,$8E,$02,$00,$00,$00,$00,$00)),
+		(Extension: 'NMSA';  StructID: 541; Name: 'Network Spawn Point Array';  IdentWin:($9C,$09,$0C,$00,$00,$00,$00,$00);  IdentMac:($9C,$09,$0C,$00,$00,$00,$00,$00)),
+		(Extension: 'CONS';  StructID: 542; Name: 'Console';  IdentWin:($DD,$0B,$8B,$DA,$13,$00,$00,$00);  IdentMac:($DD,$0B,$8B,$DA,$13,$00,$00,$00)),
+		(Extension: 'DOOR';  StructID: 543; Name: 'Door';  IdentWin:($67,$FD,$72,$31,$06,$00,$00,$00);  IdentMac:($67,$FD,$72,$31,$06,$00,$00,$00)),
+		(Extension: 'OFGA';  StructID: 544; Name: 'Object Furn Geom Array';  IdentWin:($62,$C3,$FA,$74,$13,$00,$00,$00);  IdentMac:($62,$C3,$FA,$74,$13,$00,$00,$00)),
+		(Extension: 'OBLS';  StructID: 545; Name: 'Object LS Data';  IdentWin:($3D,$70,$0B,$00,$00,$00,$00,$00);  IdentMac:($3D,$70,$0B,$00,$00,$00,$00,$00)),
+		(Extension: 'TRIG';  StructID: 546; Name: 'Trigger';  IdentWin:($2C,$CD,$D0,$DC,$21,$00,$00,$00);  IdentMac:($2C,$CD,$D0,$DC,$21,$00,$00,$00)),
+		(Extension: 'TRGE';  StructID: 547; Name: 'Trigger Emitter';  IdentWin:($3C,$B9,$A6,$71,$08,$00,$00,$00);  IdentMac:($3C,$B9,$A6,$71,$08,$00,$00,$00)),
+		(Extension: 'TURR';  StructID: 548; Name: 'Turret';  IdentWin:($BE,$05,$58,$C8,$49,$00,$00,$00);  IdentMac:($BE,$05,$58,$C8,$49,$00,$00,$00)),
+		(Extension: 'OBAN';  StructID: 549; Name: 'Object animation';  IdentWin:($24,$0C,$4E,$00,$00,$00,$00,$00);  IdentMac:($24,$0C,$4E,$00,$00,$00,$00,$00)),
+		(Extension: 'OBDC';  StructID: 550; Name: 'Door class array';  IdentWin:($0B,$CA,$9E,$BD,$07,$00,$00,$00);  IdentMac:($0B,$CA,$9E,$BD,$07,$00,$00,$00)),
+		(Extension: 'OBOA';  StructID: 551; Name: 'Starting Object Array';  IdentWin:($E1,$86,$89,$4F,$13,$00,$00,$00);  IdentMac:($E1,$86,$89,$4F,$13,$00,$00,$00)),
+		(Extension: 'CBPI';  StructID: 552; Name: 'Character Body Part Impacts';  IdentWin:($C2,$D6,$F9,$0B,$0C,$00,$00,$00);  IdentMac:($C2,$D6,$F9,$0B,$0C,$00,$00,$00)),
+		(Extension: 'CBPM';  StructID: 553; Name: 'Character Body Part Material';  IdentWin:($1F,$35,$A4,$6B,$02,$00,$00,$00);  IdentMac:($1F,$35,$A4,$6B,$02,$00,$00,$00)),
+		(Extension: 'ONCC';  StructID: 554; Name: 'Oni Character Class';  IdentWin:($EF,$59,$C7,$AA,$A5,$04,$00,$00);  IdentMac:($EF,$59,$C7,$AA,$A5,$04,$00,$00)),
+		(Extension: 'ONIA';  StructID: 555; Name: 'Oni Character Impact Array';  IdentWin:($9A,$2F,$2B,$00,$00,$00,$00,$00);  IdentMac:($9A,$2F,$2B,$00,$00,$00,$00,$00)),
+		(Extension: 'ONCP';  StructID: 556; Name: 'Oni Character Particle Array';  IdentWin:($21,$73,$2F,$00,$00,$00,$00,$00);  IdentMac:($21,$73,$2F,$00,$00,$00,$00,$00)),
+		(Extension: 'ONCV';  StructID: 557; Name: 'Oni Character Variant';  IdentWin:($F5,$99,$02,$00,$00,$00,$00,$00);  IdentMac:($F5,$99,$02,$00,$00,$00,$00,$00)),
+		(Extension: 'CRSA';  StructID: 558; Name: 'Corpse Array';  IdentWin:($CC,$D4,$43,$15,$0C,$00,$00,$00);  IdentMac:($CC,$D4,$43,$15,$0C,$00,$00,$00)),
+		(Extension: 'DPge';  StructID: 559; Name: 'Diary Page';  IdentWin:($6B,$68,$8A,$BA,$07,$00,$00,$00);  IdentMac:($6B,$68,$8A,$BA,$07,$00,$00,$00)),
+		(Extension: 'FILM';  StructID: 560; Name: 'Film';  IdentWin:($AD,$62,$1B,$33,$0B,$00,$00,$00);  IdentMac:($AD,$62,$1B,$33,$0B,$00,$00,$00)),
+		(Extension: 'ONFA';  StructID: 561; Name: 'Imported Flag Node Array';  IdentWin:($E7,$0C,$1B,$00,$00,$00,$00,$00);  IdentMac:($E7,$0C,$1B,$00,$00,$00,$00,$00)),
+		(Extension: 'ONGS';  StructID: 562; Name: 'Oni Game Settings';  IdentWin:($B6,$EB,$26,$02,$00,$00,$00,$00);  IdentMac:($B6,$EB,$26,$02,$00,$00,$00,$00)),
+		(Extension: 'HPge';  StructID: 563; Name: 'Help Page';  IdentWin:($3B,$71,$2F,$4B,$04,$00,$00,$00);  IdentMac:($3B,$71,$2F,$4B,$04,$00,$00,$00)),
+		(Extension: 'IGHH';  StructID: 564; Name: 'IGUI HUD Help';  IdentWin:($DE,$58,$8E,$E5,$08,$00,$00,$00);  IdentMac:($DE,$58,$8E,$E5,$08,$00,$00,$00)),
+		(Extension: 'IGPG';  StructID: 565; Name: 'IGUI Page';  IdentWin:($7D,$88,$67,$CE,$11,$00,$00,$00);  IdentMac:($7D,$88,$67,$CE,$11,$00,$00,$00)),
+		(Extension: 'IGPA';  StructID: 566; Name: 'IGUI Page Array';  IdentWin:($05,$09,$BE,$DD,$04,$00,$00,$00);  IdentMac:($05,$09,$BE,$DD,$04,$00,$00,$00)),
+		(Extension: 'IGSt';  StructID: 567; Name: 'IGUI String';  IdentWin:($25,$77,$A4,$A2,$02,$00,$00,$00);  IdentMac:($25,$77,$A4,$A2,$02,$00,$00,$00)),
+		(Extension: 'IGSA';  StructID: 568; Name: 'IGUI String Array';  IdentWin:($08,$A4,$BE,$DD,$04,$00,$00,$00);  IdentMac:($08,$A4,$BE,$DD,$04,$00,$00,$00)),
+		(Extension: 'IPge';  StructID: 569; Name: 'Item Page';  IdentWin:($BA,$69,$83,$93,$02,$00,$00,$00);  IdentMac:($BA,$69,$83,$93,$02,$00,$00,$00)),
+		(Extension: 'KeyI';  StructID: 570; Name: 'Key Icons';  IdentWin:($AD,$57,$47,$3F,$40,$00,$00,$00);  IdentMac:($AD,$57,$47,$3F,$40,$00,$00,$00)),
+		(Extension: 'ONLV';  StructID: 571; Name: 'Oni Game Level';  IdentWin:($A3,$2E,$9A,$B7,$7D,$00,$00,$00);  IdentMac:($A3,$2E,$9A,$B7,$7D,$00,$00,$00)),
+		(Extension: 'ONLD';  StructID: 572; Name: 'Oni Game Level Descriptor';  IdentWin:($A1,$12,$04,$00,$00,$00,$00,$00);  IdentMac:($A1,$12,$04,$00,$00,$00,$00,$00)),
+		(Extension: 'ONMA';  StructID: 573; Name: 'Imported Marker Node Array';  IdentWin:($79,$47,$12,$00,$00,$00,$00,$00);  IdentMac:($79,$47,$12,$00,$00,$00,$00,$00)),
+		(Extension: 'ONOA';  StructID: 574; Name: 'Object Gunk Array';  IdentWin:($7C,$5C,$E7,$4B,$06,$00,$00,$00);  IdentMac:($7C,$5C,$E7,$4B,$06,$00,$00,$00)),
+		(Extension: 'OPge';  StructID: 575; Name: 'Objective Page';  IdentWin:($FB,$BB,$30,$4B,$04,$00,$00,$00);  IdentMac:($FB,$BB,$30,$4B,$04,$00,$00,$00)),
+		(Extension: 'ONSK';  StructID: 576; Name: 'Oni Sky class';  IdentWin:($67,$10,$26,$C2,$14,$00,$00,$00);  IdentMac:($67,$10,$26,$C2,$14,$00,$00,$00)),
+		(Extension: 'ONSA';  StructID: 577; Name: 'Imported Spawn Array';  IdentWin:($34,$46,$04,$00,$00,$00,$00,$00);  IdentMac:($34,$46,$04,$00,$00,$00,$00,$00)),
+		(Extension: 'TxtC';  StructID: 578; Name: 'Text Console';  IdentWin:($27,$8B,$AC,$B7,$01,$00,$00,$00);  IdentMac:($27,$8B,$AC,$B7,$01,$00,$00,$00)),
+		(Extension: 'ONTA';  StructID: 579; Name: 'Trigger Array';  IdentWin:($C0,$FC,$A0,$00,$00,$00,$00,$00);  IdentMac:($C0,$FC,$A0,$00,$00,$00,$00,$00)),
+		(Extension: 'ONVL';  StructID: 580; Name: 'Oni Variant List';  IdentWin:($8A,$C5,$34,$44,$05,$00,$00,$00);  IdentMac:($8A,$C5,$34,$44,$05,$00,$00,$00)),
+		(Extension: 'WPge';  StructID: 581; Name: 'Weapon Page';  IdentWin:($B5,$89,$58,$6F,$04,$00,$00,$00);  IdentMac:($B5,$89,$58,$6F,$04,$00,$00,$00)),
+		(Extension: 'OSBD';  StructID: 582; Name: 'Oni Sound Binary Data';  IdentWin:($6C,$DB,$00,$00,$00,$00,$00,$00);  IdentMac:($3C,$5E,$01,$00,$00,$00,$00,$00)),
+		(Extension: 'PSpc';  StructID: 583; Name: 'Part Specification';  IdentWin:($48,$26,$08,$00,$00,$00,$00,$00);  IdentMac:($48,$26,$08,$00,$00,$00,$00,$00)),
+		(Extension: 'PSpL';  StructID: 584; Name: 'Part Specification List';  IdentWin:($05,$CC,$0C,$00,$00,$00,$00,$00);  IdentMac:($05,$CC,$0C,$00,$00,$00,$00,$00)),
+		(Extension: 'PSUI';  StructID: 585; Name: 'Part Specifications UI';  IdentWin:($FB,$96,$4E,$54,$CD,$03,$00,$00);  IdentMac:($FB,$96,$4E,$54,$CD,$03,$00,$00)),
+		(Extension: 'SNDD';  StructID: 586; Name: 'Sound Data';  IdentWin:($78,$05,$37,$00,$00,$00,$00,$00);  IdentMac:($EB,$11,$04,$00,$00,$00,$00,$00)),
+		(Extension: 'SUBT';  StructID: 587; Name: 'Subtitle Array';  IdentWin:($68,$6C,$04,$00,$00,$00,$00,$00);  IdentMac:($68,$6C,$04,$00,$00,$00,$00,$00)),
+		(Extension: 'UUEA';  StructID: 588; Name: 'Error Binding Array';  IdentWin:($BC,$EE,$0A,$00,$00,$00,$00,$00);  IdentMac:($BC,$EE,$0A,$00,$00,$00,$00,$00)),
+		(Extension: 'TMFA';  StructID: 589; Name: 'Float Array';  IdentWin:($24,$53,$02,$00,$00,$00,$00,$00);  IdentMac:($24,$53,$02,$00,$00,$00,$00,$00)),
+		(Extension: 'IDXA';  StructID: 590; Name: 'Index Array';  IdentWin:($8F,$70,$02,$00,$00,$00,$00,$00);  IdentMac:($8F,$70,$02,$00,$00,$00,$00,$00)),
+		(Extension: 'TStr';  StructID: 591; Name: 'String';  IdentWin:($A0,$64,$00,$00,$00,$00,$00,$00);  IdentMac:($A0,$64,$00,$00,$00,$00,$00,$00)),
+		(Extension: 'StNA';  StructID: 592; Name: 'String Array';  IdentWin:($20,$B5,$8C,$99,$05,$00,$00,$00);  IdentMac:($20,$B5,$8C,$99,$05,$00,$00,$00)),
+		(Extension: 'TMRA';  StructID: 593; Name: 'Template Reference Array';  IdentWin:($21,$35,$07,$00,$00,$00,$00,$00);  IdentMac:($21,$35,$07,$00,$00,$00,$00,$00)),
+		(Extension: 'TRAS';  StructID: 594; Name: 'Totoro Aiming Screen';  IdentWin:($30,$A9,$21,$FA,$01,$00,$00,$00);  IdentMac:($30,$A9,$21,$FA,$01,$00,$00,$00)),
+		(Extension: 'TRAM';  StructID: 595; Name: 'Totoro Animation Sequence';  IdentWin:($18,$C9,$3C,$7E,$10,$00,$00,$00);  IdentMac:($18,$C9,$3C,$7E,$10,$00,$00,$00)),
+		(Extension: 'TRAC';  StructID: 596; Name: 'Animation Collection';  IdentWin:($2F,$FB,$E9,$26,$0F,$00,$00,$00);  IdentMac:($2F,$FB,$E9,$26,$0F,$00,$00,$00)),
+		(Extension: 'TRCM';  StructID: 597; Name: 'Totoro Quaternion Body';  IdentWin:($4E,$05,$DE,$92,$23,$00,$00,$00);  IdentMac:($4E,$05,$DE,$92,$23,$00,$00,$00)),
+		(Extension: 'TRBS';  StructID: 598; Name: 'Totoro Body Set';  IdentWin:($39,$42,$92,$A2,$02,$00,$00,$00);  IdentMac:($39,$42,$92,$A2,$02,$00,$00,$00)),
+		(Extension: 'TRMA';  StructID: 599; Name: 'Texture Map Array';  IdentWin:($57,$6D,$DE,$99,$05,$00,$00,$00);  IdentMac:($57,$6D,$DE,$99,$05,$00,$00,$00)),
+		(Extension: 'TRFT';  StructID: 600; Name: 'Totoro Facing Table';  IdentWin:($AF,$21,$02,$00,$00,$00,$00,$00);  IdentMac:($AF,$21,$02,$00,$00,$00,$00,$00)),
+		(Extension: 'TRGA';  StructID: 601; Name: 'Totoro Quaternion Body Geometry Array';  IdentWin:($F8,$20,$6B,$20,$05,$00,$00,$00);  IdentMac:($F8,$20,$6B,$20,$05,$00,$00,$00)),
+		(Extension: 'TRIA';  StructID: 602; Name: 'Totoro Quaternion Body Index Array';  IdentWin:($82,$C4,$0A,$00,$00,$00,$00,$00);  IdentMac:($82,$C4,$0A,$00,$00,$00,$00,$00)),
+		(Extension: 'TRSC';  StructID: 603; Name: 'Screen (aiming) Collection';  IdentWin:($17,$6B,$78,$99,$05,$00,$00,$00);  IdentMac:($17,$6B,$78,$99,$05,$00,$00,$00)),
+		(Extension: 'TRTA';  StructID: 604; Name: 'Totoro Quaternion Body Translation Array';  IdentWin:($E8,$59,$07,$00,$00,$00,$00,$00);  IdentMac:($E8,$59,$07,$00,$00,$00,$00,$00)),
+		(Extension: 'TSFT';  StructID: 605; Name: 'Font';  IdentWin:($EA,$DE,$91,$BA,$16,$00,$00,$00);  IdentMac:($EA,$DE,$91,$BA,$16,$00,$00,$00)),
+		(Extension: 'TSFF';  StructID: 606; Name: 'Font Family';  IdentWin:($8A,$48,$6C,$8A,$0A,$00,$00,$00);  IdentMac:($8A,$48,$6C,$8A,$0A,$00,$00,$00)),
+		(Extension: 'TSFL';  StructID: 607; Name: 'Font Language';  IdentWin:($29,$DE,$08,$00,$00,$00,$00,$00);  IdentMac:($29,$DE,$08,$00,$00,$00,$00,$00)),
+		(Extension: 'TSGA';  StructID: 608; Name: 'Glyph Array';  IdentWin:($98,$4E,$2A,$00,$00,$00,$00,$00);  IdentMac:($98,$4E,$2A,$00,$00,$00,$00,$00)),
+		(Extension: 'UVDL';  StructID: 609; Name: 'UV Data List';  IdentWin:($E5,$16,$0A,$00,$00,$00,$00,$00);  IdentMac:($E5,$16,$0A,$00,$00,$00,$00,$00)),
+		(Extension: 'WMCL';  StructID: 610; Name: 'WM Cursor List';  IdentWin:($76,$D0,$09,$00,$00,$00,$00,$00);  IdentMac:($76,$D0,$09,$00,$00,$00,$00,$00)),
+		(Extension: 'WMDD';  StructID: 611; Name: 'WM Dialog Data';  IdentWin:($C4,$F3,$1D,$00,$1C,$00,$00,$00);  IdentMac:($C4,$F3,$1D,$00,$1C,$00,$00,$00)),
+		(Extension: 'WMMB';  StructID: 612; Name: 'WM Menu Bar';  IdentWin:($37,$67,$0C,$D2,$06,$00,$00,$00);  IdentMac:($37,$67,$0C,$D2,$06,$00,$00,$00)),
+		(Extension: 'WMM_';  StructID: 613; Name: 'WM Menu';  IdentWin:($38,$1A,$0C,$00,$00,$00,$00,$00);  IdentMac:($38,$1A,$0C,$00,$00,$00,$00,$00)),
+		(Extension: 'ONWC';  StructID: 614; Name: 'Oni Weapon Class';  IdentWin:($B5,$EE,$E0,$A3,$93,$01,$00,$00);  IdentMac:($B5,$EE,$E0,$A3,$93,$01,$00,$00))
 	);
 
Index: oup/current/Global/Exporters.pas
===================================================================
--- oup/current/Global/Exporters.pas	(revision 112)
+++ oup/current/Global/Exporters.pas	(revision 113)
@@ -74,5 +74,5 @@
     for i := 0 to High(ExportHandlers) do
       if ExportHandlers[i].Ext = fileinfo.Extension then
-        ExportHandlers[i].Handler(ConnectionID, FileID, filename);
+        Result := ExportHandlers[i].Handler(ConnectionID, FileID, filename);
 end;
 
Index: oup/current/Global/Functions.pas
===================================================================
--- oup/current/Global/Functions.pas	(revision 112)
+++ oup/current/Global/Functions.pas	(revision 113)
@@ -6,5 +6,4 @@
 
 function BoolToStr(bool: Boolean): String;
-function HexToLong(hex: String): LongWord;
 function Decode_Int(buffer: TByteData): LongWord;
 function Encode_Int(input: LongWord): TByteData;
@@ -14,4 +13,5 @@
 function DataToBin(Data: TByteData): String;
 function BinToInt(bin: String): Byte;
+function MakeDatLink(FileID: Integer): Integer;
 
 function StringSmaller(string1, string2: String): Boolean;
@@ -46,35 +46,4 @@
   else
     Result := 'false';
-end;
-
-
-function HexToLong(hex: String): LongWord;
-
-  function NormalizeHexString(var hex: String): Boolean;
-  var
-    i: Byte;
-  begin
-    Result := True;
-    if hex[1] = '$' then
-    begin
-      for i := 1 to Length(hex) - 1 do
-        hex[i] := hex[i + 1];
-      SetLength(hex, Length(hex) - 1);
-    end;
-    if (hex[1] = '0') and (UpCase(hex[2]) = 'X') then
-    begin
-      for i := 1 to Length(hex) - 2 do
-        hex[i] := hex[i + 2];
-      SetLength(hex, Length(hex) - 2);
-    end;
-    if Length(hex) = 0 then
-      Result := False;
-  end;
-
-begin
-  if NormalizeHexString(hex) then
-    Result := StrToInt(hex)
-  else
-    Result := 0;
 end;
 
@@ -167,4 +136,10 @@
     Add := Add shl 1;
   end;
+end;
+
+
+function MakeDatLink(FileID: Integer): Integer;
+begin
+  Result := FileID * 256 + 1;
 end;
 
Index: oup/current/Global/OniImgClass.pas
===================================================================
--- oup/current/Global/OniImgClass.pas	(revision 112)
+++ oup/current/Global/OniImgClass.pas	(revision 113)
@@ -141,5 +141,5 @@
     SetLength(tempd, Self.FWidth * Self.FHeight * 4);
     case Self.FStoreType of
-      0:
+      0: // 16bit, RGB444, A4?
       begin
         for y := 0 to Self.FHeight - 1 do
@@ -160,5 +160,5 @@
         end;
       end;
-      1, 2:
+      1, 2: // 16bit, RGB555, A1?
       begin
         for y := 0 to Self.FHeight - 1 do
@@ -179,5 +179,7 @@
         end;
       end;
-      9:
+      8: // 32bit, RGB888, A8?
+      begin end;
+      9: // Compressed, RGB565
       begin
         DecompressImage;
@@ -310,5 +312,4 @@
 var
   FileInfo: TFileInfo;
-  ext:      String;
 begin
   FileInfo := ConManager.Connection[ConnectionID].GetFileInfo(fileid);
@@ -620,5 +621,4 @@
 procedure TOniImage.GetAsData(var Target: TStream);
 var
-  i:      Integer;
   revert: Boolean;
 begin
Index: oup/current/Global/RawList.pas
===================================================================
--- oup/current/Global/RawList.pas	(revision 112)
+++ oup/current/Global/RawList.pas	(revision 113)
@@ -1,6 +1,4 @@
 unit RawList;
-
 interface
-
 uses TypeDefs;
 
@@ -143,6 +141,4 @@
   baselink, lastlink: Integer;
   links: Integer;
-  j, k:  Integer;
-//  Data:  TByteData;
   Data:  TStream;
 begin
Index: oup/current/Global/TypeDefs.pas
===================================================================
--- oup/current/Global/TypeDefs.pas	(revision 112)
+++ oup/current/Global/TypeDefs.pas	(revision 113)
@@ -21,8 +21,12 @@
       SM_IncompatibleDBVersion,
       SM_UnknownError
-  ); 
+  );
+
+  TDatOSIdent = array[0..3] of Byte;
+  TDatGlobalIdent = array[0..15] of Byte;
 
   THeader = packed record
-    Ident:      array[0..$13] of Byte;
+    OSIdent:    TDatOSIdent;
+    GlobalIdent:TDatGlobalIdent;
     Files:      Integer;
     NamedFiles: Integer;
@@ -48,9 +52,9 @@
 	TTypeIdent = array[0..7] of Byte;
 	TFileType = record
-		Extension:   String[4];
-		StructID:    Integer;
-    Description: String;
-		IdentWin:    TTypeIdent;
-    IdentMac:    TTypeIdent;
+		Extension: String[4];
+		StructID:  Integer;
+    Name:      String;
+		IdentWin:  TTypeIdent;
+    IdentMac:  TTypeIdent;
 	end;
 
@@ -123,4 +127,11 @@
       ByID: array of TLinkByID;
   end;
+
+  TDatLink = record
+      SrcOffset: Integer;
+      DestID:    Integer;
+      PosDestExts:   String;
+  end;
+  TDatLinkList = array of TDatLink;
  
 {
Index: oup/current/Helper/LevelDB.pas
===================================================================
--- oup/current/Helper/LevelDB.pas	(revision 112)
+++ oup/current/Helper/LevelDB.pas	(revision 113)
@@ -1,6 +1,4 @@
 unit LevelDB;
-
 interface
-
 uses
   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
@@ -28,9 +26,7 @@
 
 implementation
-
 {$R *.dfm}
-
 uses ABSMain, ABSDecUtil, Main,
-    ConnectionManager, TypeDefs, DataAccess, OniImgClass;
+    ConnectionManager, TypeDefs, DataAccess, OniImgClass, Data;
 
 type
@@ -70,12 +66,8 @@
   Stream_Dat, Stream_Raw, Stream_Sep: TFileStream;
 
-//  FileCount: Integer;
-//  temps, temps2: String;
 //  Data, rawdata: Tdata;
   BeginTime, FileTime: Double;
   Step:     Integer;
 //  rawlist:  TRawDataList;
-//  extlist:  TExtensionsMap;
-//  fileinfo: TFileInfo;
 //  datlinks: TDatLinks;
   OniImage:   TOniImage;
@@ -89,4 +81,8 @@
   Strings:    TStrings;
   i, j:       Integer;
+  temps:      String;
+  FileInfo:   TFileInfo;
+
+  DatFileStream, RawFileStream: TMemoryStream;
 const
   Steps: Byte = 3;
@@ -209,11 +205,18 @@
   end;
 
-  
-  extlist := OniDataConnection.GetExtendedExtensionsList;
-  for i := 0 to High(DatHeader.Ident) do
-    DatHeader.Ident[i] := OniDataConnection.LevelInfo.Ident[i];
-  DatHeader.Files := OniDataConnection.GetFilesCount;
+  for i := 0 to High(DatHeader.OSIdent) do
+    case Connection.DataOS of
+      DOS_WIN: DatHeader.OSIdent[i] := HeaderOSIdentWin[i];
+      DOS_MAC: DatHeader.OSIdent[i] := HeaderOSIdentMac[i];
+      DOS_MACBETA: DatHeader.OSIdent[i] := HeaderOSIdentMacBeta[i];
+    end;
+  for i := 0 to High(DatHeader.GlobalIdent) do
+    DatHeader.GlobalIdent[i] := HeaderGlobalIdent[i];
+  DatHeader.Files := Connection.GetFileCount;
   DatHeader.NamedFiles := Length(NamedFilesHeader);
-  DatHeader.Extensions := Length(extlist);
+
+  Strings := Connection.GetExtensionsList(EF_ExtCount);
+
+  DatHeader.Extensions := Strings.Count;
   DatHeader.DataAddr   := 0;
   DatHeader.DataSize   := 0;
@@ -227,22 +230,36 @@
 
   DoStep('Writing extensions-header');
-  progress.Max := Length(OniDataConnection.GetExtensionsList);
+  progress.Max := Strings.Count;
   Application.ProcessMessages;
-
-  for i := 0 to High(ExtensionsHeader) do
-  begin
-    ExtensionsHeader[i].Ident     := extlist[i].Ident;
-    ExtensionsHeader[i].Extension := extlist[i].Extension;
-    SetLength(temps, 4);
+  for i := 0 to Strings.Count - 1 do
+  begin
+    temps := Strings.Strings[i];
+    ExtensionsHeader[i].ExtCount := StrToInt( MidStr(
+            temps,
+            Pos('(', temps) + 1,
+            Pos(')', temps) - Pos('(', temps) - 1 ) );
+    temps := MidStr(temps, 1, 4);
     for j := 0 to 3 do
-      temps[j + 1] := ExtensionsHeader[i].Extension[3 - j];
-    ExtensionsHeader[i].ExtCount :=
-      Length(OniDataConnection.GetFilesList(temps, '', False, stIDAsc));
+      ExtensionsHeader[i].Extension[j] := temps[4-j];
+    for j := 0 to High(FileTypes) do
+      if FileTypes[j].Extension = temps then
+        Break;
+    if j < Length(FileTypes) then
+    begin
+      case Connection.DataOS of
+        DOS_WIN:     ExtensionsHeader[i].Ident := FileTypes[j].IdentWin;
+        DOS_WINDEMO: ExtensionsHeader[i].Ident := FileTypes[j].IdentMac;
+        DOS_MAC:     ExtensionsHeader[i].Ident := FileTypes[j].IdentMac;
+        DOS_MACBETA: ExtensionsHeader[i].Ident := FileTypes[j].IdentMac;
+      end;
+    end else begin
+      ShowMessage('Unknown Extension: ' + Strings.Strings[i]);
+      Exit;
+    end;
     progress.Position    := i + 1;
     lbl_progress.Caption := 'Extensions done: ' + IntToStr(i + 1) + '/' +
-      IntToStr(Length(extlist));
+      IntToStr(Strings.Count);
     Application.ProcessMessages;
   end;
-
 
   DoStep('Storing files-data');
@@ -253,19 +270,18 @@
   Application.ProcessMessages;
 
-  begintime := Time;
+  FileTime := Time;
   for i := 0 to DatHeader.Files - 1 do
   begin
-    fileinfo := OniDataConnection.GetFileInfo(i);
+    FileInfo := Connection.GetFileInfo(i);
     for j := 0 to 3 do
-      FilesHeader[i].Extension[j] := fileinfo.Extension[4 - j];
-    if fileinfo.Size > 0 then
+      FilesHeader[i].Extension[j] := FileInfo.Extension[4 - j];
+    if FileInfo.Size > 0 then
     begin
       //        DatLinks:=;
       FilesHeader[i].DataAddr := Stream_Body.Size + 8;
-      Data    := OniDataConnection.LoadDatFile(i);
-      Data[4] := (levelid) and $FF;
-      Data[5] := (levelid shr 8) and $FF;
-      Data[6] := (levelid shr 16) and $FF;
-      Data[7] := (levelid shr 24) and $FF;
+      DatFileStream := TMemoryStream.Create;
+      Connection.LoadDatFile(i, DatFileStream);
+      DatFileStream.Seek(4, soFromBeginning);
+      DatFileStream.Write(LevelID, 4);
 
       if (Pos(UpperCase(fileinfo.Extension), UpperCase(raws)) mod 4) = 1 then
@@ -337,5 +353,5 @@
     if ((i mod 10) = 0) and (i >= 100) then
       lbl_estimation.Caption := 'Estimated time left: ' + TimeToStr(
-        (Time - begintime) / i * (progress.Max - i + 1) * 1.1, timeformat );
+        (Time - FileTime) / i * (progress.Max - i + 1) * 1.1, TimeFormat );
     progress.Position := i + 1;
     lbl_progress.Caption := 'Files done: ' + IntToStr(i + 1) + '/' + IntToStr(progress.Max);
@@ -373,5 +389,5 @@
   lbl_progress.Caption   := 'Files done: ' + IntToStr(progress.Max) + '/' +
     IntToStr(progress.Max);
-  lbl_estimation.Caption := 'FINISHED (duration: ' + TimeToStr(Time - absolutebegintime, timeformat) + ')';
+  lbl_estimation.Caption := 'FINISHED (duration: ' + TimeToStr(Time - Begintime, TimeFormat) + ')';
 
   DoStep('FIN');
Index: oup/current/Main.pas
===================================================================
--- oup/current/Main.pas	(revision 112)
+++ oup/current/Main.pas	(revision 113)
@@ -170,4 +170,5 @@
   toolform: TForm_ToolTemplate;
 begin
+  Result := True;
   if MDITab.MDIChildCount > 0 then
   begin
@@ -180,5 +181,8 @@
         begin
           if not toolform.Closeable then
-            ShowMessage('Can not close toolwindow: ' + toolform.Caption); 
+          begin
+            ShowMessage('Can not close toolwindow: ' + toolform.Caption);
+            Result := False;
+          end;
         end; 
       end;
@@ -235,6 +239,4 @@
 
 procedure TForm_Main.FormCreate(Sender: TObject);
-var
-  RepMsg: TStatusMessages;
 begin
   Self.Caption := 'Oni Un/Packer ' + version;
@@ -441,5 +443,4 @@
   mode: TTBItemDisplayMode;
   i: Integer;
-  isEnabled: Boolean;
 begin
   toolbar := TTBToolbar(Sender);
@@ -674,5 +675,4 @@
 var
   name: String;
-  i: Integer;
   index: Integer;
   RepMsg: TStatusMessages;
@@ -743,4 +743,6 @@
   iconindex := -1;
   caption_end := IntToStr(tag) + '       ';
+
+  toolform := nil;
 
   if window_context = 'binedit' then
Index: oup/current/OniUnPacker.bdsproj
===================================================================
--- oup/current/OniUnPacker.bdsproj	(revision 112)
+++ oup/current/OniUnPacker.bdsproj	(revision 113)
@@ -176,5 +176,8 @@
 			<Language Name="ProjectLang">$00000000</Language>
 			<Language Name="RootDir"></Language>
-		</Language>  <Excluded_Packages>
+		</Language>  
+    
+    
+    <Excluded_Packages>
       <Excluded_Packages Name="d:\programme\borland\bds\3.0\Bin\dbwebxprt.bpl">Borland Web Wizard Package</Excluded_Packages>
     </Excluded_Packages>
Index: oup/current/OniUnPacker.dpr
===================================================================
--- oup/current/OniUnPacker.dpr	(revision 112)
+++ oup/current/OniUnPacker.dpr	(revision 113)
@@ -26,5 +26,6 @@
   Extractor in 'Tools\Extractor.pas' {Form_Extractor},
   TxmpReplace in 'Tools\TxmpReplace.pas' {Form_TxmpReplace},
-  WhatLinksHere in 'Helper\WhatLinksHere.pas' {Form_WhatLinksHere};
+  WhatLinksHere in 'Helper\WhatLinksHere.pas' {Form_WhatLinksHere},
+  DatLinks in 'Global\DatLinks.pas';
 
 {$R *.res}
Index: oup/current/Tools/BinEdit.pas
===================================================================
--- oup/current/Tools/BinEdit.pas	(revision 112)
+++ oup/current/Tools/BinEdit.pas	(revision 113)
@@ -140,5 +140,4 @@
 var
   mem:  TMemoryStream;
-  Data: TByteData;
 begin
   if ConID <> -1 then
@@ -183,4 +182,5 @@
   Data: TByteData;
   i:    Word;
+  tempi: Integer;
   floatformat: TFormatSettings;
 begin
@@ -218,8 +218,17 @@
       Result := IntToBin(hex.Data[offset]);
     11:
-      Result := '0x' + IntToHex(ConManager.Connection[ConID].GetRawInfo(fileid, offset).RawAddr, 8);
+    begin
+      tempi := ConManager.Connection[ConID].GetRawInfo(fileid, offset).RawAddr;
+      if tempi >= 0 then
+        Result := '0x' + IntToHex(tempi, 8)
+      else
+        Result := 'unused';
+    end;
     12:
-      Result := FormatNumber(hex.Data[offset + 1] + hex.Data[offset + 2] * 256 +
-        hex.Data[offset + 3] * 256 * 256, 5, '0');
+      if hex.Data[offset] = 1 then
+        Result := FormatNumber(hex.Data[offset + 1] + hex.Data[offset + 2] * 256 +
+          hex.Data[offset + 3] * 256 * 256, 5, '0')
+      else
+        Result := 'no link';
     13:
       Result := IntToStr(hex.Data[offset]);
@@ -308,6 +317,6 @@
               if Pos('#', SubName) > 0 then
               begin
-                Data.Offset  := HexToLong(MidStr(SubName, Pos('#', SubName) + 1, 8));
-                Data.Value   :=
+                Data.Offset  := StrToInt('$'+MidStr(SubName, Pos('#', SubName) + 1, 8));
+                Data.Value   := '$' +
                   MidStr(SubName, PosEx('#', SubName, Pos('#', SubName) + 1) + 1, 8);
                 Data.Caption := MidStr(SubName, 1, Pos('#', SubName) - 1);
@@ -749,10 +758,10 @@
     else
     begin
-      if nodedata.DataType = 11 then
+      if (nodedata.DataType = 11) and (nodedata.Value <> 'unused') then
       begin
         if ConManager.Connection[ConID].GetRawInfo(fileid, nodedata.offset).RawSize > 0 then
           Form_Main.open_child('rawedit', ConID, fileid);
       end;
-      if nodedata.DataType = 12 then
+      if (nodedata.DataType = 12) and (nodedata.Value <> 'no link') then
       begin
         if (StrToInt(nodedata.Value) < ConManager.Connection[ConID].GetFileCount) and
@@ -794,5 +803,5 @@
   begin
     hex.SelStart := Data.Offset;
-    hex.SelEnd   := Data.Offset + HexToLong(Data.Value) - 1;
+    hex.SelEnd   := Data.Offset + StrToInt(Data.Value) - 1;
   end;
 end;
@@ -825,5 +834,5 @@
           CellText := Data.Value //GetValue(data.DataType, data.Offset)
         else if Length(Data.Value) > 0 then
-          CellText := IntToStr(HexToLong(Data.Value)) + ' Bytes';
+          CellText := IntToStr(StrToInt(Data.Value)) + ' Bytes';
       4:
         CellText := Data.Description;
Index: oup/current/Tools/RawEdit.pas
===================================================================
--- oup/current/Tools/RawEdit.pas	(revision 112)
+++ oup/current/Tools/RawEdit.pas	(revision 113)
@@ -54,5 +54,5 @@
     procedure hexChange(Sender: TObject);
   private
-    ConID, fileid, datoffset: Integer;
+    fileid, datoffset: Integer;
   public
   end;
@@ -115,5 +115,5 @@
     for i := 0 to filelist.Count - 1 do
     begin
-      if ConManager.Connection[ConID].ExtractFileIDOfName(filelist.Items.Strings[i]) = Raw_Info.SrcID then
+      if ConManager.Connection[ConnectionID].ExtractFileIDOfName(filelist.Items.Strings[i]) = Raw_Info.SrcID then
       begin
         filelist.ItemIndex := i;
@@ -132,5 +132,5 @@
   end;
   mem := nil;
-  ConManager.Connection[ConID].LoadRawFile(raw_info.SrcID, raw_info.SrcOffset, TStream(mem));
+  ConManager.Connection[ConnectionID].LoadRawFile(raw_info.SrcID, raw_info.SrcOffset, TStream(mem));
   hex.LoadFromStream(mem);
   ClearValues;
@@ -148,5 +148,5 @@
   datoffset := StrToInt('$' + MidStr(
     list_offset.Items.Strings[list_offset.ItemIndex], 3, 8));
-  LoadRaw(ConManager.Connection[ConID].GetRawInfo(fileid, datoffset));
+  LoadRaw(ConManager.Connection[ConnectionID].GetRawInfo(fileid, datoffset));
 end;
 
@@ -391,5 +391,5 @@
 begin
   case MessageBox(Self.Handle, PChar('Save changes to .raw-part of file ' +
-      ConManager.Connection[ConID].GetFileInfo(fileid).Name + '?'), PChar('Data changed...'),
+      ConManager.Connection[ConnectionID].GetFileInfo(fileid).Name + '?'), PChar('Data changed...'),
       MB_YESNOCANCEL) of
     idYes:
@@ -398,5 +398,5 @@
       hex.SaveToStream(mem);
       mem.Seek(0, soFromBeginning);
-      ConManager.Connection[ConID].UpdateRawFile(fileid, datoffset, mem);
+      ConManager.Connection[ConnectionID].UpdateRawFile(fileid, datoffset, mem);
       mem.Free;
       hex.Modified := False;
@@ -506,8 +506,8 @@
 begin
   saved.Filter     := 'Files of matching extension (*.' +
-    ConManager.Connection[ConID].GetFileInfo(fileid).Extension + ')|*.' +
-    ConManager.Connection[ConID].GetFileInfo(fileid).Extension +
+    ConManager.Connection[ConnectionID].GetFileInfo(fileid).Extension + ')|*.' +
+    ConManager.Connection[ConnectionID].GetFileInfo(fileid).Extension +
     '|All files|*.*';
-  saved.DefaultExt := ConManager.Connection[ConID].GetFileInfo(fileid).Extension;
+  saved.DefaultExt := ConManager.Connection[ConnectionID].GetFileInfo(fileid).Extension;
   if saved.Execute then
   begin
@@ -525,11 +525,10 @@
 //  Data: Tdata;
   fs:   TFileStream;
-  data: TByteData;
   i: Integer;
   rawinfo: TRawDataInfo;
 begin
   opend.Filter := 'Files of matching extension (*.' +
-    ConManager.Connection[ConID].GetFileInfo(fileid).Extension + ')|*.' +
-    ConManager.Connection[ConID].GetFileInfo(fileid).Extension +
+    ConManager.Connection[ConnectionID].GetFileInfo(fileid).Extension + ')|*.' +
+    ConManager.Connection[ConnectionID].GetFileInfo(fileid).Extension +
     '|All files|*.*';
   if opend.Execute then
@@ -538,5 +537,5 @@
     if fs.Size <> hex.DataSize then
     begin
-      if (not (CR_ResizeRaw in ConManager.Connection[ConID].ChangeRights)) and (not (CR_AppendRaw in ConManager.Connection[ConnectionID].ChangeRights)) then
+      if (not (CR_ResizeRaw in ConManager.Connection[ConnectionID].ChangeRights)) and (not (CR_AppendRaw in ConManager.Connection[ConnectionID].ChangeRights)) then
       begin
         ShowMessage('Can''t import ' + ExtractFilename(importd.FileName) +
@@ -558,12 +557,12 @@
         end;
       end;
-      rawinfo := ConManager.Connection[ConID].GetRawInfo(fileid, datoffset);
-      if CR_ResizeRaw in ConManager.Connection[ConID].ChangeRights then
-        ConManager.Connection[ConID].UpdateRawFile(fileid, datoffset, fs)
-      else if CR_AppendRaw in ConManager.Connection[ConID].ChangeRights then
-        i := ConManager.Connection[ConID].AppendRawFile(rawinfo.LocSep, fs);
-        ConManager.Connection[ConID].UpdateDatFilePart(fileid, datoffset, 4, @i);
+      rawinfo := ConManager.Connection[ConnectionID].GetRawInfo(fileid, datoffset);
+      if CR_ResizeRaw in ConManager.Connection[ConnectionID].ChangeRights then
+        ConManager.Connection[ConnectionID].UpdateRawFile(fileid, datoffset, fs)
+      else if CR_AppendRaw in ConManager.Connection[ConnectionID].ChangeRights then
+        i := ConManager.Connection[ConnectionID].AppendRawFile(rawinfo.LocSep, fs);
+        ConManager.Connection[ConnectionID].UpdateDatFilePart(fileid, datoffset, 4, @i);
     end else begin
-      ConManager.Connection[ConID].UpdateRawFile(fileid, datoffset, fs);
+      ConManager.Connection[ConnectionID].UpdateRawFile(fileid, datoffset, fs);
     end;
     fs.Seek(0, soFromBeginning);
Index: oup/current/Tools/Template.pas
===================================================================
--- oup/current/Tools/Template.pas	(revision 112)
+++ oup/current/Tools/Template.pas	(revision 113)
@@ -153,4 +153,5 @@
     combo_extension.Items.Add('_All files_ (' +
       IntToStr(ConManager.Connection[FConnectionID].GetFileCount) + ')');
+    exts := nil;
     exts := ConManager.Connection[FConnectionID].GetExtensionsList(EF_ExtCount);
     for i := 0 to exts.Count - 1 do
@@ -177,5 +178,4 @@
   pattern: String;
   files: TStrings;
-  i: Integer;
 begin
   if FConnectionID > -1 then
@@ -192,4 +192,5 @@
         Extension := '';
 
+    files := nil;
     files := ConManager.Connection[FConnectionID].GetFilesList(extension, pattern, no_zero_bytes, FSortBy);
 
@@ -283,6 +284,4 @@
 var
   name: String;
-  nstart, nend: Integer;
-  i: Integer;
 begin
   if combo_connection.ItemIndex >= 0 then
