Index: oup/current/Global/RawList.pas
===================================================================
--- oup/current/Global/RawList.pas	(revision 221)
+++ oup/current/Global/RawList.pas	(revision 222)
@@ -44,4 +44,5 @@
   for i := 0 to links - 1 do
   begin
+    Result[i].Name := '<TBD>';
     Result[i].SrcOffset := $20 + i * 4;
     ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $20 + i * 4, 4, @link);
@@ -65,4 +66,5 @@
   for i := 0 to links - 1 do
   begin
+    Result[i].Name := '<TBD>';
     Result[i].SrcOffset := $20 + i * $74 + $24;
     ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $20 + i * $74 + $24, 4, @link);
@@ -85,4 +87,5 @@
   ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $08, 4, @datasize);
   SetLength(Result, 1);
+  Result[0].Name := 'BinaryData';
   Result[0].SrcOffset := $0C;
   Result[0].RawAddr   := link;
@@ -102,4 +105,5 @@
   ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $0C, 4, @link);
   SetLength(Result, 1);
+  Result[0].Name := 'SoundBinaryData';
   Result[0].SrcOffset := $0C;
   Result[0].RawAddr   := link;
@@ -129,4 +133,5 @@
     Result[0].SrcOffset := $44;
   end;
+  Result[0].Name := 'SoundData';
   Result[0].RawAddr := link;
   Result[0].RawSize := datasize;
@@ -170,4 +175,5 @@
     begin
       SetLength(Result, 1);
+      Result[0].Name      := 'Subtitles';
       Result[0].SrcID     := FileID;
       Result[0].SrcOffset := $18;
@@ -196,17 +202,20 @@
   SetLength(Result, 13);
   ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $16C, 2, @frames);
-  {x-z-pos}
+  {y-pos}
   ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $0C, 4, @link);
+  Result[0].Name      := 'y-pos';
   Result[0].SrcOffset := $0C;
   Result[0].RawAddr   := link;
-  Result[0].RawSize := frames * 4;
-  {y-pos}
+  Result[0].RawSize   := frames * 4;
+  {x-z-pos}
   ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $10, 4, @link);
+  Result[1].Name      := 'x-z-pos';
   Result[1].SrcOffset := $10;
   Result[1].RawAddr   := link;
-  Result[1].RawSize := frames * 8;
+  Result[1].RawSize   := frames * 8;
   {attacks}
   ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $182, 1, @tempb);
   ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $14, 4, @link);
+  Result[2].Name      := 'Attacks';
   Result[2].SrcOffset := $14;
   Result[2].RawAddr   := link;
@@ -215,4 +224,5 @@
   ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $183, 1, @tempb);
   ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $18, 4, @link);
+  Result[3].Name      := 'Damage';
   Result[3].SrcOffset := $18;
   Result[3].RawAddr   := link;
@@ -221,4 +231,5 @@
   ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $184, 1, @tempb);
   ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $1C, 4, @link);
+  Result[4].Name      := 'MotionBlur';
   Result[4].SrcOffset := $1C;
   Result[4].RawAddr   := link;
@@ -227,4 +238,5 @@
   ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $185, 1, @tempb);
   ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $20, 4, @link);
+  Result[5].Name      := 'Shortcut';
   Result[5].SrcOffset := $20;
   Result[5].RawAddr   := link;
@@ -232,4 +244,5 @@
   {throw}
   ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $24, 4, @link);
+  Result[6].Name      := 'Throw';
   Result[6].SrcOffset := $24;
   Result[6].RawAddr   := link;
@@ -238,4 +251,5 @@
   ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $186, 1, @tempb);
   ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $28, 4, @link);
+  Result[7].Name      := 'Footstep';
   Result[7].SrcOffset := $28;
   Result[7].RawAddr   := link;
@@ -244,4 +258,5 @@
   ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $187, 1, @tempb);
   ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $2C, 4, @link);
+  Result[8].Name      := 'Particle';
   Result[8].SrcOffset := $2C;
   Result[8].RawAddr   := link;
@@ -249,10 +264,12 @@
   {position}
   ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $30, 4, @link);
+  Result[9].Name      := 'Position';
   Result[9].SrcOffset := $30;
   Result[9].RawAddr   := link;
   Result[9].RawSize   := frames * 8;
-  {particle}
+  {sound}
   ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $154, 2, @tempw);
   ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $38, 4, @link);
+  Result[11].Name      := 'Sound';
   Result[11].SrcOffset := $38;
   Result[11].RawAddr   := link;
