Oreo Triggers, A new trigger preprocessor
Post #22
Jack[RCDF
Jun 13 2012, 6:47 am
|
Skin to bone, steel to rust, ash to ashes, dust to dust.
|
There's a list in one of the files in the Oreos folder, I forget which file. I was told there's a way to set aside already-in-use DCs too so you can use Oreos on a map that's already started without screwing up your existing triggers. Having said that, I think it is much easier to code a map from scratch using this or Macrotriggers or similiar than it is to add on to an existing map.
![]() ![]() ![]() ![]() ![]() ![]() Red classic. I have mostly left SEN except for the Temple Siege 2 forum (hidden to most of you). I am available via PM still, and Skype as JackRCDF. If it is important to you, you will find a way. Otherwise, you will find an excuse. -Unknown Magnificent! Perhaps you shouldn't be on SEN as much, too... Better than the iPad! |
Post #23
Kaias
Jun 16 2012, 10:44 pm
Post #24
Kaias
Jun 17 2012, 11:11 pm
|
New Update 0.8.5:
Download Link: http://www.mediafire.com/?i2ge65z9fpa8lof Next Up: Timer class, and UnitGroup ->enters(location) and ->exits(location) functions ![]() ![]() ![]() ![]() ![]() ![]() |
Post #26
Jack[RCDF
Jun 20 2012, 9:45 pm
|
Skin to bone, steel to rust, ash to ashes, dust to dust.
|
You're welcome to make a post in Portal News; if it's deemed acceptable it will be on the front page.
![]() ![]() ![]() ![]() ![]() ![]() Red classic. I have mostly left SEN except for the Temple Siege 2 forum (hidden to most of you). I am available via PM still, and Skype as JackRCDF. If it is important to you, you will find a way. Otherwise, you will find an excuse. -Unknown Magnificent! Perhaps you shouldn't be on SEN as much, too... Better than the iPad! |
Post #27
Kaias
Jun 27 2012, 12:18 am
|
New Update 0.9.0: Mint Oreos
After some collaboration with yoonkwun (thanks yoonkwun), we developed an extension called 'Mint', which lets you write triggers to your map merely by compiling. With Mint enabled, you no longer have to copy/paste the generated text into Scmdraft, the triggers are added for you. This also gives you the ability to generate units and locations to your map within Oreo trigs. Using Mint: To start, you must provide a path to your input file and an output file path to the Mint() function. Ex: ![]() Mint takes your input map file and adds the triggers Oreo generates to it. Your input map should not have the triggers in it. There are few reasons we do it this way instead of overwriting the triggers onto the original file- it protects your map from the off chance that it gets corrupted, it keeps the triggers units and locations (made by OT) from being added to your map multiple times, and it makes it so that you don't have to reload the map in Scmdraft after compiling. Your typical work flow would go like this- keep the original/input map open in Scmdraft (for making physical changes to the map, like terran, units, sprites) and oreo triggers in whatever IDE your using (for making changes to the triggers). Whenever you make a change to the map in either Scmdraft or in Oreo Trigs, you recompile OT and the changes will appear in the output map. When you test in Starcraft, you test with your output map file (where all the physical map and triggers are combined). To create a preplaced unit or location to the map using Mint Oreos, simply use these functions: ![]() Change Log:
Download Link: http://www.mediafire.com/?314bqvc3dww5mle Next Up: Timer class, and UnitGroup ->enters(location) and ->exits(location) functions, Deathcounter Storage class. This post was edited 1 time, last edit by Kaias: Jun 27 2012, 3:29 am. ![]() ![]() ![]() ![]() ![]() ![]() |
Post #28
CecilSunkure
Jun 27 2012, 12:38 am
|
Hey this is pretty cool. I need a project to practice some programming this summer to stay sharp, and I may want to dabble in something like this as well... We'll have to see.
I'm mostly interested in how you place triggers into the map file. Is there documentation somewhere on the file format of starcraft scenario files? Pretty interesting as I just developed something similar: LINK. Also, is the source included in the download or anywhere else? Lastly, if you want people to actually use your tool effectively you should create an entire map and then document steps on how to create the map you made. It's really hard for me to grasp how to use Oreo Triggers by just reading the post on it. This post was edited 1 time, last edit by CecilSunkure: Jun 27 2012, 12:46 am. |
Post #29
yoonkwun
Jun 27 2012, 1:03 am
|
StarCraft maps are nothing more than MPQ archives with a staredit\scenario.chk (plus optional .wav's). I used SFmpqapi for the Mint backend. Here's the (single) source for mint.cpp: http://pastebin.com/hKsNcc6C It uses SFmpqapi and expat. Edit: Alternative scenario.chk documentation: http://www.staredit.net/?p=oldwiki&s=17 Heinermann had his own documentation somewhere. Edit2: Er, I was thinking of this, which really isn't primary documentation but oh well: http://code.google.com/p/vgce/wiki/chkCompression This post was edited 1 time, last edit by yoonkwun: Jun 27 2012, 2:52 am. ![]() ![]() ![]() ![]() ![]() ![]() |
Post #31
Jack[RCDF
Jun 27 2012, 6:14 am
|
Skin to bone, steel to rust, ash to ashes, dust to dust.
|
Oreo Triggers is really easy to use, IMO it doesn't really need more tutorial than what you have, although perhaps add a section on making loops for generating large amounts of incremental triggers.
![]() ![]() ![]() ![]() ![]() ![]() Red classic. I have mostly left SEN except for the Temple Siege 2 forum (hidden to most of you). I am available via PM still, and Skype as JackRCDF. If it is important to you, you will find a way. Otherwise, you will find an excuse. -Unknown Magnificent! Perhaps you shouldn't be on SEN as much, too... Better than the iPad! |
Post #32
Oh_Man
Jun 30 2012, 12:56 pm
|
Creation is the province of man.
|
I don't know if this is already done or not, and it could probably be stand alone and not part of Oreo.
But someone should make some sort of notepad addon that allows you to change a single variable into a set of unique variables. OK so say I have my trigger for healing at 1%. I then copy that trigger 100 times. Now I have to go through each copy and change it to 2, 3, 4 all the way up to 100. Pretty menial work. It would be cool if you could go like, Replace 1 with 12345...etc. |
Post #33
Biophysicist
Jun 30 2012, 2:25 pm
|
:(){ :|:& };:
|
That's built into PHP. Look up for loops. http://php.net/manual/en/control-structures.for.php
Example: Code$P1 = new Player("Player 1"); $timer = new Deathcounter(); for($i = 0; $i < 121; $i++) { $P1->_if( $timer->exactly($i) )->then( Display("Timer is $i."), ''); } $P1->_if( $timer->exactly(0) )->then( $timer->setTo(120), ''); $P1->always( $timer->subtract(1), ''); ![]() ![]() ![]() ![]() ![]() ![]() Catapultam habeo. Nisi pecuniam omnem mihi dabis, ad caput tuum saxum immane mittam.
|
Post #34
CecilSunkure
Jun 30 2012, 5:00 pm
Post #35
Kaias
Jun 30 2012, 5:33 pm
|
Biophysicist is right. Part of the reason I made this as a sort of API rather than a custom language is so that you benefit from the data handling and functions of php. You can make your own functions and classes with Oreos if you wanted.
New Update: 0.9.1
Download Link: http://www.mediafire.com/?8ku895s94z745t2 ![]() ![]() ![]() ![]() ![]() ![]() |
Post #36
Kaias
Jul 7 2012, 7:30 pm
|
New Update 0.9.2
Download Link: http://www.mediafire.com/?5f52tuh0okxau39 By the way, you can do a complement operation on your conditions by passing them to not(). Example: ![]() This feature has been in Oreo since the beginning, I just hadn't documented it (like a lot of the features). ![]() ![]() ![]() ![]() ![]() ![]() |
Post #37
Jack[RCDF
Jul 12 2012, 1:24 pm
|
Skin to bone, steel to rust, ash to ashes, dust to dust.
|
Happens with all the local servers I've tried. PHP version 5.3.13, and 5.4. Tried a couple versions of oreo, the latest one in this thread and the one you sent me on bnet.
![]() ![]() ![]() ![]() ![]() ![]() Red classic. I have mostly left SEN except for the Temple Siege 2 forum (hidden to most of you). I am available via PM still, and Skype as JackRCDF. If it is important to you, you will find a way. Otherwise, you will find an excuse. -Unknown Magnificent! Perhaps you shouldn't be on SEN as much, too... Better than the iPad! |
Post #38
Kaias
Jul 13 2012, 12:43 am
|
Update: 0.9.3
Download Link: http://www.mediafire.com/?s9ff64op5c9dbjl ![]() ![]() ![]() ![]() ![]() ![]() |
Post #39
Jack[RCDF
Jul 13 2012, 2:57 pm
|
Skin to bone, steel to rust, ash to ashes, dust to dust.
|
How do I use properties with CreateUnitWithProperties?
![]() ![]() ![]() ![]() ![]() ![]() Red classic. I have mostly left SEN except for the Temple Siege 2 forum (hidden to most of you). I am available via PM still, and Skype as JackRCDF. If it is important to you, you will find a way. Otherwise, you will find an excuse. -Unknown Magnificent! Perhaps you shouldn't be on SEN as much, too... Better than the iPad! |
0 members in this topic (italic members are currently writing a reply): None
+ guest(s)
+ guest(s)
[05:19 am]
[05:19 am]
[05:14 am]
[05:14 am]
[05:13 am]
[05:13 am]
[05:11 am]






















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