Staredit Network > Forums > SC1 Mapping Tools > Topic: MacroTriggers production thread
MacroTriggers production thread
May 16 2008, 10:36 pm
By: Wormer
Pages: < 1 2 3 4 515 >
 

May 2 2009, 4:46 pm Wormer Post #41



MacroTriggers now supports new SCMD condition Memory!

Sorry, this is not working yet!

Post has been edited 2 time(s), last time on May 2 2009, 5:31 pm by Wormer.



Some.

May 3 2009, 1:29 am killer_sss Post #42



BR.recoverFromMismatchedToken
line 1:12 mismatched input 'Y9' expecting '='
BR.recoverFromMismatchedToken
line 1:34 mismatched input '-' expecting '='
BR.recoverFromMismatchedToken
line 1:55 mismatched input 'M' expecting '='
BR.recoverFromMismatchedToken
line 1:60 mismatched input '-' expecting '='
in C:\Documents and Settings\Steven\My Documents\ansi\The file for MacroTrigs:line 1:66: no viable alternative at input '*'
<<< Process finished.

ok this thing took forever to install i guess what its called. 60k lines. Anyhow iv'e got this much done but this did not happen
Quote
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:

where do i go from here and what do i need to do?



None.

May 3 2009, 2:12 am Vi3t-X Post #43



Worm. What if I wanted each key on my keyboard to represent a function? Why not just implement that for super ease? :P



None.

May 3 2009, 7:06 am Wormer Post #44



killer_sss, you have syntax errors in the first line of the file. The output pointing you on errors. Numbers like 1:12 represent line:column where you got the error.

Could you attach the source file, so I can tell what errors are?

Quote from Vi3t-X
Worm. What if I wanted each key on my keyboard to represent a function? Why not just implement that for super ease? :P
Do you mean the ability to insert an action/condition invoking hotkeys? But you cant use single keys for that. Much keys combinations are already taken in Notepad++. There are 22 conditions and 53 actions... I think it is doable for the most frequently used actions and conditions. But even if I do this you need to remember all hotkeys by heart.



Some.

May 3 2009, 7:48 am Wormer Post #45



MacroTriggers now supports new SCMD condition Memory!

MacroTriggers syntax is Memory(offset, qmod, number), where offset and number are integers and qmod is quantity modifier.

The arcive includes updated SCMD trigger, MacroTriggers syntax highlightings, auto-completion file, and help file.

Download mtrigsc v1.3 package.



Some.

May 3 2009, 5:18 pm killer_sss Post #46



i cant seem to attach the file which one am i suppose to attach btw? the mtrig file or the one after the f6 compilation part?

the f6 compilation one is the one i cant seem to attach.



None.

May 3 2009, 5:39 pm Wormer Post #47



Quote from killer_sss
i cant seem to attach the file which one am i suppose to attach btw? the mtrig file or the one after the f6 compilation part?

the f6 compilation one is the one i cant seem to attach.
The mtrig one of course.
You can upload it to http://www.mediafire.com/ for example.



Some.

May 3 2009, 6:57 pm killer_sss Post #48



http://www.mediafire.com/?sharekey=8bfcb6337cef52c02fb2ca15d7ea42d9e04e75f6e8ebb871

btw what do i do with the new 1.3 patch? i downloaded it



None.

May 3 2009, 7:19 pm Wormer Post #49



You use v1.3 in the same way as v1.2. It only has the support for the new Memory condition.

W8 a minute, this is not the file I wanted you to attach. I want the source text file with your triggers which you try to compile. If I understand right it is called something like "The file for MacroTrigs".



Some.

May 3 2009, 7:54 pm killer_sss Post #50



Quote from Wormer
You use v1.3 in the same way as v1.2. It only has the support for the new Memory condition.

W8 a minute, this is not the file I wanted you to attach. I want the source text file with your triggers which you try to compile. If I understand right it is called something like "The file for MacroTrigs".

so i need to compile this new file as well?

http://www.mediafire.com/?sharekey=8bfcb6337cef52c02fb2ca15d7ea42d959c6de9b040d5fd05be6ba49b5870170

Post has been edited 2 time(s), last time on May 3 2009, 8:04 pm by killer_sss.



