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 02-16-14, 04:17 PM   #2851
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by sober View Post
Works .
Excellent

Don't blame me now for all the external cam time you will be racking up watching air-to-air combat
TheDarkWraith is offline   Reply With Quote
Old 02-16-14, 04:41 PM   #2852
THE_MASK
Ace of the deep .
 
THE_MASK's Avatar
 
Join Date: Jan 2006
Posts: 9,226
Downloads: 901
Uploads: 73


Default

Quote:
Originally Posted by TheDarkWraith View Post
Excellent

Don't blame me now for all the external cam time you will be racking up watching air-to-air combat
External camera
THE_MASK is offline   Reply With Quote
Old 02-16-14, 07:22 PM   #2853
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Fixed the coastal defenses not being able to track contacts. Now they can track a contact and IF they have a radio (they need zones! They have no .zon file) they can inform other units of their sighting. They are still unable to fire any weapons though.

At least they have some use for now in detecting contacts and informing other units of their contact Trying to get them to fire guns still...
TheDarkWraith is offline   Reply With Quote
Old 02-17-14, 12:18 PM   #2854
Silent Steel
Sea Lord
 
Join Date: Jun 2008
Location: Noch dabei
Posts: 1,732
Downloads: 618
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith View Post
Fixed the coastal defenses not being able to track contacts. Now they can track a contact...

Excellent!!!
Thanks TDW
Silent Steel is offline   Reply With Quote
Old 02-17-14, 02:01 PM   #2855
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Working on the coastal defenses and noticed that my new code that forces units to use their radio doesn't work for the coastal defenses because one of their pointers is null (DamageEffects pointer). Thus I'm revising this bit of code so that if this pointer is null it will say the unit has a radio (thus can receive/transmit). This will be in upcoming new version of Generic Patcher.

Somehow I totally overlooked something in the existing game code that 'gives' the new contact detected by a unit to other units The existing game code only 'gives' the unit detected to other units that:
1) do not currently have a contact
2) is a type of destroyer

#2 above is the kicker I overlooked! I wondered why sometimes when an enemy aircraft was near but heading away from me and a ship unit detected me the aircraft never came and investigated. Now I know why I'm going to change the existing game code so that ANY unit can receive the new contact if it has no contact currently. The patch for this will be placed in the Experimental category until it's tested by many for any ill effects. Once it has been verified to give no ill effects I'll move it out of the Experimental category.
TheDarkWraith is offline   Reply With Quote
Old 02-17-14, 03:22 PM   #2856
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
Fixed the coastal defenses not being able to track contacts. Now they can track a contact and IF they have a radio (they need zones! They have no .zon file) they can inform other units of their sighting. They are still unable to fire any weapons though.

At least they have some use for now in detecting contacts and informing other units of their contact Trying to get them to fire guns still...


Hope you find a way to fix the jammed coastal artillery and, please, don't forget the catapult-launched search planes idea


Quote:
Originally Posted by TheDarkWraith View Post
Somehow I totally overlooked something in the existing game code that 'gives' the new contact detected by a unit to other units

...

I'm going to change the existing game code so that ANY unit can receive the new contact if it has no contact currently.
Does it include merchants? Them adopting evasive maneuvers if radioed about enemy presence, would be so cool
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 02-17-14, 05:08 PM   #2857
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
Hope you find a way to fix the jammed coastal artillery...
Let's discuss why the coastal defenses, in stock game form, are not able to track targets. They first have to track targets before they can engage them. I've found two 'problems' with how the game engine handles coastal defenses:
1) how the game engine places the coastal defense in 3D space
2) how the game engine tests to see if unit is able to track targets

For #1 because of how the game engine places coastal defenses in 3D space one part of them always ends up being below the maximum depth for location. When this happens it's an automatic 0 for number of targets unit has detected. Piss poor coding on devs

For #2 the game engine only lets certain units track targets. Coastal defenses are not one of them. Once again piss poor coding by devs

I have devised patches to correct #1 and #2 above so coastal defenses can track units.

Now since the patches allow the coastal defenses to track units they should be able to engage them correct? The answer would be yes but sadly, they do not I haven't figured out why yet but I'm fairly certain that #2 is being applied when the game engine checks if unit can fire weapons against a contact. I'm still searching for the code that handles this.

So aggravating to see such piss poor quality control in this game. One would say don't blame the devs but rather blame the management. In this instance this is just total piss poor coding by the devs with total lack of QC on the code
TheDarkWraith is offline   Reply With Quote
Old 02-17-14, 10:59 PM   #2858
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Working on new version of Generic Patcher. Here's what is currently involved in new version:

- The patch for artillery (coastal defenses) and anti-aircraft units that allows them to acquire and track contacts is complete and works as designed. If they detect any contacts they will advise other units via radio

