Staredit Network > Forums > SC1 Mapping Tools > Topic: MacroTriggers production thread
MacroTriggers production thread
May 16 2008, 10:36 pm
By: Wormer
Pages: < 1 « 11 12 13 14 15 >
 

Dec 25 2009, 8:17 pm Falkoner Post #241



Quote
Is there functionality for using arrays in triggers? I know you can define an array outside of a trigger, and pull values from it to use in the trigger... But I was wondering if there was a way to have a dynamic array that gets directly manipulated and edited by triggers. (If there isn't, such functionality could be implemented (if needed) in the form of multiple death counters, where each value of each counter is used as an array index.)

Yeah, the only real use for arrays is in loops, you just modify which section of the array is being accessed using the loop's number.

Also, just a suggestion to everyone, since you sometimes want to have things with Macros, but find it hard due to the inability to change conditions(trust me Wormer, this is huge), I have 2 sections at the top of my triggers, one collapsed under Macros, and another collapsed under Functions, which is basically a Macro, even marked with all the syntax of one, except I have an odd keyword in the conditions category, so whenever I want to use it, I simply copy this "funtion" into my trigger list(each one is in a collapsed section), and select it all and use find and replace to put my wanted conditions/actions into the Macro, and also using Find and Replace to fill in all the variables that would normally be parameters in a Macro, then I collapse it down again, and add the conditions added as a part of the parameters list to the title.



None.

Dec 26 2009, 6:21 pm melnikov Post #242



i have reinstalled notepad++ and macrotrigger plugins. now it works.

Post has been edited 1 time(s), last time on Dec 26 2009, 6:28 pm by melnikov.



None.

Dec 30 2009, 6:33 am Cinolt Post #243



There should be an option, probably best in the form of a flag or something in the compilation line, to allow different 'types' in places that they aren't originally intended. Example:

Deaths(@P(1), @Exactly, 1, 42)

Instead of a unit, it would compile with 42 in that space, right now the 42 would prevent it from outputting anything at all. The reason for this is that there is no way, in a sense, to increment a unit, but you can increment an integer. With the output, I could do a Search and Replace function to replace 42 with "Zerg Zergling" or the like, then replace 43 with "Zerg Hydralisk" etc.



None.

Dec 30 2009, 11:26 am Wormer Post #244



Quote from name:yoonkwun
There should be an option, probably best in the form of a flag or something in the compilation line, to allow different 'types' in places that they aren't originally intended.
Usually it is a bad practice to make exceptions from the general rule.
The better way is generalizing the rule itself to allow exceptions as it's particular case.

There are two cases when one may need specifying unit IDs. The first case is EUDs. The second is your case when one wants to loop through a sequence of units, enumerate them for using in loops.

In the first case I would have allowed integers in the unit constructor @Unit(INTEGER). But SCMD isn't allowing extended units anyways. In your case using arrays is a much better solution.

That way you specify units you want to loop through in an array:
Quote from MacroTriggers
ARRAY aMyUnits = { @Unit("Zerg Zergling"), @Unit("Zerg Hydralisk") /*, ... etc. */ } 
Afterwards you loop through the array elements:
Quote from MacroTriggers
FOR n = 0 TO 1 DO
// Deaths(@P(1), @Exactly, 1, aMyUnits[n])
ENDL




Some.

Dec 30 2009, 7:14 pm Cinolt Post #245



Ah okay, I forgot about arrays. That will work for my purpose. Thanks.



None.

Jan 5 2010, 2:51 am CecilSunkure Post #246



Hola. I've set up macro triggers in about an hour. It took me forever to realize that in this code:

Code
cd "$(CURRENT_DIRECTORY)" // set up current directory
NPP_SAVE // save current file
java -jar "<full path to mtrigsc.jar>" "$(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"

you have to change the line java -jar "<full path to mtrigsc.jar>" "$(NAME_PART).trigger" "$(NAME_PART).property" to include your path to mtrigsc.jar without the two <> characters. You should make a note of this in the original post Wormer ;)

I'm having trouble using the auto-complete and am unsure of how to get it working in notepad++. Can anyone help me out? I don't see an auto-completion file to include in the user-defined language .xml file.. What should I do to get the auto-complete to work?



None.

Jan 5 2010, 6:20 am The Starport Post #247



If you have all the files in the right place, you should be able to press Ctrl+Space to get your autocomplete. As I recall, for my Vista machine I put the UserDefinedLang.xml and Shortcuts.xml go under <User Account Folder>\AppData\Roaming\Notepad++\, and Mtrigger.xml goes under the Program Files (x86)\Notepad++\Plugins\APIs\ folder. I think there was another better way that also works, though.

Personally I prefer setting up macros bound to the numpad for the set of conditions or actions I most commonly use, since the autocomplete doesn't seem to give you the option for filling in the fields of each condition or action type.

Post has been edited 2 time(s), last time on Jan 5 2010, 6:31 am by Tuxedo-Templar.



None.

Jan 5 2010, 4:36 pm Falkoner Post #248



Hey, I made an install video, the sound and video are off, but it's better than nothing: MacroTriggers Installation Video



None.

Jan 5 2010, 7:29 pm ImagoDeo Post #249



