![]() |
Re: SE4 Templatizer Ready for Download!
Negate: 1. To render ineffective or void; nullify. 2. To deny; contradict; rule out.
Well, I suppose it fits under contradict. http://forum.shrapnelgames.com/images/icons/icon7.gif |
Re: SE4 Templatizer Ready for Download!
The negative of a number nullifies it. To negate a number, to nullify it. The null number is 0.
[ July 14, 2004, 21:05: Message edited by: Imperator Fyron ] |
Re: SE4 Templatizer Ready for Download!
True, but the described operation is 0 - n, where n is the number. The operation you describe is n + (0 - n).
|
Re: SE4 Templatizer Ready for Download!
This works too. How about the operation -1*n where n is the number
|
Re: SE4 Templatizer Ready for Download!
Time for a progress report! http://forum.shrapnelgames.com/images/icons/icon10.gif
The calculator part of the application is coming along great; currently, it can negate, add, subtract, multiply, divide, exponentiate, and take modulos, exponents, percentages, and factorials! http://forum.shrapnelgames.com/images/icons/shock.gif What's left to do: -Add in variables -Add in mathematical functions (sin, log, sqrt, and stuff like that) -Add in user defined functions (if I can - Fyron wants 'em and it shouldn't be TOO hard, just string replacement http://forum.shrapnelgames.com/images/icons/icon12.gif ) -Add in functions that return strings, not just numbers (if I can - would be useful for generating Roman numerals for components) -Finally, write the application that parses the SE4 data file templates and generates the actual data files! http://forum.shrapnelgames.com/images/icons/shock.gif |
Re: SE4 Templatizer Ready for Download!
Oops, forgot to mention that I needed to add parentheses... Well, I just finished adding those! http://forum.shrapnelgames.com/images/icons/icon10.gif
BTW, will anyone be needing functions that take multiple parameters? I could easily implement single-parameter functions as unary operators and not write proper functions, and that would save me a bit of time with the parsing of parameters, but if you really want them... http://forum.shrapnelgames.com/images/icons/icon12.gif |
Re: SE4 Templatizer Ready for Download!
Quote:
But if it's too time consiming (multiparam functions)...don't bother with it now. Save it for future Versions http://forum.shrapnelgames.com/images/icons/icon7.gif |
Re: SE4 Templatizer Ready for Download!
I'll see what I can do then http://forum.shrapnelgames.com/images/icons/icon12.gif
BTW, I just added 4 more operators: The "to" operator generates random numbers in a specified range, so 1to6 simulates rolling a normal six-sided die. The "d" operator acts like in many roleplaying games, rolling multiple dice; 3d6 rolls up a number from 3 to 18 with most values in the 8 to 12 range. http://forum.shrapnelgames.com/images/icons/icon6.gif Note that these random generators will NOT allow you to generate random damage for weapons in SE4; it will just generate random numbers in the data files. Which might at least be good for a surprise game if you can keep yourself from peeking at the tech tree http://forum.shrapnelgames.com/images/icons/icon12.gif 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... http://forum.shrapnelgames.com/image...s/rolleyes.gif |
Re: SE4 Templatizer Ready for Download!
Time for another progress report! http://forum.shrapnelgames.com/images/icons/icon10.gif
I added variables today - actually, they're really just named constants, as the program can't perform symbolic manipulations on them. (Though I wonder how hard that would be given what I've set up so far... http://forum.shrapnelgames.com/images/icons/icon12.gif ) I added 3 built-in variables: pi, e, and c (the speed of light). Any more you might want? I also added the "E" operator, which does scientific notation, e.g. 3E6 means 3 million. All that's left now is those pesky functions (and those aren't really even crucial, as long as I can do the single-parameter ones as unary operators) and then I can start incorporating the SE4 files into a client program for this app! http://forum.shrapnelgames.com/images/icons/icon6.gif |
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... http://forum.shrapnelgames.com/image...s/rolleyes.gif
|
All times are GMT -4. The time now is 01:37 AM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.