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 415 >
 

Apr 27 2009, 11:19 pm Falkoner Post #21



1. Does Notepad++ have issues with updating the output files when you compile? Must you reopen them to get the updated version?

2. If you haven't saved in Notepad++ before compilation, will it compile the old text?

3. What should the actual UserFineLang.xml file look like with just your language installed? I accidently messed mine up and can't get an original to fix it.

4. Why not simply place the comment lines (//---//) in between triggers, since SCM Draft will do it anyway?



None.

Apr 28 2009, 5:18 am Wormer Post #22



Quote from Falkoner
1. Does Notepad++ have issues with updating the output files when you compile? Must you reopen them to get the updated version?
Yes, it has. I think there was a hotkey that reloaded file from disk, but it is not specified in menu and I forgot it.

Quote from Falkoner
2. If you haven't saved in Notepad++ before compilation, will it compile the old text?
You're right. If you haven't saved it will compile the old text.

Notepad++ also has issules with the current directory on and off. The current directory supposed to be the directory of your file (if you have proper settings), but sometimes it complie to the last visited direcotry.

I suggest using the next script to get rid of that problems:
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"

(I commented .property files opening because they are not often used.)

Quote from Falkoner
3. What should the actual UserFineLang.xml file look like with just your language installed? I accidently messed mine up and can't get an original to fix it.
For me it is the next file userDefinedLanguage.xml right now, as far as I haven't defined any other user defined languages. You should place it into "Documents and Settings\User\Application Data\Notepad++".

Quote from Falkoner
4. Why not simply place the comment lines (//---//) in between triggers, since SCM Draft will do it anyway?
I don't quite understood the question. Are you talking about generated SCMD triggers? If that, it does not matter anyways. I believe SCMD forgets about the text after compilation and generates it each time from scratch from it's internal triggers representation.

EDIT:
Quote from Wormer
Thanks, I am going to add keywords (like TRIGGER, CONDITIONS, LOCATION and such) auto-completion soon!
Not quite sure now if that is a good idea, because these might mess up with conditions/actions. Probably having just a pure conditions and actions hints would be better.

Post has been edited 1 time(s), last time on Apr 28 2009, 5:23 am by Wormer.



Some.

Apr 29 2009, 1:10 am Falkoner Post #23



Ah, thanks Wormer, it works perfectly now, awesome :) I'm seriously impressed with this now, actually having it setup in front of me, I can totally see myself using it.

Quote
I don't quite understood the question. Are you talking about generated SCMD triggers? If that, it does not matter anyways. I believe SCMD forgets about the text after compilation and generates it each time from scratch from it's internal triggers representation.

Well, as you know when SCM Draft generates the triggers, it automatically places the //-----// in between each trigger, and I think for readability it might be better if MacroTriggers also did this, even though it is not necessary, it helps identify different triggers

Quote
Not quite sure now if that is a good idea, because these might mess up with conditions/actions. Probably having just a pure conditions and actions hints would be better.

At this point, all you're missing is autocompletion, and with that I'd say it's just about perfect, I think if you could have a unit name autocomplete with a list of units(like SCM Draft) that would be handy, but for locations and such I don't feel it's really necessary, so as long as you have hints for actions and conditions, and maybe an autocomplete option for Notepad++ to lay out a blank version of that action when you start typing it, it'd be perfect :)

Question 1: Do units need to be initialized as a variable in order to be used in the MacroTriggers, or can you just use unit names in the actions?

Question 2: Is there currently any way to place triggers in MacroTriggers into different tiers to allow for minimizing of sections of triggers when you're done with them?

Question 3: Would it be possible to place unit's name in a sort of array so that you could use mathematical operations to pick different unit names in a loop?

Post has been edited 2 time(s), last time on Apr 29 2009, 1:21 am by Falkoner.



None.

Apr 29 2009, 8:30 am Wormer Post #24



