SUBSIM Radio Room Forums



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

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SHIII Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 01-11-11, 02:27 PM   #886
LGN1
Ace of the Deep
 
Join Date: Mar 2006
Posts: 1,138
Downloads: 147
Uploads: 12
Default

Quote:
Originally Posted by Hitman View Post
@Stiebler and H.Sie

...a feature I think would be worth adding:

- A % random chance of crash dives getting out of control, as it happened in real life, with a risk of getting below crash depth and crushing. Ideally more probable with greener crew, but this would probably be too complicated.
Hi Hitman,

shouldn't there be a possibility to stop the crash dive somehow? If there is none, I'm wondering what the idea is? Wouldn't this just be a random chance for a career end whenever you press 'c' , i.e., whenever you press 'c' you play a virtual Russian Roulette?
LGN1 is offline   Reply With Quote
Old 01-11-11, 05:27 PM   #887
h.sie
Admiral
 
Join Date: Jul 2008
Posts: 2,192
Downloads: 131
Uploads: 0


Default

@Stiebler: According to my observations the q-d tank is emptied, but extremely slow when crash dive is interrupted.

In both cases (non-interrupted and interrupted crashdive), different routines write to the q-d tank.

By the way: If you have the address of the q-d-tank, simply add 0x8 and you'll have the address of the "crash dive flag" (a single byte), which could be useful.

I'm tired now and continue during the next days.

Gähn!!!
h.sie
__________________
My Mediafire page: http://www.mediafire.com/hsie
h.sie is offline   Reply With Quote
Old 01-12-11, 05:42 AM   #888
Stiebler
Fuel Supplier
 
Stiebler's Avatar
 
Join Date: Oct 2005
Location: London, UK
Posts: 1,237
Downloads: 29
Uploads: 4


Default

@H.sie:

Thanks for this important information.
I have sent a PM.

@LGN1:
Quote:
The first version, however, might be problematic for people that have a less deep crash-dive depth in their cfg files so that their q-d tank value is already smaller than 1 at 40m I think one should keep it in mind that different people/mods have different crash-dive depths.
You make a valid point.
The code I have in mind will simply reset the quick-diving tank as soon as the U-boat sinks below 40m.
Therefore, if a player has crash-dive depth set to (say) 20m, the 'crash-dive blues' will be ended as soon as the boat sinks below 40m. Thus, there will be a problem only if the player tries to maintain a depth set to less than 40m, after ordering the crash-dive.
But in any case, if the crash-dive depth is set at 20m, it is probably a simple solution just to allow the crash-dive to settle out before diving deeper. You will have time for that. You may not have time if the crash-dive depth is set to 80 metres.

I believe that I am very close to getting right the code for the solution that I have proposed. Then we shall know if this solution affects the ability to blow ballast, has H.sie has suggested. And we can test other matters, as LGN1 has mentioned, also.

Stiebler.
Stiebler is offline   Reply With Quote
Old 01-12-11, 06:31 AM   #889
NGT
Lieutenant
 
Join Date: Sep 2006
Posts: 259
Downloads: 289
Uploads: 3
40 meters

Hello Stiebler and h.Sie

The reason for crash–dive in depth less than 25 meters is —for me— simple:

Shallow waters (example: around Britain, raids in ports etc.) + no crash–dive–blues.

Of course, without crash–dive–blues, we can tweak the crash–dive for 300 meters, and interrupt (or restart) at any depth.

So, I don’t understand very well the critical point of 40 meters. If —anyway— I must pass below 40 meters, this solution is not valuable when in shallow waters.

I miss something, yes?
NGT is offline   Reply With Quote
Old 01-12-11, 06:51 AM   #890
h.sie
Admiral
 
Join Date: Jul 2008
Posts: 2,192
Downloads: 131
Uploads: 0


Default

@Stiebler: Yesterday I discovered that under certain circumstances (crash-dive interrupted but q-d-tank not completely filled to 1,0) the q-d-tank indeed goes back to 0.5, but very, very slowly, because a certain routine R continuously writes data into it.

So if you simply reset the q-d-tank to 0.5 once, you risk that this value will be overwritten under the above-mentioned circumstances.

And if you write 0.5 repeatedly, this will interfere with the values from the above-mentioned routine R, which also tries to write other values into the q-d-tank. This can lead to "oscillations".

Since the above-mentioned routine R also writes to other things different from q-d-tank, one cannot simply disable or patch it. Patching / disabling the routine R will only work, if one finds out, if R is currently trying to write into the q-d-tank or not. For this reason we need to work with pointers.

