SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Sub/Naval + Other Games > Classic Subsims
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 09-06-11, 05:13 AM   #1
Sheppard
Captain of the Nautilus
 
Join Date: Mar 2005
Posts: 143
Downloads: 223
Uploads: 0
Default Modding Silent Hunter 1.

I've looked through the SUBS.DAT file for SH:CE and deciphered maybe 65-70% of it using UGE -- Universal Game Editor, a old DOS-era editor that still works quite well for old style games.

Here's the output file for the TENCH entry block in SUBS.DAT created by UGE:

Code:
 ===========================================================================
Num.  Variable name            OFFSET  VAR.TYPE         RANGE
===========================================================================
  13  Tench Name #1             13921  9 letters         TEXT       
  14  Tench Name #2             13931  9 letters         TEXT       
  15  SHP File #1               13962  12 letters        TEXT       
  16  SHP File #2               13976  12 letters        TEXT       
  17  Surf Speed Range          14021  4 bytes     +/- 2,147,483,648
  18  Surf Range Speed          14025  4 bytes     +/- 2,147,483,648
  19  Subm Speed Range          14029  4 bytes     +/- 2,147,483,648
  20  Subm Speed Range          14033  4 bytes     +/- 2,147,483,648
  21  Bow TT                    14037  4 bytes     +/- 2,147,483,648
  22  Stern TT                  14041  4 bytes     +/- 2,147,483,648
  23  # Torp Bow                14045  4 bytes     +/- 2,147,483,648
  24  # Torp Stern              14049  4 bytes     +/- 2,147,483,648
  25  Deck Gun Count            14057  4 bytes     +/- 2,147,483,648
  26  Deck Gun Cal. (inch)      14061  4 bytes     +/- 2,147,483,648
  27  Length                    14069  4 bytes     +/- 2,147,483,648
  28  Beam                      14073  4 bytes     +/- 2,147,483,648
  29  Height                    14077  4 bytes     +/- 2,147,483,648
  30  Test Depth                14081  4 bytes     +/- 2,147,483,648
  31  Periscope Depth           14085  4 bytes     +/- 2,147,483,648
  32  Radar Depth               14089  4 bytes     +/- 2,147,483,648
  33  Periscope Height          14093  4 bytes     +/- 2,147,483,648
  34  Radar Mast Height         14097  4 bytes     +/- 2,147,483,648
  35  Top Speed Surf            14109  10 letters        TEXT       
  36  Top Speed Subm            14119  10 letters        TEXT       
  37  Tench Surf Disp           14129  4 bytes     +/- 2,147,483,648
  38  Tench Subm Disp           14133  4 bytes     +/- 2,147,483,648
  39  Displacement Coeff        14137  4 bytes     +/- 2,147,483,648
  40  Tench Surf Power          14141  4 bytes     +/- 2,147,483,648
  41  Tench Subm Power          14145  4 bytes     +/- 2,147,483,648
  42  Surfaced Spd Coeff.       14149  4 bytes     +/- 2,147,483,648
  43  Submerged Spd Coeff.      14153  4 bytes     +/- 2,147,483,648
  44  # Diesel Motors           14181  4 bytes     +/- 2,147,483,648
  45  # Electric Motors         14185  4 bytes     +/- 2,147,483,648
  46  Diesel Fuel (gal)         14189  4 bytes     +/- 2,147,483,648
  47  Diesel Consumption??      14193  4 bytes     +/- 2,147,483,648
  48  Surf Mot Coef. ???        14197  4 bytes     +/- 2,147,483,648
  49  Surf Mot Coef. Stop?      14201  4 bytes     +/- 2,147,483,648
  50  Surf Mot Coef. 1/3 F      14205  4 bytes     +/- 2,147,483,648
  51  Surf Mot Coef. 2/3 F      14209  4 bytes     +/- 2,147,483,648
  52  Surf Mot Coef. STD F      14213  4 bytes     +/- 2,147,483,648
  53  Surf Mot Coef. FUL F      14217  4 bytes     +/- 2,147,483,648
  54  Surf Mot Coef. FLK F      14221  4 bytes     +/- 2,147,483,648
  55  Subm Mot Coef. ???        14241  4 bytes     +/- 2,147,483,648
  56  Subm Mot Coef. Stop?      14245  4 bytes     +/- 2,147,483,648
  57  Subm Mot Coef. 1/3 F      14249  4 bytes     +/- 2,147,483,648
  58  Subm Mot Coef. 2/3 F      14253  4 bytes     +/- 2,147,483,648
  59  Sub. Mot Coef. STD F      14257  4 bytes     +/- 2,147,483,648
  60  Sub. Mot Coef. FUL F      14261  4 bytes     +/- 2,147,483,648
  61  Sub. Mot Coef. FLK F      14265  4 bytes     +/- 2,147,483,648
