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 > SH5 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 07-30-12, 02:30 PM   #676
Haukka81
Medic
 
Join Date: Jan 2008
Location: Oulu, Finland
Posts: 162
Downloads: 368
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith View Post
You need to play with the Visual settings in data\cfg\Sensors.cfg:

;Visual.
Visual range factor=0.5 ;[>=0]
Visual fog factor=1 ;[>=0]
Visual light factor=1 ;[>=0]
Visual waves factor=0.8 ;[>=0]
Visual speed factor=0 ;[>=0]
Visual aspect=0.9 ;[>=0]
Visual enemy speed=0.2 ;[>=0]
Visual noise factor=0 ;[>=0]
Visual sensor height factor=0.5 ;[>=0]
Visual already tracking modifier=600 ;[detection probability modifier], most accurate, once a contact is detected it will lose it very hard
Visual decay time=250 ;[>0] already tracking bonus decay, in seconds
Visual uses crew efficiency=false ;[true or false]

Those highlighted in bold you should experiment with. To be honest I don't know what happens when you increase/decrease each value (I don't know the impact it has - does it make it more sensitive or less sensitive?) Experiment and let us know

Looks like irai already did:

;Submarine player sensors detection parameters

[SensorParameters]

;Visual.
Visual range factor=0.30 ;[>=0] was 0.5, decreased by 25%
Visual fog factor=0.75 ;[>=0]
Visual light factor=1 ;[>=0]
Visual waves factor=0.65 ;[>=0] was 0.8, decreased by 25%
Visual speed factor=0 ;[>=0]
Visual aspect=0.9 ;[>=0]
Visual enemy speed=0.2 ;[>=0]
Visual noise factor=0 ;[>=0]
Visual sensor height factor=0.5 ;[>=0]
Visual already tracking modifier=600 ;[detection probability modifier], most accurate, once a contact is detected it will lose it very hard
Visual decay time=250 ;[>0] already tracking bonus decay, in seconds
Visual uses crew efficiency=false ;[true or false]




Maybe it needs more tuning, must test my self

If numbers go down, will spotting distance go down or up ?
Haukka81 is offline   Reply With Quote
Old 07-30-12, 07:09 PM   #677
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

I have the complete collision routine and all it's subroutines mapped out and decoded Now I can really have some fun!

Let me pose this interesting question:

Given a zone (box) of a unit has an AP value of 100. The player fires a shell at the unit and hits said zone (box). The AP value of the shell is 10. By the game's calculations no damage is done to this zone (box). I would agree since it's AP value of 100 (100cm) protects against a shell with an AP value of 10 (10cm). But what if this shell impact stresses the zone (box) and degrades it some? Would this happen in real life?

If it would happen in real life then I could have the game 'roll' a % chance to see if the zone (box)'s AP value degrades. If the result of this is it does then come up with some formula to reduce the AP value of this zone (box).

This would only apply to the impact point and not to any adjacent zones (boxes). Thoughts

My creative mind is having a hay day right now. I see/know everything that goes on during a collision and I have the ability to make it do whatever I want it to do


A patch I think I'm going to release will add some 'variety' to the shell/torpedo collisions. If you look at the AmmoDamageInfo controller attached to a shell/torpedo you'll notice MinEF, MaxEF, AP, MinRadius, MaxRadius, etc. These are hard coded values - they do not change anytime a collision happens. It just doesn't seem right thinking about it in real life terms. Manufacturing tolerances and different qualities of materials in each batch of x weapon made will have different values of these parameters. Thus I'm going to have the game randomize these values to reflect this.
TheDarkWraith is offline   Reply With Quote
Old 07-30-12, 07:53 PM   #678
THE_MASK
Ace of the deep .
 
THE_MASK's Avatar
 
Join Date: Jan 2006
Posts: 9,226
Downloads: 901
Uploads: 73


Default

Does cargo type carried or cargo weight come into it . DisplacementVariation found in Silent Hunter 5\data\Sea\******\CFG

