ProTRG v1.1, Easily and efficiently generate masses of triggers
Post #41
MC˛poiuy_qwert
Jan 29 2010, 4:26 am
|
PyMS and ProTRG developer
|
Thanks Cecil, I'll look into your code more when I have the chance.
The .trg exporting is pretty much only meant for modders, but could be useful for people that have no access to SCMDraft. And the problem you're talking about is .trg's dont contain the location information, so there is no location importing/exporting. ![]() ![]() ![]() ![]() ![]() ![]() ![]() We mod Starcraft. PyMS (Forums/Local) | FNTGen | ProTRG (Local) | LocUnlock | BWAI Launcher BroodWarAI.com (Forums) | StarCraft: Team Fortress (Forums/Local) |
Post #42
CecilSunkure
Mar 25 2010, 6:47 pm
Post #43
MC˛poiuy_qwert
Mar 25 2010, 7:59 pm
|
PyMS and ProTRG developer
|
I'm sorry I completely forgot about this. Good timing on the post though since I should have access to a Windows computer tonight!
![]() ![]() ![]() ![]() ![]() ![]() ![]() We mod Starcraft. PyMS (Forums/Local) | FNTGen | ProTRG (Local) | LocUnlock | BWAI Launcher BroodWarAI.com (Forums) | StarCraft: Team Fortress (Forums/Local) |
Post #44
CecilSunkure
Mar 25 2010, 8:03 pm
Post #45
MC˛poiuy_qwert
Mar 26 2010, 1:49 am
|
PyMS and ProTRG developer
|
Ok I finished it up and compiled it on the Windows computer, I just need BWAI's new FTP info to upload the new version. If anyone wants it before hand post/PM me I guess.
![]() ![]() ![]() ![]() ![]() ![]() ![]() We mod Starcraft. PyMS (Forums/Local) | FNTGen | ProTRG (Local) | LocUnlock | BWAI Launcher BroodWarAI.com (Forums) | StarCraft: Team Fortress (Forums/Local) |
Post #46
MC˛poiuy_qwert
Mar 27 2010, 2:47 pm
|
PyMS and ProTRG developer
|
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 ![]() ![]() ![]() ![]() ![]() ![]() ![]() We mod Starcraft. PyMS (Forums/Local) | FNTGen | ProTRG (Local) | LocUnlock | BWAI Launcher BroodWarAI.com (Forums) | StarCraft: Team Fortress (Forums/Local) |
Post #47
CecilSunkure
Apr 5 2010, 9:11 am
|
When you open reference.txt, what is the keyboard shortcut to collapse the text into a nicer looking view? I cannot remember, and you changed the original post so it doesn't include that information anymore ;C
Can you also add in support for the memory condition in scmdraft? Okay, well I modified your reference .txt and made a nice .xml file using the #> #< collapsibles: http://www.mediafire.com/?oyykynyzjmy Alt + 1 to collapse first level, alt + 2 to collapse second level. Alt + Shift + 1 to uncollapse first level, Alt + Shift + 2 to uncollapse second level. I also posted here with some information for making the memory condition. This post was edited 5 times, last edit by CecilSunkure: Apr 5 2010, 9:44 pm. Reason given: typo |
Post #48
CecilSunkure
Apr 7 2010, 1:37 pm
|
Here is a new source file with the memory condition in it for you poiuy, along with a new reference.xml.
http://www.mediafire.com/?xjk3xdrzrzo I changed the class definition of a LONG integer as -4294967295 < x > 4294967295. This post was edited 2 times, last edit by CecilSunkure: Apr 7 2010, 3:38 pm. |
Post #49
MC˛poiuy_qwert
Apr 7 2010, 3:28 pm
|
PyMS and ProTRG developer
|
Yep, easily.
Good idea with making it collapseable, I'll add that. Yep, i'll reply there. I'll check it out when i get home, ![]() ![]() ![]() ![]() ![]() ![]() ![]() We mod Starcraft. PyMS (Forums/Local) | FNTGen | ProTRG (Local) | LocUnlock | BWAI Launcher BroodWarAI.com (Forums) | StarCraft: Team Fortress (Forums/Local) |
Post #50
CecilSunkure
Apr 7 2010, 5:15 pm
Post #52
CecilSunkure
Apr 7 2010, 5:27 pm
Post #54
CecilSunkure
Apr 7 2010, 5:32 pm
Post #56
CecilSunkure
Apr 7 2010, 5:49 pm
|
Okay so create a new .txt or .protrg file then open it up in notepad++. This is the file you will type code into to compile. The compiled (output triggers that are in scmdraft format) are in the scmd_FileName file.
It looks like you tried to compile the output file Here is an example of writing a hyper trigger in the protrg input file (the file you first open): Codefor loop in range(3) HyperTrigger = Trigger(1) Preserve = PreserveTrigger() wait = Wait(0) Always(add=HyperTrigger) for i in range (63): HyperTrigger.add(wait) HyperTrigger.add(Preserve) Here is another way: CodeHyper = Trigger(1) Always(add=Hyper) for i in range(63): Wait(0, add=Hyper) PreserveTrigger(add=Hyper) |
Post #57
MC˛poiuy_qwert
Apr 19 2010, 11:25 pm
|
PyMS and ProTRG developer
|
I don't think that has ever been valid, or if you are right I don't know how it worked before. What you need to do is use the global keyword inside the function like:
CodeMAX_INDEX = 1699 def test_Index(i): global MAX_INDEX if i > MAX_INDEX: print('Error; the max iteration count is %s' % (MAX_INDEX)) test_Index(3) ![]() ![]() ![]() ![]() ![]() ![]() ![]() We mod Starcraft. PyMS (Forums/Local) | FNTGen | ProTRG (Local) | LocUnlock | BWAI Launcher BroodWarAI.com (Forums) | StarCraft: Team Fortress (Forums/Local) |
Post #58
CecilSunkure
Apr 20 2010, 12:58 am
Post #59
xAngelSpiritx
May 7 2010, 10:30 pm
Post #60
CecilSunkure
May 8 2010, 1:13 am
0 members in this topic (italic members are currently writing a reply): None
+ guest(s)
+ guest(s)
Please log in to shout.








![[close]](/images/up.gif)