===========================================================================
A lot of these variables are inter-related; such as Surfaced/Submerged Power and the Surfaced/Submerged Speed Coefficients.

I've been able to edit in a pretty decent SSN-571 Nautilus into the game, but have been unable to find the numbers that handle battery capacity in SUBS.DAT; hence me posting this.

Last edited by Sheppard; 09-06-11 at 07:11 AM.
Sheppard is offline   Reply With Quote
Old 09-06-11, 01:19 PM   #2
aanker
Pacific Thunder
 
aanker's Avatar
 
Join Date: Apr 2004
Location: Yellow Sea
Posts: 1,896
Downloads: 236
Uploads: 14


Default

Quote:
Originally Posted by Sheppard View Post
I've looked through the SUBS.DAT file for SH:CE and deciphered maybe 65-70% of it using UGE -- Universal Game Editor, a old DOS-era editor that still works quite well for old style games.

A lot of these variables are inter-related; such as Surfaced/Submerged Power and the Surfaced/Submerged Speed Coefficients.

I've been able to edit in a pretty decent SSN-571 Nautilus into the game, but have been unable to find the numbers that handle battery capacity in SUBS.DAT; hence me posting this.
With the PTC SH1 Database project by Kim Rønhof, Kim and others deciphered just about everything possible except for creation of new Patrol Zones. We were even playing with that idea when SH4 came out.

Kim created a program that combined all of Hawks Utilities plus changing the torpedo loadout and is called the Torpedo Change Tool - TCT.

Furthermore, WEAPONT.DAT, ROSTERXX, Subs.dat, Ships.dat, RosterX.dat, Carsub.dat, and PZ.dat were all deciphered with a hex editor and almost all important bytes and bits were located for everything. The introduction:
Quote:
The PTC SH Database project main target is to decrypt the database structure of the Sh (1) game making it possible to change elements in the game.

The database structure of SH is not available, as the members of PTC do not have access to the source code. The Database projects object is to create a insight into the database structure making changes in the game possible.

Information produced by the project is the database structure as we think it is, but there is always a element of uncertainty, please keep this in mind.

A few of the database file have been analyzed by Kim’s Hex program, this program has made it relatively easy to gain insight into database such as patrol files and Data files, where different closely related data can be compared such as 2 nearly equal patrols where only firing 1 torpedo
differs, and comparing the different torpedoes (mark10/mark14 ex.)

A short test faze has evaluated changes in the databases, to se if change create the expected results (this has not always been the case)

SH Database structure : the elements :
The directory structure – under the silent hunter main directory there are the following subdirectories :
The result of all this work was the TCT.
Quote:
The Subs.dat file
The Subs.dat file starts with byte 09
Then it lists
The different Sub types in text
Each listing is 32 bytes long the ending last 4 bytes hold the address where the
Data for the specific Subtype data is.

The specific Sub type data are each 1704 bytes long.
And start as follows Dec Hex
Type - - - - Address - - - - Low Byte - - - High byte
S-Class - - - 289 - - - - - - 21 01 - - - - 00 00
Barracuda - - 1993 - - - - - C9 07 - - - - 00 00
Narwhal - - - 3697 - - - - - 71 0E - - - - 00 00
P-Class - - - 5401 - - - - - 19 15 - - - - 00 00
Salmon - - - - 7105 - - - - - C1 1B - - - - 00 00
T-Class - - - 8809 - - - - - 69 22 - - - - 00 00
Gato - - - - 10513 - - - - - 11 29 - - - - 00 00
Balao - - - - 12217 - - - - - B9 2F - - - - 00 00
Tench - - - - 13921 - - - - - 61 36 - - - - 00 00
Quote:
00000465:19 00 00 00 1C 00 00 00 A0 00 00 00 31 33 00 00 13 speed surface
00005577:18 00 00 00 1C 00 00 00 78 00 00 00 31 39 00 00 19 in text
00007281:18 00 00 00 1D 00 00 00 78 00 00 00 32 30 00 00 20
00010689:1A 00 00 00 1E 00 00 00 64 00 00 00 32 30 2E 37 20.75