@@ -261,4 +278,5 @@
   ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $138, 4, @templ);
   ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $13C, 4, @link);
+  Result[12].Name      := 'Extent';
   Result[12].SrcOffset := $13C;
   Result[12].RawAddr   := link;
@@ -291,4 +309,5 @@
     end;
   end;
+  Result[10].Name      := 'BodyParts Animation';
   Result[10].SrcOffset := $34;
   Result[10].RawAddr   := link;
@@ -351,4 +370,5 @@
     Result[0].RawAddr   := link_mac;
   end;
+  Result[0].Name    := 'ImageData';
   Result[0].RawSize := datasize;
   Result[0].LocSep  := not (ConManager.Connection[ConnectionID].DataOS = DOS_WIN);
@@ -365,4 +385,5 @@
 begin
   RawList          := GetRawList(ConnectionID, FileID);
+  Result.Name      := '';
   Result.SrcID     := -1;
   Result.SrcOffset := -1;
@@ -375,4 +396,5 @@
       if RawList[i].SrcOffset = DatOffset then
       begin
+        Result.Name      := RawList[i].Name;
         Result.SrcID     := FileID;
         Result.SrcOffset := RawList[i].SrcOffset;
Index: oup/current/Global/TypeDefs.pas
===================================================================
--- oup/current/Global/TypeDefs.pas	(revision 221)
+++ oup/current/Global/TypeDefs.pas	(revision 222)
@@ -76,4 +76,5 @@
 
   TRawDataInfo = record
+      Name:          String;
       SrcID:         Integer;
       SrcOffset:     Integer;
Index: oup/current/Helper/WhatLinksHere.dfm
===================================================================
--- oup/current/Helper/WhatLinksHere.dfm	(revision 221)
+++ oup/current/Helper/WhatLinksHere.dfm	(revision 222)
@@ -70,8 +70,4 @@
       TabOrder = 0
       OnDblClick = list_fromDblClick
-      ExplicitLeft = 38
-      ExplicitTop = 65
-      ExplicitWidth = 415
-      ExplicitHeight = 84
     end
   end
@@ -116,8 +112,4 @@
       TabOrder = 0
       OnDblClick = list_fromDblClick
-      ExplicitLeft = -230
-      ExplicitTop = -43
-      ExplicitWidth = 415
-      ExplicitHeight = 84
     end
   end
Index: oup/current/Helper/WhatLinksHere.pas
===================================================================
--- oup/current/Helper/WhatLinksHere.pas	(revision 221)
+++ oup/current/Helper/WhatLinksHere.pas	(revision 222)
@@ -3,5 +3,5 @@
 uses
   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
-  Dialogs, StdCtrls, Template, ExtCtrls;
+  Dialogs, StdCtrls, _TemplateFile, ExtCtrls;
 
 type
@@ -19,5 +19,5 @@
   private
   public
-    SenderForm: TForm_ToolTemplate;
+    SenderForm: TForm_TemplateFile;
     ConID: Integer;
     FileID: Integer;
Index: oup/current/Main.dfm
===================================================================
--- oup/current/Main.dfm	(revision 221)
+++ oup/current/Main.dfm	(revision 222)
@@ -43,5 +43,4 @@
       end>
     ParentBiDiMode = False
-    ExplicitWidth = 742
   end
   object DockTop: TTBDock
@@ -50,5 +49,4 @@
     Width = 842
     Height = 75
-    ExplicitWidth = 742
     object MainMenu: TTBToolbar
       Left = 0
@@ -359,5 +357,4 @@
     Height = 470
     Position = dpRight
-    ExplicitLeft = 733
   end
   object DockBottom: TTBDock
@@ -367,5 +364,4 @@
     Height = 9
     Position = dpBottom
-    ExplicitWidth = 742
   end
   object opend: TOpenDialog
Index: oup/current/Main.pas
===================================================================
--- oup/current/Main.pas	(revision 221)
+++ oup/current/Main.pas	(revision 222)
@@ -7,6 +7,7 @@
   MDITab, TB2Item, TB2Dock, TB2Toolbar, TB2MDI, OneInst,
   Data, TypeDefs, ConnectionManager,
-  Functions, Settings, Template,
-  RawEdit, BinEdit, Extractor, Preview, TxmpReplace;
+  Functions, Settings,
+  RawEdit, BinEdit, Extractor, Preview, TxmpReplace,
+  _BaseTemplate, _TemplateFile, _TemplateFileList;
 
 type