Quote from Falkoner
Well, as you know when SCM Draft generates the triggers, it automatically places the //-----// in between each trigger, and I think for readability it might be better if MacroTriggers also did this, even though it is not necessary, it helps identify different triggers
Hmmm... Well, I consider this. I just haven't thought about it because I usually don't investigate generated triggers. I personally see no difference with delimiters and without, for me it is all the same. There might be different opinions.

Quote from Falkoner
At this point, all you're missing is autocompletion, and with that I'd say it's just about perfect, I think if you could have a unit name autocomplete with a list of units(like SCM Draft) that would be handy, but for locations and such I don't feel it's really necessary, so as long as you have hints for actions and conditions, and maybe an autocomplete option for Notepad++ to lay out a blank version of that action when you start typing it, it'd be perfect :)
With an auto-completion I am restricted to fairly limited resources of what Notepad++ will allow me. The problem with unit names auto-complete is that raw unit names are Strings including quotation characters and space. Notepad++ can only auto-complete words composed of letters A-Z, a-z and an underline character (by the way, this is the cause why Notepad++ auto-completion could not be done for SCMD triggers). The problem is also in that all auto-completion words are put in one set. That way, if I add keywords and/or unit names to auto-completion these words might hinder auto-completion of actions and conditions, which is not good.

As for auto-complete option which lays out a blank version of an action or condition I also can't do that through Notepad++ auto-completion feature. I can suggest using macroses which Tux had used and described. He put several most frequently used actions and conditions to a Notepad++ macro and recalled them via numbers-hotkeys. Probably it is also a good idea to put a blank trigger there.

It also would be nice if Notepad++ could recognize variables and grant an ability to auto-complete those. An approximation of this useful feature might be the Notepad++'s auto-completion of frequently used words in the text (Preferences->Backup/Auto-completion 'Word completion' switch instead of 'Function completion').

Quote from Falkoner
Question 1: Do units need to be initialized as a variable in order to be used in the MacroTriggers, or can you just use unit names in the actions?
You can just use unit names, with a proviso that they are arguments to a unit constructor @U("Unit Name"). Let's take a Deaths(Player, QMod, Integer, Unit) condition for example. Actions and conditions arguments are typed in MacroTriggers. That means MacroTriggers expects a Player as a first argument, QuantityModifier as the second and so on. String "Unit Name" itself has a String type and cannot be directly used at that places. The string should be transformed to an object of a desired type with use of type constructors like @U(String) or @P(Integer). That is made to prevent silly mistakes, for example when one can have a "Terran Marine" location and accidentally mix up arguments and unintentionally specify "Terran Marine" as a location. This allows the compiler to provide more useful information on error.

But I strongly recommend to use a variable for each unit used in triggers. Moreover I recommend using different variables for separate roles the particular unit plays in the triggers. To my mind naming of objects turned out to be the most useful feature of MacroTriggers, probably even more useful than triggers replication. When you have a list of definitions of objects at start of your text file that helps keeping track and organizing them. When you need to change the unit in a particular role to another one, you can simply change it in one place --- it's definition.

Quote from Falkoner
Question 2: Is there currently any way to place triggers in MacroTriggers into different tiers to allow for minimizing of sections of triggers when you're done with them?
Do you mean the sections collapse thing? Ermmm, don't quite understand again.

Quote from Falkoner
Question 3: Would it be possible to place unit's name in a sort of array so that you could use mathematical operations to pick different unit names in a loop?
Bull's eye hit! No.
To my mind this is the only significant feature MacroTriggers strongly needs and it is mainly the only thing I mean when say "Some features I wanted to make were not implemented. Probably I will finish that later."

Post has been edited 3 time(s), last time on Apr 29 2009, 8:46 am by Wormer.



Some.

Apr 29 2009, 7:10 pm Falkoner Post #25



Hmm it's too bad the autocompletion is so bad, I guess I'll just use hotkeys like Tux did.

Quote
Do you mean the sections collapse thing? Ermmm, don't quite understand again.

Yeah, so that you can collapse different sections and have others open, it's a nice way to organize and split triggers, hiding ones you don't need.

Quote
To my mind this is the only significant feature MacroTriggers strongly needs and it is mainly the only thing I mean when say "Some features I wanted to make were not implemented. Probably I will finish that later."

