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

This Month's Specials

The Star & the Crescent- Save $9.00
winSPWW2- Save $6.00

   







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

Reply
 
Thread Tools Display Modes
  #21  
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
  #22  
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
  #23  
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
  #24  
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
  #25  
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
  #26  
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
  #27  
Old July 24th, 2004, 03:54 PM

Yimboli Yimboli is offline
Sergeant
 
Join Date: Apr 2004
Posts: 202
Thanks: 0
Thanked 0 Times in 0 Posts
Yimboli is on a distinguished road
Default Re: SE4 Templatizer Ready for Download!

Quote:
Originally posted by Ed Kolis:
The other two are really statistical operators, but I figured I'd throw them in because I'd already done factorials - the "P" operator calculates permutations while the "C" operator calculates combinations, if you happen to know (or care) what those are...
Ed, I fully understand combinations and permutations... I'm just wondering how you think they would be useful? And how do they work? i.e. if I say P(1234), what happens?
Reply With Quote
  #28  
Old July 24th, 2004, 05:06 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!

Quote:
Do I need .NET Framework? I got errors about missing dlls when tried to work with it.
Yeah, you need the .NET Framework 1.1. You can find it at http://msdn.microsoft.com/netframewo...t/default.aspx

Quote:
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)
Yes - at least it will, once I get the part that reads and writes SE4 files working with the expression evaluator. Right now all I've posted is the expression evaluator part In addition, I'm planning on making pretty much any of the fields able to get formulas into, not just the cost... even the text fields! So you know how you do [%ShieldPointsGenerated] but you can't do that for any other ability? Well now all you have to do is copy over the formula that you used in the actual ability (maybe I'll put in special variables that act like [%ShieldPointsGenerated] so you can just use those instead of the whole formula), and it will be inserted into the description string!

Quote:
Ed, I fully understand combinations and permutations... I'm just wondering how you think they would be useful? And how do they work? i.e. if I say P(1234), what happens?
That's not how you'd call the function - actually, it's an infix operator, so you'd call something like 4P3, and that would find the number of permutations of 4 objects in Groups of 3. As for how it would be useful, I really don't know in terms of SE4, but I figured I'd include it because I'd be releasing this math parser for general use anyway and someone somewhere might need it
__________________
The Ed draws near! What dost thou deaux?
Reply With Quote
  #29  
Old July 24th, 2004, 08:02 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!

25 Mb? Good god! Nice size for a set of libraries.

Burn the .NET!!!
Reply With Quote
  #30  
Old July 24th, 2004, 09:48 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!

Sorry about that... hope you download them anyway, because you will need them to run the program

(Hey, think of it this way - it's about the same size as the Java libraries, and nobody complains about Java, do they? )

edit: judging from your sig, you might be interested in this: www.go-mono.com
It's the GNU Version of .NET and allows you to run .NET applications on Linux as well as Windows - as long as they're compiled for Mono and not the regular .NET. Mine isn't but it should be able to be compiled for Mono - I think...

[ July 24, 2004, 20:51: Message edited by: Ed Kolis ]
__________________
The Ed draws near! What dost thou deaux?
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 06:02 PM.


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