MacroTriggers (MT) is a language allowing you to specify sequence of triggers. MT is similiar to SCMD text triggers but having additional facilities for triggers duplication. The compiler processes input text files written on MacroTriggers and generates SCMD text triggers which you copy/paste into your map.
Installation and usage
Installation and basics video tutorials by Tuxlar.
Macro Triggers Tutorial (Part 2, Basics)
Installation video tutorial by Falkoner.
Macro Triggers Installation Tutorial
How to use MacroTriggers Compiler?
The MT compiler is written in java. To run it you should need JRE (Java Runtime Environment) installed on your computer. You could always download the latest JRE version from http://java.sun.com/. The compiler is mtrigsc.jar executeable file and is invoked from the command line. To run the compiler on your input text file input.mtrigger (you could use one of the examples below) open your command line (Start->Run and type: cmd) and write the following command: java -jar <full path to mtrigsc.jar> <full path to input.mtrigger>. If input file does not contain errors the compiler will generate two output files out.trigger and out.property, which are simple text files containing your triggers in SCMD text triggers syntax. The first file contains triggers themselves and the second - CUWP property slots. All you need is just to copy/paste their contents into your map through SCMD text triggers editor.
How to use MacroTriggers with Notepad++?
If you're using Notepad++ to write your triggers the compilation process simplifies. You can use Notepad++ execute thing for fast compilation of your source files. Open your MacroTriggers input file in Notepad++ and press F6 (you need NppExec plugin installed, if you haven't got, go to Plugins->Plugin Manager->Show Plugin Manager and install it). Execute dialog will open. Copy this little script there:
Code
cd "$(CURRENT_DIRECTORY)" // set up current directory
NPP_SAVE // save current file
java -jar "<full path to mtrigsc.jar>" "$(FULL_CURRENT_PATH)" "$(NAME_PART).trigger" "$(NAME_PART).property"
NPP_CLOSE "$(NAME_PART).property" // to make notepad++ reload file we close it first
NPP_OPEN "$(NAME_PART).property"
NPP_CLOSE "$(NAME_PART).trigger"
NPP_OPEN "$(NAME_PART).trigger"
NPP_SAVE // save current file
java -jar "<full path to mtrigsc.jar>" "$(FULL_CURRENT_PATH)" "$(NAME_PART).trigger" "$(NAME_PART).property"
NPP_CLOSE "$(NAME_PART).property" // to make notepad++ reload file we close it first
NPP_OPEN "$(NAME_PART).property"
NPP_CLOSE "$(NAME_PART).trigger"
NPP_OPEN "$(NAME_PART).trigger"
Changing the <full path to mtrigsc.jar> to the path where you've unpacked the compiler. After this is done press save and name the script, for example, mtrigs. You can quickly invoke the last executed script pressing Ctrl+F6. The resulting files with SCMD triggers and properties will immediately open in the editor.
Synthax Highlighting with Notepad++
You can download user defined language file for MT (MacroTriggers), SCMD triggers (Triggers), SCMD properties (Properties) and for help file (MTriggersHelp) there: http://www.mediafire.com/?0mz0nnl2wzk
The MTriggersHelp highlighting is designed specifically for the help file mtrigs_help.txt included in archive along with the compiler. You can split the Notepad's window on two, open mtrigs_help.txt in the right window and use it for fast info on trigger conditions and actions. There is another file mtrigs_gram.txt which contains MT language description.
Downloads
Examples
You might want to try the examples of triggers written in MacroTriggers: http://www.mediafire.com/?2xwz0mhbw0n
Full List of Actions and Conditions
mtrigs_help.txt file describes the syntax of all actions and conditions you could use in MT. It is recommended to open the file in Notepad++ with the provided MTriggersHelp highlighting: http://www.mediafire.com/?ehvomnf43mi
Formal Synthax
mtrigs_gram.txt contains the formal MacroTriggers syntax description (not fully describes the language yet): http://www.mediafire.com/?doycn0nh6zz
The Compiler
MacroTriggers compiler v1.0
MacroTriggers compiler v1.2 (few bugfixes related to generated SCMD triggers syntax)
MacroTriggers package v1.3 (added new SCMD Memory condition, updated MacroTriggers and SCMD triggers syntax files, auto-completion file, and help file to include it)
MacroTriggers package v1.4 (added arrays, updated MacroTriggers triggers syntax file to highlight single quote strings)
MacroTriggers compiler v1.5 (a bugfix related to generated SCMD triggers syntax)
MacroTriggers package v1.5 (the same as v1.4, except the fixed mtrigsc.jar)
MacroTriggers compiler v1.6 (a bugfix related to generated SCMD triggers syntax)
MacroTriggers package v1.6 (the same as v1.5, except the fixed mtrigsc.jar)
Miscalleous
Information files from Tuxlar
Screenshoots
There is an image of how the development with MT in Notepad++ might look like:
Auto-completion:
Hints on parameters:
Auto-completion:
Hints on parameters:
Development state notice
The compiler and the language is not developping right now. Some features I wanted to make were not implemented. Probably I will finish that later. But it is still the most powerfull replication tool and you can use this for your own purposes. Feel free to post your questions, feedback, suggestions.
Post has been edited 32 time(s), last time on Jul 4 2010, 9:30 am by Wormer. Reason: added note on NppExec plugin requirement
Some.