This a tutorial for integrating SCA functionality into your map.
Use this information to add SCA to an existing map you’ve already made.

To get started, create these 6 DC’s by renaming units that you don’t use.
RUNSAVE
GAMESAVE
SAVETIME
DISCCHECK
LOADCHECK
MONEY
Personally, I like to use the turret units under the * section of Terran for this purpose.

Once you have renamed 6 units to exactly as above, open TrigEdt++ above and insert the following triggers:
If you don’t have TrigEdit++ showing, it means you do not have it installed. You can download TrigEdit++ here: ttps://scrmaps.com/tools/
To install TrigEdit++, simply put the file inside the plugins folder of SCM Draft.
Trigger { -- No comment (31D979D9) players = {P8}, conditions = { Deaths(CurrentPlayer, AtMost, 9000, "SAVETIME"); }, actions = { SetDeaths(CurrentPlayer, Add, 1, "SAVETIME"); PreserveTrigger(); }, } Trigger { -- No comment (4D7C7DC7) players = {P8}, conditions = { Deaths(CurrentPlayer, AtLeast, 9000, "SAVETIME"); }, actions = { SetDeaths(CurrentPlayer, SetTo, 0, "SAVETIME"); SetDeaths(P1, Add, 1, "SAVEGAME"); SetDeaths(P2, Add, 1, "SAVEGAME"); SetDeaths(P3, Add, 1, "SAVEGAME"); SetDeaths(P4, Add, 1, "SAVEGAME"); SetDeaths(P5, Add, 1, "SAVEGAME"); PreserveTrigger(); }, } Trigger { -- No comment (5579B3D8) players = {Force1}, conditions = { Deaths(CurrentPlayer, AtLeast, 1, "SAVEGAME"); Accumulate(CurrentPlayer, Exactly, 0, Ore); }, actions = { SetDeaths(CurrentPlayer, SetTo, 0, "SAVEGAME"); SetDeaths(CurrentPlayer, SetTo, 1, "RUNSAVE"); PreserveTrigger(); }, } Trigger { -- No comment (52AB5C5E) players = {Force1}, conditions = { Deaths(CurrentPlayer, AtLeast, 1, "SAVEGAME"); Accumulate(CurrentPlayer, AtLeast, 1, Ore); Accumulate(CurrentPlayer, AtMost, 9, Ore); }, actions = { SetResources(CurrentPlayer, Subtract, 1, Ore); SetDeaths(CurrentPlayer, Add, 1, "MONEY"); PreserveTrigger(); }, } Trigger { -- No comment (D61B8F0C) players = {Force1}, conditions = { Deaths(CurrentPlayer, AtLeast, 1, "SAVEGAME"); Accumulate(CurrentPlayer, AtLeast, 10, Ore); Accumulate(CurrentPlayer, AtMost, 99, Ore); }, actions = { SetResources(CurrentPlayer, Subtract, 10, Ore); SetDeaths(CurrentPlayer, Add, 10, "MONEY"); PreserveTrigger(); }, } Trigger { -- No comment (ADDF9844) players = {Force1}, conditions = { Deaths(CurrentPlayer, AtLeast, 1, "SAVEGAME"); Accumulate(CurrentPlayer, AtLeast, 100, Ore); Accumulate(CurrentPlayer, AtMost, 999, Ore); }, actions = { SetResources(CurrentPlayer, Subtract, 100, Ore); SetDeaths(CurrentPlayer, Add, 100, "MONEY"); PreserveTrigger(); }, } Trigger { -- No comment (B65FAEB1) players = {Force1}, conditions = { Deaths(CurrentPlayer, AtLeast, 1, "SAVEGAME"); Accumulate(CurrentPlayer, AtLeast, 1000, Ore); Accumulate(CurrentPlayer, AtMost, 9999, Ore); }, actions = { SetResources(CurrentPlayer, Subtract, 1000, Ore); SetDeaths(CurrentPlayer, Add, 1000, "MONEY"); PreserveTrigger(); }, } Trigger { -- No comment (23B6E20D) players = {Force1}, conditions = { Deaths(CurrentPlayer, AtLeast, 1, "SAVEGAME"); Accumulate(CurrentPlayer, AtLeast, 10000, Ore); Accumulate(CurrentPlayer, AtMost, 99999, Ore); }, actions = { SetResources(CurrentPlayer, Subtract, 10000, Ore); SetDeaths(CurrentPlayer, Add, 10000, "MONEY"); PreserveTrigger(); }, } Trigger { -- No comment (545BB1CE) players = {Force1}, conditions = { Deaths(CurrentPlayer, AtLeast, 1, "SAVEGAME"); Accumulate(CurrentPlayer, AtLeast, 100000, Ore); Accumulate(CurrentPlayer, AtMost, 999999, Ore); }, actions = { SetResources(CurrentPlayer, Subtract, 100000, Ore); SetDeaths(CurrentPlayer, Add, 100000, "MONEY"); PreserveTrigger(); }, } Trigger { -- No comment (2E46A336) players = {Force1}, conditions = { Deaths(CurrentPlayer, AtLeast, 1, "SAVEGAME"); Accumulate(CurrentPlayer, AtLeast, 1000000, Ore); }, actions = { SetResources(CurrentPlayer, Subtract, 1000000, Ore); SetDeaths(CurrentPlayer, Add, 1000000, "MONEY"); PreserveTrigger(); }, } Trigger { -- No comment (63A6792E) players = {Force1}, conditions = { Deaths(CurrentPlayer, AtLeast, 1000000, "MONEY"); Deaths(CurrentPlayer, Exactly, 0, "SAVEGAME"); }, actions = { SetDeaths(CurrentPlayer, Subtract, 1000000, "MONEY"); SetResources(CurrentPlayer, Add, 1000000, Ore); PreserveTrigger(); }, } Trigger { -- No comment (7BB6A7A1) players = {Force1}, conditions = { Deaths(CurrentPlayer, AtLeast, 100000, "MONEY"); Deaths(CurrentPlayer, AtMost, 999999, "MONEY"); Deaths(CurrentPlayer, Exactly, 0, "SAVEGAME"); }, actions = { SetDeaths(CurrentPlayer, Subtract, 100000, "MONEY"); SetResources(CurrentPlayer, Add, 100000, Ore); PreserveTrigger(); }, } Trigger { -- No comment (F47BE628) players = {Force1}, conditions = { Deaths(CurrentPlayer, AtLeast, 10000, "MONEY"); Deaths(CurrentPlayer, AtMost, 99999, "MONEY"); Deaths(CurrentPlayer, Exactly, 0, "SAVEGAME"); }, actions = { SetDeaths(CurrentPlayer, Subtract, 10000, "MONEY"); SetResources(CurrentPlayer, Add, 10000, Ore); PreserveTrigger(); }, } Trigger { -- No comment (E6109ACC) players = {Force1}, conditions = { Deaths(CurrentPlayer, AtLeast, 1000, "MONEY"); Deaths(CurrentPlayer, AtMost, 9999, "MONEY"); Deaths(CurrentPlayer, Exactly, 0, "SAVEGAME"); }, actions = { SetDeaths(CurrentPlayer, Subtract, 1000, "MONEY"); SetResources(CurrentPlayer, Add, 1000, Ore); PreserveTrigger(); }, } Trigger { -- No comment (09045933) players = {Force1}, conditions = { Deaths(CurrentPlayer, AtLeast, 100, "MONEY"); Deaths(CurrentPlayer, AtMost, 999, "MONEY"); Deaths(CurrentPlayer, Exactly, 0, "SAVEGAME"); }, actions = { SetDeaths(CurrentPlayer, Subtract, 100, "MONEY"); SetResources(CurrentPlayer, Add, 100, Ore); PreserveTrigger(); }, } Trigger { -- No comment (7A550563) players = {Force1}, conditions = { Deaths(CurrentPlayer, AtLeast, 10, "MONEY"); Deaths(CurrentPlayer, AtMost, 99, "MONEY"); Deaths(CurrentPlayer, Exactly, 0, "SAVEGAME"); }, actions = { SetDeaths(CurrentPlayer, Subtract, 10, "MONEY"); SetResources(CurrentPlayer, Add, 10, Ore); PreserveTrigger(); }, } Trigger { -- No comment (2360655D) players = {Force1}, conditions = { Deaths(CurrentPlayer, AtLeast, 1, "MONEY"); Deaths(CurrentPlayer, AtMost, 9, "MONEY"); Deaths(CurrentPlayer, Exactly, 0, "SAVEGAME"); }, actions = { SetDeaths(CurrentPlayer, Subtract, 1, "MONEY"); SetResources(CurrentPlayer, Add, 1, Ore); PreserveTrigger(); }, }
Save your map. You are done with SCM Draft now.
Open EUD Editor 3 and go to the plugins tab.

