OpenRA Tilesets

Information and discussion for custom maps and mods.
JaySJay
Posts: 6
Joined: Fri Sep 22, 2017 9:53 am

OpenRA Tilesets

Post by JaySJay »

Hello
I would like to make maps for OpenRA, and I want to add few custom tiles to, shell we say, cnc desert tileset.

I've gone through
https://github.com/OpenRA/OpenRA/wiki/E ... ut-modding
and studied OpenRA dirs a little.
It's not that I've got it all (especially part with reversed engineering) but I've understood that you can mod with fairly simple tools.
However before I will be able to start implementing my bigger plans, I need to clarify few things, because it seems that I'm missing something important. I hope you guys can help me. All my questions based on my experience with latest playtest files and utilities.

1) .sno, .des, .tem etc. files have the same structure as shp files, but they were given different extension to link them to corresponding snow, desert, etc. tilesets and palettes. Is this correct?

2) If the previous is true, how come I can't open most of .des files with shp builder? E.g. I can open cliffs1.des, but I can't open bridge*.{des,jun} basically any bridge file? Is that shp builder's issue?

3) If I convert any animated landscape graphic(e.g bridge3.des) file to png via OpenRa.Utility all (water) animation is lost. On github the palette cycling animation was mentioned, but not explained in OpenRa context. Is there any way to extract this animation from shp? How do you do landscape animation after all, via shp frames or via palette cycling?

4) Let's say I've already done custom tilesets, or units - generally any custom graphics and want to share it. Is it possible to share custom graphics with just maps without creating new mod (cause I don't know how to do it yet)?

5) Do yaml files for tilesets referencing graphics in bits directories of corresponding mod?
Why a lot of files that mentioned in tileset's yaml are absent in bits directory (and btw anywhere and openRA directory too). For instance, in desert.yaml tileset of cnc for one of the bridge tiles there is:

-Template@169:
Id: 169
Images: bridge3.des
Size: 6,5
Categories: Bridge
Tiles:
......

But there is no bridge3.des in openRA directory, unless I do:
​OpenRa.Utility cnc --extract bridge3.des
From where I've just extracted it? (the same question goes about palettes)

6) There is also one thing about OpenRa utility that is not very comfortable and transparent to me: sometimes it throws output files to it's home directory, sometimes to <User>\AppData\Local\VirtualStore\Program Files (x86)\OpenRA (playtest) (which is more comfortable) I guess it depends of do I run it as admin or user. Is there anyway to set utilitie's extract/import dir? Or redirect output with smth. like ">" n linux command line utilities?

I would appreciate a lot If you help me to figure at least some of the answers.

User avatar
MustaphaTR
Posts: 201
Joined: Mon Aug 04, 2014 6:38 am
Location: Kastamonu, Turkey

Post by MustaphaTR »

I can answer 4 and 5.

4) Maps can contain custom units and artworks, sounds, palette files for them. But custom tileset (also custom cursors or UI elements) is not supported.

5) Bits folders contain stuff that added just for OpenRA, which original game didn't have. Original game files are found under "MyDocumments/OpenRA/Content/ModCodeName". They are placed in .mix files. You may need XCC Mixer (if you don't have already) to open those files and extract graphics from there. Do not replace anything in this files. If you wanna edit something from there a same named file in bits or map folder would take priority, so put edited file there.

JaySJay
Posts: 6
Joined: Fri Sep 22, 2017 9:53 am

Post by JaySJay »

Hi, Mustapha.
Thanks for your replies.
MustaphaTR wrote: custom tileset (also custom cursors or UI elements) is not supported
4) That's pity(
But now I understand why nobody added intermediate bridge section(water-water) to any of cnc tilesets. (that what I was going to do)
Thats also much harder to find map testers this way.

5) That explains why I wasn't able to find .mix files under OpenRa homedir as well!

User avatar
Graion Dilach
Posts: 272
Joined: Fri May 15, 2015 5:57 pm

Re: OpenRA Tilesets

Post by Graion Dilach »

Then let me answer the first three points.
JaySJay wrote: 1) .sno, .des, .tem etc. files have the same structure as shp files, but they were given different extension to link them to corresponding snow, desert, etc. tilesets and palettes. Is this correct?

2) If the previous is true, how come I can't open most of .des files with shp builder? E.g. I can open cliffs1.des, but I can't open bridge*.{des,jun} basically any bridge file? Is that shp builder's issue?
TD and RA used TMP format for tiles, but indeed the extensions were based on the theater and not on the file format itself. As MustaphaTR mentioned, XCC Mixer would be a good idea here, because it can deal with TMP(RA) as well.
JaySJay wrote: 13) If I convert any animated landscape graphic(e.g bridge3.des) file to png via OpenRa.Utility all (water) animation is lost. On github the palette cycling animation was mentioned, but not explained in OpenRa context. Is there any way to extract this animation from shp? How do you do landscape animation after all, via shp frames or via palette cycling?
Palette cycling is a classic 8 bit term and used in a lot of games of the era, like Heroes 2 (for the Phoenix, among others) or Transport Tycoon Deluxe. What this means that areas painted with a specific color will step from a color slot to another and back in a cycle. The reason you're losing the pal cycling during conversion back'n'forth is probably because your result SHP ended up with a similar but different color index and the cycling doesn't get triggered. You can look at your mod's rules/palettes.yaml for the RotationPaletteEffect trait for the actually-used-in-mod pal rotation. Refer to the Traits wiki page - https://github.com/OpenRA/OpenRA/wiki/Traits - for defaults.
Image
Image
Image
AS Discord server: https://discord.gg/7aM7Hm2

