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

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $6.00

   







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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old July 13th, 2004, 06:54 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 SE4 Scripting in Python (templatizer again)

This might not sound very impressive, but I just wrote a program that can negate a number...

Why'd you do that, you might ask? Well, I'm working on an expression evaluator. OK, you ask again, why are you doing THAT? Well, this expression evaluator is going to be used in a sort of Uber-Tech-Gridder program which combines the flexibility of editing text files (ask Gandalf Parker or any other Linux junkie ) with the power of something like Krsqk's Component Generator. OK, it won't generate tech *grids* - it will only work in one dimension - but there will be a lot of flexibility; basically you will be able to do what Aaron's promised for SE5 with the SE4 data files - something like this:

code:
Start Level           := 1
End Level := 12
Name := Anti - Proton Beam [level]
Description := Focused energy beam used as a medium range weapon.
Pic Num := 18
Tonnage Space Taken := 30
Tonnage Structure := 30
Cost Minerals := [50 + 25 * level]
Cost Organics := 0
Cost Radioactives := [10 + 10 * level]
Vehicle Type := Ship\Base\Sat\WeapPlat\Drone
Supply Amount Used := 5
Restrictions := None
General Group := Weapons
Family := 2000
Roman Numeral := [level]
Custom Group := 0
Number of Tech Req := 1
Tech Area Req 1 := Energy Stream Weapons
Tech Level Req 1 := [level]
Number of Abilities := 0
Weapon Type := Direct Fire
Weapon Target := Ships\Planets\Ftr\Sat\Drone
Weapon Damage At Rng := [max(15 + level * 5 - range * 10, 0)]
Weapon Damage Type := Normal
Weapon Reload Rate := 1
Weapon Display Type := Beam
Weapon Display := 1
Weapon Modifier := 0
Weapon Sound := apbeam.wav
Weapon Family := 1

And the beauty of my approach is that it will apply not only to Components.txt, but also to Facility.txt and anything else you might want to have leveled items! " src="images/icons/cool.gif" />

Now I know that I'm not easily motivated to work on something past the first night, but I know that this program is something that the SE4 community would greatly appreciate (at least I'd think you would!) so please keep bugging me to finish it! (Or at least release the code so someone else can )

edit: changed topic from "Semi-OT: I just negated a number! (Really, this is interesting! ;-)" to "Math parser ready (not the data file generator - yet!)"
changed topic to "SE4 Templatizer Ready for Download!"
edit: changed topic to "Templatizer 3 is HERE!!!!!"

[ July 25, 2004, 05:52: Message edited by: Ed Kolis ]
__________________
The Ed draws near! What dost thou deaux?
Reply With Quote
 

Bookmarks


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 04:43 PM.


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