I do not guarantee, that it is the most efficient/best method or anything - it's more like a shitty workaround - but it works.
The "custom tileset" is in fact just a bunch of custom actors with large graphics that emulate the terrain - even while they can be set to be displayed below any actor, resources and craters seem to be displayed below them.
In other words: Resources and craters which are on the same tile as a custom tile will be invisible!
Another thing is, that this method will require you to work with .yamls. The custom tileset won't be visible in the editor, as far as I know, so you'll not only have to set the rules, but also place the custom actors via .yaml.
For this tutorial I'm making a 30x30 WINTER Tiberian Dawn map, to show how to use the tiles from RAs much bigger tilesets. If you're able to draw stuff, or have your own tileset lying around somewhere, you can of course use those tiles, too.
THIS TUTORIAL MIGHT BE USELESS TO RA-MAPPERS, AS TDs TILESETS DON'T CONTAIN ANYTHING THAT RAs TILESETS DON'T HAVE.
If you want to use custom tilesets in RA, you'll need to find or make your own tiles.
If you don't want to read the tutorial but just have a working example, you can either check out the Sunset map, or the finished tutorial map Custom Tileset Tutorial Map.
Step One: Making the base map
Make your map. I'm going to make an island with cliffs, which is trivial in RA, but impossible in TD.
The places you plan to replace do not have to be very detailed, since they won't be displayed anyway. Simply placing 1-tile rocks for places that are supposed to block movement would suffice, and since those places can't have craters or resources on them, anyway, it shouldn't be a problem. But since we're just going to replace some cliff-graphics, we might as well use cliffs, instead of rocks.
Step Two: Screenshots
Now, make as many screenshots of your map as needed to be able to fit the entire map seamlessly at 100% resolution in an image editing program.
You should try to cut out the picture accurate to every single pixel. Zoom in, if you have to.
I'm using GIMP, which is nice because it's free and supports layers - I can only recommend working with layers, as they make this much easier. I'm assuming that you know how to work with your image editing tool.
I'm also using alt+tab to keep the editor open, while using the image editor - in case there is an oversight in the basic map, you can fix it faster that way, instead of having to open and close the editor all the time.
Step Three: Editing
It can help to make a new layer which consists only of colored tiles, depicting the tile size of the mod you're working with. For TD and RA it is 24x24, for Dune 2000 it is 32x32. Obviously you'll want to make that layer transparent, to see the original map.
Now we're making an RA map, which contains all the tiles we need to finish this island - in this case, water cliffs.
I put the playerspawns around all those tiles, in order to make it easier to see which part belongs to the cliff template, and which does not.
Now we make a screenshot of this map and make it either a new layer or a new file - whatever suits you better. We will now copy all those cliffs from the RA screenshot over to the TD screenshot. For this we need another layer.
Once you're done copying everything, it should look like this.
Depending on how much effort you want to put into this, you can either leave it now as it is, or erase a bit from the RA tiles to make snowy parts from the TD tiles visible again - that is, if your TD cliffs are on a layer below the RA cliffs.
You can also draw your own stuff into the map. Before you start drawing some masterpiece, keep in mind that the game only has 256 colors, so if you use a lot of colors the end result might look rather bad (.png support was already suggested on github as a feature, but it looks like this feature won't be added any time soon, if ever).
My map looks like this right now.
As you can see, I placed some actors, including resources and player spawns in between. You'll want to have every actor you want to see on the map placed, before importing the "custom tileset".
It is even possible to make your map animated. But for that it might be easier to simply make a custom actor for the animated parts, instead of animating all of the map.
Step Four: Exporting
Once the map looks like you want it to, you can now export the image you created. For this disable all layers, that you do not want to show up in your map. For me those are the 24x24 tile grid and the screenshot of the base map. You will need a black layer at the bottom now, since black is the "transparent color" in the default mods.
For exporting you do not want to have anything using transparency - in the screenshot above you can see some stuff which is partially transparent - and when this picture is converted to a paletted image this creates ugly results, as openRA can't handle transparency in shps, apart from the completely transparent color black. Therefore you need to add another layer with the texture that is supposed to be displayed below the transparent stuff - in this case, it's cutout bits of the base map.
Now you're ready to export this image.
NOTE: For big maps you may need to export multiple smaller pictures instead of one big one.
Step Five: Converting to .shp
I'm using the Open Source SHP Builder to convert images from .png to .shp.
Import the picture you just exported into the OS SHP builder. If you only have one image, disable "View Only The First File Of The Package", optimize conversion for the mod you want to use the picture in and you should be good to go. If you have one single huge image, this might be really slow.
Now you may notice that your image looks worse - which is because of the palette-thingy I mentioned before. You can either try to fix it manually (the OS SHP builder has a paletted editor), edit it in your image editing program some more, or remove the offending bits of your map, if it looks unrecoverable.
If you think, your image looks good enough (or want to try to use it anyway), you can now export this. Before you do, set Options->Tiberian Sun->Animation. Trying to export them as Tiberian Dawn .shps makes them unusable for me and causes OpenRA to crash, but maybe you are more lucky than me.
As far as I know, .shps need to have names with 8 letters or less, so keep that in mind, when naming your .shp.
Step Six: Adding the .shp
At this point, your map should be finished and only need to have the shp added. If this is not the case, finish your map now. Whenever I try to edit maps with the editor, that contain custom stuff, the editor crashes for me.
Locate your .oramap and open it. The .oramap format is basically a .zip and you should be able to open it with any file archiver that can open those. I know that 7zip works (because it's what I'm using).
Extract the map.yaml and open it with a text-editor.
Scroll past all the actors and add a new one (don't forget to increment the number) and give it a unique name (such as "maptile1"). The location should be the center of where the maptile is supposed to be placed, in my case this happens to be 15,15 (map was 30x30 tiles big).
Go to rules and paste this:
Code: Select all
^MapTile: RenderBuilding: Palette: staticterrain Building: Footprint: __ __ Dimensions: 2,2 Health: HP: 1 Armor: Type: Wood AutoTargetIgnore: BodyOrientation: FrozenUnderFog: StartsRevealed: true ScriptTriggers: DamageMultiplier: Modifier: 0
Go to sequences and define your own maptiles, but also add ZOffset: -20000. That should make the maptile display below every other actor.
Once all is set, the interesting part should look like this (at least it does for my map, as my map only contains 9 "normal" actors).
Code: Select all
Actor10: maptile1 Location: 15,15 Owner: Neutral Smudges: Rules: ^MapTile: RenderBuilding: Palette: staticterrain Building: Footprint: __ __ Dimensions: 2,2 Health: HP: 1 Armor: Type: Wood AutoTargetIgnore: BodyOrientation: FrozenUnderFog: StartsRevealed: true ScriptTriggers: DamageMultiplier: Modifier: 0 maptile1: Inherits: ^MapTile Sequences: maptile1: idle: tutorial Start: 0 ZOffset: -20000
Now it's time to try the map.
If you did everything correctly, it should work now.
First post ever on this forum (or any forum for that matter), I hope this all worked out correctly.
I have never written tutorials before, so if anything is unclear, let me know.
EDIT: So apparently I'm too stupid to get the image links working, so just follow the links for now.