| View previous topic :: View next topic |
| Author |
Message |
katzsmile
Level: 48

Position: Registered User
Joined: 06 Sep 2010
Posts: 22
Kel: 46 [ Donate ]
Online Status: Offline
|
Posted: Wed Jan 25, 2012 9:00 am Post subject: 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
| Attachment: |

|
| Filename: |
tilesetbuilder2.jpg |
| Description: |
Tileset Builder 2 |
| 370.89 KB :: Viewed 1595 Time(s) :: [ Download ] |
|
| Attachment: |
| Filename: |
TilesetBuilder2.zip |
| Description: |
Tileset Builder 2 |
| 311.39 KB :: Downloaded 205 Time(s) :: [ Download ] |
|
|
|
| Back to top |
|
 |
zypres1
Level: 42

Position: Registered User
Joined: 24 Oct 2011
Posts: 209
Kel: 22 [ Donate ]
Online Status: Offline
|
Posted: Thu Jan 26, 2012 12:54 am Post subject: 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?
|
|
| Back to top |
|
 |
Petrenko
Level: 45

Position: Registered User
Joined: 08 Apr 2011
Posts: 126
Kel: 20 [ Donate ]
Online Status: Offline
|
Posted: Fri Feb 10, 2012 9:45 pm |
|
|
Heyho.
I tried making a tileset for cnc but i have a problem:
I doesn't shop up in the editor.
I got no idea where to put the .pal
There is a .png of my try attached.
| Attachment: |

|
| Filename: |
try.png |
| 433.86 KB :: Viewed 1483 Time(s) :: [ Download ] |
|
_________________ Hail to the soviets! |
|
| Back to top |
|
 |
Petrenko
Level: 45

Position: Registered User
Joined: 08 Apr 2011
Posts: 126
Kel: 20 [ Donate ]
Online Status: Offline
|
Posted: Fri Feb 10, 2012 9:50 pm |
|
|
If anyone else wants to try i edited a z-terrain to fit in the 24pixel tilesize and adjusted the colours a bit.
| Attachment: |
| Filename: |
jungle.rar |
| 596.37 KB :: Downloaded 174 Time(s) :: [ Download ] |
|
_________________ Hail to the soviets! |
|
| Back to top |
|
 |
katzsmile
Level: 48

Position: Registered User
Joined: 06 Sep 2010
Posts: 22
Kel: 46 [ Donate ]
Online Status: Offline
|
Posted: Sat Feb 11, 2012 9:48 pm |
|
|
.pal must go to bits folder
tileset yaml must be listed in mod.yaml
|
|
| Back to top |
|
 |
Cmd. Matt
Level: 45

Position: Registered User
Joined: 01 May 2012
Posts: 519
Kel: 518 [ Donate ]
Online Status: Offline
|
Posted: Sat May 26, 2012 11:06 am |
|
|
| I think this should replace Tileset Builder 1 which I can't even start because it requires two undocumented command line options.
|
|
| Back to top |
|
 |
Cmd. Matt
Level: 45

Position: Registered User
Joined: 01 May 2012
Posts: 519
Kel: 518 [ Donate ]
Online Status: Offline
|
Posted: Sat May 26, 2012 4:51 pm |
|
|
| Rough and Rock have the same color which makes them indistinguishable.
|
|
| Back to top |
|
 |
Cmd. Matt
Level: 45

Position: Registered User
Joined: 01 May 2012
Posts: 519
Kel: 518 [ Donate ]
Online Status: Offline
|
Posted: Sat May 26, 2012 4:55 pm |
|
|
Export crashed with 32x32 d2k_BLOXBASE.BMP
| Code: | 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 |
I am using the precompiled sources with Mono.
PS: Compiling it myself won't help.
|
|
| Back to top |
|
 |
katzsmile
Level: 48

Position: Registered User
Joined: 06 Sep 2010
Posts: 22
Kel: 46 [ Donate ]
Online Status: Offline
|
Posted: Thu May 31, 2012 10:50 am |
|
|
| My tools - SHPViewer and TileSetBuilder 2 is not designed for Linux and Mono. Never ever try using it underr Mono. Or grab the sources and fix the bugs yourself
|
|
| Back to top |
|
 |
Harisson
Level: 67

Position: Registered User
Joined: 13 Jan 2008
Posts: 128
Kel: 114 [ Donate ]
Online Status: Offline
|
Posted: Thu May 31, 2012 11:11 am |
|
|
| katzsmile, can you allow tileset with less size ? Maybe 16x16....
|
|
| Back to top |
|
 |
Cmd. Matt
Level: 45

Position: Registered User
Joined: 01 May 2012
Posts: 519
Kel: 518 [ Donate ]
Online Status: Offline
|
Posted: Thu May 31, 2012 2:12 pm |
|
|
Crashes on Windows XP, too. Sorry for German error messages.
| Code: | ************** 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.
---------------------------------------- |
I don't understand the code so I doubt I can fix this myself
|
|
| Back to top |
|
 |
Cmd. Matt
Level: 45

Position: Registered User
Joined: 01 May 2012
Posts: 519
Kel: 518 [ Donate ]
Online Status: Offline
|
Posted: Wed Jun 06, 2012 2:28 pm Post subject: researching the problems |
|
|
I started trying to fix it:
| Code: | var data = src.LockBits(new Rectangle(0, 0, src.Width, src.Height),
ImageLockMode.ReadOnly, PixelFormat.Format8bppIndexed); |
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
| Code: | | surface1.Image.SetResolution(72, 72); |
I also had to remove setting TerrainType to anything other then "Clear":
| Code: | string ttype = "Clear";
//ttype = TerrainType[surface1.TerrainTypes[t.Key.X, t.Key.Y]].Type; |
because I get ArrayIndex out of range otherwise.
|
|
| Back to top |
|
 |
Cmd. Matt
Level: 45

Position: Registered User
Joined: 01 May 2012
Posts: 519
Kel: 518 [ Donate ]
Online Status: Offline
|
Posted: Thu Jun 07, 2012 5:28 pm |
|
|
I fixed the crash https://github.com/Mailaender/OpenRA/commit/8f1d06ff31487f92b43e1c06192885ef59a91ddf 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.
|
|
| Back to top |
|
 |
Cmd. Matt
Level: 45

Position: Registered User
Joined: 01 May 2012
Posts: 519
Kel: 518 [ Donate ]
Online Status: Offline
|
Posted: Thu Jun 07, 2012 6:15 pm |
|
|
| Petrenko wrote (View Post): | | If anyone else wants to try i edited a z-terrain to fit in the 24pixel tilesize and adjusted the colours a bit. |
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.
|
|
| Back to top |
|
 |
Cmd. Matt
Level: 45

Position: Registered User
Joined: 01 May 2012
Posts: 519
Kel: 518 [ Donate ]
Online Status: Offline
|
Posted: Sun Jun 17, 2012 11:02 am |
|
|
| Everything is fixed now (except MIX file writing) and merged into OpenRA.
|
|
| Back to top |
|
 |
|