I'm thinking of downloading this simply because of the enormous potential, but I need some questions answered first.

1. I intend to use the program simply for tediously long trigger system sections that I don't want to manually trigger. Do I need the entire package, or would the compiler do this for me on its own?

2. Is there a limit to the size of the output file that MT can generate? I mean, what if I were intending to do a 2,000-trigger system designed to award the player based on kills instead of kill score or deaths. Could the program accomplish this?

Thanks in advance.



None.

Jan 5 2010, 7:36 pm Falkoner Post #250



Quote
1. I intend to use the program simply for tediously long trigger system sections that I don't want to manually trigger. Do I need the entire package, or would the compiler do this for me on its own?

2. Is there a limit to the size of the output file that MT can generate? I mean, what if I were intending to do a 2,000-trigger system designed to award the player based on kills instead of kill score or deaths. Could the program accomplish this?

It takes an extra minute to get the entire package installed, and other than the compiler it's just additions to Notepad++ to make things easier, so I'd just do the entire thing, but you can just do the compiler and Notepad++ if you want.

A few pages back in this topic someone made a script that generated around twenty-five thousand EUD triggers for a map, I think it can handle it ;)



None.

Jan 5 2010, 7:38 pm The Starport Post #251



You shouldn't need thousands of triggers for something like that. There's a very simple, unlimited way to do it.



None.

Jan 5 2010, 8:28 pm ImagoDeo Post #252



Quote from name:Tuxedo-Templar
You shouldn't need thousands of triggers for something like that. There's a very simple, unlimited way to do it.

I know about Kills to Cash Perfect. But if MT can produce a 2000 or 3000 trigger system in the same time that it would take me to implement KtCP, I'd prefer to go with the huge system. Also, if you want specific drop chances for specific monsters, the huge system can do that more efficiently than KtCP, I think.



None.

Jan 5 2010, 8:37 pm Falkoner Post #253



I would agree, except with so many triggers your map now takes much longer to download.



None.

Jan 5 2010, 9:35 pm The Starport Post #254



Actually that "perfect" solution would take longer to implement, technically, though with either system you could have about the same control over specific drop chances. My point is that simple problems alone (like Kill counting) shouldn't define your reason for using something like MacroTriggers.



None.

Jan 5 2010, 11:24 pm ImagoDeo Post #255



Quote from name:Tuxedo-Templar
Actually that "perfect" solution would take longer to implement, technically, though with either system you could have about the same control over specific drop chances. My point is that simple problems alone (like Kill counting) shouldn't define your reason for using something like MacroTriggers.

Agreed, it is a simple problem, but complex problems don't usually require huge amounts of triggers, do they?



None.

Jan 6 2010, 2:07 am CecilSunkure Post #256



Quote from name:Tuxedo-Templar
If you have all the files in the right place, you should be able to press Ctrl+Space to get your autocomplete. As I recall, for my Vista machine I put the UserDefinedLang.xml and Shortcuts.xml go under <User Account Folder>\AppData\Roaming\Notepad++\, and Mtrigger.xml goes under the Program Files (x86)\Notepad++\Plugins\APIs\ folder. I think there was another better way that also works, though.

Personally I prefer setting up macros bound to the numpad for the set of conditions or actions I most commonly use, since the autocomplete doesn't seem to give you the option for filling in the fields of each condition or action type.
I have all three .xml files in the proper place (start >> run >> %APPDATA%\Notepad++), although I cannot use ctrl+space to auto-complete.. Do you have any idea why this could be?



None.

Jan 6 2010, 6:05 am ImagoDeo Post #257



I've downloaded and unpacked the mtrigs file - but apparently I need an input file to run the compiler on. Are there any tutorials for basic composition of an input file?

I'm desperate to unlock the enormous potential of this system, but I will probably need some help...



None.

Jan 6 2010, 2:17 pm CecilSunkure Post #258



Yeah you're supposed to make your own input file. From there, you type in your mtriggers, and then compile them into SCMDraft triggers with the mtrigsc.jar file.



None.

Jan 6 2010, 7:32 pm ImagoDeo Post #259



Took me about an hour to get everything installed. It might take a while to figure things out, but I've finally got it under my control. ^_^

Thanks once again, Wormer, for making such an awesome program.



None.

Jan 6 2010, 10:08 pm Falkoner Post #260



If you're having issues you can always just watch my actions on the video I may, even if the sound is off :-_-:



None.

Options
Pages: < 1 « 11 12 13 14 15 >
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:56 am]
Oh_Man -- cool bit of history, spellsword creator talking about the history of EUD ^
[09:24 pm]
Moose -- denis
[05:00 pm]
lil-Inferno -- benis
[10:41 am]
v9bettel -- Nice
[2024-4-19. : 1:39 am]
Ultraviolet -- no u elky skeleton guy, I'll use em better
[2024-4-18. : 10:50 pm]
Vrael -- Ultraviolet
Ultraviolet shouted: How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
hey cut it out I'm getting all the minerals
[2024-4-18. : 10:11 pm]
Ultraviolet -- :P
[2024-4-18. : 10:11 pm]
Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
[2024-4-17. : 11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
Please log in to shout.


Members Online: Oh_Man, Roy