ETA for release? Probably sometime early next week, or sooner if I feel especially motivated... I've just got two more functions to add to the parser (assuming I don't think up more!
) and after that I have to make it integrate with the SE4 files, but I already have some code that loads SE4 files, so that shouldn't be too hard...
OOP, conditionals, and comments? Hmm, that's a bit beyond the scope of what I was planning - all I really was going to do was have something that's basically identical to the SE4 data files (in fact you could pass in an SE4 data file and it would output it right back, not that that would be useful
) but with a few extra fields - Min Level, Max Level, Weapon Min Range, and Weapon Max Range come to mind. Then in most of the fields you could put in equations in square brackets and they would be substituted for you and based on the Min Level and Max Level, you'd get multiple SE4 data entries for each entry you supply to my program. I guess conditionals might be possible if I put in boolean operations, but right now I have everything set up as type double, which might have been a mistake - if I ever want to make it more generic (say, so I can add a function to generate the components' Roman numerals instead of having to use Arabic numerals in their place), I'd have to change everything to type object, and I have hundreds of places where I'm referencing type double - not to mention all the type conVersions I'd have to add, and error checking to make sure you don't pass a string to a function that's expecting a number!
But you will be glad to see the HUGE array of functions, etc. that will be supported:
Prefix operators:
+ (identity)
- (negation)
Infix operators:
+ (addition)
- (subtraction)
* (multiplication)
/ (division)
^ (exponentiation)
\ (integer division)
% (modulo or remainder)
to (random; 3to6 generates a random integer from 3 to 6 inclusive)
d (dice; 3d6 generates a random integer as would be generated by rolling 3 six-sided dice)
P (permutations; 4P2 returns the number of permutations of 4 objects in Groups of 2)
C (combinations; 4C2 returns the number of combinations of 4 objects in Groups of 2)
E (exponential notation; 3E6 returns 3.0*10^6 or 3000000)
Postfix operators:
! (factorial)
% (percentage)
Built-in variables:
pi (ratio of circumference of circle to its diameter)
e (base of the natural logarithms)
c (speed of light, in meters per second)
Functions:
sin (sine)
cos (cosine)
tan (tangent)
asin (arcsine)
acos (arccosine)
atan (arctangent)
sinh (hyperbolic sine)
cosh (hyperbolic cosine)
tanh (hyperbolic tangent)
dtor (degrees to radians)
rtod (radians to degrees)
log (logarithm, base 10, or a specified base as the second parameter)
ln (logarithm, base e)
sqrt (square root)
curt (cube root)
root (returns x^(1/y) where x and y are the 2 arguments. Useful in place of the exponentiation operator if you want to take odd roots of negative numbers.)
abs (absolute value)
floor (largest integer below or equal)
ceiling (smallest integer above or equal)
int (integer part)
dec (decimal part)
round (rounds to nearest integer, or number of significant digits as specified by a second parameter)
fib (Fibonacci series)
poly (evaluates a polynomial in x; takes 2 or more arguments where the first argument is the value of x and later arguments are the coefficients of the polynomial in the order they are normally written, i.e. by descending order of power)
ftoc (Fahrenheit to Celsius)
ctof (Celsius to Fahrenheit)
min (finds minimum of all its arguments)
max (finds maximum of all its arguments)
avg (finds mean of all its arguments)
stdev (finds standard deviation of all its arguments)
median (finds median of all its arguments)
And any more I can think of!