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

This Month's Specials

The Star and the Crescent- Save $8.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 June 21st, 2005, 11:06 AM

Lemmy Lemmy is offline
Second Lieutenant
 
Join Date: Mar 2001
Location: Netherlands
Posts: 479
Thanks: 0
Thanked 0 Times in 0 Posts
Lemmy is on a distinguished road
Default [Tool] SE4 text to html/javascript

For a preview, look here (may take a few seconds to load, ~500kB)
Yes, pictures are missing.

So i had some free time, got bored, and recently learned about XML and XSL. I wanted to put my newly learned skills into practice...soo....and well, to make a long story short, i ended up writing a tool in C# (first time in C# as well) that converts some of the SE4 data files into a javascript file and a html/js webpage that display the contents of that newly generated javascript file...now if you're wondering what happened to the XML, well, XML/XSL was too slow because could only display everything at once unless i used javascript...and creating 400+ tables with components takes way too long. Only way to cut back on the load time was to use complicated not-so compliant javascript to only display some of the XML data at a time. But, if i'm going to use javascript, i might as well do everything in javascript, be compliant, and ditch the XML to make it easier on myself.

Anyway..i guess 80% of you didn't understand a word of this and are just interested in the tool, so...

The good stuff
Step 1: Unzip the contents of this zip file in your mod directory (the same directory that contains the Data directory). It will create a new directory called 'se4html'
Step 2: In this new directory you'll find 'se4html.exe', run that anytime you want to convert your data files to javascript. When it's done it will create a new file 'se4data.js'.
Step 3: You can now open 'se4data.html' in your browser and see the result (with pictures if you have them in your mod dir)

* The program does not alter your mod files in anyway.
* Currently it only reads/converts TechAreas.txt, Components.txt, Facilities.txt and Vehicles.txt
* To have pictues you need the Components and Facilities folder in your Pictures dir as well.
* It has been tested on vanilla SE4 Gold (latest patch), TDM 3.4 and the Adamant mod...it is possible that other mods contain certain unknown elements that causes the program to malfunction, the result will be that 'se4data.js' will contain errors, which in turn causes the html page to not function properly...if you're a web developer/programmer type person, you'll probably know how to track down the error/anomaly in your mod files...if not, then yeah, not much you can do except report it here along with unusual/non-standard things you put in your mod files.


[edit]
Current Version: 0.3
Added: Engines Per Move in Vechicles section
Fixed: Requirement Must Have Bridge wasn't applied correctly
Fixed: Empty ablity descriptions replaced by ability type and values
__________________
[Boo!]
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 12:45 AM.


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