as a few guys here might know, I have been working on a mugen full game the past year(s), as less know I have been working on a small little app to make the game programming easier/faster. what it does is take a script very similar to mugen code, then takes self defined sctrls and blocks of code from user created files and substitutes them in a new script file. in the spoiler is the explanation as it is on the readme.
Spoiler, click to toggle visibilty
/*WHAT IS THIS*/
A parser for mugen code so you can use a slightly higher level code, which is based on mugen's codebut support constants, macros and parent sctrls.
/* HOW TO USE */
1) edit config.txt.
a) the first line points to the constants definition file.
res/constants.res
In the constant definitions file you code should be like this:
define #constantname
constantvalue
the define statements tells the parser that a constant is about to be defined, #constantname is the name of the constant, you must use the constant complete with the # in your code so the program does the swapping,the value can be a single word or a series of sctrls.
define #constantname
constantvalue
#anotherconstant
you can define constants recursively.
in you cns code now you can do stuff like:
[State velstop]
type = VelAdd
trigger1 = var(#morph)
Y = #secondary_gravity
b) the second line points to the parent definition file.
res/parents.res
In the parent definition file your code goes like this.
[State velstop]
type = VelSet
identity = VelStop
trigger1 = Time = 0
X = 0
Y = 0
as you can see, it's regular mugen code but with one difference; you must give the sctrls and identity, any other parameters are optional; the identity is used in your cns code to call the parent sctrl in the following way:
[State 40, 4]
parent = VelStop
trigger1 = Time = 1
which will be converted to:
[State 40, 4]
trigger1 = Time = 1
type = VelSet
X = 0
Y = 0
if there are duplicated parameters (like the trigger1), the parent's parameers won'tbe used but the sctrl's will.
something to note is that a parent can also have parents, like:
[State velstop]
type = VelSet
identity = VelStop
trigger1 = Time = 0
X = 0
Y = 0
[State velstopX]
parent = VelStop
type = VelSet
identity = VelStopX
trigger1 = Time = 0
X = 100
so, if you have:
[State 40, 4]
parent = VelStopX
trigger1 = Time = 1
you will get:
[State 40, 4]
trigger1 = Time = 1
type = VelSet
X = 100
Y = 0
c) any following lines are a pair of input file/output files(in the case of output files, if you use subfolders they must already exist).
normals.src test/normals.st