If other ships are nearby does chance of extinguishing fires increase ?

Time to extinguish fires would depend on size of zone box etc ?

"When the damaged hull allowed sufficient sea water to rapidly rush inside , the fires seemed to extinguish immediately " Is the zone box % underwater .

Throw this into the mix

Last edited by THE_MASK; 07-30-12 at 08:31 PM.
THE_MASK is offline   Reply With Quote
Old 07-30-12, 08:20 PM   #679
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by sober View Post
So if i hit a zone box with 100 AP with a torp of 10 AP then that should reduce the zone box a random % so that the box is now anywhere between 100 AP and 80 AP . A torp with 20 AP would reduce the box randomly from 100 AP to 60 AP . I just make the random damage double the torp AP .

Does cargo type carried or cargo weight come into it . DisplacementVariation found in Silent Hunter 5\data\Sea\******\CFG

If other ships are nearby does chance of extinguishing fires increase ?

Time to extinguish fires would depend on size of zone box etc ?

"When the damaged hull allowed sufficient sea water to rapidly rush inside , the fires seemed to extinguish immediately "
Regarding the AP: currently here's what the game does (we'll use a torpedo in this example):

torpedo hits ship. Game calculates damage that can be inflicted by torpedo. Subtracts this damage from ship's HPs. Now iterates over all boxes: is AP value of torpedo > AP value of box? If yes incur damage to box. If not check next box. If all boxes checked then done.

Now where in that routine does it decrease the AP value of the box? IT DOESN'T! So you're telling me that a box that just suffered a torpedo hit and incurred damage still has the same AP value? I don't think so. So here's what I'm adding: if box incurs damage from collision then calculate damage to AP also (formula yet to be determined) and update box's AP value to reflect lower value.

You have some great ideas there. Whether they can be implemented or not time will tell
TheDarkWraith is offline   Reply With Quote
Old 07-31-12, 12:34 AM   #680
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

version 1.0.48.0 released. See post #1

This version adds a new patch for SHCollisions.act. This new patch will reduce the AP of the zone (box) when it receives damage (applies to collateral damage also!). This new patch REQUIRES COLLATERAL DAMAGE PATCH TO BE ENABLED OR GAME WILL CTD!

The zone (box) has to incur damage in order for it's AP to be reduced (this means the AP value of the item impinging on the unit has to be higher than the AP of the zone (box) - i.e. a torpedo or (most) shell impacts or a DC)

