Staredit Network > Forums > SC1 Mapping Tools > Topic: MacroTriggers production thread
MacroTriggers production thread
May 16 2008, 10:36 pm
By: Wormer
Pages: < 1 « 7 8 9 10 1115 >
 

Sep 2 2009, 4:19 am Wormer Post #161



Oh, indeed! How I haven't thought of it? :rolleyes:
+1 :D



Some.

Sep 6 2009, 4:03 am poison_us Post #162

Back* from the grave

For some reason (probably because my OS is a WinME), it won't run for me. Major letdown and disappointment. It doesn't even pop-up when I ctrl+alt+delete. I've got 4 things on there: my wireless device's program, Firefox, Systray and Explorer.




Sep 6 2009, 5:13 am Falkoner Post #163



Do you have Java Runtime Environment Installed, and are you trying to run it through Notepad++ like you're supposed to?



None.

Sep 6 2009, 5:54 am poison_us Post #164

Back* from the grave

Quote from Falkoner
Do you have Java Runtime Environment Installed, and are you trying to run it through Notepad++ like you're supposed to?

Yes, and no, in that order. It took me a while to find the ANSI version that'll work on my computer...but it's amazing now. I'm currently too tired to comprehend it.

Post has been edited 2 time(s), last time on Sep 6 2009, 6:33 am by poison_us.




Sep 6 2009, 11:27 am The Starport Post #165



You know, if you're not able to get Notepad++ up and running, but don't mind using just plain notepad or another text editor to do your text macro triggers, then I could set you up with a simple .bat file or something for compiling your macro triggers. MacroTriggers is really only a command line application itself, after all. Notepad++ just adds a bunch of stuff for conveniences, but nothing essential, really.



None.

Sep 6 2009, 2:17 pm poison_us Post #166

Back* from the grave

I got it up, just the step #3 or whatever currently has me fuxxored.

EDIT: After trying for roughly 23 or so minutes, I'm still equaling the fail.
Quote from Wormer
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.

I can't figure out how to get this to work. What I'm putting in is:
java -jar "C:\Program Files\MT1.5\mtrigsc.jar" "C:\Program Files\MT1.5\mtrigger.xml" "$(NAME_PART).trigger" "$(NAME_PART).property" . What the DOS spits back at me before closing [yay for prt scr] is:
Quote
MacroTriggers Compiler v1.5
line 1:1 no viable alternative at character '?'
line 1:44 no viable alternative at character '?'
in c:\Program Files\MT1.5\mtrigger.xml:line 1:0: required <...>+ loop did not match anything at input '<'

Any help?

Post has been edited 1 time(s), last time on Sep 8 2009, 3:19 am by poison_us.




Sep 20 2009, 1:20 am payne Post #167

:payne:

Thanks to TuxLar for his epic video tutorial ^^
One thing I'm wondering: that Alt+2 that you are talking of do not work for me... wtf?

And what's the difference between "mtrigger" and "mtrigger help" language?
And also, shouldn't I be able to select a value and have a little list that pop-up over my mouse or something like that? Right now, I'm not ever getting to select a block of text by a single click. I do not know if that's normal ;o



None.

Sep 20 2009, 1:24 am The Starport Post #168



Quote from poison_us
I got it up, just the step #3 or whatever currently has me fuxxored.

EDIT: After trying for roughly 23 or so minutes, I'm still equaling the fail.
Quote from Wormer
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.

I can't figure out how to get this to work. What I'm putting in is:
java -jar "C:\Program Files\MT1.5\mtrigsc.jar" "C:\Program Files\MT1.5\mtrigger.xml" "$(NAME_PART).trigger" "$(NAME_PART).property" . What the DOS spits back at me before closing [yay for prt scr] is:
Quote
MacroTriggers Compiler v1.5
line 1:1 no viable alternative at character '?'
line 1:44 no viable alternative at character '?'
in c:\Program Files\MT1.5\mtrigger.xml:line 1:0: required <...>+ loop did not match anything at input '<'

Any help?
Well, mtrigger.xml is the wrong file. That's just your language definition for Notepad++. The second file path parameter refers to the .mtrigger file containing your macro triggers themselves.

Not sure why you're going the command line route, though. Just copy pasta the code box into the Execute dialog of NP++ (like in my tutorial videos). :P




Also...


Hey Wormer, can I ask you a huge favor? Could you cook up a quick version to add a simple language feature: An 'eval' function? Like, say, you define a set of variables:
Code
STRING str1 = "Brings(@CurrentPlayer, @AtLeast 1, "
UNIT marine = @U("Terran Marine")
STRING str2 = ", @Anywhere)"