@@ -108,5 +109,4 @@
     procedure menu_previewClick(Sender: TObject);
     procedure menu_metaClick(Sender: TObject);
-    function open_child(window_context: String; connection, fileid: Integer): TForm_ToolTemplate;
 
     procedure menu_windows_cascadeClick(Sender: TObject);
@@ -127,4 +127,7 @@
   private
   public
+    function open_child(window_context: String; Connection, FileID: Integer): TForm_BaseTemplate; overload;
+    function open_child(window_context: String; Connection: Integer): TForm_BaseTemplate; overload;
+    function open_child(window_context: String): TForm_BaseTemplate; overload;
     procedure DefaultHandler(var Message); override;
   end;
@@ -168,5 +171,5 @@
 var
   i: Integer;
-  toolform: TForm_ToolTemplate;
+  toolform: TForm_BaseTemplate;
 begin
   Result := True;
@@ -175,7 +178,7 @@
     for i := 0 to MDITab.MDIChildCount - 1 do
     begin
-      if MDITab.MDIChildren[i] is TForm_ToolTemplate then
+      if MDITab.MDIChildren[i] is TForm_BaseTemplate then
       begin
-        toolform := TForm_ToolTemplate(MDITab.MDIChildren[i]);
+        toolform := TForm_BaseTemplate(MDITab.MDIChildren[i]);
         if toolform.ConnectionID = ConManager.ConnectionByIndex[index].ConnectionID then
         begin
@@ -323,5 +326,5 @@
   tabIndex: Integer;
   hint: String;
-  tool: TForm_ToolTemplate;
+  tool: TForm_BaseTemplate;
 begin
   pt.X := X;
@@ -332,19 +335,22 @@
   if tabIndex >= 0 then
   begin
-    if MDITab.MDIChildren[tabIndex] is TForm_ToolTemplate then
+    if MDITab.MDIChildren[tabIndex] is TForm_BaseTemplate then
     begin
-      tool := TForm_ToolTemplate(MDITab.MDIChildren[tabIndex]);
+      tool := TForm_BaseTemplate(MDITab.MDIChildren[tabIndex]);
       if tool.ConnectionID > -1 then
         hint := 'Connection: ' +
-              ExtractFileName(ConManager.Connection[tool.ConnectionID].FileName) + #13+#10
+              ExtractFileName(ConManager.Connection[tool.ConnectionID].FileName)
       else
-        hint := 'Connection: none' + #13+#10;
-      if tool.SelectedFile.ID > -1 then
-        hint := hint + 'Selected File: ' +
-              FormatNumber(tool.SelectedFile.ID, 5, '0') + '-' +
-              tool.SelectedFile.Name + '.' +
-              tool.SelectedFile.Extension
-      else
-        hint := hint + 'Selected File: none';
+        hint := 'Connection: none';
+      if tool is TForm_TemplateFile then
+      begin
+        if TForm_TemplateFile(tool).SelectedFile.ID > -1 then
+          hint := hint + #13+#10 + 'Selected File: ' +
+                FormatNumber(TForm_TemplateFile(tool).SelectedFile.ID, 5, '0') + '-' +
+                TForm_TemplateFile(tool).SelectedFile.Name + '.' +
+                TForm_TemplateFile(tool).SelectedFile.Extension
+        else
+          hint := hint + #13+#10 + 'Selected File: none';
+      end;
     end
     else
@@ -481,6 +487,6 @@
   if MDITab.MDIChildCount > 0 then
     for i := 0 to MDITab.MDIChildCount - 1 do
-      if MDITab.MDIChildren[i] is TForm_ToolTemplate then
-        TForm_ToolTemplate(MDITab.MDIChildren[i]).UpdateConList;
+      if MDITab.MDIChildren[i] is TForm_BaseTemplate then
+        TForm_BaseTemplate(MDITab.MDIChildren[i]).UpdateConList;
 
   menu_conns.Clear;
@@ -553,6 +559,4 @@
 procedure TForm_Main.menu_createdbClick(Sender: TObject);
 begin
-//  ShowMessage('Not yet usable');
-
   opend.Filter     := 'Oni-Dat-Files|*.dat';
   saved.Filter     := 'OUP-Level-DB (*.oldb)|*.oldb';
@@ -566,6 +570,4 @@
 procedure TForm_Main.menu_createlvlClick(Sender: TObject);
 begin
-//  ShowMessage('Not yet usable');
-
   opend.Filter     := 'OUP-Level-DB (*.oldb)|*.oldb';
   saved.Filter     := 'Oni-Dat-Files|*.dat';
