MacroTriggers production thread, a language for specifying triggers
Post #1
Wormer
May 16 2008, 10:36 pm
Post #2 Daedalus May 17 2008, 8:02 pm
|
Why did no-one reply to this? Meh
Holy crap, this is good! While I must admit that I will probably not use this since until now I've always worked a way around making tons of repeating triggers (which is a personal objective/motto). However, this sure is a great program. If it wasn't for the lame amount of possibilities (lack thereof) of Starcraft this really feels liking programming. Great job! It's a shame I'm the first commentor. ![]() ![]() ![]() ![]() ![]() ![]() |
Post #3
Wormer
May 17 2008, 8:24 pm
|
OMG! Someone've replied)
I dont know why but people seem to constantly ignore me when I'm talking about it I wonder! This seem to be a bit hard for people to make that steps to run and it needs some effort to understand. I know, people are lazy! But thanks for comment!!! It is still in development. You know, I'm making this for my personal use. I just wanted to share this with people who might find it handfull.BTW, you can find the original production thread there: http://www.warbox.us/viewforum.php?f=45&sid=991ac09b64d71ab31eb1759cf5719f28 This post was edited 2 times, last edit by Wormer: May 17 2008, 8:58 pm. |
Post #5
Wormer
May 18 2008, 7:13 am
|
No, I'm not. This is not a general programming language, it is specific one. It is not even a programming laguage, it is just a language for specifying sequences of triggers. It is most similiar to Macro Assebmler by it's fucntionality. MacroTriggers relates to SCMD text triggers very much alike Assembler relates to Macro Assembler. By synthax it might remind one an Oberon programming language. But it's non of them. Anyway, it should not say much for you, should it?
I definetly should have written fast tutorial on how to write on MacroTriggers. I just don't see much attention and hence dont hurry with writeing. But anyway, anyone can always look at examples and learn the language from them. It's not that complex at all! And you can always ask me, I am always glad to explain. |
Post #7
Wormer
May 19 2008, 4:38 am
|
I was waiting for this question
Unfortunately there is no way for now. However, I was thinking about writing the tool for converting triggers from the SCMD format (or better embedding it in the compiler). Though I don't sure if it can be usefull (mabe if only you like the MacroTriggers (MT) synthax). It is better to start triggering on MT from the beginning, specifying a new variable for each unit/location/switch/string and ect. This will allow you fast refactoring in the future. Having definitions of the objects you use in the map all in one place could be also used as some kind of documentation in the future too. This could serve like a reference on what you're using. If you're not lazy (as I am ), you could even place some comments there.But, if you have over half way done map and want to implement a system wich you want to write on MT you could do it, compile and then copy/paste resulting triggers in your main triggers file. Noone forces you to copy/paste them directly into the SCMD editor. In this case you should only correct CUWP slots as the compiler begins numeration from one (btw, it might be good idea to be albe to say the compiler how it should numerate CUWP slots in the resulting file). This post was edited 1 time, last edit by Wormer: May 19 2008, 4:43 am. |
Post #11
Wormer
Jan 8 2009, 5:40 pm
|
Updated the head topic with the latest (v1.2) version of MT compiler.
This version do not add new features but has few bugfixes related to generated SCMD triggers synthax. Enjoy EDIT: If anyone have made open source maps using MT language, I will be glad to post that in the head post under the examples. |
Post #12
Wormer
Apr 26 2009, 8:41 pm
|
Have you ever dreamed to have actions and conditions auto-completion with parameters hints on input for real text triggers?
Now you have a chance to try that yourself with MacroTriggers! Just look at this sexynezzzz! Autocompletion: ![]() Hints on parameters: ![]() Well, this works in Notepad++. All you have to do is to copy this file into "Notepad++\Plugins\APIs". Also a User Defined syntax highlighting is required. It must be called exactly as "mtrigger" and associated with .mtrigger extention for your MacroTriggers source files. Also be sure that your Auto-completion and Parameters Hints on Input are on at Settings->Preferences...->Backup/Auto-completion. Enjoy and dont forget to restart your Notepad++ before you can use it! EDIT: Hotkeys for opening the autocompletion window and hints are Ctrl+Space and Ctrl+Shift+Space accordingly. Just in case you accidently closed that window. This post was edited 1 time, last edit by Wormer: Apr 26 2009, 8:49 pm. |
Post #14
Wormer
Apr 26 2009, 9:00 pm
|
Thanks, I am going to add keywords (like TRIGGER, CONDITIONS, LOCATION and such) auto-completion soon! Also, by the way, I've discovered another very powerful text editor Vim (google it!). It has got much greater (Notepad++ is a toy in comparance with it) capabilities for text highlighting and probably other things... But it is not intuitive and you need to learn and practice much to use it.
|
Post #16
Conspiracy!
Apr 26 2009, 9:31 pm
|
Hmm... I looked at it and its a bit difficult to set it up for someone who doesn't have much knowledge in programming. But I did look at your example text and it is much better than what SCMD has with the //-----// and {} crap (I know {} is used in programming). I wish you would have made it a bit simpler, like no tabs represents the players the trigger includes, one tab is conditions and two tabs is actions.
Overall, I would enjoy it if I could set up easier. ![]() ![]() ![]() ![]() ![]() ![]() |
Post #19
Wormer
Apr 27 2009, 8:58 am
|
Finally! A year passed and I'm starting to get some feedback!
This is a command line program, that why it's use little differs from programs with window interface. I assure you it is very simple to setup and use. Follow the next steps: 1. Download Java Runtime Environment (JRE) from http://java.sun.com and install. Probably the fastest way to find JRE it is to type the JRE download in Google and the first link leads to http://www.java.com/ru/download/manual.jsp. 2. Download and install mtrigsc.jar. Donwload mtrigsc v1.2. To install mtrigsc simply copy it to any folder on your hard drive. Remember the full path (starting from drive letter) to mtrigsc.jar, you need it to invoke the compiler. 3. Use mtrigsc from command line. The .jar file mtrigsc.jar is a java executeable file. It takes three parameters: the source file with your triggers written on MacroTriggers and names of two output files with SCMD triggers and properties respectively. The most straightforward way is to invoke it directly from the command line. To open command line you go Start->Run... and type cmd. To run mtrigsc on your source file source.mtrigger you type java -jar <full path to mtrigsc.jar> <full path to source.mtrigger> out.trigger out.property. Two specified files out.trigger and out.property will be created in your current directory. 4. Use mtrigsc with Notepad++. Notepad++ takes care of all tedious work with the command line. You write a script which Notepad++ invokes every time you hit the F6 button. Notepad++ can substitute strings with the full path to the current file and such, so you don't need to worry about it anymore. So, you open your source.mtrigs file in Notepad++ and hit F6. The dialog will open. You type the following line java -jar "<full path to mtrigsc.jar>" "$(FULL_CURRENT_PATH)" "$(NAME_PART).trigger" "$(NAME_PART).property" and press ok. Notepad++ will substitue $(FULL_CURRENT_PATH) with the full path to the file you edit and $(NAME_PART) with it's name without the extension. If there were no errors in the file source.mtrigs you get two files with output information named source.trigger and source.property in the current directory. The next time you want to compile you simply hit Ctrl+F6 which invokes the last script. Notepad++ can even open the resulting file for you. To make it do so you add the following two lines to your script: NPP_CLOSE "$(NAME_PART).trigger"The next time you will press Ctrl+F6 the file with resulting SCMD triggers will open. So, what can be easier than hitting Ctrl+F6 buttons? Awww!.. Hitting the one button, right? This post was edited 2 times, last edit by Wormer: Apr 27 2009, 9:08 am. |
Post #20
Wormer
Apr 27 2009, 9:40 am
|
SCMD generates triggers automatically and inserts the //-----// between triggers. Every line starting with double slash '//' is a comment and it does not matter what you type there. This is only a question of formatting. There is no way to automatically generate MacroTriggers from your map with existing triggers. You write MacroTriggers from blank list and do any formatting you like.
Symbols '{}' in SCMD are used to represent where the trigger starts and where is ends. MacroTriggers use keywords 'TRIGGER' and 'ENDT' for this purpose. Actually there is no need to use braces or 'ENDT' but to my mind trigger looks more accomplished when it has these. Do you mean one should write trigger TRIGGER like this TRIGGER You see, it is a bad idea to use Tabs and Newline characters to represent some kind of information about triggers. Tabs, Whitespaces and Newline characters should be used only for formatting purposes. For example the above trigger could be written like this: TRIGGER OWNERS: Force1,Player3, The idea is to allow the user to format his triggers in the way he likes the most. For example I use the next writing for hyper triggers: TRIGGER |
0 members in this topic (italic members are currently writing a reply): None
+ guest(s)
+ guest(s)
[01:23 am]
[01:22 am]
[01:04 am]
[11:59 pm]
[10:46 pm]
[10:46 pm]
[10:30 pm]







"
I dont know why but people seem to constantly ignore me when I'm talking about it
This seem to be a bit hard for people to make that steps to run and it needs some effort to understand. I know, people are lazy!
It is still in development. You know, I'm making this for my personal use. I just wanted to share this with people who might find it handfull.
), you could even place some comments there.
![[close]](/images/up.gif)