00000481:00 00 00 00 00 00 39 00 00 00 00 00 00 00 00 00 9 speed subm.
00005593:00 00 00 00 00 00 38 00 00 00 00 00 00 00 00 00 8 in text
00007297:00 00 00 00 00 00 39 00 00 00 00 00 00 00 00 00 9
00010705:35 00 00 00 00 00 38 2E 37 35 00 00 00 00 00 00 8,75
for example - I don't see battery capacity....... yet... Are you past the excerpts posted above and is this type of information that you're after?

Happy Hunting!
__________________
" Bless those who serve beneath the deep,
Through lonely hours their vigil keep.
May peace their mission ever be,
Protect each one we ask of thee.
Bless those at home who wait and pray,
For their return by night and day."

aanker is offline   Reply With Quote
Old 09-06-11, 01:25 PM   #3
aanker
Pacific Thunder
 
aanker's Avatar
 
Join Date: Apr 2004
Location: Yellow Sea
Posts: 1,896
Downloads: 236
Uploads: 14


Default

Battery would be Submerged Range, correct?
__________________
" Bless those who serve beneath the deep,
Through lonely hours their vigil keep.
May peace their mission ever be,
Protect each one we ask of thee.
Bless those at home who wait and pray,
For their return by night and day."

aanker is offline   Reply With Quote
Old 09-06-11, 04:09 PM   #4
Hitman
Pacific Aces Dev Team
 
Hitman's Avatar
 
Join Date: Sep 2002
Location: Spain
Posts: 6,099
Downloads: 109
Uploads: 2


Default

Interesting, never had heard of that before aanker

If I could have one thing, and only one modded by code into SH1, then that would be a huge reduction in enemy traffic. The amount of traffic and contacts, specially in areas where it was truly scarce in real life, is what killed a big part of the fun for me, as it made huge tonnage figures too easy.
__________________
One day I will return to sea ...
Hitman is offline   Reply With Quote
Old 09-06-11, 04:12 PM   #5
kgsuarez
Planesman
 
Join Date: Oct 2004
Location: USA
Posts: 181
Downloads: 28
Uploads: 0
Default

I don't have anything useful to add as far as technical things go, but I would like to say that this is very interesting.

I downloaded a copy of this UGE program and tried to play around with my AOD install with it, but I couldn't figure out what to do. It just looks like a hex editor to me. I would like to be able to make some changes, or mods, to AOD as well. So I will be watching this thread for any more info about doing such things.
kgsuarez is offline   Reply With Quote
Old 09-07-11, 01:04 AM   #6
Sheppard
Captain of the Nautilus
 
Join Date: Mar 2005
Posts: 143
Downloads: 223
Uploads: 0
Default

aanker:

Where's the following document you cite here:

Quote:
The PTC SH Database project main target is to decrypt the database structure of the Sh (1) game making it possible to change elements in the game.

The database structure of SH is not available, as the members of PTC do not have access to the source code. The Database projects object is to create a insight into the database structure making changes in the game possible.
available? Googling that text returns this thread. It does no good to have deciphered SH's file formats if nobody knows about it but the project.
Sheppard is offline   Reply With Quote
Old 09-07-11, 08:08 AM   #7
Sheppard
Captain of the Nautilus
 
Join Date: Mar 2005
Posts: 143
Downloads: 223
Uploads: 0
Default

Quote:
Originally Posted by kgsuarez View Post
It just looks like a hex editor to me.
It's not a PURE hex editor, as it's file viewer screen displays things differently, in a format more legible to the average person. It also handles an editing front end; so that you don't need to write an editor; just give away the *.MDL file you've created.

Quote:
I would like to be able to make some changes, or mods, to AOD as well. So I will be watching this thread for any more info about doing such things.
Let me take a quick look at AOD's files. The first thing you should do for editing with UGE, is to go into the game itself and write down everything possibly to do with numbers shown in the game. SH1 is very good about this, it displays a lot of game data in the game itself, so you know right away if your edits worked or didn't, and what to look for.

AOD...doesn't seem to be as easy.
Sheppard is offline   Reply With Quote
Old 09-07-11, 08:05 PM   #8
kgsuarez
Planesman
 
