Tileset Builder 2
Tileset Builder 2
New Tileset builder
Features:
- You can specify palette for image
- You can create new tileset in any moment
- Preloading terrain type defaults
- Editable tileset properties
- Fixed XCC Mixer compatibility (only for 24x24px tiles)
- Fixed magic typo
Sources included
Features:
- You can specify palette for image
- You can create new tileset in any moment
- Preloading terrain type defaults
- Editable tileset properties
- Fixed XCC Mixer compatibility (only for 24x24px tiles)
- Fixed magic typo
Sources included
- Attachments
-
- Tileset Builder 2
- tilesetbuilder2.jpg (370.89 KiB) Viewed 17157 times
-
- TilesetBuilder2.zip
- Tileset Builder 2
- (311.39 KiB) Downloaded 883 times
thank you.
Thank you.
I do not understand this, but thank you, this wil open for new maps...
What kind of tiles do we need or want?
*dune (like yours)
*next x-mas maps?
*jungle
*frozen (ice over lakes, but cannot pass)
*city
*Metro33
*offshore and pirate sea
*area 51
*mordor
*what more can we wish for?
I do not understand this, but thank you, this wil open for new maps...
What kind of tiles do we need or want?
*dune (like yours)
*next x-mas maps?
*jungle
*frozen (ice over lakes, but cannot pass)
*city
*Metro33
*offshore and pirate sea
*area 51
*mordor
*what more can we wish for?
If anyone else wants to try i edited a z-terrain to fit in the 24pixel tilesize and adjusted the colours a bit.
- Attachments
-
- jungle.rar
- (596.37 KiB) Downloaded 771 times
Hail to the soviets!
Export crashed with 32x32 d2k_BLOXBASE.BMP
I am using the precompiled sources with Mono.
PS: Compiling it myself won't help.
Code: Select all
System.ArgumentException: A null reference or invalid value was found [GDI+ status: InvalidParameter]
at System.Drawing.GDIPlus.CheckStatus (Status status) [0x0009d] in /home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Drawing/System.Drawing/gdipFunctions.cs:220
at System.Drawing.Bitmap.LockBits (Rectangle rect, ImageLockMode flags, PixelFormat format, System.Drawing.Imaging.BitmapData bitmapData) [0x00012] in /home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Drawing/System.Drawing/Bitmap.cs:280
at System.Drawing.Bitmap.LockBits (Rectangle rect, ImageLockMode flags, PixelFormat format) [0x00006] in /home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Drawing/System.Drawing/Bitmap.cs:270
at (wrapper remoting-invoke-with-check) System.Drawing.Bitmap:LockBits (System.Drawing.Rectangle,System.Drawing.Imaging.ImageLockMode,System.Drawing.Imaging.PixelFormat)
at OpenRA.TilesetBuilder2.frmBuilder.ExportTemplate (OpenRA.TilesetBuilder2.Template t, Int32 n, System.String suffix, System.String dir) [0x00000] in <filename unknown>:0
at OpenRA.TilesetBuilder2.frmBuilder.ExportClicked (System.Object sender, System.EventArgs e) [0x00000] in <filename unknown>:0
at System.Windows.Forms.ToolStripItem.OnClick (System.EventArgs e) [0x0001c] in /home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripItem.cs:1002
at System.Windows.Forms.ToolStripButton.OnClick (System.EventArgs e) [0x0001a] in /home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripButton.cs:186
at System.Windows.Forms.ToolStripItem.HandleClick (Int32 mouse_clicks, System.EventArgs e) [0x0002a] in /home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripItem.cs:1812
at System.Windows.Forms.ToolStripItem.FireEvent (System.EventArgs e, ToolStripItemEventType met) [0x00042] in /home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripItem.cs:1779
at (wrapper remoting-invoke-with-check) System.Windows.Forms.ToolStripItem:FireEvent (System.EventArgs,System.Windows.Forms.ToolStripItemEventType)
at System.Windows.Forms.ToolStrip.OnMouseUp (System.Windows.Forms.MouseEventArgs mea) [0x00047] in /home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStrip.cs:965
at System.Windows.Forms.Control.WmLButtonUp (System.Windows.Forms.Message& m) [0x0007e] in /home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:5278
at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x0017b] in /home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:5019
at System.Windows.Forms.ScrollableControl.WndProc (System.Windows.Forms.Message& m) [0x00000] in /home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ScrollableControl.cs:813
at System.Windows.Forms.ToolStrip.WndProc (System.Windows.Forms.Message& m) [0x00000] in /home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStrip.cs:1221
at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in /home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:228
at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x00000] in /home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:209
at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) [0x00085] in /home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/NativeWindow.cs:242
PS: Compiling it myself won't help.
Crashes on Windows XP, too. Sorry for German error messages.
I don't understand the code so I doubt I can fix this myself
Code: Select all
************** Ausnahmetext **************
System.ArgumentException: Ungültiger Parameter.
bei System.Drawing.Bitmap.LockBits(Rectangle rect, ImageLockMode flags, PixelFormat format, BitmapData bitmapData)
bei System.Drawing.Bitmap.LockBits(Rectangle rect, ImageLockMode flags, PixelFormat format)
bei OpenRA.TilesetBuilder2.frmBuilder.ExportTemplate(Template t, Int32 n, String suffix, String dir)
bei OpenRA.TilesetBuilder2.frmBuilder.ExportClicked(Object sender, EventArgs e)
bei System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
bei System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
bei System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
bei System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
bei System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
bei System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
bei System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei System.Windows.Forms.ScrollableControl.WndProc(Message& m)
bei System.Windows.Forms.ToolStrip.WndProc(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Geladene Assemblys **************
mscorlib
Assembly-Version: 2.0.0.0.
Win32-Version: 2.0.50727.3634 (GDR.050727-3600).
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll.
----------------------------------------
OpenRA.TilesetBuilder2
Assembly-Version: 1.0.0.0.
Win32-Version: 1.0.0.0.
CodeBase: file:///E:/TilesetBuilder2/OpenRA.TilesetBuilder2.exe.
----------------------------------------
System.Windows.Forms
Assembly-Version: 2.0.0.0.
Win32-Version: 2.0.50727.3634 (GDR.050727-3600).
CodeBase: file:///C:/windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll.
----------------------------------------
System
Assembly-Version: 2.0.0.0.
Win32-Version: 2.0.50727.3634 (GDR.050727-3600).
CodeBase: file:///C:/windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll.
----------------------------------------
System.Drawing
Assembly-Version: 2.0.0.0.
Win32-Version: 2.0.50727.3636 (GDR.050727-3600).
CodeBase: file:///C:/windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll.
----------------------------------------
OpenRA.FileFormats
Assembly-Version: 1.0.0.0.
Win32-Version: 1.0.0.0.
CodeBase: file:///E:/TilesetBuilder2/OpenRA.FileFormats.DLL.
----------------------------------------
System.Core
Assembly-Version: 3.5.0.0.
Win32-Version: 3.5.30729.1 built by: SP.
CodeBase: file:///C:/windows/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll.
----------------------------------------
mscorlib.resources
Assembly-Version: 2.0.0.0.
Win32-Version: 2.0.50727.3634 (GDR.050727-3600).
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll.
----------------------------------------
System.Xml
Assembly-Version: 2.0.0.0.
Win32-Version: 2.0.50727.3053 (netfxsp.050727-3000).
CodeBase: file:///C:/windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll.
----------------------------------------
System.Drawing.resources
Assembly-Version: 2.0.0.0.
Win32-Version: 2.0.50727.3053 (netfxsp.050727-3000).
CodeBase: file:///C:/windows/assembly/GAC_MSIL/System.Drawing.resources/2.0.0.0_de_b03f5f7f11d50a3a/System.Drawing.resources.dll.
----------------------------------------
System.Windows.Forms.resources
Assembly-Version: 2.0.0.0.
Win32-Version: 2.0.50727.3053 (netfxsp.050727-3000).
CodeBase: file:///C:/windows/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_de_b77a5c561934e089/System.Windows.Forms.resources.dll.
----------------------------------------
researching the problems
I started trying to fix it:
seems to fail because the surface1.Image is not Format8bppIndexed as System.Drawing won't work with indexed images. I have not found a solution to this.
I changed DPI from 96x96 to 72x72 because this is what GIMP tells me when I open BLOXBASE.bmp
I also had to remove setting TerrainType to anything other then "Clear":
because I get ArrayIndex out of range otherwise.
Code: Select all
var data = src.LockBits(new Rectangle(0, 0, src.Width, src.Height),
ImageLockMode.ReadOnly, PixelFormat.Format8bppIndexed);
I changed DPI from 96x96 to 72x72 because this is what GIMP tells me when I open BLOXBASE.bmp
Code: Select all
surface1.Image.SetResolution(72, 72);
Code: Select all
string ttype = "Clear";
//ttype = TerrainType[surface1.TerrainTypes[t.Key.X, t.Key.Y]].Type;
I fixed the crash https://github.com/Mailaender/OpenRA/co ... ef59a91ddf and cleaned up the whole code and added it to the MakeFile.
Bitmap src was not properly initialized and SetPixel on Bitmap rbitmap screwed the palette (it does not work with 8bpp) so I replaced it with clone. Took me some time to fix this.
Fixing the broken TerrainType array is next on my TODO list.
Bitmap src was not properly initialized and SetPixel on Bitmap rbitmap screwed the palette (it does not work with 8bpp) so I replaced it with clone. Took me some time to fix this.
Fixing the broken TerrainType array is next on my TODO list.
Everything in OpenRA is indexed to a 8bit color palette. Your PNG is a regular RGB file. I think you just need to convert it.Petrenko wrote: ↑If anyone else wants to try i edited a z-terrain to fit in the 24pixel tilesize and adjusted the colours a bit.