Then you use them in your trigger like this:
Code
TRIGGER
OWNERS: @P(1)
CONDITIONS:
   eval( str1 + "marine" + str2 )
ACTIONS:
   ...
ENDT

How doable would that be?



None.

Sep 20 2009, 1:31 am Falkoner Post #169



Of course, an ACTION and CONDITION variable would also be very cool, don't know how your code is written, so whichever is easier for you.



None.

Sep 20 2009, 1:32 am The Starport Post #170



Quote from payne
Thanks to TuxLar for his epic video tutorial ^^
One thing I'm wondering: that Alt+2 that you are talking of do not work for me... wtf?
If the language definitions are installed correctly, you could also go under the View menu, Collapse Level, and select 2. That should neatly collapse all 2nd-level nested groups in your open files.

Quote
And what's the difference between "mtrigger" and "mtrigger help" language?
And also, shouldn't I be able to select a value and have a little list that pop-up over my mouse or something like that? Right now, I'm not ever getting to select a block of text by a single click. I do not know if that's normal ;o
'mtrigger help' is just a silly "language" made up to make the help file look pretty and allow collapsing it into a neat list. 'mtrigger' is your actual macro trigger language definition.


Here's a tip: Adding in //> and, on a later line, //< lets you make your own collapsible groups in your macro trigger files. Useful for organization.



None.

Sep 20 2009, 2:37 am CecilSunkure Post #171



I've been sort of lurking this topic for quite some time, but haven't really gotten extremely interested until now. If you were to add in condition and action variables, with an eval function like tuxedo-templar asked, I think MT would be extremely useful! If you could do that, I would be major happy!



None.

Sep 20 2009, 2:59 am azala Post #172



Worm, you're a smart guy, but regarding MT there is a gigantic elephant in the room. Namely,
"Why is this system worth using, as opposed to any good scripting language (Python, Ruby, etc.)"

Attached are a few examples of what you can do with Python:

"one.zip" is an example of a Python file I wrote in a few minutes, with example input and output text. just an illustration of how unbelievably simple some useful operations are.

"two.zip" is an complex example - I used a python script to manage the upgrade tree/probabilities for my rpg. included are the main trigger file, various input/output files, but all you really need to know is you can mess around with the input values, run techtree.py, and trig.txt is updated accordingly.

Attachments:
one.zip
Hits: 4 Size: 0.98kb
two.zip
Hits: 4 Size: 32.59kb



None.

Sep 20 2009, 3:01 am Falkoner Post #173



This is system is worth using because it allows you to more easily organize your triggers, and is already written for people's use, rather than them using their own scripted language, which takes a bit of time to write. I don't think you realize the full capabilities of this language, azala.



None.

Sep 20 2009, 3:04 am The Starport Post #174



Quote from CecilSunkure
I've been sort of lurking this topic for quite some time, but haven't really gotten extremely interested until now. If you were to add in condition and action variables, with an eval function like tuxedo-templar asked, I think MT would be extremely useful! If you could do that, I would be major happy!
I have an old tool I used for text triggers for doing eval-like stuff, but without Macro Triggers integration it'd be a pain to use. Yeah this needs to be implemented. I wouldn't mind not having condition or action variables if I had just an 'eval' function (or something equivalent), really.



None.

Sep 20 2009, 3:10 am azala Post #175



Quote from Falkoner
This is system is worth using because it allows you to more easily organize your triggers, and is already written for people's use, rather than them using their own scripted language, which takes a bit of time to write. I don't think you realize the full capabilities of this language, azala.

What sort of operation is easier to do in MT?

And why would you go through the process of learning a whole new language that has relatively little testing behind it (compared to scripting languages), and has zero value outside the SC context? Your productivity is directly tied to the reliability and usability of the system, so if something goes wrong, you're *really* out of luck.



None.

Sep 20 2009, 3:11 am CecilSunkure Post #176



Quote from Falkoner
This is system is worth using because it allows you to more easily organize your triggers, and is already written for people's use, rather than them using their own scripted language, which takes a bit of time to write. I don't think you realize the full capabilities of this language, azala.
Yeah I would actually prefer to use a scripting language, but my problem is that I don't have a complete enough knowledge of python or ruby in order to create my own .py files for trigger replication..

Also, I'm really rather interested in one of the earliest posts in which wormer said you could define variables as units, which would allow you to modify the definition of the variable thus changing all your triggers at once, instead of modifying each individual trigger to swap one unit for another.

Macro Triggers looks more friendly to people who haven't a working knowledge of programming yet.

[Edit]Also, it looks like there are a few people around here who would love to help people learn to use macro triggers, while I am rather alone in my quest to learn to program in python.

