SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
02-16-14, 04:17 PM | #2851 |
Black Magic
|
|
02-16-14, 04:41 PM | #2852 |
Ace of the deep .
|
|
02-16-14, 07:22 PM | #2853 |
Black Magic
|
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... |
02-17-14, 12:18 PM | #2854 |
Sea Lord
Join Date: Jun 2008
Location: Noch dabei
Posts: 1,732
Downloads: 618
Uploads: 0
|
|
02-17-14, 02:01 PM | #2855 |
Black Magic
|
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. |
02-17-14, 03:22 PM | #2856 | |
Navy Seal
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
|
Quote:
Hope you find a way to fix the jammed coastal artillery and, please, don't forget the catapult-launched search planes idea Does it include merchants? Them adopting evasive maneuvers if radioed about enemy presence, would be so cool |
|
02-17-14, 05:08 PM | #2857 |
Black Magic
|
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 |
02-17-14, 10:59 PM | #2858 |
Black Magic
|
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 |
02-17-14, 11:08 PM | #2859 | |
Ace of the deep .
|
Quote:
|
|
02-18-14, 01:51 PM | #2860 |
Black Magic
|
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. |
02-18-14, 02:07 PM | #2861 | |
Navy Seal
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
|
Quote:
Possible that the coastal guns are radioing their own position (rather than enemy position), thus inducing warship reinforcements to run aground? |
|
02-18-14, 02:17 PM | #2862 |
Black Magic
|
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...
|
02-18-14, 07:02 PM | #2863 |
Black Magic
|
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 |
02-18-14, 07:19 PM | #2864 | ||
Grey Wolf
Join Date: Sep 2006
Location: NY
Posts: 994
Downloads: 1078
Uploads: 6
|
Quote:
Quote:
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.
__________________
JSGME help links and common error solutions |
||
02-18-14, 07:20 PM | #2865 | ||
Navy Seal
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
|
Quote:
Quote:
|
||
|
|