Join Date: Oct 2004
Location: USA
Posts: 181
Downloads: 28
Uploads: 0
Default

Sheppard, before you get too far into it I would advise you to take a look at the following excerpt from http://www.subsim.com/tips/tipaod.php.

Quote:
Hex-Editing the Gamesave File for "Command Aces of the Deep - Ver.1.1"
**Copyright(C)2000 by Steven L. Hildebrand**
Yes, you can Hex-Edit the Command AOD game-save file to give yourself any sub type you want, as well as giving yourself a promotion, a medal, or changing your home port...wanna try a Mediterranean career without running the British ASW gauntlet at Gibralter?? No prob, hex edit your home port and load the edited gamesave file...instant Med Cruise!

The reader uses this info at their own risk, I cannot be responsible if you manage to trash your files, or if your computer becomes possessed by the unclean spirit of Richard Nixon. Not my problem, dudes...

The following file addresses are in HEX, not Decimal:

48 = Rank
49 = Medals
4A = Sub Insignia
4B = Homeport
4C-4F = Assigned Patrol Grid
56 = # of Patrols
57-59 = Total Tonnage Sunk (See Notes Below)
5B-5D = Career Score (See Notes Below)
69 = Sub Type


Values for Sub Type:
00 = Type IIC
01 = Type IID
02 = Type VIIB
03 = Type VIIC
04 - TypeVIIC/41
05 = Type IXB
06 = Type IXC/40
07 = Type XXI


Values for Home Port:

00 = Bergen, Norway (11th Flotilla)
01 = Trondheim, Norway (13th Flotilla)
02 = Kiel (1st Flotilla)
03 = Wilhelmshaven
04 = Brest, France (9th Flotilla)
05 = Lorient, France
06 = St. Nazaire, France (6th Flotilla)
07 = La Rochelle, France (3rd Flotilla)
08 = Bordeaux, France
09 = La Spezia, Italy
0A = Salamis, Greece


Values for Rank:

00 = Leutnant
01 = Oberleutnant
02 = Kapitanleutnant
03 = Korvettenkapitan
04 = Fregattenkapitan


Values for Medals:

01 = Knights Cross
02 = Knights Cross w/Oak Leaves
03 = Knights Cross w/Oak Leaves & Swords
04 = Knights Cross w/Oak Leaves, Swords & Diamonds


Notes:

First, I can find no value/location for a sub crew's level of experience (green, veteran, etc.)...and since it has nothing to do with the number of patrols, I can only assume that it is determined by the number of ships you've sunk. Pity, since it would be nice to start a "career" in 1939 with a veteran crew.

Also, no location for the number of ships sunk, so the game must count the number of sunk-ship records in the game-save file. Speaking of which, my next task is to decode the sunk-ship portion of the career record.

**Very Important** -- the Hex values for total tonnage and career score are actually expressed backward. Let me explain...

On the save file I used for exploration, my total tonnage sunk was 181,244. This value, expressed in Hexidecimal, is "02 C3 FC" but in the gamesave file, it was written as "FC C3 02." My career score was 92270, or "01 68 6E" but it was written as "6E 68 01." Weird, eh?? I remembered this from decoding the gamesave files from many other games.

Don't know how to convert Decimal values into Hexidecimal?? It's easy if you have Win95 or Win98. Open up the Windows Calculator ... under "View," select "Scientific." Then select "Dec" from the toolbar, and type in your Decimal value (181244), then select "Hex" on the toolbar...your Decimal value will be converted into a Hex value (02C3FC).

Check Baffles!!


Steven ".High*Ping*Drifter." Hildebrand
Chicago, IL. [[
HighPingDrifter@hotmail.com ]]

"And a thousand, thousand slimy things lived on...and so did I..."

As you can see, some of the work has already been done. I have used the information above myself in the past.

I'm going to try to give it another go. Maybe I can find some other useful things.
kgsuarez is offline   Reply With Quote
Old 09-08-11, 10:57 AM   #9
aanker
Pacific Thunder
 
aanker's Avatar
 
Join Date: Apr 2004
Location: Yellow Sea
Posts: 1,896
Downloads: 236
Uploads: 14


Default

Quote:
Originally Posted by Sheppard View Post
aanker:

Where's the following document you cite here:

available? Googling that text returns this thread. It does no good to have deciphered SH's file formats if nobody knows about it but the project.
I thought this was publicly available in the groups but I'm not having any luck finding it in either group (Yahoo). I'll write him and try and get permission. I agree, the more working on this, the better. Furthermore all of this work was wasted if nobody knows about it - right?
__________________
" Bless those who serve beneath the deep,
Through lonely hours their vigil keep.
May peace their mission ever be,
Protect each one we ask of thee.
Bless those at home who wait and pray,
For their return by night and day."

aanker is offline   Reply With Quote
Old 09-08-11, 03:50 PM   #10
aanker
Pacific Thunder
 
aanker's Avatar
 
Join Date: Apr 2004
Location: Yellow Sea
Posts: 1,896
Downloads: 236
Uploads: 14


Default

Good news, he zipped it up and will upload it. Very important work IMO and many hours invested. Please share what you find too Your hex editor on steroids looks great !!
__________________
" Bless those who serve beneath the deep,
Through lonely hours their vigil keep.
May peace their mission ever be,
Protect each one we ask of thee.
Bless those at home who wait and pray,
For their return by night and day."

aanker is offline   Reply With Quote
Old 09-10-11, 02:53 PM   #11
Sheppard
Captain of the Nautilus
 
Join Date: Mar 2005
Posts: 143
Downloads: 223
Uploads: 0
Default

To what group though?

Will it be this one?

http://groups.yahoo.com/group/PacificThunder/
Sheppard is offline   Reply With Quote
Old 09-10-11, 03:53 PM   #12
aanker
Pacific Thunder
 
aanker's Avatar
 
Join Date: Apr 2004
Location: Yellow Sea
Posts: 1,896
Downloads: 236
Uploads: 14


Default

Yes, PacificThunder. I received the zip this morning and emailed back to see where he (or I) should put it - and did I have permission, etc, etc.

It seems logical that it should go there.

----
__________________
" Bless those who serve beneath the deep,
Through lonely hours their vigil keep.
May peace their mission ever be,
Protect each one we ask of thee.
Bless those at home who wait and pray,
For their return by night and day."

aanker is offline   Reply With Quote
Old 09-16-11, 06:27 PM   #13
Sheppard
Captain of the Nautilus
 
Join Date: Mar 2005
Posts: 143
Downloads: 223
Uploads: 0
Default

Are you ever going to upload it, or will it remain lost forever?
Sheppard is offline   Reply With Quote
Old 09-16-11, 09:00 PM   #14
aanker
Pacific Thunder
 
aanker's Avatar
 
Join Date: Apr 2004
Location: Yellow Sea
Posts: 1,896
Downloads: 236
Uploads: 14


Default

I am waiting for permission - we must do these things right. When he lets me know where he wants it, I'll post back when I upload it. Should be soon.... and worth the wait - hang on
__________________
" Bless those who serve beneath the deep,
Through lonely hours their vigil keep.
May peace their mission ever be,
Protect each one we ask of thee.
Bless those at home who wait and pray,
For their return by night and day."

aanker is offline   Reply With Quote
Old 09-18-11, 03:22 PM   #15
aanker
Pacific Thunder
 
aanker's Avatar
 
Join Date: Apr 2004
Location: Yellow Sea
Posts: 1,896
Downloads: 236
Uploads: 14


Default SH1 data file uploaded

Okay Sheppard and anyone else,

I received permission from Kim, got a whole lot more data than I thought existed, and the files are in a zip:

Located in the Files section at:
http://games.groups.yahoo.com/group/PacificThunder/

Zip is called:
SH1database files.zip

Its description is:
"SH1 Database Project - Kim Rønhof"

I hope it is helpful because Kim put a lot of work into getting the info to make his tools for SHCE - SH1. I hate to see this work go to waste or get lost!

I also uploaded them here.
http://www.subsim.com/radioroom/down...o=file&id=3377

Happy Hunting!

Art
__________________
" Bless those who serve beneath the deep,
Through lonely hours their vigil keep.
May peace their mission ever be,
Protect each one we ask of thee.
Bless those at home who wait and pray,
For their return by night and day."


Last edited by aanker; 09-18-11 at 03:39 PM.
aanker is offline   Reply With Quote
Reply


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 Off

Forum Jump


All times are GMT -5. The time now is 02:08 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 1995- 2024 Subsim®
"Subsim" is a registered trademark, all rights reserved.