Log in

View Full Version : [REL] Ship Data Fetcher


gutted
03-13-10, 06:47 PM
Silent Hunter Ship Data Fetcher (Version 1.3)
by: Corey "Gutted" Harwell


Download here (http://www.subsim.com/radioroom/downloads.php?do=file&id=1602) (Requires Microsoft .NET Framework 2.0, you should already have it)

This program will Fetch data such as Length, Width, Mast Height, Max Speed etc. for all SURFACE SHIPS installed in your game folder. It can output it in either an excel friendly format or in a "pretty" format. Only tested against a Silent Hunter 5 install, though it may (or may not) work for previous versions.


Version 1.3 Changelog:
1. Removed Spaces after the comma's in the delimited output. Fixes issue when trying to import into excel.
2.Program will now use the folder it is in as the default path. Just drop it into your main SH5 folder.

This is the final version. I dont foresee myself doing anymore with it and have packed the code away. Enjoy.


Version 1.2 Changelog:
1.Forgot to add a checkbox for "Draft". It was fetching it, but you couldn't see it.


Version 1.1 Changelog:
1. Sorts the ships alpabhetically.
2. You can now choose which details you want to fetch.
3. The internal ClassName can now be fetched.



http://img171.imageshack.us/img171/6310/shipdatafetcher.png

gutted
03-13-10, 07:01 PM
guess i should have mentioned it requires .NET 2.0. Updated post.

reaper7
03-13-10, 07:02 PM
Thanks Gutted for this. Not sure if its worth finishing the mod I started as AOTD_Rhonen is working on a similar one. May yet though if so this will come in handy. Cheers.:DL

gutted
03-13-10, 07:04 PM
Cool, hopefully someone gets some use out of it. It's already saved me ALOT of time for my speed solver.

gutted
03-13-10, 07:21 PM
How it works (incase anyone wants to make their own customized version):

First look in data\Roster\Names.cfg
Look through the |Sea| section. And you'll see a bunch of entries

ClassName=RealName

Record all of thsoe pairs.

Now loop through every folder under data\Sea\

In each folder open up it's .CFG file (if it has no .CFG file.. skip to next one).

In the .cfg file you will see:
ClassName=######

Simply find it in the list of class\real names you store earlier. If it's not in your list.. ignore this folder, because it may be something like an Iceberg. If it is, you can pair it with it's real name.

Grab the info you neeed out of this file.

Continue until finished.

gutted
03-13-10, 07:29 PM
I may add checkboxes so you can pick and choose only the values you want extracted.. and i may also add the ability to sort it by Name, Length, Speed etc.

But i'll save that for a rainy day when im really bored.

Dimitrius07
03-13-10, 07:41 PM
I think this thread should be sticky. Very interesting :yep:

gutted
03-13-10, 08:36 PM
Decided to just go ahead and make those changes, was only like 5-10 minutes worth of work.


New version is up.

reaper7
03-13-10, 08:50 PM
Great Improvement. Saves me manualy going into all the .cfg files for each entity. Thanks Gutted.

Georg_Unterberg
03-13-10, 09:11 PM
argh! And I went through the .cfg files manually to get the required ship data for speed solution calculation.

Now with this tool I can get it with a few clicks, this saves a lot of time - I should have waited.

Thanks, gutted!

karamazovnew
03-13-10, 09:21 PM
This is excellent!!! And it works fast too :D

Oh by the way, can you add the draft too? :O:

gutted
03-13-10, 10:39 PM
Oh by the way, can you add the draft too? :O:

Done!


It was already fetching the draft, but i forgot to add a checkbox for it so you could see it the new version. :rotfl2:

gutted
03-13-10, 11:06 PM
Version 1.3 is up. See 1st post for details.


Last version I promise!! Packing the code away into my "completed" folder.