.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Space Empires: IV & V (http://forum.shrapnelgames.com/forumdisplay.php?f=20)
-   -   New weapons help document & HTML template (http://forum.shrapnelgames.com/showthread.php?t=2428)

ColdSteel March 18th, 2001 07:56 AM

New weapons help document & HTML template
 
I have what I think is a pretty good idea. Why not write a program that builds a HTML document template and then parses the existing SE4 data files for information on weapons components and fills in the template information in dynamic fashion?

There are quite a few Quake log file parsers that do exactly this (AEStats for one) and they work great. The advantage to this approach is that all you have to do to update this help document when a new patch comes out is re-run the program and regenerate the HTML based on the very Lastest info contained in the text files. No more wondering what changes were made to which weapons. It would always be up to date.

In addition, you can use existing game graphics to include pictures of each weapon and component along with their stats. Looks spiffy.

I have constructed just such a sample HTML document template that contains only the Anti-proton Beam weapon entry, just so everyone can see what I mean. It's attached here to take look at. Just copy it to your SE4 "Manual" subdirectory so it knows where to find the graphics for the game. Also make sure it has a .html extension on the filename.

A really good language to do this project in would be Perl but it requires you to have Perl installed on your PC to run the program so that's no good. C++ might by kind of clunky.

Are there any programmers out there that might be interested in taking this on as a project? It could well be extended beyond just the weapons to all components if desired. I think this would be of great benefit to the SE4 community. Once you get the HTML template coded, the rest is pretty trivial programming.

So what do you all think?

Daynarr March 18th, 2001 12:18 PM

Re: New weapons help document & HTML template
 
Great idea. http://www.shrapnelgames.com/ubb/images/icons/icon7.gif

raynor March 18th, 2001 05:54 PM

Re: New weapons help document & HTML template
 
Unzip this program into a new directory and tell where to find components.txt and where to find the component pictures. It will create HTML files using ColdSteel's template for all the weapons and store them in the directory you run the program out of. The image path is absolute so you don't have to create the directory in your se4 path.

While writing this program, I noticed that Tractor Beam II has two lines with different values for Weapon Display. I think the second one should be deleted and that this is a BUG! My program displays an error message when it reads the second one but it doesn't affect the program's performance.

Let me know what you think and/or what changes you would like to see.

ColdSteel March 18th, 2001 08:02 PM

Re: New weapons help document & HTML template
 
Wow raynor, thanks!!!!! http://www.shrapnelgames.com/ubb/ima...ons/icon10.gif
That was really, really fast. I can't believe just how great this SE4 community is!

What did you end up coding it in? C++?

I do think we need one more piece of html to make it a bit more user friendly and that's a main html index page that has all the weapon links. Basically it would just have links to each of the html files that your program creates.

Would you like me to go ahead and create that template? We could either use that as a static index page distributed along with your program file or you could also generate it from your program along with the other html files.

If you do include it in your program then any additional weapons that might get added later by MM would automatically have a link generated dynamically which is the main advantage over just having a static page. The other advantage is that your program would be the only thing that needs distributing. With the static approach we'd need to distribute the index and the program which is just a tiny bit messier and not quite as elegant.

So, let me know which way you'd prefer and if you want me to go ahead generate a main index page template.

Once finished I think it should be posted over in the mods forum. We could also provide it as another resource to the new documentation project that some of the community here have just started up. I hope everyone will take a look at the html pages that raynor's program generates and let us know if we missed anything as far as useful information in the template.

Also, if people do find the utility useful, this concept could be extended to all components not just weapons.

Thanks again, raynor. This is just great and I'm sure this will be very useful to everyone.



Possum March 18th, 2001 08:25 PM

Re: New weapons help document & HTML template
 
I am simply knocked out!

Raynor, Cold Steel, both you guys seriously deserve a community service award for this. This is simply outstanding work.

I hereby award this project the Possum Pawprint of Approval http://www.shrapnelgames.com/ubb/images/icons/icon7.gif

And I do very much agree with CS's suggestion for an index file to top it all off. DAMN, this is good work; what a great way to start my SE4 day http://www.shrapnelgames.com/ubb/images/icons/icon7.gif http://www.shrapnelgames.com/ubb/images/icons/icon7.gif http://www.shrapnelgames.com/ubb/images/icons/icon7.gif

Will March 18th, 2001 10:47 PM

Re: New weapons help document & HTML template
 
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by ColdSteel:
C++ might by kind of clunky.
<HR></BLOCKQUOTE>

Since when is C++ clunky? http://www.shrapnelgames.com/ubb/images/icons/icon7.gif

raynor March 18th, 2001 11:48 PM

Re: New weapons help document & HTML template
 
Thanks for the comments, y'all. I'm glad you liked it and that I could give back a little to the SE4 community.

Oh, hi Will. Er, I may not have much in the way of my share of work on the manual since I spent some time writing this program instead. What can I say? Programmers much prefer writing code to writing documentation. http://www.shrapnelgames.com/ubb/images/icons/icon7.gif

ColdSteel, it would be great if you could create an HTML template for the index page. We definitely, definitely want the program to generate everything. That way the program will work also for those folks who have added their own components.

This program is written in Object Pascal (Borland Delphi).

ColdSteel March 19th, 2001 12:04 AM

Re: New weapons help document & HTML template
 
Okay, I'm on it.

ColdSteel March 19th, 2001 01:09 AM

Re: New weapons help document & HTML template
 
raynor, I noticed one thing in your program that you might want to change. It's currently putting in the "Family" number rather that the "Weapon Family" number in the templates. As an example, for the Anti-Proton Beam, the Family number is 2000, while the Weapon Family number is 1. I chose to plug in the Weapon Family in the template because that's the one used in the AI_DesignCreation.txt file. We could always put both in there if people want them, I just thought the Weapon Family was the one most used.

Still working on the Index template. Bear with me, this is my "learn HTML at Last" fun project for the week. http://www.shrapnelgames.com/ubb/images/icons/icon7.gif

ColdSteel March 19th, 2001 02:39 AM

Re: New weapons help document & HTML template
 
raynor, here's the weapon component html index. Just a few notes on it:

1) I included the SE4 Version number in there so folks can see what Version the document was created from. If you can turn the Version into a variable and pull the latest one from the top of the history.txt file that would be great.

2) I created the weapon links entries as two columns and only created the first 6 entries to establish the pattern for you. You can use whatever order you want to populate the tables. Probably just listing them in the order they come in from the data file would work fine. They're probably in order by Family or Weapon family in there anyway.

3) I made the index page title a link to the botton of the list and put in some brief "about this document" info and a Version number there. Feel free to change anything there or add stuff as you see fit.

4) I wanted to ask if you thought it might be better to create the index file in the same directory as all the other html files or instead stick it in the top directory all by itself and put all the other html files in a subdirectory beneath that. Your choice on that, whatever you think best.

5) There's a message right below this one that describes a very minor glitch in the first template for the Weapon Family entry.

Thanks again for helping with this little project. It's been a lot of fun playing with the html and I think its turning out even better than I thought it would. http://www.shrapnelgames.com/ubb/ima...ons/icon12.gif

If this utility is well recieved, what do you think about us extending it later on to handle the rest of the components as well?


All times are GMT -4. The time now is 12:57 AM.

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