Page 1 of 1

ProTRG v1.1

Posted: Sun Jan 10, 2010 3:27 pm
by poiuy_qwert
ProTRG v1.1 by poiuy_qwert
Download Windows EXE: ProTRG v1.1 (1.7mb)
Download the Source: ProTRG v1.1 (49kb, requires Python)

ProTRG is an advanced trigger creation language (like MacroTriggers) built on top of Python that is very useful for generating lots of SCMDraft triggers (and now even .trg files!) in an easy and efficient way. ProTRG is a command line "compiler" which runs the code in a plain text file and outputs SCMDraft triggers (or a .trg) to another file. It also comes with Notepad++ support, in fact its meant to be used with Notepad++ for a much easier experience.

Changes
ProTRG v1.1:
* Updated readme
* Fixed LeaderboardComputerPlayers (changed parameter from SETSWITCHSTATE to SETOTHERSTATE)
* Fixed the default trigger file from "triggers.txt" to "triggers.protrg"
* Fixed the convenience global ACTIONS so it's set to True
* Fixed some TUNIT vs UNIT inconsistancies, and the definitions for conditions/actions with the PERCENT parameter type
* Fixed multilines and slashes in string conversion
* Fixed potential problem with script filenames starting with "protrg" (without quotes)
* Fixed switches to be numbered the same as SCMDraft switches (1-256 instead of 0-255)
* Fixed many unit names
* Added support for compiling straight to .trg's, including GOT compatible .trg's (Note: StarEdit has problems loading recycled strings)
* Added an optional mechanism to have stronger typed values for parameters (Explained more in the Coding section)
* Added support for Extended Unit Deaths (EUD's) using the new stronger type mechanism (using EXTENDEDUNIT type)
* Added DefaultString, which is set to an empty string (""), and all default AI scripts as Globals
* Added @include preprocessor to iclude ProTRG files in others
* Added better command line support
* Added better support for Properties
* Added the keyword argument "disabled" for conditions/actions
* Added the possibility to collapse code in Notepad++ using #> and #< for the start and end
* Added a list of the Globals and their values to reference.txt
* All conditions and actions now inherit from the Condition and Action classes instead of directly from Raw
* LOCATION id's are now 0 to 254 instead of 1 to 255 to conform with map editors default location names
* If an error happens in your script it will now print all the current triggers in the Trigger list (if any) after printing the error traceback
ProTRG v1:
* First public release

Re: ProTRG v1.0

Posted: Sun Jan 10, 2010 11:14 pm
by bajadulce
NIce :)  I'm not much of a mapper, but I do know that creating Trigs in your standard map editor can get really old fast.  This tool looks like a great way to build complex triggers as you can copy/paste, move stuff around, and take advantage of the other python features.

I really like the fact that modders such as myself can build triggers using Unit ID's.  Most modders feel pretty comfortable around Unit ID's thats for sure.

Re: ProTRG v1.1

Posted: Sat Mar 27, 2010 7:57 am
by poiuy_qwert
ProTRG v1.1 released
Download Windows EXE: ProTRG v1.1 (1.7mb)
Download the Source: ProTRG v1.1 (49kb, requires Python)

Changes:
* Updated readme
* Fixed LeaderboardComputerPlayers (changed parameter from SETSWITCHSTATE to SETOTHERSTATE)
* Fixed the default trigger file from "triggers.txt" to "triggers.protrg"
* Fixed the convenience global ACTIONS so it's set to True
* Fixed some TUNIT vs UNIT inconsistancies, and the definitions for conditions/actions with the PERCENT parameter type
* Fixed multilines and slashes in string conversion
* Fixed potential problem with script filenames starting with "protrg" (without quotes)
* Fixed switches to be numbered the same as SCMDraft switches (1-256 instead of 0-255)
* Fixed many unit names
* Added support for compiling straight to .trg's, including GOT compatible .trg's (Note: StarEdit has problems loading recycled strings)
* Added an optional mechanism to have stronger typed values for parameters (Explained more in the Coding section)
* Added support for Extended Unit Deaths (EUD's) using the new stronger type mechanism (using EXTENDEDUNIT type)
* Added DefaultString, which is set to an empty string (""), and all default AI scripts as Globals
* Added @include preprocessor to iclude ProTRG files in others
* Added better command line support
* Added better support for Properties
* Added the keyword argument "disabled" for conditions/actions
* Added the possibility to collapse code in Notepad++ using #> and #< for the start and end
* Added a list of the Globals and their values to reference.txt
* All conditions and actions now inherit from the Condition and Action classes instead of directly from Raw
* LOCATION id's are now 0 to 254 instead of 1 to 255 to conform with map editors default location names
* If an error happens in your script it will now print all the current triggers in the Trigger list (if any) after printing the error traceback

Re: ProTRG v1.1

Posted: Sun Mar 28, 2010 7:15 am
by Archangel
I'd love to use this, but I'm on Windows 7 and the instructions don't appear to work for my OS.

There's supposed to be a userDefineLang.xml in the Notepad++ folder? Not in mine, don't know where it'd be. I went ahead and copied the one from the ProTRG folder but something tells me that's not going to cut it.

Press F6? Why? I did but it didn't do anything and there's no explanation as to what it SHOULD do, so I can't just manually navigate to whatever it is that command's supposed to do.

Blah.

Re: ProTRG v1.1

Posted: Sun Mar 28, 2010 10:36 am
by poiuy_qwert
Archangel wrote:There's supposed to be a userDefineLang.xml in the Notepad++ folder? Not in mine, don't know where it'd be. I went ahead and copied the one from the ProTRG folder but something tells me that's not going to cut it.
Maybe there is no userDefineLang.xml in the folder until you run it the first time. Anyway, what you did should work, check the Languages menu and see if ProTRG is listed at the bottom.
Archangel wrote:Press F6? Why? I did but it didn't do anything and there's no explanation as to what it SHOULD do, so I can't just manually navigate to whatever it is that command's supposed to do.
Do you have an old version of Notepad++ or something? F6 is part of the NppExec plugin which has come with Notepad++ for a while. What is listed in the Plugins menu?

Re: ProTRG v1.1

Posted: Sun Mar 28, 2010 1:58 pm
by Archangel
v5.6.8 is the version I have running. It's what was linked to from the post.

I don't have an nppExec.dll in the plugins, if that's what I'm supposed to be looking for. Is there a newer version?

Re: ProTRG v1.1

Posted: Sun Mar 28, 2010 8:03 pm
by poiuy_qwert
That is the latest version of Notepad++, so it looks like you downloaded a package that didn't come with the plugins (didn't know there was such a thing). I'm pretty sure the installer download on this page has them, or it looks like you can get the NppExec plugin itself from this page.

Re: ProTRG v1.1

Posted: Sun Mar 28, 2010 9:12 pm
by Archangel
Weird, huh?

Thanks though!

Is it the Obide thing? I don't see NppExec in that .zip

There's a ghNppExec  one as well it could be?