Add eudTurbo as shown above.
Now open the Trigger Editor:

Create a new epScript file, and rename it into something in English. I renamed mine to qorpg2.
In the text box to the right, coy and paste the below code:
import TriggerEditor.SCArchive as sca; function luasca(){} function onPluginStart(){ } function beforeTriggerExec(){ EUDPlayerLoop()(); sca.Exec(); if(Deaths(CurrentPlayer, Exactly, 1, "RUNSAVE")){ // Data Save SetDeaths(CurrentPlayer, SetTo, 0, "RUNSAVE"); sca.SaveData(0); } if(Deaths(P8, AtLeast, 8000, "SAVETIME")){ // Cheat Check switch(sca.ConnectStatus()){ case 1: SetDeaths(CurrentPlayer, SetTo, 11, "DISCCHECK"); break; } } if(Deaths(CurrentPlayer, AtLeast, 11, "DISCCHECK")){ // Cheat End switch(sca.GetLastMessage()){ case 1: break; case 2: Defeat(); break; case 3: break; case 4: break; case 5: break; case 6: break; case 7: break; case 8: break; case 9: break; default: sca.ResetLastMessage(); } } if(Deaths(CurrentPlayer, Exactly, 0, "LOADCHECK") && Deaths(P8, AtLeast, 3000, "SAVETIME") && CountdownTimer(Exactly, 0)){ // Data Save SetDeaths(CurrentPlayer, SetTo, 1, "LOADCHECK"); SetCountdownTimer(SetTo, 1); sca.LoadData(0); } EUDEndPlayerLoop(); } function afterTriggerExec(){ }
This code basically converts your mineral and stores it as a death value every 6 minutes in-game.
It also loads the death value at the start of the game, and converts into mineral.
You would need to have SCA running before the game starts, or you will miss the load instance.
You can tweak this code to have your map load units instead of minerals, or do both.
The DISCCHECK checks if the player’s SCA launcher was disconnected during game and triggers defeat if detected.
I recommend leaving that on there to prevent cheating if you don’t understand what that means.

You’re almost there. Now click the settings icon, and go to the SCArchive tab.
Fill out the information, which would be your Battle Code, SCA Launcher PW, Map Name, e-mail address, and description.
If you don’t have a SCA Launcher PW, you have to first download SCA Launcher and create an account.
There is also a link for thumbnail image, which has to be hosted externally on something like imgur.
As for the 300 buffer size, I recommend setting 50 per DC being saved.
Since this map saves one death value only, I’ll just leave it at 300 which is the default buffer size.
ATIA World RPG uses 8000 buffer size, and Warbible RPG uses 2000 buffer just to give you an idea.
Once you’ve completed those fields above, you would have to add the actual DC you want SCA to be saving/loading.

Click the plus icon, and find the unit MONEY, which was one of the unit you renamed earlier.
Now add it as “money” again. This is the new name that will be shown on SCarchive.kr Leaderboard for your map.

Last but very important step. You have to set the epScript file under the first tab.
Again, my epScript file was renamed earlier to “qorpg2” so I am going to select that.
Now, hit compile. If successful, head over to the link: https://scarchive.kr/maker/main.php
This is your web interface for all your SCA compiled maps.

What you want to do is click the third 관리 button which will open the settings page.
Click the highlighted button below which will now SHOW your map in SCA website under https://scarchive.kr/maplist.php

You have enabled your map to be shown on SCA website.
Last step would be displaying the real-time leaderboard.

Scroll down a little more, and toggle the first button highlighted which is enabling leaderboard.
Now, under the dropdown menu set it as money, which is the DC value we are saving/loading for this map.
Click 적용, which means [Apply].
You’re finished. Now your map is SCA enabled and will be ready to be used by other people.
Make sure to change the description to include the download links to your map, so people who come across your map through SCA map listing page can try your map without having clues as to where to look for it. I recommend putting a link to a Google Drive Folder, where the latest version of your map is contained.
You should probably bookmark the following page, which shows how many players are currently actively playing which map:
http://scarchive.kr/getCCU.php
If you have any questions or run into errors, comment on this page I will try to get back to you soon. I hope you found this information to be useful.
-Lifebot