.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

The Falklands War: 1982- Save $9.00
winSPMBT: Main Battle Tank- Save $5.00

   







Go Back   .com.unity Forums > Shrapnel Community > Space Empires: IV & V

Reply
 
Thread Tools Display Modes
  #1  
Old July 23rd, 2004, 02:11 AM
Ed Kolis's Avatar

Ed Kolis Ed Kolis is offline
General
 
Join Date: Apr 2001
Location: Cincinnati, Ohio, USA
Posts: 4,547
Thanks: 1
Thanked 7 Times in 5 Posts
Ed Kolis is on a distinguished road
Default Re: SE4 Templatizer Ready for Download!

Almost there... these functions are just getting annoying because I have to basically copy and paste my wrapper classes for one standard math library function to the next...
__________________
The Ed draws near! What dost thou deaux?
Reply With Quote
  #2  
Old July 23rd, 2004, 06:58 AM
Aiken's Avatar

Aiken Aiken is offline
Major
 
Join Date: Jan 2004
Location: Taganrog, Russia
Posts: 1,087
Thanks: 0
Thanked 0 Times in 0 Posts
Aiken is on a distinguished road
Default Re: SE4 Templatizer Ready for Download!

Ed, what's ETA for release?

Edit: feature requests

1. bit of OOP
2. Conditions.
3. Comment sign.

Together it could look like this:

if (Cost Minerals.Antiproton Beam (level-1))>1500
// do something
else
exec format c:

I can't imagine any application of these features, probably they're completely useless here (except comments), but nevertheless it's cool

[ July 23, 2004, 06:46: Message edited by: aiken ]
Reply With Quote
  #3  
Old July 23rd, 2004, 09:16 PM
Ed Kolis's Avatar

Ed Kolis Ed Kolis is offline
General
 
Join Date: Apr 2001
Location: Cincinnati, Ohio, USA
Posts: 4,547
Thanks: 1
Thanked 7 Times in 5 Posts
Ed Kolis is on a distinguished road
Default Re: SE4 Templatizer Ready for Download!

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!
__________________
The Ed draws near! What dost thou deaux?
Reply With Quote
  #4  
Old July 24th, 2004, 02:52 AM
Ed Kolis's Avatar

Ed Kolis Ed Kolis is offline
General
 
Join Date: Apr 2001
Location: Cincinnati, Ohio, USA
Posts: 4,547
Thanks: 1
Thanked 7 Times in 5 Posts
Ed Kolis is on a distinguished road
Default Re: SE4 Templatizer Ready for Download!

No SE4 data file integration yet, but why not play around with my math parser and let me know what you think?

http://home.fuse.net/koliset/Programming/EEE.rar
__________________
The Ed draws near! What dost thou deaux?
Reply With Quote
  #5  
Old July 24th, 2004, 02:48 PM
Aiken's Avatar

Aiken Aiken is offline
Major
 
Join Date: Jan 2004
Location: Taganrog, Russia
Posts: 1,087
Thanks: 0
Thanked 0 Times in 0 Posts
Aiken is on a distinguished road
Default Re: SE4 Templatizer Ready for Download!

*trying to launch Evil Ed's Exterminator once again*

Do I need .NET Framework? I got errors about missing dlls when tried to work with it.

[ July 24, 2004, 13:52: Message edited by: aiken ]
Reply With Quote
  #6  
Old July 24th, 2004, 02:55 PM
Ruatha's Avatar

Ruatha Ruatha is offline
Major General
 
Join Date: May 2002
Location: Linghem, Östergötland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
Ruatha is on a distinguished road
Default Re: SE4 Templatizer Ready for Download!

ETA next week.. Darned, you'll beat my eta for the companion


(Don't really understand what this does but have nothing to do and wants to post)
Impressive amount of functions though!
To bad it wasn't a zip archive, I dont feel up to download an unrar proggie here at work, only have zip support.
Will have to try it when I get home.

[ July 24, 2004, 14:03: Message edited by: Ruatha ]
Reply With Quote
  #7  
Old July 24th, 2004, 03:24 PM
Alneyan's Avatar

Alneyan Alneyan is offline
General
 
Join Date: Sep 2003
Location: United Kingdom
Posts: 3,603
Thanks: 0
Thanked 22 Times in 22 Posts
Alneyan is on a distinguished road
Default Re: SE4 Templatizer Ready for Download!

Hmm. This perfectly sums up my understanding of your program, Ed, and therefore I will unlikely able to provide any kind of feedback.

Before you threaten to totemise me: does this program allow modders to plug in various formulas ruling any value in the SEIV files? For example, is the purpose of this program to automatise a geometrical suit ruling the cost of devices? (Such as what SJ seems to have done for his latest mod)

If so, I can indeed see its usefulness for modders (well, as long as they can understand the whole array of mathematical functions better than I do; I flunked maths at kindergarten after all). If I am wholly mistaken, I guess it is simply too complicated for my poor mind.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 03:48 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2026, Shrapnel Games, Inc. - All Rights Reserved.