SCUMSLang (pronounced S-C-U-M-S-Lang) is the programming language and the compiler for describing and creating triggers for Starcraft Broodwar/Remastered.
This project is under heavy development. Please look at the features below the project is aiming at.
- 1. Table of Content
- 2. Comparison table
- 3. Language Specification
- 4. SCUMSLang API
- 5. Planned features
Property | SCUMSLang | LangUMS | YATAPI | TrigEditPlus | TrigEdit |
---|---|---|---|---|---|
Implementation language | C# | C++ | Python | C++ | C++ |
Advertised editor | Visual Studio Code | Visual Studio Code | PyCharm IDE | SciTE≙Lexilla.dll over ScmDraft 2 plugin |
Editor over in-built ScmDraft 2 plugin |
Interface language*1 | SCUMSLang (lang) | LangUMS (lang) | Python | Lua | TrigEdit (lang) |
Statically typed*2 | Yes | Yes | Yes | Yes | Yes |
Variables | int, short, byte, string; overflow detection Death counter, switches |
int (implicit); no overflow detection Death counter, switches |
Death counter, switches | Death counter, switches | Death counter, switches |
Triggers | One-to-one, Templates, Machine States | One-to-one, Templates, Machine State | One-to-one, Templates | One-to-one, Templates | One-to-one |
Syntax validation | TBD: Compiler, IDE | Compiler, Autocomplete | Preprocessor, IDE | Compiler, Autocomplete | Compiler |
Compilation validation | TBD: Yes | Yes*3 | No!*4 | Yes | Yes |
Compilation trigger integration*5 | TBD: Paste in TrigEdit*6, .scx/.scm injection | .scx/.scm injection | Paste in TrigEdit*6 | .scx/.scm injection | .scx/.scm injection |
Unit tests | ./**/test/ (e.g. here) | Link | - | - | - |
API-Documentation | TBD: Yes; IDE-integrated | Yes | No; but usage instructions | No; but usage instructions | No |
Examples | TBD | Link | Link | - | - |
Binary | SCUMSLang.exe | langums.exe | - | TrigEditPlus.sdp | TrigEdit.sdp |
Download sources | TBD: GitHub Releases, Chocolately | GitHub Releases | Compile source code | StarEdit StarCraft I Database | In-built in ScmDraft 2 |
Last release | TBD | Oct 25, 2017 | Mar 7, 2019 | Sep 1, 2014 | 2004 |
*1 Interface language is the language in which you are actual writing the triggers. If no language is used GUI is assumed.
*2 Method parameters(, method return types), variables and constants/enumeration members are statically typed and are checked against the preprocessor/compiler.
*3 Death counter are happily overflowing when compiler generated trigger are using that amount and more of death counter you provided to compiler.
*4 @sethmachine: Does YATAPI check for any compilation or syntax errors?
Currently, no (but a very good idea). The best way to check actual errors will be when copy and pasting to SCMDraft and seeing the TrigEdit complain about certain lines. YATAPI will also happily compile triggers with more than 64 actions or conditions (but this kind of check could be easily added in).
*5 How are the compiled triggers in the map (.scx, .sxcm) integrated?
*6
- Copy compiled triggers
- Paste it in TrigEdit (Triggers->Trigger Editor)
- Press black check button with the blue tile
- A window opens to inform you that the compilation finished.
The pre-processor is a program that runs before the compiler and essentially performs text substitution. Read here for more informations.
https://github.com/SCUMSLang/Specification
https://github.com/SCUMSLang/SCUMSLang/blob/main/src/SCUMSLang.UMSLFiles/src/System.umsh
https://github.com/SCUMSLang/SCUMSLang/blob/main/src/SCUMSLang.UMSLFiles/src/Conditions
https://github.com/SCUMSLang/SCUMSLang/blob/main/src/SCUMSLang.UMSLFiles/src/Enums
https://github.com/SCUMSLang/SCUMSLang/blob/main/src/SCUMSLang.UMSLFiles/src/Functions
- Pretty the same features like LangUMS
- Written in C#
- Independable state machines but dependent on those they have to be
- Enum types (e.g. Player.Player1, Player.Force1 and so on)
- Statically types (e.g. int, short, byte, bool, string, or concrete enum type)
- Integer pool with overflow detection
- Function overloading
- Side effectless sleep()
- Better IDE integration with in-code API documentation
- Chocolatey (package manager) support