[Edit]
Quote from azala
And why would you go through the process of learning a whole new language that has relatively little testing behind it (compared to scripting languages), and has zero value outside the SC context? Your productivity is directly tied to the reliability and usability of the system, so if something goes wrong, you're *really* out of luck.
Actually that is a rather good point. I am extremely limited on my time, I'm a busy person. I'm willing to try out MT right now, but I'm actually not sure if I will put my time and effort into learning how to use it effectively, as if I were to learn something like Python.. That would be useful outside of SC context, very useful.



None.

Sep 20 2009, 3:12 am azala Post #177



Quote
Macro Triggers looks more friendly to people who haven't a working knowledge of programming yet.

This is exactly why I recommended Python. Spend an hour with it and then re-evaluate your position ;)



None.

Sep 20 2009, 3:18 am CecilSunkure Post #178



Spend an hour with python? I've spent quite a few hours with it actually. I can just about create a very simple game, even using the A-Star algorithm for AI.. But other than that, I really can't use python to do much. But after looking at your two files, that looks extremely cost effective. Those triggers would have taken me hours upon hours to do by hand. You probably made them in a fraction of that time.



None.

Sep 20 2009, 3:20 am Falkoner Post #179



MacroTriggers is extremely simple if you've already been triggering in SC before, it's a language already set up to be specifically geared toward SC, instead of you having to do all the basic brute-forcing, it's already been done. With the help file and the autocomplete it's ridiculously easy to get, and you just get faster at it the more you use it.

Yes, all the operations could be done using another scripting language, but that would require you to also write the basic connections between the language and SC itself, this is already done in MacroTriggers, loops, functions, variables, all already possible and no brute-forcing information except writing the actual triggers themselves.



None.

Sep 20 2009, 3:34 am The Starport Post #180



Quote from azala
Quote from Falkoner
This is system is worth using because it allows you to more easily organize your triggers, and is already written for people's use, rather than them using their own scripted language, which takes a bit of time to write. I don't think you realize the full capabilities of this language, azala.

What sort of operation is easier to do in MT?

And why would you go through the process of learning a whole new language that has relatively little testing behind it (compared to scripting languages), and has zero value outside the SC context? Your productivity is directly tied to the reliability and usability of the system, so if something goes wrong, you're *really* out of luck.
Good argument, actually. Actually I already have a Javascript tool with trigger bindings for that very reason. I built it earlier in a failed bid to make a web application for trigger making, and it could ostensibly be used for that purpose in its current form (getting it to plug it into notepad++ or another IDE might take some work, though). But I don't use it because the added layer of language features do little to improve trigger making, as triggers are basically a shallow and highly constrained declarative language that would rarely be able to make use of the sorts of abstract features normal languages possess. Even MacroTriggers' own MACRODEF; it's equivalent of functions, is something I rarely ever use, for example.

There's little in terms of specifics that you can do with trigger making that applies outside of its own domain, really. And all the syntax and data types of triggers are built into the language itself rather than needing to be wrestled with as data variables of another language's bindings library. The only real shortcoming with the features of the native language is, as I addressed with my 'eval' request, control of conditions and actions as data rather than code. But even that shortcoming is not a substantial drawback, really.


Note also that both me and Wormer have already made multiple non-trivial maps with it. It's not perfect, sure, but it definitely does its job.

Post has been edited 6 time(s), last time on Sep 20 2009, 8:31 am by Tuxedo-Templar.



None.

Options
Pages: < 1 « 7 8 9 10 1115 >
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[05:59 am]
NudeRaider -- *is
[05:17 am]
NudeRaider -- despite all its flaws the sound design its fantastic
[10:29 pm]
Oh_Man -- homeworld 3 = massive disappointment
[2024-5-14. : 10:05 am]
Moose -- ya
[2024-5-14. : 5:23 am]
zsnakezz -- yes
[2024-5-12. : 8:51 pm]
l)ark_ssj9kevin -- Are you excited for Homeworld 3?
[2024-5-12. : 8:44 pm]
l)ark_ssj9kevin -- Hi Brusilov
[2024-5-12. : 4:35 pm]
O)FaRTy1billion[MM] -- Brusilov
Brusilov shouted: Hey, what happened to EUDDB? Is there a mirror for it somewhere? Need to do a little research.
my server that was hosting it died
[2024-5-10. : 8:46 pm]
NudeRaider -- Brusilov
Brusilov shouted: Hey, what happened to EUDDB? Is there a mirror for it somewhere? Need to do a little research.
https://armoha.github.io/eud-book/
[2024-5-10. : 8:36 am]
Brusilov -- Hey, what happened to EUDDB? Is there a mirror for it somewhere? Need to do a little research.
Please log in to shout.


Members Online: Oh_Man, Moose