.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 Race Viewer/Profiler (ESP) Utility Released (http://forum.shrapnelgames.com/showthread.php?t=5806)

ColdSteel April 27th, 2002 04:05 PM

New Race Viewer/Profiler (ESP) Utility Released
 
I've released ESP v.1.0, which is a race profile viewer that generates HTML pages over in the mod forum: http://www.shrapnelgames.com/cgi-bin...&f=50&t=000002
-CS

<blockquote><font size="1" face="Verdana, Arial">quote:</font><hr> I haven't really done anything serious with SE4 modding since Raynor and I built the component viewer that's on the Gold CD and so I thought I'd build a similar utility that allows viewing of all SE4 races on a PC through generated HTML pages.

This was my "learn Python, learn Tkinter, learn HTMLgen, learn installer" project and I've had a bLast doing it all. Python is an awesome tool and (as open source) completely free. So are the other Python tools mentioned above.

So, here is the initial ESP 1.0 release. I'd appreciate any comments.
1019915131.zip
Download file size is 1.6 MB

-CS

Contents of the readme.txt follow:

SPACE EMPIRES IV GOLD EMPIRE SPECIES PROFILER
ESP VERSION 1.0

ESP is a small utility that builds HTML pages from the SE4 text header files
in the race sub directories. The resulting HTML page generated by ESP
provide an overview of each race, their characteristics and their race styles.

INSTALLATION INSTRUCTIONS

1. Create a new directory somewhere on your SE4 install hard drive.
2. Extract the 3 files to the new directory.
3. That's it.

** PLEASE NOTE: **
** This utility creates a index HTML page called "main.html" in your **
** ESP directory which allows access to all the other HTML generated **

The first time you start ESP, it searches the hard drive for your SE4 directory
so it may be a little slow to start up on the initial load. It saves the path
in a file and subsequent loads should be much quicker.

If ESP cannot find a SE4 directory or you wish to set a path to another drive
or folder where you have SE4 Race file directories, use the Change Path command
and select any file in the directory path you want the search to start from.

When the Generate HTML command button is selected, ESP will search for all
the SE4 Race directories on the path and generate HTML pages for each race it
finds. It will also generate an Index page containing a list of all the races
it generated HTML pages.

Links from the "main.html' index page will allow you to view Race's Empire
Profile pages and Race Style Pages.

I hope you find ESP useful and enjoyable.

For comments, suggestions for improvements or bug reports please contact:
ColdSteel@comcast.net" <hr></blockquote>

[ 27 April 2002: Message edited by: ColdSteel ]

[ 27 April 2002: Message edited by: ColdSteel ]

[ 27 April 2002: Message edited by: ColdSteel ]</p>

ColdSteel April 27th, 2002 11:43 PM

Re: New Race Viewer/Profiler (ESP) Utility Released
 
Also, Here are some small GIF images of some sample HTML pages generated by ESP.exe:
1019943437.gif
1019943578.gif
1019943622.gif

-CS

Andrés April 28th, 2002 05:35 PM

Re: New Race Viewer/Profiler (ESP) Utility Released
 
Did you see the javascript/html viewer I had made? IIRC it was included in the gold CD.

ColdSteel April 28th, 2002 11:56 PM

Re: New Race Viewer/Profiler (ESP) Utility Released
 
Andres,
No, I confess I didn't.
http://forum.shrapnelgames.com/image...s/rolleyes.gif

I've just looked at yours and fortunately there appear to be some differences. My utility builds race files for races anywhere on a PC, even in mod folders.

It also builds a pages of race information from the AI_General.txt files as well as race style viewer pages. As an .exe it can be run from any directory.

I'll try to take mine in a somewhat different direction from yours in any future Versions and apologize sincerely if I stepped on any toes.

-CS

[ 28 April 2002: Message edited by: ColdSteel ]</p>

Andrés April 29th, 2002 05:30 AM

Re: New Race Viewer/Profiler (ESP) Utility Released
 
On the contrary, I made that viewer because I didn’t find an existing one, more or less the same reason you describe, not to get the credit (because of course I cannot get any money http://forum.shrapnelgames.com/images/icons/icon7.gif )
I think we should combine efforts and ideas to make the best viewer possible.
If you like any of the features or layout of my viewer, feel free to copy them.
BTW it’s some time since I wrote that viewer and I’m relatively satisfied with it and I’m not planning to make any update soon.

I recall another .exe race style viewer.
Instead of using html, it displayed everything in it's own windows.
A nice feature it had is creating animated explosions and shields.
I don't have a copy now and don't remember the author. Anybody knows where to find it?

BTW I have a bug report.
It doesn't seem to be working ok in my system, it doesn't seem to be creating a main.html although it does create all races profiles (or at least many, I didn't verify if some are missing, I see 3.36MB in 162 html files)
I imagine that that file is generated at the end and that some error occurs before, although I don’t see any error message.
It's probably related to the many race styles and many mods that include extra races, as well as AI only races that use pics under the main races dir.


Brief comparison and ideas:

Some features in my viewer

*It looks faster because it only generates one race at a time, just before displaying it, and take a minimal space since race file is overwritten every time you change race http://forum.shrapnelgames.com/images/icons/tongue.gif Processing all races at once takes some time.

*Show all stuff in a single page, but I’m not sure if this is better than your two pages system

*List all ships in a logical easy to understand order, also useful to detect missing ship sizes. It would be nice to include neo-standard extra ship sizes (if any).

*Place Mini Pic next to the Portrait Pic

*Hide bitmap file names as part of a whole idea of making it easier to read. So you just see the word "Frigate" beside the Racename_Portrait_Frigate.bmp and the Racename_Mini_Frigate.bmp pics

*Verify the existence and list all existing AI files with links to see them

*Verify the existence and add a link to DesignName file

*Main title of the page is Empire Name + Empire Type (from AI_General), instead of DirName/FileName + "Empire"
("Amon'krie Continuum" sounds much better than "Amonkrie Empire")

*Lists any extra file in the race dir with the appropriate link. In most cases it results to be a readme (just click in the link and read) file or a .emp or a DesignName file that should be moved or copied to the appropriate directory.

Things I like in your viewer, and that mine can’t currently do

*Lists all races, including those in mods and neutrals


Some ideas I’d like to see in a future viewer
(I’m sure some people here will make more suggestions of extra features)

*At some point I had made animated gif previews for explosion and shield pics, but I got tired. How hard would it be to automate creation of animated gifs?

*Replace missing pics with pics from the generic (neutral) shipset. ()

*Your viewer displays racial traits and some extra info mine doesn’t. However it almost looks like reading the AI_general.txt
It would be nice to re arrange it to make it more readable.
Perhaps to look something like this:

Opt 1
Characteristics
1 – Aggressiveness – 110
Advanced Traits
1 - Organic Manipulation

Opt 2
Characteristics
1 – Aggressiveness - 120
2 - Defensiveness - 110
Advanced Traits
Organic Manipulation

Opt 3
ect.

ColdSteel April 30th, 2002 12:23 AM

Re: New Race Viewer/Profiler (ESP) Utility Released
 
Andres,

Thanks for the nice feedback and ideas.

I've had some very similar ideas to yours (as has Raynor who had some suggestions for me too) but since I was teaching myself how to code in Python and generate the HTML code with the HTLMgen module from scratch, I needed to learn how to crawl before I could walk (so to speak).
http://forum.shrapnelgames.com/images/icons/icon7.gif
Because of the Python learning curve I've kept things fairly simple to start out but do plan to add some more sophisticated stuff in the next Version now that I've pretty much learned the language.

One idea I had that I thought would be really, really cool would be to take each race, and produce HTML pages for each of their ship designs, turning all the cryptic weapon families and other numbers into graphics and text by X-referencing with the components files. That way you could see fairly easily (and graphically) what technologies the race's attack ships, etc. would research and use.

I'll look into the bug you reported, thanks. Yes, the main.html page is generated Last as you surmised. I agree something happened before it got there. I'll need to add in some more error checking and display and maybe an error log file to report them out. That's a lot of files. What was the Last race and file it processed correctly? That might be a good clue.

I'll also look at the output reformat you suggest since I was thinking something similar.

Thanks again.
http://forum.shrapnelgames.com/images/icons/tongue.gif
-CS

[ 29 April 2002: Message edited by: ColdSteel ]</p>

Andrés April 30th, 2002 05:11 AM

Re: New Race Viewer/Profiler (ESP) Utility Released
 
The problem does not appear if I remove the DevnullModGold (Last Version) dir.
Check if the program works ok if you install that mod.
Display shows "Generating HTML for Zorian". That seems to be Last race I have currently installed under the main Pictures\Races dir (at least the Last if sorted). Both HTML files for that race seem to be generated ok.
I'll have to confirm this but I suspect it can be related to the fact that I have installed only in that mod.

ColdSteel May 2nd, 2002 02:09 AM

Re: New Race Viewer/Profiler (ESP) Utility Released
 
<blockquote><font size="1" face="Verdana, Arial">quote:</font><hr> The problem does not appear if I remove the DevnullModGold (Last Version) dir.
Check if the program works ok if you install that mod.
Display shows "Generating HTML for Zorian". <hr></blockquote>

Andrés,

I've confirmed that it does work with the Version of DevnullModGold that's on the CD so I think you're right about the Zorian since they aren't in that Version. They may have an odd number of race files or something that could hose a subscript or something.

I have a new ESP Version now with more error checking in that pops a window with the exception message and the line of source code where it hairballs. Should be able to find it now.

I'll try it with the newer mod to see. Thanks again for the help on this.

-CS

ColdSteel May 2nd, 2002 02:19 AM

Re: New Race Viewer/Profiler (ESP) Utility Released
 
Andrés,

On second thought... http://forum.shrapnelgames.com/images/icons/icon9.gif

After installing the most recent DevNullModGold, I don't see any Zorian race in there at all. They must be from some other mod?

Does anyone here know which mod the Zorians belong to?

Thanks.

-CS

Andrés May 2nd, 2002 06:25 AM

Re: New Race Viewer/Profiler (ESP) Utility Released
 
I don't think that particular race has anything to do. I don't have it installed under any mod, just in a new dir under the main races dir. It seems to process the mods first and the main races dirs later.

If the viewer works ok for you with the DevNullModGold, it can be something only on my system.
Have you uploaded the new esp Version?

ColdSteel May 3rd, 2002 01:10 AM

Re: New Race Viewer/Profiler (ESP) Utility Released
 
Andrés,

Yes, it does work okay with the DevNullGoldMod on my PC.

No, I still don't have the new Version up yet because I'm working on some other changes that Raynor had suggested. I should be able to get Version 1.2 up by this weekend sometime.

Thanks again. http://forum.shrapnelgames.com/images/icons/icon7.gif

Atrocities May 3rd, 2002 02:56 AM

Re: New Race Viewer/Profiler (ESP) Utility Released
 
This is a very cool program. Thanks. http://forum.shrapnelgames.com/images/icons/icon7.gif

ColdSteel May 4th, 2002 02:04 AM

Re: New Race Viewer/Profiler (ESP) Utility Released
 
I just released a new Version 1.2 over in the mod area. http://forum.shrapnelgames.com/images/icons/icon6.gif

<blockquote><font size="1" face="Verdana, Arial">quote:</font><hr> ESP Version 1.2 Released
SE4 Race Viewer/Stats HTML Generation Utility
Here's a new Version of my ESP utility.
1020470304.zip
Here are the changes since Version 1.0:

Version History.

v1.2
- Removed exit confirmation.
- Added yes/no choice for initial default path search on first load.
- Added status message to display HTML generation directory location.
- Added status message to display current search path on load.
- Changed main HTML index name from 'main.html' to '0_index.html'.
- Added status Messages for search directory change command.
- Changed the file select dialog to a directory select dialog.
- Increased size of status area and added word wrapping for multiline Messages.

v.1.1
- Added error checking and error message status window.
- Changed initial startup to provide feedback before searching for default dir. <hr></blockquote>

Andrés, try this Version out and let me know what error message you get for the Zorians. Thanks.

-CS

ColdSteel May 4th, 2002 03:07 PM

Re: New Race Viewer/Profiler (ESP) Utility Released
 
You're welcome, Atrocities. http://forum.shrapnelgames.com/images/icons/icon12.gif

[ 04 May 2002: Message edited by: ColdSteel ]</p>

PDF May 4th, 2002 04:21 PM

Re: New Race Viewer/Profiler (ESP) Utility Released
 
With new Version I had a crash while the prog were examining Andrès Lescanos races... an error in a Nostropholo files ... http://forum.shrapnelgames.com/images/icons/icon9.gif
Strange things is that v 1.0 worked all right through !

Andrés May 4th, 2002 09:24 PM

Re: New Race Viewer/Profiler (ESP) Utility Released
 
Ok I continued to test, now with the new Version.

Error message it shows is:

Traceback (most recent call Last):
File (&lt;string&gt;, line 199, in onGen
File "HTMLgen.py", line 190, in write
IOError [Errno 9] Bad file descriptor

What doesn't look like much help.
The status line shows:

Generating HTML for RaceName


It generates succesfully RaceName.html, but not RaceName_Ships.html

What I did was remove that race and try again.
I repeated that 7 times, removing the romulan, vandron, SW-REB, SW-TF, ygath, zorian and regency before the program runned succesfully.
Number of htmls generated seems to be constant: 161, the error always seemed to appear before attempting to generate the 162nd file.
My guess is that it is some variable overflow generated because of the large number of races I have installed.
(I had re-installed some races after the previous test, so total number of races I have now is larger than what I had then, I guess that then removing the devnull mod removed enough races to make the difference back then.)
Now I have 78 races only in the main races dir.

To confirm that it is related to the total number and not to those races in particular, I re-installed them and removed other 7 races and the program worked ok.

Probably this is the same error PDF has found, I bet that he also has many races installed.

[ 04 May 2002: Message edited by: Andrés Lescano ]</p>

PDF May 4th, 2002 09:33 PM

Re: New Race Viewer/Profiler (ESP) Utility Released
 
Andrés, indeed I had the *same* (senseless...) message and lots of races installed (TDM, yours, Atrocities'Trek races, DevNull, Hadrian A races, etc etc ...)
Perhaps when I ran ESP 1.0 I had less and so it worked ...

ColdSteel May 4th, 2002 10:45 PM

Re: New Race Viewer/Profiler (ESP) Utility Released
 
http://forum.shrapnelgames.com/images/icons/icon7.gif Thanks guys for the bug reports. That gives me some idea of what may be going on. I'll do some testing.

Andrés, do you by any chance have any race set .bmp graphics files stored in the RaceName directory? For some reason it looks like it thinks RaceName is a race directory and it shouldn't do that unless there are some race graphics there.

Thanks again,

-CS

ColdSteel May 5th, 2002 12:33 AM

Re: New Race Viewer/Profiler (ESP) Utility Released
 
Okay, I did some testing and confimed that it is indeed the number of files causing the "bad file descriptor" error 9. Interestingly, if I run the program in the command window mode (Command Window in background), it works just fine, no matter how many race files there are.

From this, it appears to be a Python bug. I can always just enable the command window mode on the next release to make the error go away but I'd like to find a nicer fix than that if I can. I'm going to play with it some more.

In the meantime, just be aware that if you install more than 80 race sets on your PC search path, the current Version of ESP will error off. A temporary work-around is to set the default path lower down so that the program processes fewer files at a time. I'm working on it...

If any Python guru out there has an idea what causes this error, please let me know.

-CS

ColdSteel May 7th, 2002 12:19 AM

Re: New Race Viewer/Profiler (ESP) Utility Released
 
Good news Andrés!

I was able to find the problem causing ESP to crash when more than 80 races are processed. I should have a new Version up shortly with the fix.

Turns out that the problem was in the HTMLgen module and not in my program after all. Every time it wrote out a HTML file it printed a confirmation message to sys.stdout. The problem is that it apparently expected this message to go to a DOS command window but my program is not running in that mode. So instead it goes to an internal Windows buffer and once 160 such Messages are printed, the buffer fills up and the program gets hosed.

Fortunately, Python modules like HTMLgen come complete with the source code. I was able to track it down, comment out the offending code in the module and, whoooha, it doesn't crash anymore.

If you're a programmer, it's times like this when you feel really good (you programmers know what I mean). http://forum.shrapnelgames.com/images/icons/tongue.gif

liga May 7th, 2002 11:39 AM

Re: New Race Viewer/Profiler (ESP) Utility Released
 
Thank you for the ESP ... it's really a great utility

bye bye and goog luck
Liga


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

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