abcdefg30
Posts: 366
Joined: Mon Aug 18, 2014 6:00 pm

Post by abcdefg30 »

As it looks, some of those files are renamed shp files, and others tmp files as Graion said. (shp for overlays like craters and smudges, and tmp for "real" tiles, I suppose.) At least that's how XCC Mixer is displaying them for me. That'd also explain why you can open some of them using OS Shp Builder.

Btw, there's also a TMP Editor within the XCC Utilites, but I didn't have any luck with it either.

User avatar
Sleipnir
Posts: 796
Joined: Wed Apr 10, 2002 11:52 pm
Contact:

Post by Sleipnir »

Note that OpenRA can use any of the supported image formats for terrain, so isn't limited to tmp. The game almost supports map-defined tileset overrides, somebody just needs to complete the final work in the `Ruleset` class.

User avatar
Graion Dilach
Posts: 272
Joined: Fri May 15, 2015 5:57 pm

Post by Graion Dilach »

abcdefg30 wrote: Btw, there's also a TMP Editor within the XCC Utilites, but I didn't have any luck with it either.
The TMP Editor is for TMP(TS) files.
Image
Image
Image
AS Discord server: https://discord.gg/7aM7Hm2

JaySJay
Posts: 6
Joined: Fri Sep 22, 2017 9:53 am

Post by JaySJay »

Thank you for responses, guys.

Now it's clear that that xcc mixer is among important things that I was missing. I was aware of original TD/RA file formats, but somehow I had a (wrong)belief that OpenRA mostly no longer using them.

abcdefg30
Posts: 366
Joined: Mon Aug 18, 2014 6:00 pm

Post by abcdefg30 »

Graion Dilach wrote:
abcdefg30 wrote: Btw, there's also a TMP Editor within the XCC Utilites, but I didn't have any luck with it either.
The TMP Editor is for TMP(TS) files.
Ah that explains it, thanks.

Matt
Posts: 1029
Joined: Tue May 01, 2012 12:21 pm
Location: Germany

Post by Matt »


abcdefg30
Posts: 366
Joined: Mon Aug 18, 2014 6:00 pm

Post by abcdefg30 »

Cool stuff. Unfortunately they ( http://resource.openra.net/maps/22282/ ) are using/have to use actors for terrain, so not sure if that helps. (Works fine with decorative elements, but I'm really unsure about passable terrain or terrain you can build on.)

JaySJay
Posts: 6
Joined: Fri Sep 22, 2017 9:53 am

Post by JaySJay »

abcdefg30 wrote:
Cool stuff. Unfortunately they ( http://resource.openra.net/maps/22282/ ) are using/have to use actors for terrain, so not sure if that helps. (Works fine with decorative elements, but I'm really unsure about passable terrain or terrain you can build on.)
You definitely can't build on these and most likely can't move over, it depends on footprint, I guess.
Maybe footprint __.__ will make decorations passable(I should try it).

What I can't really get when I'm looking at this map is how author/you guys work with .pal files.

I'm getting palletes out of td/ra shps with --png, as it returns indexed color image, after that I'm able to save image's pallete as separate file(same png or special formats supported by modern graphic processors) and create new graphics with it.

But how do I export my pallete back to .pal file format?

JaySJay
Posts: 6
Joined: Fri Sep 22, 2017 9:53 am

Post by JaySJay »

JaySJay wrote: But how do I export my pallete back to .pal file format?
Ah,
XCC mixer's copy as .pal option.
Haven't used XCC mixer a lot so far, I found OpenRA Utility more handy for extraction tasks and I don't need to mess with mix files yet.

By the way, anyone know why most of the time, I'm seeing just black squares in XCC?

Image

all td/ra native mix files, except desert.mix as well:

Image

I thought it might be due incorrect pallete, but I can't select it as well, even if I'm browsing the directory with several .pal files "select palet" list is empty.

User avatar
netnazgul
Posts: 469
Joined: Mon Jul 10, 2017 7:32 am
Location: Minsk
Contact:

Post by netnazgul »

You should first point XCC Mixer to content/ra folder (where your ra mixes are) somewhere in options and then restart the app. On restart check that folder path is still there. After that you open one of the mix files and then press "next palette" until you see correctly colored sprites.

The thing doesn't work on Win10 apparently, at least it didn't for me. Selected folder always reverted to clear on restart. Probably mixer tries to save options somewhere windows doesn't allow to.

JaySJay
Posts: 6
Joined: Fri Sep 22, 2017 9:53 am

Post by JaySJay »

netnazgul wrote: You should first point XCC Mixer to content/ra folder (where your ra mixes are) somewhere in options and then restart the app. On restart check that folder path is still there. After that you open one of the mix files and then press "next palette" until you see correctly colored sprites.

The thing doesn't work on Win10 apparently, at least it didn't for me. Selected folder always reverted to clear on restart. Probably mixer tries to save options somewhere windows doesn't allow to.
That was it. Thank you.

Strange, but I'm running it on windows 10.
Have you tried to "run as administrator"?

Post Reply