Jump to content

Terrain tricks: northern island corners


Recommended Posts

As some of you may have noticed, compared to Red Alert 1, C&C1 is lacking a fair bit in terms of tilesets. And to remedy that, map makers have had no choice but to resort to trickery.

However, the point of trickery is of course to actually trick the player. If you have a horrible-looking terrain transition, then sure, pasting a dozen trees over it will probably mostly cover it up... but it's not a pretty solution, and it's hardly subtle. Instead, let's look at some more elegant solutions that only involve map tiles.

Two of the things that requires such trickery are the north-east and north-west shore corners. Plain and simple, C&C1 doesn't have them. And yet, when Chad1233 asked me about them, I distinctly remembered making maps that contained them. Some research later, I realized I made fairly pretty-looking corners by cheating the system; I built them by cleverly combining tiles from different tilesets.


One of these tricks, the one seen at the left side, is fairly easy. I generally call it "the stump", because it always sticks out a bit.

These 'stumps' can be made in two directions, and are done simply by taking the river mouths of both the top- and bottom-facing variety, pasting them together, cutting them in half, and then putting the normal curving-down tileset at the bottom of the half you end up using:


So yeah, fairly simple. But, for the north-east version up there, as you notice, it does not actually stick out. Yes, there's clearly still river-trickery involved, as you can see from the grass leading up to the water, but the shore itself actually has more or less the shape you'd expect from a shore corner.

This process is a bit more tricky, but it can in fact be done without resorting to hex-editing tiles into the map's .bin file (see below for more on that). Here's how I did it:


Of course, these two final shore pieces in the two last steps can be whatever you want. The actual bit you need is just this:


And it can just as well be used with other adjacent pieces:


The possibility, as dear Dr. Moebius said... are limitless!


I fiddled around a bit, but so far, I haven't been able to construct a non-stump version of the north-west one, though. if I ever figure one out, I'll post it here too.

If anyone else knows similar mapping tricks, please post them! I'd love to see more of these.

  • Upvote 5
Link to comment
Share on other sites

Thanks :)

Here's a slightly decreased stump design, which does require a little hex editing. The piece indicated in red on the third frame is moved to the area indicated in blue.


Small intro to hex editing maps... a C&C map consists of 64 rows of 64 cells, with 2 bytes per cell, making it always exactly 8192 bytes long. For each of these cells, the first byte is the tileset ID (as can be looked up in my tilesets ini file), and the second indicates which tile number of that tileset to use.

Tileset ID FF is reserved for clear terrain (official maps have all clear terrain saved as "FF 00" cells), but, annoyingly, XCC insists on saving clear terrain as the actual repeating 4x4 tiles pattern of all 16 cells of tileset ID 00, meaning values 00 00, 00 01, 00 02, etc, up to 00 0F.

To hex edit a map, I basically use a 1x1 'marker' block that is easy to recognize. My default marker in the old days was 05 00 (rock in water) but given the aforementioned fact that xcc doesn't use the default terrain marker, there will be a lot of "00 05 00 06" in there already, making the value 05 00 hard to use.

Instead, nowadays, I've been using the P04 "UFO" tile. It's generally rarely used in a map (and if it is, you can leave that for after your editing), and it has an ID higher than 0F so we don't have to deal with XCC's blank terrain mess. Its ID in the map file should be "46 00" (tile ID 70, tile 00). P03 (45 00) is another good one, but the more different markers you use, the more map decoration you have to delay until after all this editing.

Anyway. To copy the piece above, first mark each area using a marker. The terrain to replace can be marked simply by replacing it by the marker. The piece to copy should get a marker to the left or right of it, since maps are saved in horizontal lines, so you'll know the bytes right next to your marker are the bytes to copy.


Note that you don't strictly need the copy markers; if you know which tileset the tiles are from (XCC editor shows this), and you know which tiles they are, you can figure out that the tileset is SH9, which has ID 91 (in the tilesets.ini file), or 5B in hex, and that the tiles to use are the center right and lower right ones in the 3x3 grid:

0 1 2
3 4[5]
6 7[8]

This means the values we'll find are "5B 05" and "5B 08".