None.

May 3 2009, 8:35 pm Wormer Post #51



Um... :unsure: this is not what I wanted too.... I need a text file...

If I understand you right you've copied mtrigsc.jar into some folder and written the script in Notepad++ with right paths to the mtrigsc.jar.

After that you run the script on the text file. There are some examples in the archive (text files with .mtrigger extention). Try to open one of them in notepad++ and hit F6.



Some.

May 3 2009, 10:17 pm killer_sss Post #52



Quote
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"NPP_OPEN "$(NAME_PART).trigger"

well i'm confused as ever. I did step one. I did step 2. Step 4 i guess idk what i missed. I asumed source file was mtrigsc.jar is it not? I don't see any source.mtrigs anywhere so i compiled mtrigsc.jar.

i think i missed that file and i have no idea what i'm doing. I mean i can program and i can map only problem is i have trouble with the inbetween crap. what did i miss lol?



None.

May 3 2009, 10:42 pm Wormer Post #53



Quote from killer_sss
I don't see any source.mtrigs anywhere so i compiled mtrigsc.jar.
You're doing fine. You've done the setup, now it is time to start programming. What do you usually do when you program? You're writing a program, right? The program is a text which you type in and then compile. Compiling mtrigsc.jar is wrong. You've said that you've downloaded version1.3 archive. There is a folder called "examples" in it. This folder contains text files "ex1.mtrigger" and "ex2.mtrigger". Open one of these files in Notepad++ and press F6. Tell me what you get.



Some.

May 3 2009, 11:06 pm killer_sss Post #54



Quote from Wormer
Quote from killer_sss
I don't see any source.mtrigs anywhere so i compiled mtrigsc.jar.
You're doing fine. You've done the setup, now it is time to start programming. What do you usually do when you program? You're writing a program, right? The program is a text which you type in and then compile. Compiling mtrigsc.jar is wrong. You've said that you've downloaded version1.3 archive. There is a folder called "examples" in it. This folder contains text files "ex1.mtrigger" and "ex2.mtrigger". Open one of these files in Notepad++ and press F6. Tell me what you get.

but in step 4 i never got 2 files. i thought thats what i needed b4 i write the program.

well i have the compiler working now that i figured our .rar is a compressed file lol.

i compiled extrigger one and this is what i got:

line 1:20 no viable alternative at character '{'
line 3:59 no viable alternative at character ';'
...
line 361:58 no viable alternative at character ';'
line 362:0 no viable alternative at character '}'
BR.recoverFromMismatchedToken
line 1:7 mismatched input '(' expecting '='
BR.recoverFromMismatchedToken
in C:\Documents and Settings\Steven\My Documents\ansi\v1.3\examples\ex1.trigger:line 2:10: mismatched input ':' expecting '='

am i making progress now? from here i can type my triggers and setup my macros?

edit: added the open/close parts to the mtrigs compile thing like step 4 says and i now get this

java -jar "C:\Documents and Settings\Steven\My Documents\ansi\v1.3\mtrigsc.jar" "C:\Documents and Settings\Steven\My Documents\ansi\v1.3\examples\ex2.trigger" "ex2.trigger" "ex2.property"NPP_CLOSE "ex2.trigger"NPP_OPEN "ex2.trigger"
Process started >>>
MacroTriggers Compiler v1.3
Usage: mtrigsc <input macrotriggers file> <output triggers file> <output properties file>
<<< Process finished.

wasn't it suppose to open the triggers of what i compiled so i can paste them into a map? compiled the test triggers.

Post has been edited 5 time(s), last time on May 4 2009, 12:05 am by killer_sss.



None.

May 4 2009, 12:28 am Falkoner Post #55



Change your script to this:
Code
cd "$(CURRENT_DIRECTORY)" // set up current directory
NPP_SAVE // save current file
java -jar "C:\Program Files (x86)\Starcraft\BIN\MTRIGS\mtrigsc.jar" "$(FULL_CURRENT_PATH)" "$(NAME_PART).trigger" "$(NAME_PART).property"
//NPP_CLOSE "$(NAME_PART).property"
//NPP_OPEN "$(NAME_PART).property"
NPP_CLOSE "$(NAME_PART).trigger" // to make notepad++ reload file we close it
NPP_OPEN "$(NAME_PART).trigger"