So my approach is a soft-hand-solution by trying to understand how R works and then modify it accordingly, but only if the pointer register currently points to the q-d-tank.

Happy hacking!
h.sie
__________________
My Mediafire page: http://www.mediafire.com/hsie
h.sie is offline   Reply With Quote
Old 01-12-11, 09:41 AM   #891
BogdaNz
Loader
 
Join Date: Jan 2011
Posts: 83
Downloads: 105
Uploads: 0
Default

i want realistic repair and flooding time mode but i dont see no link
i looked at last page but there are only description ,no link
BogdaNz is offline   Reply With Quote
Old 01-12-11, 10:59 AM   #892
Magic1111
Silent Hunter
 
Join Date: Sep 2008
Location: Germany - Sailing on U-552 in North Atlantic
Posts: 4,429
Downloads: 783
Uploads: 0


Default

Quote:
Originally Posted by BogdaNz View Post
i want realistic repair and flooding time mode but i dont see no link
i looked at last page but there are only description ,no link
Open your eyes and read first post on first page carefully (read under "Step3"...)!

Here are the download link: http://www.mediafire.com/?a6j533a02wsf39d

Best regards,
Magic
__________________
Magic1111 is offline   Reply With Quote
Old 01-12-11, 12:03 PM   #893
Stiebler
Fuel Supplier
 
Stiebler's Avatar
 
Join Date: Oct 2005
Location: London, UK
Posts: 1,237
Downloads: 29
Uploads: 4


Default

@H.sie:
Quote:
@Stiebler: Yesterday I discovered that under certain circumstances (crash-dive interrupted but q-d-tank not completely filled to 1,0) the q-d-tank indeed goes back to 0.5, but very, very slowly, because a certain routine R continuously writes data into it.... [+ More]
Not a problem (I think...).

I found that, by observing the crash-dive flag that you found earlier, the flag is set to false (from true = 1) when either of these circumstances occur:
a) the q-d-tank starts to empty.
b) the crash-dive is interrupted.
When the crash-dive flag is false, the q-d-tank is not emptied at all, and the code is not used.

Using this information, I have now complete code that does everything I intended. (Whether what I intended will work usefully, remains to be seen.)

I need only to fix a simple bug (forgot to reset jump addresses when changing the label at the new address), and I expect to have fully working code.

However, there remains a significant problem:
I am testing for the q-d-tank by asking of each value of ecx at my breakpoint if a filled diving tank is at location [q-d-tank - 0x14].
What happens is that the q-d-tank fills too quickly, before the diving tank is itself filled. After that the q-d-tank/ecx value is not encountered again until the q-d-tank starts to empty at about 40m.
So everything works fine, *provided* that no one interrupts the crash-dive before the U-boat has reached around 40m.
I have an alternative idea to fix this, but first I want to confirm the properties of a U-boat whose crash-dive has been interrupted at 40-50m.

That is tomorrow's problem - if I have time.

@NGT:
I understand your argument perfectly, and perhaps we could make the code run from 18m, not from 40m.
But first, I must test that the guiding principle works.

Stiebler.
Stiebler is offline   Reply With Quote
Old 01-12-11, 12:28 PM   #894
Captain Birdseye
Watch Officer
 
Join Date: Feb 2009
Location: Sat behind my desk at BdU tapping away on my Enigma machine.
Posts: 339
Downloads: 44
Uploads: 0
Default

Guys I can't understand the instructions.

I have copied my sh3.exe to my desktop but the batch file still says incorrect check sum, saying fciv isn't recognised. I have version 1.4.0.1

Thanks.
__________________
Captain Birdseye is offline   Reply With Quote
Old 01-12-11, 01:36 PM   #895
WH4K
Frogman
 
Join Date: Dec 2010
Posts: 291
Downloads: 56
Uploads: 0
Default

Join the club.

The problem is simple: There are about half a dozen different variants of sh3.exe. h.sie's mod only works with one of them.

Yet, they're all the "same" version, 1.4. But not really, as they are all different in subtle ways.

Some sh3.exe's include hooks for the Starforce malware. Newer ones don't, yet are still incompatible with the patcher.

Then you have people who have implemented the "4GB" patch.

Naturally, there's mass confusion.
__________________
Windows 10 Pro (x64)
WH4K is offline   Reply With Quote
Old 01-12-11, 01:37 PM   #896
SquareSteelBar
Sea Lord
 
Join Date: May 2006
Location: U-73
Posts: 1,638
Downloads: 618
Uploads: 0
Default

