Information and discussion for custom maps and mods.
chrisf
Posts: 246 Joined: Mon Sep 06, 2010 4:59 am
Post
by chrisf » Sun Jan 23, 2011 7:38 pm
Here's a very simple tool for converting 8bit (correct palette!) PNGs to SHP without having to wrangle XCC Mixer.
Setup: unzip this package into a folder somewhere
Name your PNGs with frame numbers -- 1.png, 2.png, 3.png etc.
Do
Code: Select all
`makeshp firstframe# lastframe# outputfile.shp`
like this:
Attachments
makeshp-a1.zip
makeshp and prerelease version of OpenRA.FileFormats.dll required for it to work (53.94 KiB) Downloaded 529 times
chrisf
Posts: 246 Joined: Mon Sep 06, 2010 4:59 am
Post
by chrisf » Sat Jan 29, 2011 3:09 am
Ouch! Two retarded things:
1. I left an absolute path in the app.
2. The .NET image loader forces everything to the wrong pixelformat on load, so the palette is all screwy.
chrisf
Posts: 246 Joined: Mon Sep 06, 2010 4:59 am
Post
by chrisf » Sun Feb 13, 2011 6:06 am
Here's a new version of makeshp. It works the same way, but it fixes the dimensions of the files for you, and also actually works.
Attachments
makeshp-a2.zip
(133.96 KiB) Downloaded 490 times
chrisf
Posts: 246 Joined: Mon Sep 06, 2010 4:59 am
Post
by chrisf » Mon Feb 14, 2011 5:14 am
Disregard that, I should actually test the builds I upload.
Attachments
makeshp-a3.zip
(133.94 KiB) Downloaded 512 times
Matt
Posts: 1144 Joined: Tue May 01, 2012 12:21 pm
Location: Germany
Post
by Matt » Sat May 26, 2012 9:48 am
You should add this to OpenRA.Utility.exe
Matt
Posts: 1144 Joined: Tue May 01, 2012 12:21 pm
Location: Germany
Post
by Matt » Mon Jul 02, 2012 5:12 pm
Do you still have the source code for it?
chrisf
Posts: 246 Joined: Mon Sep 06, 2010 4:59 am
Post
by chrisf » Mon Jul 02, 2012 7:45 pm
This is what grew into OpenRA.Utility's --shp command.
Matt
Posts: 1144 Joined: Tue May 01, 2012 12:21 pm
Location: Germany
Post
by Matt » Mon Jul 02, 2012 8:04 pm
It would be nice to select multiple single PNGs instead of one already appended one sometimes though.
tacozmeister
Posts: 126 Joined: Tue Jun 26, 2012 3:37 am
Location: St. Louis, MO
Post
by tacozmeister » Tue Jul 24, 2012 2:51 am
I tried it, and I got this.
Code: Select all
Unhandled Exception: System.IO.EndOfStreamException: Unable to read beyond the end of the stream.
at System.IO.BinaryReader.ReadByte()
at OpenRA.Fileformats.Graphics.PngLoader.Load(Stream s)
at OpenRA.FileFormats.Graphics.PngLoader.Load(String filename)
at makeshp.Program.Main(String [] args)
I input "makeshp 1 1 anyname.shp" in the correct directory.
chrisf
Posts: 246 Joined: Mon Sep 06, 2010 4:59 am
Post
by chrisf » Tue Jul 24, 2012 9:37 pm
Use OpenRA.Utility, not makeshp. This is a dead tool.