- Revised the units must use radio patch so that it takes into account the null pointer of the coastal defenses (thus coastal defenses have a radio and can use it to inform other units of it's contact). Also fixed bug in not all units being checked to see if they have a radio and can use it.

Noticed some strange behavior of AI and am currently investigating why something happened It deals with a ship that got a contact via radio from a coastal defense unit. The ship was NE of the contact about 21km away from it and around the side of an island. While attempting to come around the side of the island it (ship) beached itself and got stuck in the shallow water
TheDarkWraith is offline   Reply With Quote
Old 02-17-14, 11:08 PM   #2859
THE_MASK
Ace of the deep .
 
THE_MASK's Avatar
 
Join Date: Jan 2006
Posts: 9,226
Downloads: 901
Uploads: 73


Default

Quote:
Originally Posted by TheDarkWraith View Post
Working on new version of Generic Patcher. Here's what is currently involved in new version:

- The patch for artillery (coastal defenses) and anti-aircraft units that allows them to acquire and track contacts is complete and works as designed. If they detect any contacts they will advise other units via radio

- Revised the units must use radio patch so that it takes into account the null pointer of the coastal defenses (thus coastal defenses have a radio and can use it to inform other units of it's contact). Also fixed bug in not all units being checked to see if they have a radio and can use it.

Noticed some strange behavior of AI and am currently investigating why something happened It deals with a ship that got a contact via radio from a coastal defense unit. The ship was NE of the contact about 21km away from it and around the side of an island. While attempting to come around the side of the island it (ship) beached itself and got stuck in the shallow water
Wouldn't that just be the ship following node path which just happens to cover shallow water . Wouldn't moving the node path fix it ? I notice that in the single mission against all odds the 2 DDs 9 times out of 10 hang a left and ground themselves .
THE_MASK is offline   Reply With Quote
Old 02-18-14, 01:51 PM   #2860
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Some good news related to coastal defenses guns: I found where in the code it deals with weapons, specifically guns Now I just have to map out the weapons controller and learn how to use it and should be able to get the coastal guns to fire it's guns.

The other good news is that the game recognizes the coastal defense's weapon controller defined in it's sim file. I saw the game check that controller for something and it failed the check as it immediately returned from the function. Once I learn how the weapons controller works and I map it out I should be able to make some sense out of why the coastal gun's weapon controller is 'failing' whatever check it's doing.

@sober - not sure if it's path related or what. It looks like IRAI is part of the problem also I really need to find the AI collision routines in the code so I can see how/when the game determines a unit is about to collide with land.
TheDarkWraith is offline   Reply With Quote
Old 02-18-14, 02:07 PM   #2861
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
Some good news related to coastal defenses guns: I found where in the code it deals with weapons, specifically guns Now I just have to map out the weapons controller and learn how to use it and should be able to get the coastal guns to fire it's guns.

The other good news is that the game recognizes the coastal defense's weapon controller defined in it's sim file. I saw the game check that controller for something and it failed the check as it immediately returned from the function. Once I learn how the weapons controller works and I map it out I should be able to make some sense out of why the coastal gun's weapon controller is 'failing' whatever check it's doing.


Quote:
Originally Posted by TheDarkWraith View Post
@sober - not sure if it's path related or what. It looks like IRAI is part of the problem also I really need to find the AI collision routines in the code so I can see how/when the game determines a unit is about to collide with land.
Possible that the coastal guns are radioing their own position (rather than enemy position), thus inducing warship reinforcements to run aground?
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 02-18-14, 02:17 PM   #2862
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
Possible that the coastal guns are radioing their own position (rather than enemy position), thus inducing warship reinforcements to run aground?
Nope. When the coastal gun radioed it's contact to the ship the ship received the same contact and set course for that contact. The problem is it has to go around some land to get to the contact and instead of going around it it runs itself into shallow water and then stops and just sits there Like the scapa flow problem with the PT boats at times...
TheDarkWraith is offline   Reply With Quote
Old 02-18-14, 07:02 PM   #2863
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

digging around in the SHSim.act file again I've found the function that checks to see if the contact detected pointer is not a null pointer and if so then iterate over all the equipment defined in the unit's .eqp file and update them (one of these updates turns the weapons on).

Getting close to figuring out why the coastal guns do not track and fire their cannon at contacts
TheDarkWraith is offline   Reply With Quote
Old 02-18-14, 07:19 PM   #2864
Mikemike47
Grey Wolf
 
Join Date: Sep 2006
Location: NY
Posts: 994
Downloads: 1078
Uploads: 6
Default

Quote:
Originally Posted by TheDarkWraith View Post
Nope. When the coastal gun radioed it's contact to the ship the ship received the same contact and set course for that contact. The problem is it has to go around some land to get to the contact and instead of going around it it runs itself into shallow water and then stops and just sits there
Interesting when guns are not around and/or radio communications is not included in the equation, that merchant ships go around the shallow waters.....darn nodes or lack of nodes like sober said in single mission and dd.

Quote:
Originally Posted by TheDarkWraith View Post
Getting close to figuring out why the coastal guns do not track and fire their cannon at contacts
Good to hear. Thanks again, and all others that have submitted info to TDW, to make this game work right.

See this Open Horizons post, too, since you mentioned IRAI may be part of problem in this thread at post #2864.

P.S. I added comments on last 2-3 pages of Multiple UIs thread. Start at posts #11051 or newer when time permits please.
Mikemike47 is offline   Reply With Quote
Old 02-18-14, 07:20 PM   #2865
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
Nope. When the coastal gun radioed it's contact to the ship the ship received the same contact and set course for that contact. The problem is it has to go around some land to get to the contact and instead of going around it it runs itself into shallow water and then stops and just sits there Like the scapa flow problem with the PT boats at times...
Is there a special routine telling sea units that they must reach a point on map by following the campaign nodes? Thinking out loud, your code might be bypassing it

Quote:
Originally Posted by TheDarkWraith View Post
digging around in the SHSim.act file again I've found the function that checks to see if the contact detected pointer is not a null pointer and if so then iterate over all the equipment defined in the unit's .eqp file and update them (one of these updates turns the weapons on).
Probably not relevant, but under this respect coastal artillery is more similar to aircraft than it is to sea units: I am sure you are aware that their cannon controller is directly linked to the main model (through sim file indeed), rather than to an external gun equipment.
__________________
_____________________
|May the Force be with you!|
...\/
gap 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:26 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.