You have to copy fciv.exe to the desktop, too
SquareSteelBar is offline   Reply With Quote
Old 01-12-11, 01:59 PM   #897
LGN1
Ace of the Deep
 
Join Date: Mar 2006
Posts: 1,138
Downloads: 147
Uploads: 12
Default

Quote:
Originally Posted by NGT View Post
Hello Stiebler and h.Sie

The reason for crash–dive in depth less than 25 meters is —for me— simple:

Shallow waters (example: around Britain, raids in ports etc.) + no crash–dive–blues.

Of course, without crash–dive–blues, we can tweak the crash–dive for 300 meters, and interrupt (or restart) at any depth.

So, I don’t understand very well the critical point of 40 meters. If —anyway— I must pass below 40 meters, this solution is not valuable when in shallow waters.

I miss something, yes?
Hi NGT,

I think also in real-life you could not crash-dive in shallow water because you needed a certain depth to stop the diving. So, not being able to use the crash dive command in water shallower than, let's say 40m, sounds realistic to me

Personally, I think the 40m 'boundary' would be fine (I think most super-mods have a deeper crash-dive depth than 40m. So, most players would be fine).

Cheers, LGN1
LGN1 is offline   Reply With Quote
Old 01-12-11, 04:40 PM   #898
h.sie
Admiral
 
Join Date: Jul 2008
Posts: 2,192
Downloads: 131
Uploads: 0


Default

@Stiebler: I have different observations, in the following situation:

1) Order crash dive.

2) When boat has depth of about 20m, interrupt dive by ordering new depth of 40m.

This leads to a very slow but constant empying process of the q-d-tank. During this time the code at Sh3Sim.act+0xA7B7:

fst dword ptr [ecx+08]

constantly writes new values into the q-d-tank. This process takes about 5 minutes, until q-d-tank is 0,5.

Happy hacking!
h.sie
__________________
My Mediafire page: http://www.mediafire.com/hsie
h.sie is offline   Reply With Quote
Old 01-12-11, 05:15 PM   #899
Stiebler
Fuel Supplier
 
Stiebler's Avatar
 
Join Date: Oct 2005
Location: London, UK
Posts: 1,237
Downloads: 29
Uploads: 4


Default

@H.sie:
Thanks for the new info.

But.... I have solved it all!!

First, I have now functioning code that checks for an interrupted crash-dive and writes 0.500 to the q-d-tank. This works well, with *no* depth limitation, but subject to the complicated limitation that the q-d-tank must be full (1.0000) before the code functions. So you cannot interrupt the crash-dive with a new depth until about 20-30 seconds of game time have elapsed. I had written elaborate code to identify the q-d-tank variable and to separate it from the main diving tank.

If the code is allowed to function properly, then an interrupted crash-dive maintains its new depth at slow underwater speed indefinitely. I have tested it, it is true.
Also the 'blow ballast' function works perfectly both with a completed crash-dive and with an interrupted crash-dive. I have tested it, it is true.

So I have a working program. With a lot of heavy code to identify the q-d-tank and its crash-dive flag.

But I have discovered something else!
the q-d-tank is referenced by float [esi+438h].
the crash-dive flag is referenced by byte [esi+440h].

Tomorrow, I shall re-write my code much simpler, and with no timing or depth limitation!

Stiebler.
Stiebler is offline   Reply With Quote
Old 01-12-11, 11:54 PM   #900
ryanwigginton
Weps
 
Join Date: Apr 2007
Location: Nottinghamshire
Posts: 368
Downloads: 68
Uploads: 0
Default

Quote:
Originally Posted by WH4K View Post
Join the club.

The problem is simple: There are about half a dozen different variants of sh3.exe. h.sie's mod only works with one of them.

Yet, they're all the "same" version, 1.4. But not really, as they are all different in subtle ways.

Some sh3.exe's include hooks for the Starforce malware. Newer ones don't, yet are still incompatible with the patcher.
Tell me about it. I've been following this thread from the start. The other day I decided I couldn't wait any longer and tried to use the patch. Wrong checksum.

I have a later, budget 'Focus Essential' disc version. No starforce as far as I know, but still, wrong checksum.

But I have absolute faith in h.sie's abilities and (being an optimist) believe once he's created all the changes he wants, he or Stiebler will turn their efforts to improving compatibility. We can only hope.
__________________
Windows 8 Pro 64-bit, Intel Core i7-2760QM @ 2.40GHz, 8GB RAM, AMD Radeon HD 6990M
ryanwigginton 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:26 PM.


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.