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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 07-27-12, 03:01 PM   #11
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
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
 

Thread Tools
Display Modes

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 04:18 PM.


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