Well, then I look forward to when this is an option :)


One last question, can loops be used in Actions and Conditions?



None.

Apr 29 2009, 10:20 pm Wormer Post #26



Quote from Falkoner
Yeah, so that you can collapse different sections and have others open, it's a nice way to organize and split triggers, hiding ones you don't need.
You can use the sequence //> to open the folder and //< to close it with my current syntax. As far as they start with a double slash MacroTriggers will recognize them as comments.

Quote from Falkoner
One last question, can loops be used in Actions and Conditions?
No you can't use loops, nor you can use if statements there. This is not implemented too!..



Some.

Apr 29 2009, 10:51 pm Falkoner Post #27



Ah, that works, mmkay, then I think I'm all situated to use it :)



None.

Apr 30 2009, 3:45 am killer_sss Post #28



well i've read this as best as i can and from what i can tell i would like to use this.

problems are
1. i only understood about 75% of what was talked about. I know how to use languages/coding/programing whatever you want to call it, but alot of placing certain things here and there i have no idea what your talking about. can you simplify? such as things i need to get everything up and running.

2. i don't have notepad++. Can i dl it for free somewhere?


Basically i can figure out the technical stuff of how to code and what not i'm just clueless about the patthin and some of the questions falk has asked about.

pretty much trying to find a way to type triggers than having to Click a million times. Starting my first major project and im guessing it will have 5k+ triggers with lots of repeats.

I use to type homework in word for some programing languages and then copy into the program back at school and if i can't use this i'd like to know if another way is possible thru typing rather than clicking.

Post has been edited 1 time(s), last time on Apr 30 2009, 4:20 am by killer_sss.



None.

Apr 30 2009, 4:31 am Falkoner Post #29



Quote
2. i don't have notepad++. Can i dl it for free somewhere?

Yeah, it's free, just google it, once you work with it a bit some of my questions might make more sense.



None.

Apr 30 2009, 10:59 am Wormer Post #30



Quote from killer_sss
well i've read this as best as i can and from what i can tell i would like to use this.
Hello killer_sss! Glad to hear you're interested!

Quote from killer_sss
pretty much trying to find a way to type triggers than having to Click a million times. Starting my first major project and im guessing it will have 5k+ triggers with lots of repeats.
Do you know SCMDraft text triggers? Do you understand them? Have you tried to use it?

Quote from killer_sss
can you simplify? such as things i need to get everything up and running.
If you understand SCMDraft text triggers then you should have a basic understanding. Basically this tool works with raw text and generates text on output. The output text contains SCMDraft triggers which you copy/paste into your map.

For how to run MacroTriggers please consider this post. Could you be more specific in what point you can't understand that I could help you.

Quote from killer_sss
2. i don't have notepad++. Can i dl it for free somewhere?
Notepad++, the first link is yours! Write when you try this!

Quote from killer_sss
Basically i can figure out the technical stuff of how to code and what not i'm just clueless about the patthin and some of the questions falk has asked about.
I'm glad to hear you know how to code, but this a bit differs, because triggers are not programs. Can't get what are you clueless about? What is "the patthin"?



Some.

Apr 30 2009, 9:29 pm killer_sss Post #31



Quote from Wormer
Do you know SCMDraft text triggers? Do you understand them? Have you tried to use it?

this is what im missing i have no idea how to use text triggers or where i can go to expierment with using them. I have been unable to find their location in scm draft. all i have found is the string editor and the clasic trigger edit which is way 2 much clicking for me.

If you could direct me to somewhere to get help with this or help me yourself that would be great thnx.

*edit* with some forum searching i found some help i just had to uninstall and reinstall and boom i now have the text trigger options and somewhat know what im doing now will continue to expirement with them.

**i have a basic understanding down now and should be able to go from there.**



Quote from Wormer
I'm glad to hear you know how to code, but this a bit differs, because triggers are not programs. Can't get what are you clueless about? What is "the patthin"?