Why is this AP value important? Because it plays a BIG factor in the amount of damage a zone (box) incurs. In a nutshell the AP of the zone (box) in subtracted from the AP of the item causing the damage, this value is then used in a formula to figure out the amount of HPs damage to the zone (box). Even though the zone (box) may be repaired eventually the next time it is subjected to damage it will incur more damage due to having a lower AP value (you'll notice this with your sub! Being depth charged now is a BAD move - even close bomb explosions from airplanes are not good!)

There is much room for improvement of this patch. This is the first version of it.

I'll add the randomization of the AmmoDamageInfo parameters tomorrow


Last edited by TheDarkWraith; 07-31-12 at 12:53 AM.
TheDarkWraith is offline   Reply With Quote
Old 07-31-12, 03:38 AM   #681
Trevally.
Navy Seal
 
Join Date: Apr 2007
Location: AN1536 (Orkney)
Posts: 5,451
Downloads: 166
Uploads: 28


Default

Thanks TDW - this sounds great

I had always ensured that when I fire torps at a ships - they would hit different parts - spread the damage.

With this - is it correct to think that placing a torp in the same hole as the one before will now do more damage

I will start testing shortly
__________________
Trevally Mods for SH5
Trevally. is offline   Reply With Quote
Old 07-31-12, 07:26 AM   #682
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

As far as I know, a shell inpacting on a metal plate would damage anyway its structure -no matter if shell's AP are lesser than box AP- by means of deformation and micro-creaks.

These factors would affect the armour level by decreasing it, and they should be cumulative with an exponential trend. In other words, the more stress a metal structure had previously suffered, the bigger the effect of further stresses, until the critical point is reached and a mechanical overload (sudden collapse of the structure) is occurring.

I suppose as well that any improvised damage repair could restore the original armour only in minimal part.
gap is offline   Reply With Quote
Old 07-31-12, 08:09 AM   #683
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Trevally. View Post
Thanks TDW - this sounds great

I had always ensured that when I fire torps at a ships - they would hit different parts - spread the damage.

With this - is it correct to think that placing a torp in the same hole as the one before will now do more damage
Yes it will. It will do considerably more damage.

One thing I have to add to the AP damage patch is damage to the unit's AP. If you look in the .zon file for the unit you'll see that it has an AP defined. This value is used when a zone (box) has an AP value < 0. When the zone (box) has AP value of < 0 the game takes the absolute value of the zone (box) AP and mutliplies the unit's AP value with it to get the zone (box)'s AP value. This unit AP value is also used when the shell/torpedo first impacts the unit. At first impact the game takes the AP value of the shell/torpedo and subtracts the unit's AP value from it and then uses this result in a formula to calculate the number of HPs to subtract from the unit. As you can see when the unit's AP value decreases the number of HPs sustained increases. Just as it should. I hope to add this to the AP patch today.

Quote:
Originally Posted by gap View Post
As far as I know, a shell inpacting on a metal plate would damage anyway its structure -no matter if shell's AP are lesser than box AP- by means of deformation and micro-creaks.

These factors would affect the armour level by decreasing it, and they should be cumulative with an exponential trend. In other words, the more stress a metal structure had previously suffered, the bigger the effect of further stresses, until the critical point is reached and a mechanical overload (sudden collapse of the structure) is occurring.
From what the service taught me about metallurgy I thought the same. I'll try and model this
TheDarkWraith is offline   Reply With Quote
Old 07-31-12, 04:01 PM   #684
Dogfish40
Ace of the Deep
 
Join Date: Sep 2010
Location: LA Area, Central coast, California
Posts: 1,023
Downloads: 827
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith View Post
Been doing a lot of travelling lately for work so I haven't had time to sit down in front on my main system and 'work'. To kill time on the airplanes I've been looking into the .exe and .act files for 'problems'. One thing that I had a hunch of being a problem was when a shell/torpedo impacted a unit the game was incorrectly calculating which zones (boxes) were affected. That hunch turns out to be correct - the game has a serious problem in this area.
In order to explain why we have to take two steps back and state one fundamental difference between SH5 and all the previous versions: The Granny file system. The Granny file system includes a unit of measure in the Art Tool Info of every GR2 file. This value let's the game know what the scaling factor is of the data it contains. For SH5 this scaling factor is 0.1 in every GR2 file (that I've looked at). This scaling factor seems to have caused much confusion to the programmers programming SH5.
After weeks of chasing down the routine that is called that calculates the distance from each zone (box) to the impact point I finally found it. The game calculates this distance and then compares this distance to the MinRadius and MaxRadius of the shell/torpedo that impacted the unit. There is a HUGE problem in a subroutine that is called from this routine. The subroutine iterates over every zone (box) and compares the distance from impact to it to the MaxRadius. If less than MaxRadius then game says no damage is done to that zone. Herein is the problem: the radius is unscaled, the MaxRadius is scaled (i.e. say distance calculated was 3.42 and MaxRadius was supposed to be 7.0 but the game is using 0.7 instead). Thus the game is not inflicting damage to nearby zones This explains why the ships do not list/sink like they should when hit by shells and torpedoes
The solution is easy: use the unscaled value for MaxRadius. The fix is not so easy as I have to find the pointer that points to this value. Once I find this pointer I'll be releasing another patch to fix this blaring oversight on the devs
Sorry for keeping the whole quote in but it was so interesting, I had to say, PLEASE TDW, for the love of... Keep us posted on any patch for this. It's another one that will really bring up the "real" factor in the game.
Cheers D40
__________________
Dogfish40
Dogfish40 is offline   Reply With Quote
Old 07-31-12, 04:17 PM   #685
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Dogfish40 View Post
Sorry for keeping the whole quote in but it was so interesting, I had to say, PLEASE TDW, for the love of... Keep us posted on any patch for this. It's another one that will really bring up the "real" factor in the game.
Cheers D40
I have the whole collision routine and it's supporting routines decoded. From those I can see everything that goes on during a collision. I'm now questioning my original evaluation of this. Even though I can see everything doesn't mean I understand the whys of it. Herein lies the problem:

the game calculates the distance from the zone (box) to the impact point. It then does a 'lazy' square root to get the square root of that distance. It then compares that result to the MinRadius and MaxRadius values. Now the MinRadius and MaxRadius values are scaled to game units (multiplied by 0.1 - i.e. MinRadius in sim file is 3 but in game it's 0.3). I can't for the life of me figure out why they are taking the square root of the distance
TheDarkWraith is offline   Reply With Quote
Old 07-31-12, 05:21 PM   #686
volodya61
Ocean Warrior
 
volodya61's Avatar
 
Join Date: Feb 2012
Location: Rostov-on-Don, local time GMT+4
Posts: 3,300
Downloads: 374
Uploads: 0


Default

Hi TDW!

The new Sub on bottom fix have a new third-party effect.
The sub is dive lower than required in the Uboat.cfg file..
For example:
PeriscopeDepth
in the file - 12m, when Sub on bottom fix enabled - 14m
SnorkelDepth
in the file - 14m, when Sub on bottom fix enabled - 16m
__________________
.
Where does human stupidity end?

.


El sueño de la razón produce monstruos © - and for some people awakening will be cruel
volodya61 is offline   Reply With Quote
Old 07-31-12, 06:01 PM   #687
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
I have the whole collision routine and it's supporting routines decoded. From those I can see everything that goes on during a collision. I'm now questioning my original evaluation of this. Even though I can see everything doesn't mean I understand the whys of it. Herein lies the problem:

the game calculates the distance from the zone (box) to the impact point. It then does a 'lazy' square root to get the square root of that distance. It then compares that result to the MinRadius and MaxRadius values. Now the MinRadius and MaxRadius values are scaled to game units (multiplied by 0.1 - i.e. MinRadius in sim file is 3 but in game it's 0.3). I can't for the life of me figure out why they are taking the square root of the distance
No idea

during this afternoon I've been playing with a possible simplified model for armour/damage.

Given AP(S): shell's armour points and AP(B0): box's starting armour points, both >= 0, box's armour points after shell's impact is calculated as follows:

AP(B1) = MAX [AP(B0)* [1 - [C1 * AP(S) / AP(B0)] ^ C2); 0]

where C1 and C2 are two arbitrary positive constants we can use for "finetuning" the formula. Specifically:

C1 is the lower AP(B0) / AP(S) ratio at wich a shell would be enough to wipe out boxe's armour points with one single inpact (graph's gradient when C2=1).

C2 is the "exponential factor" of the formula. 1 for a linear hits number / Box armour points graph.

Every time a shell inpacts a box, the game should update its armour points, and when they are zeroed the box should start taking damage.

I have prepared a spreadsheet for changing the above mentioned parameters and seeing how they would affect the exponential curve. If you want to have a glance at it, I've uploaded it here:

https://rapidshare.com/files/2103822...lculations.xls

Last edited by gap; 07-31-12 at 06:14 PM.
gap is offline   Reply With Quote
Old 07-31-12, 06:09 PM   #688
SilentOtto
Engineer
 
Join Date: Mar 2002
Location: BF79
Posts: 209
Downloads: 71
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith View Post
I have the whole collision routine and it's supporting routines decoded. From those I can see everything that goes on during a collision. I'm now questioning my original evaluation of this. Even though I can see everything doesn't mean I understand the whys of it. Herein lies the problem:

the game calculates the distance from the zone (box) to the impact point. It then does a 'lazy' square root to get the square root of that distance. It then compares that result to the MinRadius and MaxRadius values. Now the MinRadius and MaxRadius values are scaled to game units (multiplied by 0.1 - i.e. MinRadius in sim file is 3 but in game it's 0.3). I can't for the life of me figure out why they are taking the square root of the distance
Hey TDW, this intrigued me (love numbers too!) so I did some magic googling and came out with something called Square Root Scaled Distance, related to... guess what? BLASTING! I found some formulae and long readings, but it seems on first read that it's used in blasting calculations, mining, etc. So it looks like that's the reason for the scaled distances and the sqr! Seems like blast effects diminish with sqr of distance, didn't get to the part of why the scaled distance but there it is!

These are a few examples of what I found, it's a bit late here, I can give it a second look tomorrow.

http://www.iseegoldenwest.org/tech.htm

http://www.sustainableaggregates.com...gandenergy.htm

http://www.sustainableaggregates.com...itoring_p2.htm
SilentOtto is offline   Reply With Quote
Old 07-31-12, 06:18 PM   #689
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
No idea

during this afternoon I've been playing with a possible simplified model for armour/damage.

Given AP(S): shell's armour points and AP(B0): box's starting armour points, both >= 0, box's armour points after shell's impact is calculated as follows:

AP(B1) = MAX [AP(B0)* [1 - [C1 * AP(S) / AP(B0)] ^ C2); 0]

where C1 and C2 are two arbitrary positive constants we can use for "finetuning" the formula. Specifically:

C1 is the lower AP(B0) / AP(S) ratio at wich a shell would be enough to wipe out boxe's armour points with one single inpact (graph's gradient when C2=1).

C2 is the "exponential factor" of the formula. 1 for a linear hits number / Box armour points graph.

Every time a shell inpacts a box, the game should update its armour points, and when they are zeroed the box should start taking damage.

I have prepared a spreadsheet for changing the above mentioned parameters and seeing how they would affect the exponential curve. If you want to have a glance at it, I've uploaded it here:

https://rapidshare.com/files/2103822...lculations.xls
gotta love math and numbers I'll post the whole damage equation that SH5 is using here soon so you can see what they are doing

Quote:
Originally Posted by SilentOtto View Post
Hey TDW, this intrigued me (love numbers too!) so I did some magic googling and came out with something called Square Root Scaled Distance, related to... guess what? BLASTING! I found some formulae and long readings, but it seems on first read that it's used in blasting calculations, mining, etc. So it looks like that's the reason for the scaled distances and the sqr! Seems like blast effects diminish with sqr of distance, didn't get to the part of why the scaled distance but there it is!

These are a few examples of what I found, it's a bit late here, I can give it a second look tomorrow.

http://www.iseegoldenwest.org/tech.htm

http://www.sustainableaggregates.com...gandenergy.htm

http://www.sustainableaggregates.com...itoring_p2.htm
Interesting Will have to read over and see if it applies

On another note I found the main rendering loop in the exe file. I'm making a 'Render' patch that will allow you to:
- remove posteffects
- remove water droplets effects
- remove water leaks effects

These would mainly be used for troubleshooting but Sober may have an interest in the water droplets one. Maybe it will cure his smoke problem If it does it will be some good feedback so I can poke around more in PostEffects act file and maybe see why.
TheDarkWraith is offline   Reply With Quote
Old 07-31-12, 06:32 PM   #690
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

v1.0.49.0 released. See post #1

This adds a new patch to SH5.exe that allows certain items from ever being rendered in the game.

@Sober - try enabling the water droplets one and see if your smoke problem stops

TheDarkWraith 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 07:37 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.