@@ -582,60 +584,35 @@
 procedure TForm_Main.menu_previewClick(Sender: TObject);
 begin
-  open_child('preview', -1, -1);
+  open_child('preview');
 end;
 
 procedure TForm_Main.menu_bineditClick(Sender: TObject);
 begin
-  open_child('binedit', -1, -1);
+  open_child('binedit');
 end;
 
 procedure TForm_Main.menu_raweditClick(Sender: TObject);
 begin
-  open_child('rawedit', -1, -1);
+  open_child('rawedit');
 end;
 
 procedure TForm_Main.menu_txmpreplaceClick(Sender: TObject);
 begin
-  open_child('txmpreplace', -1, -1);
+  open_child('txmpreplace');
 end;
 
 procedure TForm_Main.menu_extractorClick(Sender: TObject);
 begin
-  open_child('extractor', -1, -1);
+  open_child('extractor');
 end;
 
 procedure TForm_Main.menu_metaClick(Sender: TObject);
-var
-  toolform:    TForm_Meta;
-  i:           Integer;
-  tag:         Integer;
-  iconindex:   Integer;
-begin
-  tag := 1;
-  if MDIChildCount > 0 then
-    for i := 0 to MDIChildCount - 1 do
-      if MDIChildren[i].Tag >= tag then
-        tag := MDIChildren[i].Tag + 1;
-
-  iconindex := -1;
-
-  toolform := nil;
-
-  toolform         := TForm_Meta.Create(Self);
-  toolform.Caption := 'MetaEditor' + ' ' + IntToStr(tag) + '       ';
-  iconindex        := 11;
-
-  if Assigned(toolform) then
-  begin
-    toolform.Name    := 'meta' + IntToStr(tag);
-    toolform.Tag     := tag;
-    MDITab.AddTab(TForm(toolform), iconindex);
-    toolform.Caption := AnsiReplaceStr(toolform.Caption, '       ', '');
-  end;
+begin
+  open_child('meta');
 end;
 
 procedure TForm_Main.menu_filecompareClick(Sender: TObject);
 begin
-  open_child('compare', -1, -1);
+  open_child('compare');
 end;
 
@@ -706,5 +683,4 @@
   RepMsg: TStatusMessages;
 begin
-//  name := TTBItem(Sender).Caption;
   index := TTBItem(Sender).Parent.IndexOf(TTBItem(Sender));
   name := ExtractFileName(ConManager.ConnectionByIndex[index].FileName);
@@ -753,7 +729,7 @@
 
 
-function TForm_Main.open_child(window_context: String; connection, fileid: Integer): TForm_ToolTemplate;
+function TForm_Main.open_child(window_context: String; connection, fileid: Integer): TForm_BaseTemplate;
 type
-  TTemplate = class of TForm_ToolTemplate;
+  TTemplate = class of TForm_BaseTemplate;
   TTool = record
       name: String;
@@ -768,8 +744,9 @@
     (name: 'preview';     icon: 4; caption: 'Preview-Window';     classt: TForm_Preview),
     (name: 'rawedit';     icon: 6; caption: 'Binary .raw-Editor'; classt: TForm_RawEdit),
-    (name: 'txmpreplace'; icon: 7; caption: 'TXMP Replacer';      classt: TForm_TxmpReplace)
+//    (name: 'txmpreplace'; icon: 7; caption: 'TXMP Replacer';      classt: TForm_TxmpReplace),
+    (name: 'meta'; icon: 11; caption: 'MetaEditor'; classt: TForm_Meta)
   );
 var
-  toolform:    TForm_ToolTemplate;
+  toolform:    TForm_BaseTemplate;
   i:           Integer;
   tag:         Integer;
@@ -806,9 +783,9 @@
     MDITab.AddTab(TForm(toolform), iconindex);
     toolform.Caption := AnsiReplaceStr(toolform.Caption, '       ', '');
-    if connection > -1 then
+    if Connection > -1 then
     begin
       toolform.SelectConnection(connection);
-      if fileid > -1 then
-        toolform.SelectFileID(connection, fileid);
+      if (FileID > -1) and (toolform is TForm_TemplateFile) then
+        TForm_TemplateFile(toolform).SelectFileID(Connection, FileID);
     end;
     Result := toolform;
@@ -816,3 +793,13 @@
 end;
 
