.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Space Empires: IV & V (http://forum.shrapnelgames.com/forumdisplay.php?f=20)
-   -   SE4 Scripting in Python (templatizer again) (http://forum.shrapnelgames.com/showthread.php?t=12459)

Ruatha July 30th, 2004 11:02 PM

Re: SE4 Templatizer Ready for Download!
 
Hmm, I don't know what I mean, I just thought it'd be easier to see what it does....

Ed Kolis July 31st, 2004 03:39 AM

Re: SE4 Templatizer Ready for Download!
 
Well, the GUI, whatever that may be, is probably a ways off... I'm still trying to work out the Last of these stupid order-of-operations bugs that ruin any expression with multiple levels of parentheses! http://forum.shrapnelgames.com/images/icons/icon8.gif

(Though with the wide variety of functions I've provided, there will be little need to use multiple levels of parentheses, no? http://forum.shrapnelgames.com/images/icons/icon12.gif )

Ed Kolis July 31st, 2004 06:54 AM

Re: SE4 Templatizer Ready for Download!
 
Well, I got those parentheses bugs fixed (at least I hope... http://forum.shrapnelgames.com/image...s/rolleyes.gif ) - anyone else want to try it out? I've generated a few MOO2 components with the program, but those are pretty trivial compared to what the program can do http://forum.shrapnelgames.com/images/icons/icon12.gif

Ed Kolis July 31st, 2004 09:03 PM

Re: SE4 Templatizer Ready for Download!
 
Grrr, I found another bug... http://forum.shrapnelgames.com/images/icons/icon8.gif
It seems you can't call a function that takes multiple parameters from inside another function, because the outer function counts all the commas inside its parameter list and spits back an error saying "too many parameters"... so I'll have to tell it to ignore any commas that are inside parentheses in a parameter list, I guess...

Also, the templatizer is rather slow, seeing as it redoes the whole calculation each time it runs an equation, even if all that's changed is the value of a variable... I'll probably have to Cache the results of all my expressions until they fall out of scope, I guess...

Finally, I'd better make it display any errors that are thrown by the various functions and such... http://forum.shrapnelgames.com/image...s/rolleyes.gif

Ed Kolis August 1st, 2004 03:29 AM

Re: SE4 Templatizer Ready for Download!
 
Fixed those bugs... still haven't done anything about the slowness; that will probably require adding a property to one of my upper-level classes and overloading it in a lot of lower-level ones... ugh http://forum.shrapnelgames.com/images/icons/tongue.gif

Unless I can figure out this attributes thing that .NET has... then I could just tag the expression type classes I want to be "nonCacheable" with a special attribute tag, and check for that tag when I go to do the caching...

Ed Kolis August 8th, 2004 06:58 PM

Re: SE4 Templatizer Ready for Download!
 
1 Attachment(s)
I've started work on a GUI Version of the Templatizer... here's a general idea of what it will look like (assuming this newfangled file attachment thing works properly http://forum.shrapnelgames.com/images/smilies/wink.gif)

Anyone interested, or should I go back and try to speed up the expression parser by making it Cache known equation results?

Fyron August 8th, 2004 07:25 PM

Re: SE4 Templatizer Ready for Download!
 
Files can only be attached in the Scenarios/Mods forum Category. You can upload the file there, then use the URL in your post here.

Ed Kolis August 8th, 2004 10:42 PM

Re: SE4 Templatizer Ready for Download!
 
Well it WORKED... http://forum.shrapnelgames.com/image...ies/tongue.gif
Is there a rule against it? http://forum.shrapnelgames.com/image...es/redface.gif

Fyron August 9th, 2004 01:50 AM

Re: SE4 Templatizer Ready for Download!
 
Yes. From the message at the top of the forums:

Quote:

...the least of which is a return of file downloads. Please use the threads in the Scenario Archive to resume putting up mods and the like.


Ruatha August 10th, 2004 02:57 AM

Re: SE4 Templatizer Ready for Download!
 
Now even I can understand it!


All times are GMT -4. The time now is 04:29 PM.

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