Staredit Network > Forums > SC1 Terrain > Topic: SCMDraft Clipboard Data
SCMDraft Clipboard Data
Apr 4 2015, 1:12 am
By: A_of-s_t  

Apr 4 2015, 1:12 am A_of-s_t Post #1

aka idmontie

I'm working on a SC Terrain related project, and I figured I'd jot these notes down in the forum. Sorry if it's old news to everybody, I'm just getting back into the game:

When you copy terrain squares in SCMDraft, the clipboard data looks like the following for one tile selected:

52 52 45 54 00 00 00 00 01 00 01 00 B0 4D

The first 32 bits of the above hex is just SCMDraft related and I'm not exactly sure what it represents (in ascii it is RRET).

The next 32 bytes seem to always be 00 00 00 00. Maybe I'm not doing anything special enough to cause those bits to change.

The next 32 bytes are descriptions of the size. 01 00 01 00 is a 1x1 square, 02 00 02 00 is a 2x2 square.

Every 16 bytes after that are terrain values.

Now what is interesting is that SCMDraft let's you use the shift button to copy some weird shapes. Here I am copying a 2x2 and a 1x1 block:



Here is the hex for that copy:

52 52 45 54 00 00 00 00 | 03 00 02 00 11 4E 12 4E | FF FF 21 4E 22 4E 23 4E

So the first 2 sets of 32 bits don't change.

The next set of 32 bits describe that we have a 3x2 block. And then each set of 16 bytes describe each tile, going across the rows. The FF FF is a special tile to SCMDraft that means NOT A BLOCK or something similar.

The reason I am looking into this is I'm trying to find a better way to share terrain rather than just sharing huge, unsearchable maps.



Personal GitHub
Starcraft GitHub Organization - Feel free to request member status!
TwitchTV

Apr 4 2015, 2:37 am O)FaRTy1billion[MM] Post #2

👻 👾 👽 💪

"RRET" (or "TERR") is probably just's SCMD's way of specifying "This is a block of terrain".
FFFF would just mean "use existing tile" or "none"


Based on your question in the shoutbox, are you trying to figure out how to get the tileset tile from these 16-bit values in SCMDraft? The high 3-nibbles (0xFFF0 >> 4) specify the *.cv5 group index, and the low nibble (0x000F) specifies which one of the 16 tiles from that group.



TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

Apr 4 2015, 2:45 am A_of-s_t Post #3

aka idmontie

Quote from O)FaRTy1billion[MM]
"RRET" (or "TERR") is probably just's SCMD's way of specifying "This is a block of terrain".
FFFF would just mean "use existing tile" or "none"

Yeah, these are no big deal to work with. I didn't even think about the endian-ness of the hex.

Quote from O)FaRTy1billion[MM]
Based on your question in the shoutbox, are you trying to figure out how to get the tileset tile from these 16-bit values in SCMDraft? The high 3-nibbles (0xFFF0 >> 4) specify the *.cv5 group index, and the low nibble (0x000F) specifies which one of the 16 tiles from that group.

Ok, that clears that up, I was going to ask about that next in the shoutbox, thanks!

Just to clear it up, I'm getting the raw clipboard data from SCMDraft so that I can generate a picture from it.



Personal GitHub
Starcraft GitHub Organization - Feel free to request member status!
TwitchTV

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[09:04 pm]
NudeRaider -- Heinermann
Heinermann shouted: who decided "we're not necessarily anti-bot"? It's worse than spam, it's social engineering to trick people into believing that they are legitimate and get them to click their links
I think moose made the rules
[08:33 pm]
NimoStar -- Is UndeadStar like an undead version of me?
[05:51 pm]
UndeadStar -- Symmetry
Symmetry shouted: kinda looks like we need to auto ban all new accounts with 3 numbers at the end lmao
Members Online: UndeadStar, FranciBizjak898, LukaNovak271, GesineFalkenthal863, AjdaSkubic907, JonasAlthaus047, LukasWeigel655
[05:13 pm]
lil-Inferno -- SEN literally had a butlerian jihad before and now he talmbout we aren't anti-bot? 🤨
[12:17 pm]
Zakerozi -- Dfk is going on here :D
[03:47 am]
Symmetry -- kinda looks like we need to auto ban all new accounts with 3 numbers at the end lmao
[12:56 am]
Heinermann -- who decided "we're not necessarily anti-bot"? It's worse than spam, it's social engineering to trick people into believing that they are legitimate and get them to click their links
[2026-11-12. : 6:04 pm]
NudeRaider -- ihjel
ihjel shouted: "Use Display Text Message or the in-game Leaderboard to output the live values of critical Death Counters." that would be so convenient wouldn't it.
ihjel
ihjel shouted: "Use Display Text Message or the in-game Leaderboard to output the live values of critical Death Counters." that would be so convenient wouldn't it.
it's rather inconvenient actually, as it requires you to transfer it to Custom Score which might even interfere with what you're measuring. But IIRC you can also use EUDs to display it which by now could actually be somewhat convenient.
[2026-11-11. : 9:25 pm]
ihjel -- "Use Display Text Message or the in-game Leaderboard to output the live values of critical Death Counters." that would be so convenient wouldn't it.
Please log in to shout.


Members Online: Moose