+function TForm_Main.open_child(window_context: String; Connection: Integer): TForm_BaseTemplate;
+begin
+  open_child(window_context, Connection, -1);
+end;
+
+function TForm_Main.open_child(window_context: String): TForm_BaseTemplate;
+begin
+  open_child(window_context, -1, -1);
+end;
+
 end.
Index: oup/current/OniUnPacker.bdsproj
===================================================================
--- oup/current/OniUnPacker.bdsproj	(revision 221)
+++ oup/current/OniUnPacker.bdsproj	(revision 222)
@@ -179,4 +179,5 @@
     
     
+    
     <Excluded_Packages>
       <Excluded_Packages Name="d:\programme\borland\bds\3.0\Bin\dbwebxprt.bpl">Borland Web Wizard Package</Excluded_Packages>
Index: oup/current/OniUnPacker.dpr
===================================================================
--- oup/current/OniUnPacker.dpr	(revision 221)
+++ oup/current/OniUnPacker.dpr	(revision 222)
@@ -15,5 +15,4 @@
   Settings in 'Settings.pas' {Form_Settings},
   Template in 'Tools\Template.pas' {Form_ToolTemplate},
-  Preview in 'Tools\Preview.pas' {Form_Preview},
   OniImgClass in 'Global\OniImgClass.pas',
   Functions in 'Global\Functions.pas',
@@ -22,7 +21,4 @@
   Exporters in 'Global\Exporters.pas',
   ValueEdit in 'Helper\ValueEdit.pas' {Form_ValueEdit},
-  BinEdit in 'Tools\BinEdit.pas' {Form_BinEdit},
-  RawEdit in 'Tools\RawEdit.pas' {Form_RawEdit},
-  Extractor in 'Tools\Extractor.pas' {Form_Extractor},
   TxmpReplace in 'Tools\TxmpReplace.pas' {Form_TxmpReplace},
   WhatLinksHere in 'Helper\WhatLinksHere.pas' {Form_WhatLinksHere},
@@ -33,5 +29,4 @@
   Img_DDSTypes in 'Global\Img_DDSTypes.pas',
   TXMP in 'FileClasses\TXMP.pas',
-  MetaEditor in 'Tools\MetaEditor.pas' {Form_Meta},
   _MetaManager in 'FileClasses\_MetaManager.pas',
   _EmptyFile in 'FileClasses\_EmptyFile.pas',
@@ -147,5 +142,13 @@
   WMM_ in 'FileClasses\WMM_.pas',
   WMMB in 'FileClasses\WMMB.pas',
-  WPge in 'FileClasses\WPge.pas';
+  WPge in 'FileClasses\WPge.pas',
+  _BaseTemplate in 'Tools\_BaseTemplate.pas' {Form_BaseTemplate},
+  _TemplateFile in 'Tools\_TemplateFile.pas' {Form_TemplateFile},
+  _TemplateFileList in 'Tools\_TemplateFileList.pas' {Form_TemplateFileList},
+  MetaEditor in 'Tools\MetaEditor.pas' {Form_Meta},
+  BinEdit in 'Tools\BinEdit.pas' {Form_BinEdit},
+  Extractor in 'Tools\Extractor.pas' {Form_Extractor},
+  Preview in 'Tools\Preview.pas' {Form_Preview},
+  RawEdit in 'Tools\RawEdit.pas' {Form_RawEdit};
 
 {$R *.res}
Index: oup/current/Tools/_TemplateFileList.dfm
===================================================================
--- oup/current/Tools/_TemplateFileList.dfm	(revision 221)
+++ oup/current/Tools/_TemplateFileList.dfm	(revision 222)
@@ -36,8 +36,4 @@
         Align = alClient
         TabOrder = 0
-        ExplicitLeft = -41
-        ExplicitTop = 28
-        ExplicitWidth = 241
-        ExplicitHeight = 381
         object tab_files: TTabSheet
           Caption = 'Files'
@@ -277,4 +273,8 @@
           end
         end
+        object tab_meta: TTabSheet
+          Caption = 'Meta'
+          ImageIndex = 1
+        end
       end
     end
Index: oup/current/Tools/_TemplateFileList.pas
===================================================================
--- oup/current/Tools/_TemplateFileList.pas	(revision 221)
+++ oup/current/Tools/_TemplateFileList.pas	(revision 222)
@@ -38,4 +38,5 @@
     check_filtername: TCheckBox;
     filelist: TListBox;
+    tab_meta: TTabSheet;
     procedure NewCon(ID: Integer);
 
