Raw D2K Art
- BaronOfStuff
- Posts: 438
- Joined: Sun May 22, 2011 7:25 pm
Oh, now this is good. Thanks for these, now I won't have to scrounge around cutting and pasting existing C&C units together like some sort of low-budget Frankenstein's Army.
I guess I can attempt to create a JASC-format 'purple palette' (using roughly the same range of shades as the commonly-used TD/RA conversion palettes by Nyerguds) so you can translate everything cleanly, but obviously you'd have to resize all the images you want to use yourself.
You can use the TD/RA palettes in Paint Shop Pro (or any other program supporting palettes), although at the moment it wouldn't translate the 'house remap' colour properly.psydev wrote: I am wondering, do you know of a way to convert these graphics to CNC / RA color palettes? I know a lot of them are bigger than 24x24, but a lot of them aren't, and could be resized/recentered.
I guess I can attempt to create a JASC-format 'purple palette' (using roughly the same range of shades as the commonly-used TD/RA conversion palettes by Nyerguds) so you can translate everything cleanly, but obviously you'd have to resize all the images you want to use yourself.
Dune2k SHPs
Already created the windtrap (or at least tried to). It worked in the dev mod "palettetest" (from git) if you rename it as powr.shp and add it like the MCV you can replace the power plant in RA. However transparency at the borders did not work well. I did not use the RA.Utility.exe because I did not understand how it worked (seems you need to arrange the .pngs in a picture using a graphics program and then tell the commandline tool the right properties. But I won't recommend trying XCC Mixer and SHPbuilder either.
I found http://ra.afraid.org/html/downloads/mods.html and extracted some .shps from some strange mod .mix files. The grey building animations looks a little adapted to RA. When I had a look at the original png files the Dune 2000 building animation is cracking out of the sand (even though you reinforced the ground with concrete plates...)
Edit: Removed the game files for copyright reasons.
I found http://ra.afraid.org/html/downloads/mods.html and extracted some .shps from some strange mod .mix files. The grey building animations looks a little adapted to RA. When I had a look at the original png files the Dune 2000 building animation is cracking out of the sand (even though you reinforced the ground with concrete plates...)
Edit: Removed the game files for copyright reasons.
Last edited by Matt on Sun May 13, 2012 5:46 pm, edited 1 time in total.
R8Reader
You can put the PNG pieces together to prepare for RA.Utilities.exe --SHP:
This requires ImageMagick (and a bash script that I will start working on right now).
I am currently working on a DATA.R8 parser because I don't think that uploading pre-converted Dune 2000 game files is legal. https://github.com/Mailaender/OpenRA/commits/ I already fixed the error about stopping at Frame 1010. First it cropped the files ignoring the offset, now it aligns everything to the left using the full frame mimicking the PNGs in d2kout.zip However they are not correctly aligned. In DATA.R8 there is a offset field to position the image inside a virtual frame. I would be happy if someone tells me how to fix it. Notice the Debug messages and the unused variables StartX/Y, EndX/Y that I calculated from OffsetX/Y.
Code: Select all
convert {4109..4150}.png +append mcvdeploy.png
I am currently working on a DATA.R8 parser because I don't think that uploading pre-converted Dune 2000 game files is legal. https://github.com/Mailaender/OpenRA/commits/ I already fixed the error about stopping at Frame 1010. First it cropped the files ignoring the offset, now it aligns everything to the left using the full frame mimicking the PNGs in d2kout.zip However they are not correctly aligned. In DATA.R8 there is a offset field to position the image inside a virtual frame. I would be happy if someone tells me how to fix it. Notice the Debug messages and the unused variables StartX/Y, EndX/Y that I calculated from OffsetX/Y.
However RA.Utility.exe fails:
Edit: This happens when not using compatible PNG files (8bit Indexed palette). Not a bug, just a very technical and hard to understand error message.Received args: --shp mcvdeploy.png 96
System.IO.EndOfStreamException: Failed to read past end of stream.
at System.IO.BinaryReader.ReadByte () [0x00000] in <filename unknown>:0
at OpenRA.FileFormats.Graphics.PngLoader.Load (System.IO.Stream s) [0x00000] in <filename unknown>:0
at OpenRA.FileFormats.Graphics.PngLoader.Load (System.String filename) [0x00000] in <filename unknown>:0
at OpenRA.Utility.Command.ConvertPngToShp (System.String[] args) [0x00000] in <filename unknown>:0
at OpenRA.Utility.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
Last edited by Matt on Sun May 13, 2012 6:00 pm, edited 1 time in total.
DATA.R8 -> PNG -> SHP working!
I removed all the pre-converted SHPs of the original Dune 2000. For legal reasons I don't think we should supply ripped game files even though the game looks like abandonware. However my adapted RA.Utility.exe can now create SHPs from the Dune 2000 R8 game files. https://github.com/Mailaender/OpenRA/co ... 7e8eb8ff95
It works like this (on Linux):
It works like this (on Linux):
I will create a shell script / batch file (Windows) that automatizes this. However the offset is still ignored as it sometimes has negative values or the picture is set outside of the frame and I don't know how handle this at the moment (help appreciated).mono OpenRA.Utility.exe --r8 "/home/user/.openra/Content/d2k/DATA.R8" "mods/palettetest/d2k.pal" 1699 1730 "harvester" --transparent
mono OpenRA.Utility.exe --shp harvester.png 32
Re: DATA.R8 -> PNG -> SHP working!
I hit the same issue with my original parser, which, combined with the legal issues you have already mentioned are why I abandoned my d2k efforts.Cmd. Matt wrote: ↑However the offset is still ignored as it sometimes has negative values or the picture is set outside of the frame and I don't know how handle this at the moment (help appreciated).
I had three thoughts on the problem, which I never followed up on:
- What happens if you increase the frame size to encompass these (seemingly) bogus offsets?
- Are the file format specs wrong? Perhaps the offsets mean something subtlety different from what we think?
- These offsets may be unused by the game, and there may be an offset table embedded elsewhere in the game data / exe
Offsets for infantry frames is
OffsetX = frameWidth/2 - Width/2
OffsetY = frameHeight/2 - Height/2
Offset for vehicles and projectile frames is
OffsetX = frameWidth/2 - frameOffsetX
OffsetY = frameHeight/2 - frameOffsetY
Offset for buildings frames is
if (frameOffsetX < 0) { frameOffsetX = 0 - frameOffsetX; }
if (frameOffsetY < 0) { frameOffsetY = 0 - frameOffsetY; }
OffsetX = 0 + frameOffsetX
OffsetY = frameHeight - frameOffsetY
OffsetX = frameWidth/2 - Width/2
OffsetY = frameHeight/2 - Height/2
Offset for vehicles and projectile frames is
OffsetX = frameWidth/2 - frameOffsetX
OffsetY = frameHeight/2 - frameOffsetY
Offset for buildings frames is
if (frameOffsetX < 0) { frameOffsetX = 0 - frameOffsetX; }
if (frameOffsetY < 0) { frameOffsetY = 0 - frameOffsetY; }
OffsetX = 0 + frameOffsetX
OffsetY = frameHeight - frameOffsetY
works: http://content.open-ra.org/?p=detail&table=units&id=100katzsmile wrote: ↑Offsets for infantry frames is
OffsetX = frameWidth/2 - Width/2
OffsetY = frameHeight/2 - Height/2
works: http://content.open-ra.org/?p=detail&table=units&id=98katzsmile wrote: ↑Offset for vehicles and projectile frames is
OffsetX = frameWidth/2 - frameOffsetX
OffsetY = frameHeight/2 - frameOffsetY
works: http://content.open-ra.org/?p=detail&table=units&id=99katzsmile wrote: ↑Offset for buildings frames is
if (frameOffsetX < 0) { frameOffsetX = 0 - frameOffsetX; }
if (frameOffsetY < 0) { frameOffsetY = 0 - frameOffsetY; }
OffsetX = 0 + frameOffsetX
OffsetY = frameHeight - frameOffsetY
Code: https://github.com/Mailaender/OpenRA/co ... 6ad845446c
Thanks!
I didn't know where and how to change the mapping used in the engine and therefore reversed and cycled the frame order for vehicles. Code is a little redundant and ugly, but it works (tested with palettetest mod). *yay* I think I can start creating the OpenD2k mod now or at least add the Dune 2000 units and buildings to the Red Alert mod. Arrakis.yaml is currently crashing the editor and I don't know how the map tiles where extracted, appended and scripted in the first place.Sleipnir wrote: ↑For some reason, they thought it appropriate to change the mapping between direction and frame. You will need to reverse and cycle the frame order, or (probably simpler in the long run) change the mapping used in the engine.
The arrakis tileset was created with the OpenRA.TilesetBuilder tool.
Up until the last time I looked (about a year ago) it was never very well supported (most of the ui was unfinished and nonfunctional) and it relied on hardcoded parameters in the source. Looking at the current code, this doesn't appear to have changed. I believe that katzsmile was working on a successor at one point, but don't know what happened with it.
Up until the last time I looked (about a year ago) it was never very well supported (most of the ui was unfinished and nonfunctional) and it relied on hardcoded parameters in the source. Looking at the current code, this doesn't appear to have changed. I believe that katzsmile was working on a successor at one point, but don't know what happened with it.