![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
![]() |
#646 |
Black Magic
![]() |
![]()
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 ![]() ![]() 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 ![]() |
![]() |
![]() |
![]() |
#647 |
Navy Seal
![]() Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
|
![]()
Brilliant find TDW
![]() Please keep us informed on any progress you will be doing on this matter! |
![]() |
![]() |
![]() |
#648 |
中国水兵
![]() Join Date: Jul 2011
Posts: 278
Downloads: 941
Uploads: 0
|
![]()
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. |
![]() |
![]() |
![]() |
#649 | |
Seasoned Skipper
![]() Join Date: Mar 2010
Location: Berlin, Germany
Posts: 718
Downloads: 575
Uploads: 0
|
![]() Quote:
![]() |
|
![]() |
![]() |
![]() |
#650 |
Captain
![]() Join Date: May 2011
Posts: 489
Downloads: 106
Uploads: 0
|
![]()
Thank you for your hard work, TDW!
![]() |
![]() |
![]() |
![]() |
#651 |
中国水兵
![]() Join Date: Mar 2005
Location: Basque Country
Posts: 284
Downloads: 365
Uploads: 0
|
![]()
Yes, thank you very much !!
We really appreciate your work !! ![]() Txema |
![]() |
![]() |
![]() |
#652 |
Sailor man
![]() Join Date: Jun 2007
Location: Chicago, Illinois, USA
Posts: 46
Downloads: 1457
Uploads: 0
|
![]()
Here, here!
|
![]() |
![]() |
![]() |
#653 |
Navy Dude
![]() Join Date: Feb 2010
Posts: 178
Downloads: 127
Uploads: 0
|
![]()
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 |
![]() |
![]() |
![]() |
#654 |
The Old Man
![]() |
![]()
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.
|
![]() |
![]() |
![]() |
#655 |
Navy Dude
![]() Join Date: Feb 2010
Posts: 178
Downloads: 127
Uploads: 0
|
![]()
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.
|
![]() |
![]() |
![]() |
#656 |
Black Magic
![]() |
![]() |
![]() |
![]() |
![]() |
#657 |
Black Magic
![]() |
![]()
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
![]() ![]() |
![]() |
![]() |
![]() |
#658 |
Black Magic
![]() |
![]()
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. |
![]() |
![]() |
![]() |
#659 |
Ace of the deep .
|
![]()
I just had to read this 3X to believe what i was reading , fantastic
![]() |
![]() |
![]() |
![]() |
#660 |
Ocean Warrior
![]() |
![]()
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 |
![]() |
![]() |
![]() |
|
|