setting up the "pathing" sorry mispelled as you described in the link to the first post idk if there was too much clutter in that post or what but i was really confused lol. The part below is a major chunk of what i believe i need to know and was unable to understand. specifically #2 and #4

Quote from Wormer
For how to run MacroTriggers please consider this post. Could you be more specific in what point you can't understand that I could help you.


Post has been edited 4 time(s), last time on Apr 30 2009, 10:50 pm by killer_sss.



None.

May 1 2009, 1:14 am Falkoner Post #32



The path means the filepath, like if I were to put something on my desktop, the filepath would be:
C:\Documents and Settings\Test Account\Desktop\File.sux



None.

May 1 2009, 3:08 am Pyro682 Post #33



Sorry about not replying before. I saw you looking at it while I was, and I was thinking "Well... Shit... he knows I'm reading his post.. he's gonna want me to reply"

The amount of text is what waivered me off... and the programming stuff.....

XD Not a fan of programming stuffs.



None.

May 1 2009, 3:43 am killer_sss Post #34



Quote from Falkoner
The path means the filepath, like if I were to put something on my desktop, the filepath would be:
C:\Documents and Settings\Test Account\Desktop\File.sux
java -jar "<C:\Documents and Settings\Steven\My Documents\ansi\mtrigsc.jar>" "$(FULL_CURRENT_PATH)" "$(NAME_PART).trigger" "$(NAME_PART).property"

this is what i put in the step four path and it says unable to acess jarfile. spits my path back at me and says process ended. ive checked the path. I saved it extracted it and I downloaded the file in the same folder as notepad to keep me from losing it. what am i missing?



None.

May 1 2009, 3:47 am Falkoner Post #35



Remove the < > from either side of the filename :P



None.

May 1 2009, 5:35 am killer_sss Post #36



Quote from Falkoner
Remove the < > from either side of the filename :P

this is why i said i needed help. i know what a path name is but i didn't know what all i had to put in for pathing i put everything like he said lol. next time ignore the <> symbols in original statement would be nice for those who don't know what all were doing lol.



None.

May 2 2009, 4:59 am killer_sss Post #37



Quote from Wormer
For example I use the next writing for hyper triggers:

TRIGGER
OWNERS: Player
CONDITIONS:
ACTIONS:
Wait(0) Wait(0) Wait(0) Wait(0) Wait(0) Wait(0) Wait(0) Wait(0)
Wait(0) Wait(0) Wait(0) Wait(0) Wait(0) Wait(0) Wait(0) Wait(0)
Wait(0) Wait(0) Wait(0) Wait(0) Wait(0) Wait(0) Wait(0) Wait(0)
Wait(0) Wait(0) Wait(0) Wait(0) Wait(0) Wait(0) Wait(0) Wait(0)
Wait(0) Wait(0) Wait(0) Wait(0) Wait(0) Wait(0) Wait(0) Wait(0)
Wait(0) Wait(0) Wait(0) Wait(0) Wait(0) Wait(0) Wait(0) Wait(0)
Wait(0) Wait(0) Wait(0) Wait(0) Wait(0) Wait(0) Wait(0) Wait(0)
Wait(0) Wait(0) Wait(0) Wait(0) Wait(0) Wait(0) Wait(0)
PreserveTrigger()
ENDT

no condition seriosly? Doesn't this need a always condition or something?

Quote
You can just use unit names, with a proviso that they are arguments to a unit constructor @U("Unit Name"). Let's take a Deaths(Player, QMod, Integer, Unit) condition for example. Actions and conditions arguments are typed in MacroTriggers. That means MacroTriggers expects a Player as a first argument, QuantityModifier as the second and so on. String "Unit Name" itself has a String type and cannot be directly used at that places. The string should be transformed to an object of a desired type with use of type constructors like @U(String) or @P(Integer). That is made to prevent silly mistakes, for example when one can have a "Terran Marine" location and accidentally mix up arguments and unintentionally specify "Terran Marine" as a location. This allows the compiler to provide more useful information on error.