So anyway, P03 is our replace marker, and P04 indicates the cells just right of the tiles to copy. With that done, save the map, open the .bin file in your favourite hex editor, and let's look for 46 00, the ID of our copy marker.


As predicted, the values before the copy markers are "5B 05"  and "5B 08". Now we remember those, and we go find our replace markers, 45 00.


Well, that wasn't too hard; they're right there. So now we replace those two by the two values we found.


Done! Save and exit, and let's see the result if we reload the map in XCC Editor:


The edit is applied! Now you can clean up the copied piece and the copy markers, and your edit is done.

Link to comment
Share on other sites

Beach-less islands and lakes are also possible in temperate and winter by carefully combining river and river-to-shore tiles. See my Fjord map for reference.

I had an example, but on another computer: I might later post a pic of a land bridge in desert. I.e. faking a river going through a tunnel under a cliff. Rudimentary stuff, but with some hexing it can work better.

  • Upvote 1
Link to comment
Share on other sites

4 minutes ago, cn2mc said:

Beach-less islands and lakes are also possible in temperate and winter by carefully combining river and river-to-shore tiles. See my Fjord map for reference.

I had an example, but on another computer: I might later post a pic of a land bridge in desert. I.e. faking a river going through a tunnel under a cliff. Rudimentary stuff, but with some hexing it can work better.

I can't believe I never really looked at this... is that entire lake made from disjointed river tiles?
And the island too, for that matter?

Edited by AchromicWhite
  • Confused 1
Link to comment
Share on other sites

Small lake is only rivers, I think. Island probably too. The fjord itself is a combination of shore and river. It switches to beach in the West. The idea came to me before, when I was one time making a similar fjord-like mission, and I wanted to have cliffs as near to the water as possible.

  • Like 1
Link to comment
Share on other sites

Here it is: a land bridge in the desert theatre. Only the two top waterfall cells needed actual hex editing, the East part I did by simply overlapping tiles in XCC. Maybe there is a suitable cell in the river tileset that will mask the lack of shadow and blend in with the cliff better than the dumb tree solution.



  • Upvote 3
Link to comment
Share on other sites

It should... the RA map data is converted to base64 (and compressed I think) but the data is saved the same way, only with 3 bytes per cell IIRC, allowing IDs that span 2 bytes. In fact I think RAED even has features for copying and pasting single template cells.

But the point is rather moot; RA actually has all those tiles we're faking into existence here :P

Link to comment
Share on other sites

Yeah, but the copy-paste function for tiles sounds tasty. Couldn't that, or a 'deconstructed' template section where you can choose 1 tile out of a set be added to one of the existing editors for TD? 

Link to comment
Share on other sites

I doubt it, but I could probably write my own if I feel up to it... already got code to read (and write) the tileset format, and the maps are peanuts; all that remains is the mix format, and I doubt that's hard.

Link to comment
Share on other sites

A different tool for just editing .bins sounds much more streamlined, yes. Is the .mix thing really needed for anything besides hacking in new tiles? Because the way I see it, if you have a tool that can open and edit template files with simple draw and copy/paste functions, you can just have the corresponding bytes for every tile and store them as a standalone palette or something, or am I wrong? 

Anyway, this is kind of going off topic. I'll maybe show 'long bridges' later. I'd like to hear ideas for more things to do with maps, because I like this thread.

Link to comment
Share on other sites

Yeah, that land bridge is pretty neat. Haven't done any hex editing myself, so I'd have to learn a bit to get started; but it's helpful, for sure. A simple copy/paste tool would be good. It means that people don't have to learn simple hex to be able to make what they want in maps.

Most of the "tricks" I've done in mapping have just been to make roads work when the lengths available are not quite right... pretty simple stuff, lol.

  • Confused 1
Link to comment
Share on other sites

  • 2 weeks later...
On 5/12/2018 at 12:25 AM, cn2mc said:

Is the .mix thing really needed for anything besides hacking in new tiles?

There's this little detail called "reading the original theater data to actually show the map"... otherwise you may as well use CC-SCEN :P

It would be kind of a bother if the first line in the manual of such a tool was "extract all files from temperat.mix, desert.mix, winter.mix and snow.mix into a new folder, because this tool can read TMP files but can't read them from mix files" :rolleyes:

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...