SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SHIII Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=195)
-   -   Realism- and gameplay-related hardcode fixes for SH3.EXE (https://www.subsim.com/radioroom/showthread.php?t=174225)

asanovic7 12-29-11 07:53 PM

hey... that was quick.. :)

tx for the reply. :D

watching over your work, it's cool.. although papilova hit you hard with comments :DDD its a game, not a simulator :)

cheers

asanovic7 12-29-11 07:56 PM

oh and yes, sh3 still remains the best, keep up the modding :DD

Leitender 12-30-11 03:01 AM

Quote:

Yes, I use the telegraph setting because it is much easier and common for all Uboat types. I assume the Uboats absolute speed to be proportional to the telegraph setting.
h.sie

Did several tests:

Set aheadflank=0.96 und went to flank. Damage occured after

1. 2h

2. 25 Min.

immediatly ater warning. Reread your explanation: T50 does not mean that damage only occurs after 2hours of flank, so in principle it works as programmed. Damage also can occur instantly after ran flank.

Set aheadflank=0.5

1. ran flank: No damage after 9 hours

2. ran full: damage after 3,5h.

Hm. If this is the behaviour you all want to achieve, everything is alright with this mod. But this is not realistic in my eyes.

But to close conciliable: Torpedoswitchbugfix works as intended: Perfect! :salute:

h.sie 12-30-11 04:11 AM

@Leitender:

The mod works with random numbers. Every second a random number is generated, and with a chance po a damage is applied. It is calculated for undamaged diesels:

po = 1e-4 * TelegraphSpeed^32

Due to the nature of random processes, T50 of course cannot be a fixed (predictable) time after that a damage occurs, it is much more the timespan after that the probablity of damage occurence is 50%. This is what I remember from some statistics lectures years ago. With a little mathematics one gets for T50

T50 = ln(0.5) / ln(1-po) in seconds.

For telegraph speed = 1.0 we have:
po = 1e-4
T50 = 6931 sec = 1.93 h

Thus, at rel. speed = 1.0, one of course cannot exactly predict when the damage occurs. But the chance is high. And if the first light damage occurs (which has NOT to be interpreted as damage, but much more as overheating, as a warning "we have to throttle the diesels now") the chance po rises about a factor of 4 to po = 4e-4 if you don't throttle the diesels immediately. And if you don't throttle, you risk a secondary damage, which I programmed to be severe, what can destroy the diesels.

I had to do it this way, because this way the state (overheated or not) of the diesels is indirectly stored in their damage counter AND IS SAVED IN THE SAVEGAME!!! Otherwise one could save/reload and the information/state of the diesels is lost.

I again have to say: I cannot offer a more sophisticated model. Only a simple model. We have to live with compromises.

But in the next version, I will drastically reduce po or even set po=0 for all continuous speed settings (rel. speed < 1.0) so that damage will only occur at relative speed = 1.0

h.sie

P.S. You say that my mod is not realistic. I agree to some extent. More I couldn't do with all the restrictions.

My question to you: How would you realise that mod in a more realistic way? Please consider, that the current state must be saved in a savegame.

Leitender 12-30-11 06:22 AM

h.sie

I believe i understand what you did. You created a damage probability where p0 is Poisson-distributed and thus damage will occur with almost 100% probability the longer you run with full or flank. This is exactly what i deny for real engines. They were constructed permanent safe during regular action. Have you tried your mod ingame in long terms?

But the actual question was, whether we could use LGN1´s idea to set the knotmeter for speedmax=1, when aheadflank ist to be set to 0.96 to achieve a save propulsion when aheadflank and an unsafe, overload propulsion when set the knotmeter to its max. value.

As your algorithm calculates damage speed-dependant, and not telegraph-ORDER-dependant (that was the actual question, sorry for my unpreciseness), we will have a continuous increase of damage probability all over the speed bandwith, i.e. within all regular telegraph orders, and not a discrete calculation of damage probability dependant only on full or flank order. So LGN1´s idea won´t work up to now.

To be constructive, maybe one could set the duration T=T50+(0.5h./.2h) (from - to)

Or maybe we have to stretch the probability function to a speed limit of 0.96, below wich probability is nearly=0, an above which damage probability increases dramatically:

Set the speed limit to speed=0.96:

p0=1e-4*0.96^32
p0=2.7e-5

If we change your function to

p0=1e-4*speed^32-2.7e-5

this should lead to a damage probability<0 (possible?) for speed<0.96 if am right.

If it´s not possible to calculate with negative probabilities, maybe we can set

p0=0 for 0<speed<=0.96 and

