[skip all navigation]

SCMC (Tentative Name), Map Binary Compiler

Creator: yoonkwun
Time: Jun 10 2012, 5:21 pm

Post #1     yoonkwun Jun 10 2012, 5:21 pm

[Avatar]
offlinecontact
Rank: Regular
SCMC is a tool (though somewhat more of an API) to compile binary trigger, location, and unit data into a map systematically, allowing all of the flow control, math functions, etc. that the C/++ language provides.

First you need a C++ compiler (the rest of the instructions assume GCC (Minimalistic GCC for Windows), remember to check the option for the C++ compiler. You need to include the directory to the GCC executables to your PATH environment variable. For Windows, assuming installation at C:\MinGW, the directory is C:\MinGW\bin. So if the existing contents of the PATH environment variable is ABC123, then the new PATH environment variable should read C:\MinGW\bin;ABC123).

Unpack the scmc files anywhere (dirty hack for Windows; I stole SFmpq.dll from MapSketch because compiling it gave me a runtime error :x). Read the header files (files that end in .h) for the C prototypes/enums.

Use a batch file, or use Notepad++ with the NppExec plugin (similar to MacroTriggers' instructions), using this script:

Code

cd "$(CURRENT_DIRECTORY)"
NPP_SAVE
g++ -I. -L. -lSFmpq -lscmc "$(FILE_NAME)" -o scmc.exe
./scmc.exe $(NAME_PART)pre.scx $(NAME_PART).scx
xcopy /y $(NAME_PART).scx "C:\Program Files (x86)\StarCraft\Maps"

The last command doesn't work as it is from lack of privileges; installing StarCraft in an alternate directory would remedy this problem.

I honestly don't have the motivation to explain it more formally, but I'll explain details on a question/answer basis. There's example files tankdefense.cpp and tankdefensepre.scx. Open it with Notepad++ and run the script to get the result, tankdefense.scx.
This post was edited 5 times, last edit by yoonkwun: Jul 4 2012, 12:48 am.

Top

Post #2     Roy Jun 10 2012, 5:50 pm

[Avatar]
An artist's depiction of an Extended Unit Death
offlinecontact
Rank: Veteran
Most mappers on Windows 7 have SC installed somewhere other than the Program Files directory for specifically that privileges reason. I personally put all my games in C:\Games.

So... This program is to code SC map data in C? Is there some advantage to this over just using an editor, excluding familiarity?

Top

Post #3     yoonkwun Jun 10 2012, 5:58 pm

[Avatar]
offlinecontact
Rank: Regular
Advanced maps with more sophisticated triggers (location grids, binary countoffs) require many (in the order of thousands) redundant triggers, which are made systematically. Basically it has the same advantage as the other trigger compilers (MacroTriggers, ProTRG, Oreo Triggers) except mine compiles the data directly into the binary map, not requiring the need for copy and pasting text triggers, and has builtin support for locations/units (for hybrid grids).

Top
0 members in this topic (italic members are currently writing a reply): None
+ guest(s)


[12:25 pm]
Wing Zero -- And hairy arms, you can't forget the hairy arms.
[11:25 am]
TF- -- Shart
[10:18 am]
KrayZee -- "Xbox, go home" is an actual voice command used by the Kinect. :D
[07:19 am]
Lanthanide -- One of the developers clearly said "call of doody"
[06:56 am]
Fire_Kame -- so much
[06:56 am]
Fire_Kame -- there was so much opportunity
[06:51 am]
O)FaRTy1billion -- At the very end they talk about Call of Duty and how you have a dog, and that's about it for games
Please log in to shout.