And upon compiling the code will be saved, and it will reopen the compiled triggers if they are already open, and open them if they are not :) (Remember to replace the mtrigsc.jar filepath with your own ;))



None.

May 4 2009, 5:37 am Wormer Post #56



Quote from killer_sss
am i making progress now? from here i can type my triggers and setup my macros?
Yup, right. From now you start writing your macro triggers. You're running the wrong file, you need to process the "ex2.mtrigger".

And also make as Falkoner said.



Some.

Jun 22 2009, 7:48 pm poison_us Post #57

Back* from the grave

Could you put this into a more user-friendly program? My computer won't run notepad++, and I don't have any programming knowledge...I think if it was more user-friendly more people would use it, and this would get the recognition it deserves.

EDIT: possibly work with SI to get this as a plug-in to SCMDraft?




Jun 22 2009, 8:25 pm Wormer Post #58



I suck writing user interfaces. I would like to put it into a more friendly way, but it is hard for me to accomplish.

But this program simply transforms text from one form into another. You can use any other text editor which will work on your computer and suits you better. I could have suggested using Vim, but it is times more complicated than Notepad++ and requires more programming skills to setup properly and use effectively...

EDIT: By the way guys, an update which will allow you to use arrays is coming soon!
Like
Quote
ARRAY colors = { "Red", "Green", "Blue" }

FOR i=0 TO 2 DO
TRIGGER
OWNERS: @P(1)
CONDITIONS:
ACTIONS:
Comment(colors[i], @AlwaysDisplay)
ENDT
ENDL




Some.

Jun 26 2009, 2:04 pm Commanda_Panda Post #59



I've been away from the Starcraft scene for quite some time, and I don't really understand what this does >.< Could someone explain it simpler? :)
I'm wondering if this has to power to make many slightly edited triggers ... for example, I'm working on a map that I need the following triggers:
Conditions:
Current Player has suffered exactly 1 death of Missile Turret
Actions:
Set Unit HP for Current Player at Anywhere 1%
Preserve Trigger

Conditions:
Current Player has suffered exactly 2 death of Missile Turret
Actions:
Set Unit HP for Current Player at Anywhere 2%
Preserve Trigger

It's a virtual HP system I'm working on for my map, and I would need triggers than go all the way from 1%-100% (0 deaths of Missile Turret would result in dying), would this program be able to take my first trigger and make 98 duplicates from 1-100? Or maybe this program doesn't do anything like that at all, I'm not really sure and I'm just wondering :)
If not, are there any programs like this?

Quote from Morphling
Here is a trigger duplicator. Just load your map, open up your triggers, select the one you want, replace the numbers you want with "$x" without quotes, and set you starting value for X and your invterval (your case is 1) then finally compile it.

Thank you very much, I've been wishing for a program like this forever! I'm still wondering what this program does though, maybe it will be of use to me, so if anyone can dumb it down to explain it it'd be great :)

Post has been edited 1 time(s), last time on Jun 26 2009, 2:15 pm by Commanda_Panda.



None.

Jun 26 2009, 2:11 pm Morphling Post #60



Here is a trigger duplicator. Just load your map, open up your triggers, select the one you want, replace the numbers you want with "$x" without quotes, and set you starting value for X and your invterval (your case is 1) then finally compile it.



None.

Options
Pages: < 1 2 3 4 515 >
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
[11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
[2024-4-17. : 3:26 am]
O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
[2024-4-17. : 1:53 am]
Vrael -- bet u'll ask for my minerals first and then just send me some lousy vespene gas instead
[2024-4-17. : 1:52 am]
Vrael -- hah do you think I was born yesterday?
[2024-4-17. : 1:08 am]
O)FaRTy1billion[MM] -- i'll trade you mineral counts
[2024-4-16. : 5:05 pm]
Vrael -- Its simple, just send all minerals to Vrael until you have 0 minerals then your account is gone
[2024-4-16. : 4:31 pm]
Zoan -- where's the option to delete my account
[2024-4-16. : 4:30 pm]
Zoan -- goodbye forever
Please log in to shout.


Members Online: storusigrv, jun3hong, X405