diff --git a/UoFiddler.Controls/Classes/Options.cs b/UoFiddler.Controls/Classes/Options.cs
index 3403aec..28d072f 100644
--- a/UoFiddler.Controls/Classes/Options.cs
+++ b/UoFiddler.Controls/Classes/Options.cs
@@ -42,6 +42,18 @@ public static class Options
///
public static bool DarkMode { get; set; }
+ ///
+ /// When true, exported image filenames embed the ID in hexadecimal form (e.g. "Item 0x00FF.png").
+ /// When false, decimal form is used. Runtime flag set from AppSettings at startup.
+ ///
+ public static bool ExportFilenameInHex { get; set; } = true;
+
+ ///
+ /// When is false, controls whether decimal IDs are zero-padded
+ /// to 5 digits ("00255") or written without padding ("255"). Runtime flag set from AppSettings.
+ ///
+ public static bool ExportFilenameDecimalPadded { get; set; } = true;
+
///
/// Defines the cmd to Send Client to Loc
///
diff --git a/UoFiddler.Controls/Classes/Utils.cs b/UoFiddler.Controls/Classes/Utils.cs
index d2981c2..a55c154 100644
--- a/UoFiddler.Controls/Classes/Utils.cs
+++ b/UoFiddler.Controls/Classes/Utils.cs
@@ -64,6 +64,23 @@ public static bool ConvertStringToInt(string text, out int result)
return int.TryParse(text, NumberStyles.Integer, null, out result);
}
+ ///
+ /// Formats an ID for inclusion in an exported filename, honoring the user's
+ /// hex/decimal preference in and
+ /// .
+ ///
+ public static string FormatExportId(int id)
+ {
+ if (Options.ExportFilenameInHex)
+ {
+ return $"0x{id:X4}";
+ }
+
+ return Options.ExportFilenameDecimalPadded
+ ? id.ToString("D5")
+ : id.ToString();
+ }
+
public static unsafe Bitmap ConvertBmp(Bitmap bmp)
{
BitmapData bd = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.ReadOnly, PixelFormat.Format16bppArgb1555);
diff --git a/UoFiddler.Controls/Forms/AnimationEditForm.cs b/UoFiddler.Controls/Forms/AnimationEditForm.cs
index 22b2e65..f6075c1 100644
--- a/UoFiddler.Controls/Forms/AnimationEditForm.cs
+++ b/UoFiddler.Controls/Forms/AnimationEditForm.cs
@@ -1191,7 +1191,7 @@ private void OnClickExportToVD(object sender, EventArgs e)
}
string path = Options.OutputPath;
- string fileName = Path.Combine(path, $"anim{_fileType}_0x{_currentBody:X}.vd");
+ string fileName = Path.Combine(path, $"anim{_fileType}_{Utils.FormatExportId(_currentBody)}.vd");
AnimationEdit.ExportToVD(_fileType, _currentBody, fileName);
FileSavedDialog.Show(FindForm(), Options.OutputPath, "Animation saved successfully.");
@@ -2240,7 +2240,7 @@ private void OnClickExportAllToVD(object sender, EventArgs e)
continue;
}
- string fileName = Path.Combine(dialog.SelectedPath, $"anim{_fileType}_0x{index:X}.vd");
+ string fileName = Path.Combine(dialog.SelectedPath, $"anim{_fileType}_{Utils.FormatExportId(index)}.vd");
AnimationEdit.ExportToVD(_fileType, index, fileName);
}
diff --git a/UoFiddler.Controls/Forms/ItemDetailForm.cs b/UoFiddler.Controls/Forms/ItemDetailForm.cs
index af3a140..9cc9e61 100644
--- a/UoFiddler.Controls/Forms/ItemDetailForm.cs
+++ b/UoFiddler.Controls/Forms/ItemDetailForm.cs
@@ -246,7 +246,7 @@ private void SaveImage(ImageFormat imageFormat)
}
string fileExtension = Utils.GetFileExtensionFor(imageFormat);
- string fileName = Path.Combine(Options.OutputPath, $"Item 0x{_index:X}.{fileExtension}");
+ string fileName = Path.Combine(Options.OutputPath, $"Item {Utils.FormatExportId(_index)}.{fileExtension}");
using (Bitmap bit = new Bitmap(Art.GetStatic(_index).Width, Art.GetStatic(_index).Height))
{
diff --git a/UoFiddler.Controls/UserControls/AnimDataControl.cs b/UoFiddler.Controls/UserControls/AnimDataControl.cs
index a7d343e..203152f 100644
--- a/UoFiddler.Controls/UserControls/AnimDataControl.cs
+++ b/UoFiddler.Controls/UserControls/AnimDataControl.cs
@@ -679,7 +679,7 @@ private void OnClick_ExportAsGif(object sender, EventArgs e)
{
if (_selAnimdataEntry != null)
{
- var outputFile = Path.Combine(Options.OutputPath, $"AnimData 0x{_currentSelect:X}.gif");
+ var outputFile = Path.Combine(Options.OutputPath, $"AnimData {Utils.FormatExportId(_currentSelect)}.gif");
MainPictureBox.Frames.ToGif(outputFile, delay: 150, showFrameBounds: MainPictureBox.ShowFrameBounds);
MessageBox.Show($"Saved to {outputFile}");
}
diff --git a/UoFiddler.Controls/UserControls/AnimationListControl.cs b/UoFiddler.Controls/UserControls/AnimationListControl.cs
index 1a3aef1..dfc439a 100644
--- a/UoFiddler.Controls/UserControls/AnimationListControl.cs
+++ b/UoFiddler.Controls/UserControls/AnimationListControl.cs
@@ -872,7 +872,7 @@ private void ExtractImage(ImageFormat imageFormat)
}
string fileExtension = Utils.GetFileExtensionFor(imageFormat);
- string fileName = Path.Combine(Options.OutputPath, $"{what} {_currentSelect}.{fileExtension}");
+ string fileName = Path.Combine(Options.OutputPath, $"{what} {Utils.FormatExportId(_currentSelect)}.{fileExtension}");
Bitmap sourceBitmap = MainPictureBox.CurrentFrame?.Bitmap;
@@ -926,7 +926,7 @@ private void ExportAnimationFrames(ImageFormat imageFormat)
}
string fileExtension = Utils.GetFileExtensionFor(imageFormat);
- string fileName = Path.Combine(Options.OutputPath, $"{what} {_currentSelect}");
+ string fileName = Path.Combine(Options.OutputPath, $"{what} {Utils.FormatExportId(_currentSelect)}");
for (int i = 0; i < MainPictureBox.Frames?.Count; ++i)
{
@@ -981,7 +981,7 @@ private void ExportSingleFrame(ImageFormat imageFormat)
}
string fileExtension = Utils.GetFileExtensionFor(imageFormat);
- string fileName = Path.Combine(Options.OutputPath, $"{what} {_currentSelect}");
+ string fileName = Path.Combine(Options.OutputPath, $"{what} {Utils.FormatExportId(_currentSelect)}");
Bitmap bit = MainPictureBox.Frames[(int)listView1.SelectedItems[0].Tag].Bitmap;
using (Bitmap newBitmap = new Bitmap(bit.Width, bit.Height))
diff --git a/UoFiddler.Controls/UserControls/FontsControl.cs b/UoFiddler.Controls/UserControls/FontsControl.cs
index dd74e10..a4ce16b 100644
--- a/UoFiddler.Controls/UserControls/FontsControl.cs
+++ b/UoFiddler.Controls/UserControls/FontsControl.cs
@@ -209,8 +209,8 @@ private void OnClickExport(object sender, EventArgs e)
string path = Options.OutputPath;
string fileType = (int)treeView.SelectedNode.Parent.Tag == 1 ? "Unicode" : "ASCII";
string fileName = (int)treeView.SelectedNode.Parent.Tag == 1
- ? Path.Combine(path, $"{fileType} {(int)treeView.SelectedNode.Tag} 0x{FontsTileView.SelectedIndices[0]:X}.tiff")
- : Path.Combine(path, $"{fileType} {(int)treeView.SelectedNode.Tag} 0x{_fonts[FontsTileView.SelectedIndices[0]] + AsciiFontOffset:X}.tiff");
+ ? Path.Combine(path, $"{fileType} {(int)treeView.SelectedNode.Tag} {Utils.FormatExportId(FontsTileView.SelectedIndices[0])}.tiff")
+ : Path.Combine(path, $"{fileType} {(int)treeView.SelectedNode.Tag} {Utils.FormatExportId(_fonts[FontsTileView.SelectedIndices[0]] + AsciiFontOffset)}.tiff");
if ((int)treeView.SelectedNode.Parent.Tag == 1)
{
diff --git a/UoFiddler.Controls/UserControls/GumpControl.cs b/UoFiddler.Controls/UserControls/GumpControl.cs
index 04ffa04..b7aa359 100644
--- a/UoFiddler.Controls/UserControls/GumpControl.cs
+++ b/UoFiddler.Controls/UserControls/GumpControl.cs
@@ -734,7 +734,7 @@ private void Extract_Image_ClickPng(object sender, EventArgs e)
private static void ExportGumpImage(int index, ImageFormat imageFormat)
{
string fileExtension = Utils.GetFileExtensionFor(imageFormat);
- string fileName = Path.Combine(Options.OutputPath, $"Gump 0x{index:X4}.{fileExtension}");
+ string fileName = Path.Combine(Options.OutputPath, $"Gump {Utils.FormatExportId(index)}.{fileExtension}");
using (Bitmap bit = new Bitmap(Gumps.GetGump(index)))
{
@@ -792,7 +792,7 @@ private void ExportAllGumps(ImageFormat imageFormat)
continue;
}
- string fileName = Path.Combine(dialog.SelectedPath, $"Gump 0x{index:X4}.{fileExtension}");
+ string fileName = Path.Combine(dialog.SelectedPath, $"Gump {Utils.FormatExportId(index)}.{fileExtension}");
var gump = Gumps.GetGump(index);
if (gump is null)
{
diff --git a/UoFiddler.Controls/UserControls/ItemsControl.cs b/UoFiddler.Controls/UserControls/ItemsControl.cs
index 92b5c57..86ddbd6 100644
--- a/UoFiddler.Controls/UserControls/ItemsControl.cs
+++ b/UoFiddler.Controls/UserControls/ItemsControl.cs
@@ -746,7 +746,7 @@ private static void ExportItemImage(int index, ImageFormat imageFormat)
}
string fileExtension = Utils.GetFileExtensionFor(imageFormat);
- string fileName = Path.Combine(Options.OutputPath, $"Item 0x{index:X4}.{fileExtension}");
+ string fileName = Path.Combine(Options.OutputPath, $"Item {Utils.FormatExportId(index)}.{fileExtension}");
using (Bitmap bit = new Bitmap(Art.GetStatic(index)))
{
@@ -821,7 +821,7 @@ private void ExportAllItemImages(ImageFormat imageFormat)
continue;
}
- string fileName = Path.Combine(dialog.SelectedPath, $"Item 0x{index:X4}.{fileExtension}");
+ string fileName = Path.Combine(dialog.SelectedPath, $"Item {Utils.FormatExportId(index)}.{fileExtension}");
var artBitmap = Art.GetStatic(index);
if (artBitmap is null)
{
diff --git a/UoFiddler.Controls/UserControls/LandTilesControl.cs b/UoFiddler.Controls/UserControls/LandTilesControl.cs
index 0ac9f41..fbdc694 100644
--- a/UoFiddler.Controls/UserControls/LandTilesControl.cs
+++ b/UoFiddler.Controls/UserControls/LandTilesControl.cs
@@ -561,7 +561,7 @@ private static void ExportLandTileImage(int index, ImageFormat imageFormat)
}
string fileExtension = Utils.GetFileExtensionFor(imageFormat);
- string fileName = Path.Combine(Options.OutputPath, $"Landtile 0x{index:X4}.{fileExtension}");
+ string fileName = Path.Combine(Options.OutputPath, $"Landtile {Utils.FormatExportId(index)}.{fileExtension}");
using (Bitmap bit = new Bitmap(Art.GetLand(index)))
{
@@ -652,7 +652,7 @@ private void ExportAllLandTiles(ImageFormat imageFormat)
continue;
}
- string fileName = Path.Combine(dialog.SelectedPath, $"Landtile 0x{index:X4}.{fileExtension}");
+ string fileName = Path.Combine(dialog.SelectedPath, $"Landtile {Utils.FormatExportId(index)}.{fileExtension}");
var landTile = Art.GetLand(index);
if (landTile is null)
{
diff --git a/UoFiddler.Controls/UserControls/LightControl.cs b/UoFiddler.Controls/UserControls/LightControl.cs
index 86d1172..e52b000 100644
--- a/UoFiddler.Controls/UserControls/LightControl.cs
+++ b/UoFiddler.Controls/UserControls/LightControl.cs
@@ -349,7 +349,7 @@ private void OnClickExportBmp(object sender, EventArgs e)
string path = Options.OutputPath;
int i = (int)treeViewLights.SelectedNode.Tag;
- string fileName = Path.Combine(path, $"Light {i}.bmp");
+ string fileName = Path.Combine(path, $"Light {Utils.FormatExportId(i)}.bmp");
Light.GetLight(i).Save(fileName, ImageFormat.Bmp);
FileSavedDialog.Show(FindForm(), fileName, "Light saved successfully.");
}
@@ -363,7 +363,7 @@ private void OnClickExportTiff(object sender, EventArgs e)
string path = Options.OutputPath;
int i = (int)treeViewLights.SelectedNode.Tag;
- string fileName = Path.Combine(path, $"Light {i}.tiff");
+ string fileName = Path.Combine(path, $"Light {Utils.FormatExportId(i)}.tiff");
Ultima.Light.GetLight(i).Save(fileName, ImageFormat.Tiff);
FileSavedDialog.Show(FindForm(), fileName, "Light saved successfully.");
}
@@ -377,7 +377,7 @@ private void OnClickExportJpg(object sender, EventArgs e)
string path = Options.OutputPath;
int i = (int)treeViewLights.SelectedNode.Tag;
- string fileName = Path.Combine(path, $"Light {i}.jpg");
+ string fileName = Path.Combine(path, $"Light {Utils.FormatExportId(i)}.jpg");
Ultima.Light.GetLight(i).Save(fileName, ImageFormat.Jpeg);
FileSavedDialog.Show(FindForm(), fileName, "Light saved successfully.");
}
diff --git a/UoFiddler.Controls/UserControls/MultisControl.cs b/UoFiddler.Controls/UserControls/MultisControl.cs
index 2fe3c34..b3e6241 100644
--- a/UoFiddler.Controls/UserControls/MultisControl.cs
+++ b/UoFiddler.Controls/UserControls/MultisControl.cs
@@ -469,7 +469,7 @@ private void ExtractMultiImage(ImageFormat imageFormat, Color backgroundColor)
string fileExtension = Utils.GetFileExtensionFor(imageFormat);
string floorSuffix = HeightChangeMulti.Value > 0 ? $"_Z{HeightChangeMulti.Value:000}" : string.Empty;
- string fileName = Path.Combine(Options.OutputPath, $"Multi 0x{int.Parse(TreeViewMulti.SelectedNode.Name):X4}{floorSuffix}.{fileExtension}");
+ string fileName = Path.Combine(Options.OutputPath, $"Multi {Utils.FormatExportId(int.Parse(TreeViewMulti.SelectedNode.Name))}{floorSuffix}.{fileExtension}");
SaveImage(_mulBitmap, fileName, imageFormat, backgroundColor);
FileSavedDialog.Show(FindForm(), fileName, "Multi saved successfully.");
}
@@ -539,7 +539,7 @@ private void OnExportTextFile(object sender, EventArgs e)
int id = int.Parse(TreeViewMulti.SelectedNode.Name);
string path = Options.OutputPath;
- string fileName = Path.Combine(path, $"Multi 0x{id:X}.txt");
+ string fileName = Path.Combine(path, $"Multi {Utils.FormatExportId(id)}.txt");
multi.ExportToTextFile(fileName);
FileSavedDialog.Show(FindForm(), fileName, "Multi saved successfully.");
@@ -561,7 +561,7 @@ private void OnExportWscFile(object sender, EventArgs e)
int id = int.Parse(TreeViewMulti.SelectedNode.Name);
string path = Options.OutputPath;
- string fileName = Path.Combine(path, $"Multi 0x{id:X}.wsc");
+ string fileName = Path.Combine(path, $"Multi {Utils.FormatExportId(id)}.wsc");
multi.ExportToWscFile(fileName);
FileSavedDialog.Show(FindForm(), fileName, "Multi saved successfully.");
@@ -583,7 +583,7 @@ private void OnExportUOAFile(object sender, EventArgs e)
int id = int.Parse(TreeViewMulti.SelectedNode.Name);
string path = Options.OutputPath;
- string fileName = Path.Combine(path, $"Multi 0x{id:X}.uoa");
+ string fileName = Path.Combine(path, $"Multi {Utils.FormatExportId(id)}.uoa");
multi.ExportToUOAFile(fileName);
FileSavedDialog.Show(FindForm(), fileName, "Multi saved successfully.");
@@ -687,7 +687,7 @@ private void ExportAllMultis(ImageFormat imageFormat, Color backgroundColor)
}
const int maximumMultiHeight = 127;
- string fileName = Path.Combine(dialog.SelectedPath, $"Multi 0x{index:X4}.{fileExtension}");
+ string fileName = Path.Combine(dialog.SelectedPath, $"Multi {Utils.FormatExportId(index)}.{fileExtension}");
using (Bitmap multiBitmap = ((MultiComponentList)_refMarker.TreeViewMulti.Nodes[i].Tag)?.GetImage(maximumMultiHeight))
{
@@ -727,7 +727,7 @@ private void OnClick_SaveAllText(object sender, EventArgs e)
continue;
}
- string fileName = Path.Combine(dialog.SelectedPath, $"Multi 0x{index:X4}.txt");
+ string fileName = Path.Combine(dialog.SelectedPath, $"Multi {Utils.FormatExportId(index)}.txt");
multi.ExportToTextFile(fileName);
}
@@ -760,7 +760,7 @@ private void OnClick_SaveAllUOA(object sender, EventArgs e)
continue;
}
- string fileName = Path.Combine(dialog.SelectedPath, $"Multi 0x{index:X4}.uoa");
+ string fileName = Path.Combine(dialog.SelectedPath, $"Multi {Utils.FormatExportId(index)}.uoa");
multi.ExportToUOAFile(fileName);
}
@@ -793,7 +793,7 @@ private void OnClick_SaveAllWSC(object sender, EventArgs e)
continue;
}
- string fileName = Path.Combine(dialog.SelectedPath, $"Multi 0x{index:X4}.wsc");
+ string fileName = Path.Combine(dialog.SelectedPath, $"Multi {Utils.FormatExportId(index)}.wsc");
multi.ExportToWscFile(fileName);
}
@@ -859,7 +859,7 @@ private void OnClick_SaveAllUox3(object sender, EventArgs e)
continue;
}
- string fileName = Path.Combine(dialog.SelectedPath, $"Multi 0x{index:X4}.uox3");
+ string fileName = Path.Combine(dialog.SelectedPath, $"Multi {Utils.FormatExportId(index)}.uox3");
multi.ExportToUox3File(fileName);
}
@@ -904,7 +904,7 @@ private void OnExportUox3File(object sender, EventArgs e)
int id = int.Parse(TreeViewMulti.SelectedNode.Name);
string path = Options.OutputPath;
- string fileName = Path.Combine(path, $"Multi 0x{id:X4}.uox3");
+ string fileName = Path.Combine(path, $"Multi {Utils.FormatExportId(id)}.uox3");
multi.ExportToUox3File(fileName);
FileSavedDialog.Show(FindForm(), fileName, "Multi saved successfully.");
}
@@ -1288,7 +1288,7 @@ private void ExtractUopMultiImage(ImageFormat imageFormat, Color backgroundColor
string fileExtension = Utils.GetFileExtensionFor(imageFormat);
string floorSuffix = HeightChangeUop.Value > 0 ? $"_Z{HeightChangeUop.Value:000}" : string.Empty;
int id = int.Parse(treeViewUop.SelectedNode.Name);
- string fileName = Path.Combine(Options.OutputPath, $"UopMulti 0x{id:X4}{floorSuffix}.{fileExtension}");
+ string fileName = Path.Combine(Options.OutputPath, $"UopMulti {Utils.FormatExportId(id)}{floorSuffix}.{fileExtension}");
SaveImage(_uopBitmap, fileName, imageFormat, backgroundColor);
FileSavedDialog.Show(FindForm(), fileName, "Multi saved successfully.");
}
@@ -1301,7 +1301,7 @@ private void OnUopExportTextFile(object sender, EventArgs e)
}
int id = int.Parse(treeViewUop.SelectedNode.Name);
- string fileName = Path.Combine(Options.OutputPath, $"UopMulti 0x{id:X}.txt");
+ string fileName = Path.Combine(Options.OutputPath, $"UopMulti {Utils.FormatExportId(id)}.txt");
multi.ExportToTextFile(fileName);
FileSavedDialog.Show(FindForm(), fileName, "Multi saved successfully.");
}
@@ -1314,7 +1314,7 @@ private void OnUopExportUOAFile(object sender, EventArgs e)
}
int id = int.Parse(treeViewUop.SelectedNode.Name);
- string fileName = Path.Combine(Options.OutputPath, $"UopMulti 0x{id:X}.uoa");
+ string fileName = Path.Combine(Options.OutputPath, $"UopMulti {Utils.FormatExportId(id)}.uoa");
multi.ExportToUOAFile(fileName);
FileSavedDialog.Show(FindForm(), fileName, "Multi saved successfully.");
}
@@ -1327,7 +1327,7 @@ private void OnUopExportWscFile(object sender, EventArgs e)
}
int id = int.Parse(treeViewUop.SelectedNode.Name);
- string fileName = Path.Combine(Options.OutputPath, $"UopMulti 0x{id:X}.wsc");
+ string fileName = Path.Combine(Options.OutputPath, $"UopMulti {Utils.FormatExportId(id)}.wsc");
multi.ExportToWscFile(fileName);
FileSavedDialog.Show(FindForm(), fileName, "Multi saved successfully.");
}
@@ -1379,7 +1379,7 @@ private void ExportAllUopMultis(ImageFormat imageFormat, Color backgroundColor)
continue;
}
- string fileName = Path.Combine(dialog.SelectedPath, $"UopMulti 0x{index:X4}.{fileExtension}");
+ string fileName = Path.Combine(dialog.SelectedPath, $"UopMulti {Utils.FormatExportId(index)}.{fileExtension}");
using Bitmap bitmap = multi.GetImage(maxHeight);
if (bitmap != null)
{
@@ -1410,7 +1410,7 @@ private void OnUopClick_SaveAllText(object sender, EventArgs e)
continue;
}
- multi.ExportToTextFile(Path.Combine(dialog.SelectedPath, $"UopMulti 0x{index:X4}.txt"));
+ multi.ExportToTextFile(Path.Combine(dialog.SelectedPath, $"UopMulti {Utils.FormatExportId(index)}.txt"));
}
FileSavedDialog.Show(FindForm(), dialog.SelectedPath, "All UOP Multis saved successfully.");
@@ -1436,7 +1436,7 @@ private void OnUopClick_SaveAllUOA(object sender, EventArgs e)
continue;
}
- multi.ExportToUOAFile(Path.Combine(dialog.SelectedPath, $"UopMulti 0x{index:X4}.uoa"));
+ multi.ExportToUOAFile(Path.Combine(dialog.SelectedPath, $"UopMulti {Utils.FormatExportId(index)}.uoa"));
}
FileSavedDialog.Show(FindForm(), dialog.SelectedPath, "All UOP Multis saved successfully.");
@@ -1462,7 +1462,7 @@ private void OnUopClick_SaveAllWSC(object sender, EventArgs e)
continue;
}
- multi.ExportToWscFile(Path.Combine(dialog.SelectedPath, $"UopMulti 0x{index:X4}.wsc"));
+ multi.ExportToWscFile(Path.Combine(dialog.SelectedPath, $"UopMulti {Utils.FormatExportId(index)}.wsc"));
}
FileSavedDialog.Show(FindForm(), dialog.SelectedPath, "All UOP Multis saved successfully.");
diff --git a/UoFiddler.Controls/UserControls/TexturesControl.cs b/UoFiddler.Controls/UserControls/TexturesControl.cs
index 764195c..0e139f5 100644
--- a/UoFiddler.Controls/UserControls/TexturesControl.cs
+++ b/UoFiddler.Controls/UserControls/TexturesControl.cs
@@ -427,7 +427,7 @@ private static void ExportTextureImage(int index, ImageFormat imageFormat)
}
string fileExtension = Utils.GetFileExtensionFor(imageFormat);
- string fileName = Path.Combine(Options.OutputPath, $"Texture 0x{index:X4}.{fileExtension}");
+ string fileName = Path.Combine(Options.OutputPath, $"Texture {Utils.FormatExportId(index)}.{fileExtension}");
using (Bitmap bit = new Bitmap(Textures.GetTexture(index)))
{
@@ -557,7 +557,7 @@ private void ExportAllTextures(ImageFormat imageFormat)
continue;
}
- string fileName = Path.Combine(dialog.SelectedPath, $"Texture 0x{index:X4}.{fileExtension}");
+ string fileName = Path.Combine(dialog.SelectedPath, $"Texture {Utils.FormatExportId(index)}.{fileExtension}");
var texture = Textures.GetTexture(index);
if (texture is null)
{
diff --git a/UoFiddler.Plugin.Compare/UserControls/CompareGumpControl.cs b/UoFiddler.Plugin.Compare/UserControls/CompareGumpControl.cs
index 3c74b87..85b3825 100644
--- a/UoFiddler.Plugin.Compare/UserControls/CompareGumpControl.cs
+++ b/UoFiddler.Plugin.Compare/UserControls/CompareGumpControl.cs
@@ -325,7 +325,7 @@ private void Export_Bmp(object sender, EventArgs e)
}
string path = Options.OutputPath;
- string fileName = Path.Combine(path, $"Gump(Sec) 0x{i:X}.bmp");
+ string fileName = Path.Combine(path, $"Gump(Sec) {UoFiddler.Controls.Classes.Utils.FormatExportId(i)}.bmp");
SecondGump.GetGump(i).Save(fileName, ImageFormat.Bmp);
FileSavedDialog.Show(FindForm(), fileName, "Gump saved successfully.");
@@ -346,7 +346,7 @@ private void Export_Tiff(object sender, EventArgs e)
}
string path = Options.OutputPath;
- string fileName = Path.Combine(path, $"Gump(Sec) 0x{i:X}.tiff");
+ string fileName = Path.Combine(path, $"Gump(Sec) {UoFiddler.Controls.Classes.Utils.FormatExportId(i)}.tiff");
SecondGump.GetGump(i).Save(fileName, ImageFormat.Tiff);
FileSavedDialog.Show(FindForm(), fileName, "Gump saved successfully.");
diff --git a/UoFiddler.Plugin.Compare/UserControls/CompareItemControl.cs b/UoFiddler.Plugin.Compare/UserControls/CompareItemControl.cs
index 9d2761a..e1855b4 100644
--- a/UoFiddler.Plugin.Compare/UserControls/CompareItemControl.cs
+++ b/UoFiddler.Plugin.Compare/UserControls/CompareItemControl.cs
@@ -297,7 +297,7 @@ private void ExportAsBmp(object sender, EventArgs e)
return;
}
- string fileName = Path.Combine(Options.OutputPath, $"Item(Sec) 0x{i:X}.bmp");
+ string fileName = Path.Combine(Options.OutputPath, $"Item(Sec) {UoFiddler.Controls.Classes.Utils.FormatExportId(i)}.bmp");
SecondArt.GetStatic(i).Save(fileName, ImageFormat.Bmp);
FileSavedDialog.Show(FindForm(), fileName, "Item saved successfully.");
@@ -317,7 +317,7 @@ private void ExportAsTiff(object sender, EventArgs e)
return;
}
- string fileName = Path.Combine(Options.OutputPath, $"Item(Sec) 0x{i:X}.tiff");
+ string fileName = Path.Combine(Options.OutputPath, $"Item(Sec) {UoFiddler.Controls.Classes.Utils.FormatExportId(i)}.tiff");
SecondArt.GetStatic(i).Save(fileName, ImageFormat.Tiff);
FileSavedDialog.Show(FindForm(), fileName, "Item saved successfully.");
}
diff --git a/UoFiddler.Plugin.Compare/UserControls/CompareLandControl.cs b/UoFiddler.Plugin.Compare/UserControls/CompareLandControl.cs
index 504b519..628b477 100644
--- a/UoFiddler.Plugin.Compare/UserControls/CompareLandControl.cs
+++ b/UoFiddler.Plugin.Compare/UserControls/CompareLandControl.cs
@@ -262,7 +262,7 @@ private void ExportAsBmp(object sender, EventArgs e)
return;
}
- string fileName = Path.Combine(Options.OutputPath, $"Landtile(Sec) 0x{i:X}.bmp");
+ string fileName = Path.Combine(Options.OutputPath, $"Landtile(Sec) {UoFiddler.Controls.Classes.Utils.FormatExportId(i)}.bmp");
SecondArt.GetLand(i).Save(fileName, ImageFormat.Bmp);
FileSavedDialog.Show(FindForm(), fileName, "Landtile saved successfully.");
@@ -282,7 +282,7 @@ private void ExportAsTiff(object sender, EventArgs e)
return;
}
- string fileName = Path.Combine(Options.OutputPath, $"Landtile(Sec) 0x{i:X}.tiff");
+ string fileName = Path.Combine(Options.OutputPath, $"Landtile(Sec) {UoFiddler.Controls.Classes.Utils.FormatExportId(i)}.tiff");
SecondArt.GetLand(i).Save(fileName, ImageFormat.Tiff);
FileSavedDialog.Show(FindForm(), fileName, "Landtile saved successfully.");
}
diff --git a/UoFiddler.Plugin.Compare/UserControls/CompareTextureControl.cs b/UoFiddler.Plugin.Compare/UserControls/CompareTextureControl.cs
index b01241b..4d6694c 100644
--- a/UoFiddler.Plugin.Compare/UserControls/CompareTextureControl.cs
+++ b/UoFiddler.Plugin.Compare/UserControls/CompareTextureControl.cs
@@ -251,7 +251,7 @@ private void ExportAsBmp(object sender, EventArgs e)
return;
}
- string fileName = Path.Combine(Options.OutputPath, $"Texture(Sec) 0x{i:X}.bmp");
+ string fileName = Path.Combine(Options.OutputPath, $"Texture(Sec) {UoFiddler.Controls.Classes.Utils.FormatExportId(i)}.bmp");
SecondTexture.GetTexture(i).Save(fileName, ImageFormat.Bmp);
FileSavedDialog.Show(FindForm(), fileName, "Texture saved successfully.");
}
@@ -270,7 +270,7 @@ private void ExportAsTiff(object sender, EventArgs e)
return;
}
- string fileName = Path.Combine(Options.OutputPath, $"Texture(Sec) 0x{i:X}.tiff");
+ string fileName = Path.Combine(Options.OutputPath, $"Texture(Sec) {UoFiddler.Controls.Classes.Utils.FormatExportId(i)}.tiff");
SecondTexture.GetTexture(i).Save(fileName, ImageFormat.Tiff);
FileSavedDialog.Show(FindForm(), fileName, "Texture saved successfully.");
}
diff --git a/UoFiddler.Plugin.UopPacker/UserControls/UopPackerControl.resx b/UoFiddler.Plugin.UopPacker/UserControls/UopPackerControl.resx
index 924fea1..fb0eeb2 100644
--- a/UoFiddler.Plugin.UopPacker/UserControls/UopPackerControl.resx
+++ b/UoFiddler.Plugin.UopPacker/UserControls/UopPackerControl.resx
@@ -129,7 +129,7 @@
Pick the compression that matches the original UOP for the file type:
Art / Map / Sound: None
- Gumpart: None on older clients, Mythic on newer clients (New Legacy 7.0.103)
+ Gumpart: None on older clients, Mythic on newer clients (New Legacy 7.0.104)
MultiCollection: Zlib
Picking the wrong option produces a UOP that is much larger than the original or unreadable by the client.
@@ -137,16 +137,10 @@ Picking the wrong option produces a UOP that is much larger than the original or
Pick the compression that matches the original UOP for the file type:
Art / Map / Sound: None
- Gumpart: None on older clients, Mythic on newer clients (New Legacy 7.0.103)
+ Gumpart: None on older clients, Mythic on newer clients (New Legacy 7.0.104)
MultiCollection: Zlib
Picking the wrong option produces a UOP that is much larger than the original or unreadable by the client.
-
- 519, 17
-
-
- 17, 17
-
261, 17
diff --git a/UoFiddler/Classes/AppSettings.cs b/UoFiddler/Classes/AppSettings.cs
index 22dc468..6ae5f35 100644
--- a/UoFiddler/Classes/AppSettings.cs
+++ b/UoFiddler/Classes/AppSettings.cs
@@ -24,6 +24,10 @@ public static class AppSettings
public static bool DarkMode { get; set; } = false;
+ public static bool ExportFilenameInHex { get; set; } = true;
+
+ public static bool ExportFilenameDecimalPadded { get; set; } = true;
+
public static void Load()
{
if (!File.Exists(FilePath))
@@ -40,6 +44,18 @@ public static void Load()
{
DarkMode = bool.Parse(elem.GetAttribute("active"));
}
+
+ elem = (XmlElement)root?.SelectSingleNode("ExportFilenameInHex");
+ if (elem != null)
+ {
+ ExportFilenameInHex = bool.Parse(elem.GetAttribute("active"));
+ }
+
+ elem = (XmlElement)root?.SelectSingleNode("ExportFilenameDecimalPadded");
+ if (elem != null)
+ {
+ ExportFilenameDecimalPadded = bool.Parse(elem.GetAttribute("active"));
+ }
}
public static void Save()
@@ -58,6 +74,14 @@ public static void Save()
elem.SetAttribute("active", DarkMode.ToString());
root.AppendChild(elem);
+ elem = dom.CreateElement("ExportFilenameInHex");
+ elem.SetAttribute("active", ExportFilenameInHex.ToString());
+ root.AppendChild(elem);
+
+ elem = dom.CreateElement("ExportFilenameDecimalPadded");
+ elem.SetAttribute("active", ExportFilenameDecimalPadded.ToString());
+ root.AppendChild(elem);
+
dom.AppendChild(root);
dom.Save(FilePath);
}
diff --git a/UoFiddler/FiddlerAppContext.cs b/UoFiddler/FiddlerAppContext.cs
index 02f9801..dc62d5c 100644
--- a/UoFiddler/FiddlerAppContext.cs
+++ b/UoFiddler/FiddlerAppContext.cs
@@ -34,6 +34,8 @@ internal FiddlerAppContext(IServiceProvider services)
Application.SetCompatibleTextRenderingDefault(false);
AppSettings.Load();
Options.DarkMode = AppSettings.DarkMode;
+ Options.ExportFilenameInHex = AppSettings.ExportFilenameInHex;
+ Options.ExportFilenameDecimalPadded = AppSettings.ExportFilenameDecimalPadded;
if (AppSettings.DarkMode)
{
Application.SetColorMode(SystemColorMode.Dark);
diff --git a/UoFiddler/Forms/AboutBoxForm.resx b/UoFiddler/Forms/AboutBoxForm.resx
index 9b9517b..66c765f 100644
--- a/UoFiddler/Forms/AboutBoxForm.resx
+++ b/UoFiddler/Forms/AboutBoxForm.resx
@@ -118,7 +118,11 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- Version 4.20.1
+ Version 4.20.2
+- Fixed tooltip client version information in UopPacker.
+- Added option to set export file name template hexadecimal/decimal (defaults to hexadecimal).
+
+Version 4.20.1
- UopPacker: fix gump extraction, improve sizing of extracted index.
- UopPacker: fix validation when extracting maps.
- UopPacker: add progress bars and minor improvements to UI.
diff --git a/UoFiddler/Forms/OptionsForm.Designer.cs b/UoFiddler/Forms/OptionsForm.Designer.cs
index f879c03..093a2e3 100644
--- a/UoFiddler/Forms/OptionsForm.Designer.cs
+++ b/UoFiddler/Forms/OptionsForm.Designer.cs
@@ -62,6 +62,9 @@ private void InitializeComponent()
label9 = new System.Windows.Forms.Label();
FocusColorLabel = new System.Windows.Forms.Label();
SelectedColorLabel = new System.Windows.Forms.Label();
+ radioExportFilenameHex = new System.Windows.Forms.RadioButton();
+ radioExportFilenameDec = new System.Windows.Forms.RadioButton();
+ checkBoxExportFilenameDecPad = new System.Windows.Forms.CheckBox();
groupBox3 = new System.Windows.Forms.GroupBox();
map5Nametext = new System.Windows.Forms.TextBox();
argstext = new System.Windows.Forms.TextBox();
@@ -83,6 +86,7 @@ private void InitializeComponent()
PreviewBackgroundColorLabel = new System.Windows.Forms.Label();
PreviewBackgroundColorButton = new System.Windows.Forms.Button();
buttonClose = new System.Windows.Forms.Button();
+ ExportFilenamesGroupBox = new System.Windows.Forms.GroupBox();
groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)numericUpDownItemSizeHeight).BeginInit();
((System.ComponentModel.ISupportInitialize)numericUpDownItemSizeWidth).BeginInit();
@@ -90,6 +94,7 @@ private void InitializeComponent()
groupBox3.SuspendLayout();
groupBox4.SuspendLayout();
ColorsGroupBox.SuspendLayout();
+ ExportFilenamesGroupBox.SuspendLayout();
SuspendLayout();
//
// groupBox1
@@ -180,7 +185,7 @@ private void InitializeComponent()
groupBox2.TabIndex = 3;
groupBox2.TabStop = false;
groupBox2.Text = "Misc";
- //
+ //
// checkBoxPolSoundIdOffset
//
checkBoxPolSoundIdOffset.AutoSize = true;
@@ -219,7 +224,7 @@ private void InitializeComponent()
//
// buttonApply
//
- buttonApply.Location = new System.Drawing.Point(318, 476);
+ buttonApply.Location = new System.Drawing.Point(318, 551);
buttonApply.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
buttonApply.Name = "buttonApply";
buttonApply.Size = new System.Drawing.Size(88, 27);
@@ -338,6 +343,45 @@ private void InitializeComponent()
SelectedColorLabel.Text = "Tile Selection";
toolTip1.SetToolTip(SelectedColorLabel, "ItemSize controls the size of images in items tab");
//
+ // radioExportFilenameHex
+ //
+ radioExportFilenameHex.AutoSize = true;
+ radioExportFilenameHex.Location = new System.Drawing.Point(10, 21);
+ radioExportFilenameHex.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+ radioExportFilenameHex.Name = "radioExportFilenameHex";
+ radioExportFilenameHex.Size = new System.Drawing.Size(214, 19);
+ radioExportFilenameHex.TabIndex = 0;
+ radioExportFilenameHex.TabStop = true;
+ radioExportFilenameHex.Text = "Hexadecimal (e.g. Item 0x00FF.png)";
+ toolTip1.SetToolTip(radioExportFilenameHex, "Exported filenames embed the ID in hexadecimal form.");
+ radioExportFilenameHex.UseVisualStyleBackColor = true;
+ radioExportFilenameHex.CheckedChanged += OnExportFilenameFormatChanged;
+ //
+ // radioExportFilenameDec
+ //
+ radioExportFilenameDec.AutoSize = true;
+ radioExportFilenameDec.Location = new System.Drawing.Point(240, 21);
+ radioExportFilenameDec.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+ radioExportFilenameDec.Name = "radioExportFilenameDec";
+ radioExportFilenameDec.Size = new System.Drawing.Size(182, 19);
+ radioExportFilenameDec.TabIndex = 1;
+ radioExportFilenameDec.TabStop = true;
+ radioExportFilenameDec.Text = "Decimal (e.g. Item 00255.png)";
+ toolTip1.SetToolTip(radioExportFilenameDec, "Exported filenames embed the ID in decimal form.");
+ radioExportFilenameDec.UseVisualStyleBackColor = true;
+ //
+ // checkBoxExportFilenameDecPad
+ //
+ checkBoxExportFilenameDecPad.AutoSize = true;
+ checkBoxExportFilenameDecPad.Location = new System.Drawing.Point(240, 46);
+ checkBoxExportFilenameDecPad.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+ checkBoxExportFilenameDecPad.Name = "checkBoxExportFilenameDecPad";
+ checkBoxExportFilenameDecPad.Size = new System.Drawing.Size(146, 19);
+ checkBoxExportFilenameDecPad.TabIndex = 2;
+ checkBoxExportFilenameDecPad.Text = "Pad decimal to 5 digits";
+ toolTip1.SetToolTip(checkBoxExportFilenameDecPad, "When using decimal format, pad the ID with leading zeros so files sort correctly.");
+ checkBoxExportFilenameDecPad.UseVisualStyleBackColor = true;
+ //
// groupBox3
//
groupBox3.Controls.Add(label9);
@@ -554,7 +598,7 @@ private void InitializeComponent()
//
// buttonClose
//
- buttonClose.Location = new System.Drawing.Point(414, 476);
+ buttonClose.Location = new System.Drawing.Point(414, 551);
buttonClose.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
buttonClose.Name = "buttonClose";
buttonClose.Size = new System.Drawing.Size(88, 27);
@@ -563,12 +607,27 @@ private void InitializeComponent()
buttonClose.UseVisualStyleBackColor = true;
buttonClose.Click += OnClickClose;
//
+ // ExportFilenamesGroupBox
+ //
+ ExportFilenamesGroupBox.Controls.Add(radioExportFilenameHex);
+ ExportFilenamesGroupBox.Controls.Add(radioExportFilenameDec);
+ ExportFilenamesGroupBox.Controls.Add(checkBoxExportFilenameDecPad);
+ ExportFilenamesGroupBox.Location = new System.Drawing.Point(16, 476);
+ ExportFilenamesGroupBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+ ExportFilenamesGroupBox.Name = "ExportFilenamesGroupBox";
+ ExportFilenamesGroupBox.Padding = new System.Windows.Forms.Padding(4, 3, 4, 3);
+ ExportFilenamesGroupBox.Size = new System.Drawing.Size(486, 69);
+ ExportFilenamesGroupBox.TabIndex = 9;
+ ExportFilenamesGroupBox.TabStop = false;
+ ExportFilenamesGroupBox.Text = "Export Filenames";
+ //
// OptionsForm
//
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- ClientSize = new System.Drawing.Size(518, 514);
+ ClientSize = new System.Drawing.Size(518, 590);
Controls.Add(buttonClose);
+ Controls.Add(ExportFilenamesGroupBox);
Controls.Add(ColorsGroupBox);
Controls.Add(groupBox4);
Controls.Add(groupBox3);
@@ -594,6 +653,8 @@ private void InitializeComponent()
groupBox4.PerformLayout();
ColorsGroupBox.ResumeLayout(false);
ColorsGroupBox.PerformLayout();
+ ExportFilenamesGroupBox.ResumeLayout(false);
+ ExportFilenamesGroupBox.PerformLayout();
ResumeLayout(false);
}
@@ -642,5 +703,9 @@ private void InitializeComponent()
private System.Windows.Forms.CheckBox checkboxRemoveTileBorder;
private System.Windows.Forms.Label PreviewBackgroundColorLabel;
private System.Windows.Forms.Button PreviewBackgroundColorButton;
+ private System.Windows.Forms.GroupBox ExportFilenamesGroupBox;
+ private System.Windows.Forms.RadioButton radioExportFilenameHex;
+ private System.Windows.Forms.RadioButton radioExportFilenameDec;
+ private System.Windows.Forms.CheckBox checkBoxExportFilenameDecPad;
}
}
\ No newline at end of file
diff --git a/UoFiddler/Forms/OptionsForm.cs b/UoFiddler/Forms/OptionsForm.cs
index 9347126..6c4edb4 100644
--- a/UoFiddler/Forms/OptionsForm.cs
+++ b/UoFiddler/Forms/OptionsForm.cs
@@ -34,6 +34,11 @@ public OptionsForm(Action updateAllTileViewsAction,
{
InitializeComponent();
+ radioExportFilenameHex.Checked = AppSettings.ExportFilenameInHex;
+ radioExportFilenameDec.Checked = !AppSettings.ExportFilenameInHex;
+ checkBoxExportFilenameDecPad.Checked = AppSettings.ExportFilenameDecimalPadded;
+ checkBoxExportFilenameDecPad.Enabled = !AppSettings.ExportFilenameInHex;
+
Icon = Options.GetFiddlerIcon();
_updateAllTileViewsAction = updateAllTileViewsAction;
@@ -186,6 +191,22 @@ private void OnClickApply(object sender, EventArgs e)
{
Options.OutputPath = textBoxOutputPath.Text;
}
+
+ bool newHex = radioExportFilenameHex.Checked;
+ bool newPad = checkBoxExportFilenameDecPad.Checked;
+ if (newHex != AppSettings.ExportFilenameInHex || newPad != AppSettings.ExportFilenameDecimalPadded)
+ {
+ AppSettings.ExportFilenameInHex = newHex;
+ AppSettings.ExportFilenameDecimalPadded = newPad;
+ Options.ExportFilenameInHex = newHex;
+ Options.ExportFilenameDecimalPadded = newPad;
+ AppSettings.Save();
+ }
+ }
+
+ private void OnExportFilenameFormatChanged(object sender, EventArgs e)
+ {
+ checkBoxExportFilenameDecPad.Enabled = !radioExportFilenameHex.Checked;
}
private void OnClickBrowseOutputPath(object sender, EventArgs e)
diff --git a/UoFiddler/UoFiddler.csproj b/UoFiddler/UoFiddler.csproj
index b04e12f..3429543 100644
--- a/UoFiddler/UoFiddler.csproj
+++ b/UoFiddler/UoFiddler.csproj
@@ -9,9 +9,9 @@
UoFiddler
UoFiddler
Copyright © 2026
- 4.20.1
- 4.20.1
- 4.20.1
+ 4.20.2
+ 4.20.2
+ 4.20.2
true