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:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[07:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[06:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
[03:33 pm]
O)FaRTy1billion[MM] -- o sen is back
[2024-4-27. : 1:53 am]
Ultraviolet -- :lol:
[2024-4-26. : 6:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[2024-4-26. : 6:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[2024-4-26. : 6:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[2024-4-26. : 6:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[2024-4-26. : 6:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
Please log in to shout.


Members Online: Roy