PROGRESS:
Completed:
- reads triggers, strings and locations from .chk
- recognizes conditions from trigger text file
To do:
- recognize actions
- after recognizing, gather other keywords/variables
- add for looping
- write back to .chk, dealing with strings/location names
- add mission briefing stuff
- add user interface
- read from .scm/.scx
- clean up code a bit / make more efficient
[PROGRESS]18[/PROGRESS]
Define what you mean by user friendly.
Text version?
How will this improve our scmd2?
Is this essentially a tool that simplifies our life instead of having to use separate programs? Or will this just be a burden to relearn?
err.. syntactically friendly. as in, it wont be picky about what you type. you will be able to write in staredit lingo, or function notation... or however you please really, so long as it somewhat resembles a trigger. 'course.. this may be at the cost at some compile time... but we shall see. computers are fast these days, right?
it would improve scmd2 by making another method of editting your triggers available, should you choose to use it...
yes.. it would simplify your life VERY much so with what i've got planned for it. if it were incorporated into scmd2 as a plugin, you shouldnt need other programs....
but as of now it's standalone... you'd have to use something else for terrain.
and there really wont be anything to learn... unless you want to take advantage of some of its more advanced features.. which i will make as simple as possible to use. (while still providing advanced users with lots of control...)
ADDITION:
the conditions section is complete...
now i'm going to start on parsing text back into triggers....... and then my program will be usable at least
oh.. and it now works drag and drop... just drag a .chk onto the exe and it spits out the triggers, strings & locations into text files.
Could you make it open source?
well, i could.
scmdraft and starforge aren't open source though. they want to protect their precious code. this stuff is tough to figure out.. makes you not want to give it away so freely when you worked so hard on it. but perhaps.. might need some help w/ it anyway. i want people to know that *i* made it though. don't want no one stealing my credit.
but no code 'til i have something to show at least.
i guess i'll give away a few spoils here.. not that many people are going to read them.
i'm planning on having a system where you can write
current player kills at least (5,1000,5) men
which, when compiled, will create 200 triggers... current player kills at least 5 kills, 10 kills, 15 kills... etc. syntax being (start, <= max, increment)
also.. i may allow an additional parameter..
current player kills at least (0,5,1000,5)
where "0" is the identifier/precedence indicator.
so that if you have two triggers
current player kills at least (1,5,100,5) men
current player accumulates at least (0,100,1000,100) ore
actions:
give current player #1 gas
which would create triggers as follows
- current player kills at least 5 men
- accumulates at least 100 ore
- give 5 gas
- current player kills at least 10 men
- accumulates at least 100 ore
- give 10 gas
- current player kills at least 15 men
- accumulates at least 100 ore
- give 15 gas
... up to 100 kills, and then
- current player kills at least 5 men
- accumulates at least 200 ore
- give 5 gas
- current player kills at least 10 men
- accumulates at least 200 ore
- give 10 gas
etc.
which is similar to writing
for( int i=5; i<= 100; i+=5 )
{
for(int j=100; j<=1000; j+=100)
{
give_gas(i);
}
}
the precedence number corresponds with the nest level, as well as can be used for in other conditions or actions.
i might have to think that through a bit more, but that's what i have in mind.
as for the syntax..
i'm going to try and make it so that as long as each line contains all the necessary keywords, you can write it however you please.
for example, if it sees "kills", then its going to assume you are talking about the action "kills", then it will look for keywords player, number, comparison, and unit type... in whatever order you please.
it will also look at other words in the sentence to give it clues.
for example, if there are two locations in one action.. it will look for words like "at" and "to" to figure out which is which. if those words are not found, it will be assumed that they are in the order that they appear in good ol staredit.
all strings and location numbers must be enclosed in quotes...
i dont think i'll be able to allow custom names in triggers... because two units can have the same name... plus all those color tags... wouldn't be very trigger friendly.
however, you wont have to write "terran marine".. "marine" will do fine.
and if you are a grammar Nazi.. you can even write "current player brings at least 5 marines to 'location'" (with an s)
i'm thinking each line will be delimited by a line break... so no multiline triggers... text displays will use \n as a linebreak.
so. what are your thoughts? anything else you'd like to see in a trigger editor?
Yes I would like to see something. A mission briefing Editor. That is in need at the moment. Your editro could be modifed to use the alternate actions and along with your built in duplicator, it would very helpful. Im not saying scrap the trigger part, but more at adding in MB capability.
shouldn't be hard at all to add the MB editor... they just have an additional condition.
i never had much trouble with repetitivity in the mission briefings though...
what exactly would you use that for?
Animated briefs mostly. Hmmmmm..... maybe not. Just a MB would be nice.
I'd help out, I've been working with C#, it has less speed than C++ but offers more rapid development.(Vis C++ 2005 Express lacks many windows-required-headers).
I've actually been working on the interface for an editor, my main problem is extracting the CHK from the scm\scx. I can use Campaign Creations spec sheets for a guide on the CHK, but I havn't looked into the actual extraction.
Anyway, C# is a very easy language to get into, though to run the programs on it you need the .net framework. It also is slower than C++, but you really don't need every last ounce of power and considering it is made for rapid development you can get things done much faster. I learned Console C++ but with the lack of a proper compiler I can't get into the Win32\GL API's.
only two peole are really following this thread, but more updates..
seems to recognize all conditions, written however you please... i'm almost thinking it's a bit too leanient... you could write
thisconditionsisabouthowmanydeathsaplayerhassuffered
and it would recognize it... so long as it has "death" in it somewhere..
it also erases the word "death" after it finds it. actually, it erases the entire word, so that whole string would get deleted in this case. makes further checks faster, and prevents checking the same keyword twice for different things...
program also strips and stores strings
current player brings at least 1 men to "location"
it would recognize "location" and "brings". but yah.. much work to do yet.
GJ zerox. Plugin development on the SCMD team is rather slow