diff --git a/GPK_RePack/App.config b/GPK_RePack/App.config
index ca0ba5c..c1ea4c2 100644
--- a/GPK_RePack/App.config
+++ b/GPK_RePack/App.config
@@ -50,7 +50,7 @@
False
- True
+ False
1
diff --git a/GPK_RePack/Forms/GUI.Designer.cs b/GPK_RePack/Forms/GUI.Designer.cs
index 65f3d5a..3828bc4 100644
--- a/GPK_RePack/Forms/GUI.Designer.cs
+++ b/GPK_RePack/Forms/GUI.Designer.cs
@@ -110,6 +110,7 @@ private void InitializeComponent()
this.lblStatus = new System.Windows.Forms.ToolStripStatusLabel();
this.ProgressBar = new System.Windows.Forms.ToolStripProgressBar();
this.splitContainerLog_InfoTree = new System.Windows.Forms.SplitContainer();
+ this.savepaddingStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.treeContextMenu.SuspendLayout();
this.menuStrip.SuspendLayout();
this.tabControl.SuspendLayout();
@@ -230,6 +231,7 @@ private void InitializeComponent()
//
// addToolStripMenuItem
//
+ this.addToolStripMenuItem.Enabled = false;
this.addToolStripMenuItem.Name = "addToolStripMenuItem";
this.addToolStripMenuItem.Size = new System.Drawing.Size(143, 22);
this.addToolStripMenuItem.Text = "Add";
@@ -280,6 +282,7 @@ private void InitializeComponent()
this.openToolStripMenuItem,
this.toolStripSeparator3,
this.saveToolStripMenuItem,
+ this.savepaddingStripMenuItem1,
this.replaceSaveToolStripMenuItem,
this.toolStripSeparator1,
this.settingsToolStripMenuItem,
@@ -294,64 +297,64 @@ private void InitializeComponent()
// openToolStripMenuItem
//
this.openToolStripMenuItem.Name = "openToolStripMenuItem";
- this.openToolStripMenuItem.Size = new System.Drawing.Size(241, 22);
+ this.openToolStripMenuItem.Size = new System.Drawing.Size(259, 22);
this.openToolStripMenuItem.Text = "Open";
this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click);
//
// toolStripSeparator3
//
this.toolStripSeparator3.Name = "toolStripSeparator3";
- this.toolStripSeparator3.Size = new System.Drawing.Size(238, 6);
+ this.toolStripSeparator3.Size = new System.Drawing.Size(256, 6);
//
// saveToolStripMenuItem
//
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
- this.saveToolStripMenuItem.Size = new System.Drawing.Size(241, 22);
+ this.saveToolStripMenuItem.Size = new System.Drawing.Size(259, 22);
this.saveToolStripMenuItem.Text = "Save (Rebuild Mode)";
this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click);
//
// replaceSaveToolStripMenuItem
//
this.replaceSaveToolStripMenuItem.Name = "replaceSaveToolStripMenuItem";
- this.replaceSaveToolStripMenuItem.Size = new System.Drawing.Size(241, 22);
+ this.replaceSaveToolStripMenuItem.Size = new System.Drawing.Size(259, 22);
this.replaceSaveToolStripMenuItem.Text = "Save patched (not recommend)";
this.replaceSaveToolStripMenuItem.Click += new System.EventHandler(this.replaceSaveToolStripMenuItem_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
- this.toolStripSeparator1.Size = new System.Drawing.Size(238, 6);
+ this.toolStripSeparator1.Size = new System.Drawing.Size(256, 6);
//
// settingsToolStripMenuItem
//
this.settingsToolStripMenuItem.Name = "settingsToolStripMenuItem";
- this.settingsToolStripMenuItem.Size = new System.Drawing.Size(241, 22);
+ this.settingsToolStripMenuItem.Size = new System.Drawing.Size(259, 22);
this.settingsToolStripMenuItem.Text = "Settings";
this.settingsToolStripMenuItem.Click += new System.EventHandler(this.settingsToolStripMenuItem_Click);
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
- this.toolStripSeparator2.Size = new System.Drawing.Size(238, 6);
+ this.toolStripSeparator2.Size = new System.Drawing.Size(256, 6);
//
// refreshViewToolStripMenuItem
//
this.refreshViewToolStripMenuItem.Name = "refreshViewToolStripMenuItem";
- this.refreshViewToolStripMenuItem.Size = new System.Drawing.Size(241, 22);
+ this.refreshViewToolStripMenuItem.Size = new System.Drawing.Size(259, 22);
this.refreshViewToolStripMenuItem.Text = "Refresh View";
this.refreshViewToolStripMenuItem.Click += new System.EventHandler(this.refreshViewToolStripMenuItem_Click);
//
// clearToolStripMenuItem
//
this.clearToolStripMenuItem.Name = "clearToolStripMenuItem";
- this.clearToolStripMenuItem.Size = new System.Drawing.Size(241, 22);
+ this.clearToolStripMenuItem.Size = new System.Drawing.Size(259, 22);
this.clearToolStripMenuItem.Text = "Clear";
this.clearToolStripMenuItem.Click += new System.EventHandler(this.clearToolStripMenuItem_Click);
//
// exitToolStripMenuItem
//
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
- this.exitToolStripMenuItem.Size = new System.Drawing.Size(241, 22);
+ this.exitToolStripMenuItem.Size = new System.Drawing.Size(259, 22);
this.exitToolStripMenuItem.Text = "Exit";
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
//
@@ -897,6 +900,13 @@ private void InitializeComponent()
this.splitContainerLog_InfoTree.SplitterDistance = 615;
this.splitContainerLog_InfoTree.TabIndex = 9;
//
+ // savepaddingStripMenuItem1
+ //
+ this.savepaddingStripMenuItem1.Name = "savepaddingStripMenuItem1";
+ this.savepaddingStripMenuItem1.Size = new System.Drawing.Size(259, 22);
+ this.savepaddingStripMenuItem1.Text = "Save (Rebuild Mode, with Padding)";
+ this.savepaddingStripMenuItem1.Click += new System.EventHandler(this.savepaddingStripMenuItem1_Click);
+ //
// GUI
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
@@ -1026,6 +1036,7 @@ private void InitializeComponent()
private ToolStripMenuItem pasteToolStripMenuItem;
private ToolStripSeparator toolStripSeparator6;
private ToolStripMenuItem previewOGGToolStripMenuItem;
+ private ToolStripMenuItem savepaddingStripMenuItem1;
}
}
diff --git a/GPK_RePack/Forms/GUI.cs b/GPK_RePack/Forms/GUI.cs
index 7f63e8a..4beb69e 100644
--- a/GPK_RePack/Forms/GUI.cs
+++ b/GPK_RePack/Forms/GUI.cs
@@ -293,12 +293,18 @@ private void replaceSaveToolStripMenuItem_Click(object sender, EventArgs e)
}
}
+ private void savepaddingStripMenuItem1_Click(object sender, EventArgs e)
+ {
+ saveToolStripMenuItem_Click(sender, e);
+ }
+
private void saveToolStripMenuItem_Click(object sender, EventArgs e)
{
DateTime start = DateTime.Now;
List runningSavers = new List();
List runningTasks = new List();
+ bool usePadding = sender == savepaddingStripMenuItem1;
if (loadedGpkPackages.Count == 0)
return;
@@ -311,7 +317,7 @@ private void saveToolStripMenuItem_Click(object sender, EventArgs e)
Task newTask = new Task(delegate ()
{
string savepath = package.Path + "_rebuild";
- tmpS.SaveGpkPackage(package, savepath);
+ tmpS.SaveGpkPackage(package, savepath, usePadding);
});
newTask.Start();
runningTasks.Add(newTask);
@@ -1747,9 +1753,11 @@ private void selectContextAction(object sender, ToolStripItemClickedEventArgs e)
- #endregion
+ #endregion
+
+
}
}
diff --git a/GPK_RePack/Forms/GUI.resx b/GPK_RePack/Forms/GUI.resx
index be23592..6fbef41 100644
--- a/GPK_RePack/Forms/GUI.resx
+++ b/GPK_RePack/Forms/GUI.resx
@@ -124,27 +124,29 @@
17, 17
- Source Code: https://github.com/GoneUp/GPK_RePack/
-
-
-Quick Guide:
+ Quick Guide:
1. Open a *.gpk file via Main -> Open
2. Select a Object you want to edit on the treeview
3 - Editing
3a) Use the buttons Export/Replace raw data for editing any object data
-3b) Use the buttons Export/Import/Empty ogg for editing audio (Soundnodewave) files
+3b) Use the buttons Import/Export/Empty ogg for editing audio (SoundNodeWave) files
+3c) Use the buttons Import/Export DDS for editing images (Texture2D)
3c) Use the buttons Copy/Paste (or Control-C, Control-V) on any object. You can choose in the settings what the parts of the object the program should copy,
4 - Saving
-4a) The normal way to save is Main -> Save. The program will rebuild a new Gpk file from scratch.
+4a) The normal way to save is Main -> Save. The program will rebuild the GPK file from scratch.
4b) If the normal way is failing switch select Patch Mode in settings and try to import the data again (only over raw import/export). Save afterwards via Main -> Save patched.
-Note: Tera accepts only files with the exact same file size as the orginal file. Terahelper will fill the file up if its too small and warn you if it is too big. In this case you need to reduce the file size to fit the maximum.
+About Padding:
+Tera accepts only files with the exact same file size as the orginal file in some cases, for example at soundfiles. I'm not entire sure what's the reason for this, calls for some reverse engineering xD
+The save menu offers you the option to save as-is and a option with added padding. Terahelper will fill the file up if it's too small and warn you if it is too big.
If you want to change the maximum size manually select a the package and use the Misc -> Set Filesize function.
-Have Fun & Always Backup
--- GoneUp
+hfgl
+-- GoneUp (hstrobel.dev@gmail.com)
+
+Source Code is available on Github: https://github.com/GoneUp/GPK_RePack/
True
diff --git a/GPK_RePack/IO/Writer.cs b/GPK_RePack/IO/Writer.cs
index 042b23e..2464c4a 100644
--- a/GPK_RePack/IO/Writer.cs
+++ b/GPK_RePack/IO/Writer.cs
@@ -46,7 +46,7 @@ public void SaveReplacedExport(GpkPackage package, string savepath, ListFalse
- True
+ False
1