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-27-12, 03:01 PM   #646
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

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
TheDarkWraith is offline   Reply With Quote
Old 07-27-12, 03:48 PM   #647
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Brilliant find TDW
Please keep us informed on any progress you will be doing on this matter!
gap is offline   Reply With Quote
Old 07-27-12, 05:02 PM   #648
quink99
中国水兵
 
Join Date: Jul 2011
Posts: 278
Downloads: 941
Uploads: 0
Default

Everytime I think I've just flat run out of amazement you do it again TDW! Will wonders never cease.

I'm sure everyone joins me in offering our sincere thanks for this find as well as all your other matchless contributions to SH5.
quink99 is offline   Reply With Quote
Old 07-27-12, 05:10 PM   #649
Echolot
Seasoned Skipper
 
Join Date: Mar 2010
Location: Berlin, Germany
Posts: 718
Downloads: 567
Uploads: 0
Default

Quote:
I'm sure everyone joins me in offering our sincere thanks for this find as well as all your other matchless contributions to SH5.
Echolot is offline   Reply With Quote
Old 07-27-12, 05:32 PM   #650
Sartoris
Captain
 
Join Date: May 2011
Posts: 489
Downloads: 106
Uploads: 0
Default

Thank you for your hard work, TDW!
Sartoris is offline   Reply With Quote
Old 07-28-12, 12:08 PM   #651
Txema
中国水兵
 
Join Date: Mar 2005
Location: Basque Country
Posts: 284
Downloads: 365
Uploads: 0
Default

Yes, thank you very much !!

We really appreciate your work !!



Txema
Txema is offline   Reply With Quote
Old 07-28-12, 05:29 PM   #652
Scurvy Dog
Sailor man
 
Join Date: Jun 2007
Location: Chicago, Illinois, USA
Posts: 46
Downloads: 1457
Uploads: 0
Default

Here, here!
Scurvy Dog is offline   Reply With Quote
Old 07-28-12, 09:57 PM   #653
sirbum69
Navy Dude
 
Join Date: Feb 2010
Posts: 178
Downloads: 127
Uploads: 0
Default

So is it possible to use the new sonar man fix patch with your no sonar above water mod. I really hate the fact that he calls out things now while i am on the surface.

Of course i can live with it, if it means he will actully call something out now
sirbum69 is offline   Reply With Quote
Old 07-28-12, 10:02 PM   #654
TheBeast
The Old Man
 
Join Date: Jan 2010
Location: Lynnwood, WA
Posts: 1,533
Downloads: 876
Uploads: 23


Default

Quote:
Originally Posted by sirbum69 View Post
So is it possible to use the new sonar man fix patch with your no sonar above water mod. I really hate the fact that he calls out things now while i am on the surface.

Of course i can live with it, if it means he will actully call something out now
Should work fine. The Sonar Man Fix is in the SH5.exe file. The No Sonar on Surface MOD is in the UBoot_Sensors.sim file.
__________________
Fear me! I am, TheBeastBelow

SHIV-MediaFire | SHV-MediaFire
TheBeast is offline   Reply With Quote
Old 07-29-12, 12:31 PM   #655
sirbum69
Navy Dude
 
Join Date: Feb 2010
Posts: 178
Downloads: 127
Uploads: 0
Default

i thought i read in the post in the other fourm that people had to disable that mod tho. Which is why i was asking if it would be possible to get it to work sometime.
sirbum69 is offline   Reply With Quote
Old 07-29-12, 01:56 PM   #656
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by sirbum69 View Post
i thought i read in the post in the other fourm that people had to disable that mod tho. Which is why i was asking if it would be possible to get it to work sometime.
should be no problem enabling the no hydro on surface mod with the crew wakeup patch
TheDarkWraith is offline   Reply With Quote
Old 07-29-12, 02:43 PM   #657
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

I found this interesting: the game determines the maximum depth for each unit based on it's location. It samples 4 different areas to determine the maximum depth for the unit's location. This maxiumum depth is NOT the depth at which the terrain is rendered though If I let the unit descend to the maximum depth it can bump into the terrain even though the terrain is not really there
TheDarkWraith is offline   Reply With Quote
Old 07-30-12, 01:51 AM   #658
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

v1.0.47.0 released. See post #1

Adds a new version of sub on the bottom
Adds a new patch called Collateral Damage (SHCollisions.act). This patch works like this:
when a unit (even player's sub!) experiences a collision with anything the game will determine the distance from impact to each zone (box). If the distance is <= MaxRadius of the item impacting the unit then damage is incurred to that zone (box). If distance is > MaxRadius of the item impacting the unit then a random number is 'rolled'. If the random number is <= 10.0 then that zone (box) receives collateral damage (the amount of damage is dependent upon another random number and a formula involving distance)

Why collateral damage? It really irked me how the damage was being calculated for a unit when say a torpedo impacted it. The game never took into account that maybe steam pipes ruptured in another compartment (zone) that causes a fire or the thickness of the metal in a compartment was severely rusted and degraded and thus ruptured from the shaking of the ship due to impact, etc. etc. You can think of many things that would be collateral damage when something gets hit HARD. So what can cause collateral damage? ANYTHING. Torpedo hit, shell hit, colliding with land, ocean bottom, another unit, pieces of the unit hitting it (mast breaks and falls on unit)

This is the first version of this. I have plans to further enhance it in the future.

The sub on the bottom fix allows the sub to descend to the maximum depth calculated by the game for the sub's current position. It doesn't mean the sub will 'sit on the bottom' graphically necessarily. It all depends on the surrounding terrain. It's complicated how the game determines max depth for unit's current position (in a nutshell it takes the average from 4 places).


Last edited by TheDarkWraith; 07-30-12 at 02:33 AM.
TheDarkWraith is offline   Reply With Quote
Old 07-30-12, 06:38 AM   #659
THE_MASK
Ace of the deep .
 
THE_MASK's Avatar
 
Join Date: Jan 2006
Posts: 9,226
Downloads: 901
Uploads: 73


Default

I just had to read this 3X to believe what i was reading , fantastic
THE_MASK is offline   Reply With Quote
Old 07-30-12, 07:03 AM   #660
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

Thanks TDW!
That's great!
__________________
.
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
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 03:05 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.