p0=1e-4*speed^32-2.7e-5 for speed>0.96

What do you think?

Concernig your question about saveabilty: No idea how this works

h.sie 12-30-11 06:49 AM

@Leitender:

negative probabilities are maybe relevant in quantum physics but not for our diesels. they are also not compatible to my intellectual capabilities.

As I already mentioned: In the next version we'll have damage probability ONLY for telegraph speed = 1.0 (overload).

All other speed settings will be secure/safe, because I will use a high exponent of >128 AND there is also a threshold value that sets insignificant values of p0 to zero. Look into the .ini file of the current mod. You see, that this threshold is already implemented, but its value must be adjusted.

Example for speed = 0.96:

po = 1e-4 * 0.96^128 = 5e-7

Threshold value: 1e-6

Since 5e-7 is < Threshold value, po will be set to 0.

So you can assign FLANK=0.96 in the cfg file and always have safe operation.

You can activate speed=1.0 only via LGN1's method and only then you get damages.

Thus, LGN1's idea does work with this mod.

What is wrong with this?

Leitender 12-30-11 06:59 AM

Another way, (almost) same result. You´re the master and i´m glad to see how it works.

h.sie 12-30-11 07:01 AM

I'm not the master, I'm the admiral (see below my avatar).

Leitender 12-30-11 07:05 AM

Quote:

negative probabilities are maybe relevant in quantum physics but not for our diesels. they are also not compatible to my intellectual capabilities.
:DL

The sky´s the limit. But not the bottom ;)

LGN1 12-30-11 08:12 AM

Hi,

I think an exponent of 128 is fine. Players who do not want to mess with their sim and cfg files will have a safe Full setting and have to interpret the Flank setting as 'over-power' mode. Those who don't like this will have to mess with the sim and cfg file.

Personally, I also don't mind if there is a small chance for a diesel break-down at lower speed. No machine runs continuously forever without a chance of break-down. I guess in most cases such a random malfunction would not really matter because the chance that it happens in a combat situation is very low and you can just repair it. However, it would add to the immersion if your CE would report a damaged diesel during a patrol. Probably there was not a single patrol during the war with some kind of technical problems.

Cheers, LGN1

h.sie 12-30-11 08:43 AM

It seems we have now found a compromise, so that I can start to program the next version of the diesel damages mod.

Any results from the Collision damages Mod?

LGN1 12-30-11 09:08 AM

Ok, I've found some speed data in the original VIIC handbook from 1940 (speed is averaged over two settings: 'Schwimmzustand A' and 'B'):

KF: 180 RPM / 7.1kn
LF: 275 RPM / 10.1kn
HF: 340 RPM / 12.2kn
2xHF: 396 RPM / 14.3kn
GF: 435 RPM / 16.2kn
AK: 471 RPM / 17.6kn
3xAK: 480 RPM / 18.0kn

There is no speed setting with 490 RPM given, but in the chapter about the diesels 470/480/490 RPM are mentioned. At 490 RPM one would expect a speed of 18.3 - 18.4 kn.

h.sie 12-30-11 09:25 AM

@LGN1: In the .sim file of the VIIC one can find:

max_speed=18.2

so this corresponds to 3xAk.

At windspeed = 0 it can even go 19knots.

It seems the max_speed in the .sim file (and thus rel. speed = 1.0) corresponds to 3xAK.

Hitman 12-30-11 09:51 AM

Quote:

I thought that machine telegraph settings should correspond to load, not to rpm.
And in real naval engines it certainly does (Well in land ones also, as you have a gas pedal or lever), sadly in Sh3 it isn't, due to obvious simplification of the program's code.

The key difference between a naval and a land engine is that naval moves screws working in a liquid environment while a land one works with wheels against a solid element (The ground). So, with naval engines one has to account for overreving when the screw goes out of the water in bad weather, and also with the fact that there are limits for the amount of turning speed vs. traction in the water. It is not uneasy to cause cavitation and lose forward impulse by making the screw turn harder than what it can "bite" on the water, same as when you burn rubber with a car.

Sailor Steve 12-30-11 10:07 AM

Quote:

Originally Posted by h.sie (Post 1812289)
@SailorSteve: Would be great. Only problem: I have no experience to program / trigger new sound events. But maybe Stiebler knows (maybe he did that for his "smoke on the horizon" mod).

No, I meant that I could just make a new speech file for the 'Ahead Flank' setting, so when you clicked on that setting you would hear the "Engines are overheating" speech. Not exactly accurate, but better than nothing.


All times are GMT -5. The time now is 09:05 AM.

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