Staredit Network > Forums > SC1 Mapping Tools > Topic: SCMC (Tentative Name)
SCMC (Tentative Name)
Jun 10 2012, 5:21 pm
By: Cinolt  

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

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:
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.

Post has been edited 5 time(s), last time on Jul 4 2012, 12:48 am by yoonkwun.


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

An artist's depiction of an Extended Unit Death

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?

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

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).


  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[05:27 pm]
martosss -- If you can give me a solution that would fill P1 I'd appreciate it :)
[05:26 pm]
martosss -- So the game fills first the force with most open slots, then alternates ... I saw it in melee maps too - there all players are in the same force and even though the mode is top vs bottom, those 2 new forces are generic and joining players are filling the lobby from top to bottom because it's the same force. I've seen other maps where they Alternate and I assume that's because there the map had 2 forces
[05:25 pm]
martosss -- oops, can't write new lines .. oh well ... force1 : P1, force 2: P2, P3, P4, P5, P6, P7 ... force 3: CPU P8 and P2-6 gets filled first
[05:24 pm]
martosss -- no, jjf, my current setup is force1
[04:00 pm]
jjf28 -- I believe slots fill according to ascending player number, so if the observer is player 1, they'll land in that slot first, if the observer was player 8, they'll land in that slot last
[02:57 pm]
martosss -- Hey folks, a quick question ... when people enter a map lobby, can you force them to go in a particular force first? I have a map where there is 1 player, 6 spectators and 1 computer. The players always enter and go to the observer section first. I want them to first go to the player slot if it's free. Is that possible?
[2020-8-14. : 7:35 am]
MasterJohnny -- stole*
[2020-8-14. : 7:35 am]
MasterJohnny -- some russian asshole my account
[2020-8-13. : 3:41 pm]
Ultraviolet -- :wob:
[2020-8-12. : 1:16 pm]
Zycorax -- :wob:
Please log in to shout.

Members Online: Roy, Avlos, jun3hong, Arkanis