But I strongly recommend to use a variable for each unit used in triggers. Moreover I recommend using different variables for separate roles the particular unit plays in the triggers. To my mind naming of objects turned out to be the most useful feature of MacroTriggers, probably even more useful than triggers replication. When you have a list of definitions of objects at start of your text file that helps keeping track and organizing them. When you need to change the unit in a particular role to another one, you can simply change it in one place --- it's definition.

so basically this is coding pretty much i can set every variable i want to a specific name location ect.?

btw does this use your custom names for crap? so lets say i wana call a marine a Angry Fire Gunner on my map and in triggers I need to type this in, but in MT i can set a var called Rine= Terran Marine or the custom name i gave it not sure what i need here and then use this when settting up my MT's?

Also how do i setup hotkeys for commonly used triggers?

Post has been edited 1 time(s), last time on May 2 2009, 5:10 am by killer_sss.



None.

May 2 2009, 5:38 am Falkoner Post #38



Quote
no condition seriosly? Doesn't this need a always condition or something?

No condition is the same as Always, and can actually be compressed better that way :/

Quote
so basically this is coding pretty much i can set every variable i want to a specific name location ect.?

Actually, you have to :)

Quote
btw does this use your custom names for crap? so lets say i wana call a marine a Angry Fire Gunner on my map and in triggers I need to type this in, but in MT i can set a var called Rine= Terran Marine or the custom name i gave it not sure what i need here and then use this when settting up my MT's?

In SCM Draft the units go by their normal names in the text-triggers, so you just have it as the normal unit name, and in SCM Draft you just change the units custom name and it will change throughout everything but the triggers.

I donno how to set up the hotkeys, forgot how :(



None.

May 2 2009, 7:27 am Wormer Post #39



Quote from killer_sss
Also how do i setup hotkeys for commonly used triggers?
Hotkeys? Do you mean that you hit a hotkey (for example Ctrl+1) and a predefined trigger appears? If that, you can use Macro thing in Notepad++: you hit "Macro->Start Recording", type your trigger in and then "Macro Stop Recording". After that you click "Macro->Save current recorded macro" and assign the desired hotkeys combo. The next time you press that combination Notepad++ will repeat actions you did while recording from your current cursor position and you get the desired trigger. Recorded macroses store in "Documents and Settings\<User>\Application Data\Notepad++\shortcuts.xml", you could modify that file manually to handle them. I have an example of my shortcuts.xml file which inserts a blank trigger with Ctrl+1 combination: download.

Also, I've done a mistake in hints to a SetSwitch macro, parameters there should be exchanged. Download the fixed version of mtrigger.xml.

Also, I found out that hints and autocompletion turns off from time to time (you can't even recall it via hotkeys). Falkoner, have you encoutered that? I have no idea why that happens :|

Post has been edited 2 time(s), last time on May 2 2009, 7:34 am by Wormer.



Some.

May 2 2009, 8:22 am Falkoner Post #40



I haven't done anything much past setting it up and checking it out a bit, so I haven't done anything major with it yet :(



None.

Options
Pages: < 1 2 3 415 >
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2026-4-29. : 2:00 am]
l)ark_ssj9kevin -- hi jamal
[2026-4-29. : 12:18 am]
Heinermann -- memes
[2026-4-28. : 10:08 pm]
NudeRaider -- skeet-skeet, motherfucker
[2026-4-28. : 4:24 pm]
Vrael -- NudeRaider
NudeRaider shouted: Vrael boy, if you're not careful I'll moderate your sorry ass too!
gotta catch me first! skeet skeet skeet
[2026-4-26. : 1:58 pm]
lil-Inferno -- ya
[2026-4-25. : 11:50 pm]
JamaL -- Glad to see SEN will never die. Kudos to whoever is paying the hosting fees these days!
[2026-4-25. : 3:37 pm]
NudeRaider -- (-.-,)
[2026-4-25. : 3:35 pm]
Zoan -- ;o I thought that was a monkey emote
[2026-4-25. : 3:34 pm]
Zoan -- :mods:
[2026-4-25. : 3:34 pm]
Zoan -- :mods"
Please log in to shout.


Members Online: RIVE