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-17-14, 06:47 PM   #1
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
If an unit can detect more than one target with its sensor, how will it decide which one to attack? The closest one maybe? Any idea?
The one with the highest signal strength (not necessarily the closest one either)

Quote:
Originally Posted by gap View Post
On an unrelated note: there's something I always wanted to ask you, but I never did. Let's say that (while using your ship radio patch) our u-boat is detected by a radio-equipped unit, and that it calls in for reinforcements. I already know that assisting units, on turn, must have fuctional radio equipment and they must be within a "Lost contact" travel time (at their max speed) for them to react. But what if there is an airfield/carrier in the vicinity? Do aircraft spawn from them based on "lost contact time", or rather they max range is taken into account (or both of them)?
My patch says if unit detects contact then set the check airstrike timer to 1 (thus will cause check for airstrikes on next game loop iteration). When the game checks for airstrikes it will iterate over all the game units and if any game unit has the current game unit as a contact then the game will see if it can launch an airstrike on that game unit. So the game takes the max range of the airbase or carrier into account.
TheDarkWraith is offline   Reply With Quote
Old 02-17-14, 07:11 PM   #2
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
The one with the highest signal strength (not necessarily the closest one either)
I see. So for aircraft to "see" their attackers and return fire, we should at least give them a visual range as wide as the train/elevation of their turrets.

One last question (sorry for bothering you with so many questions at once ). Do you think it possible to give an unit more than a visual sensor, and to link some of its sensors to the barrels of its guns? This way aircraft would always look at the direction their guns are currently pointing to (+/- sensor's range in degrees), and if a turret is destroyed, the plane will become blind at some angles

Quote:
Originally Posted by TheDarkWraith View Post
So the game takes the max range of the airbase or carrier into account.
Is it the max range of its/her aircraft? (to the best of my knowledge airbases and carriers don't have any range setting).
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 02-17-14, 08:03 PM   #3
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
I see. So for aircraft to "see" their attackers and return fire, we should at least give them a visual range as wide as the train/elevation of their turrets.

One last question (sorry for bothering you with so many questions at once ). Do you think it possible to give an unit more than a visual sensor, and to link some of its sensors to the barrels of its guns? This way aircraft would always look at the direction their guns are currently pointing to (+/- sensor's range in degrees), and if a turret is destroyed, the plane will become blind at some angles

Is it the max range of its/her aircraft? (to the best of my knowledge airbases and carriers don't have any range setting).
The AI_Visual sensor and my AI_Visual sensor in my uboat_sensors file covers a sphere as large as the max range. Think of the max range of a visual sensor as the radius of a sphere. Wherever that sensor is located on the object defines that center of that sphere. This assumes the min and max elevations are set to a maximum value.

You can define certain bearings that the sensor can only 'see'. It's a property of the sensor (SensitivitySectors).

The game iterates over a maximum of 16 sensors for each unit object. Whether you can define more than one type of sensor (visual, radar, etc.) for each unit object I'm not sure. I'd have to watch it in debugger to see if game recognized more than 1 type of certain sensor per unit object. Same goes for attaching sensors to gun barrels and such.

Max range of the aircraft stationed at the airbase/carrier.
TheDarkWraith is offline   Reply With Quote
Old 02-17-14, 08:14 PM   #4
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

I just discovered I have an error in my units must use radio patch. It's not an error per se but rather almost all units are not being checked as to whether they can receive radio

I just learned a whole lot about how game deals with contacts today. Let's say unit detects a new contact with it's sensors. If unit previously had no contact detected then the game engine will iterate over all the game units defined to give ONE of them that is the same side (axis, allies, or neutral) the same contact (it's actually the first one it finds in the list). Note I said ONE of them. I thought it iterated over all and gave all with the same side the contact but I was wrong.

If the iterated unit receiving the contact is game unit type <= 4 or a 10 or a 11 then it's radio was being checked else it's radio is NOT being checked. I am updating the units must use radio patch to correct this.

I'm also developing a way to have the game engine while iterating over all the game units for the same side to give each one of them the contact instead of giving it to only one (the first one it finds).
TheDarkWraith is offline   Reply With Quote
Old 02-17-14, 08:44 PM   #5
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
Let's say unit detects a new contact with it's sensors. If unit previously had no contact detected then the game engine will iterate over all the game units defined to give ONE of them that is the same side (axis, allies, or neutral) the same contact (it's actually the first one it finds in the list)

...

If the iterated unit receiving the contact is game unit type <= 4 or a 10 or a 11 then it's radio was being checked else it's radio is NOT being checked. I am updating the units must use radio patch to correct this.

I'm also developing a way to have the game engine while iterating over all the game units for the same side to give each one of them the contact instead of giving it to only one (the first one it finds).
Well spotted! I suppose that fixing that, would drastically increase the difficulty in game. I wonder what devs had in mind
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 02-17-14, 09:48 PM   #6
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
Well spotted! I suppose that fixing that, would drastically increase the difficulty in game. I wonder what devs had in mind
I constantly ask myself that same question as I'm looking over the code in the debugger
TheDarkWraith is offline   Reply With Quote
Old 02-17-14, 09:57 PM   #7
THE_MASK
Ace of the deep .
 
THE_MASK's Avatar
 
Join Date: Jan 2006
Posts: 9,153
Downloads: 901
Uploads: 73


Default

Quote:
Originally Posted by TheDarkWraith View Post
I constantly ask myself that same question as I'm looking over the code in the debugger
I guess the dev team didn't have the resources or time to finish the game by some deadline . Last ditch effort gave us some limited modding tools . Still the best submarine game now
THE_MASK is offline   Reply With Quote
Old 02-17-14, 08:34 PM   #8
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
The AI_Visual sensor and my AI_Visual sensor in my uboat_sensors file covers a sphere as large as the max range. Think of the max range of a visual sensor as the radius of a sphere. Wherever that sensor is located on the object defines that center of that sphere. This assumes the min and max elevations are set to a maximum value.

You can define certain bearings that the sensor can only 'see'. It's a property of the sensor (SensitivitySectors).
Yep, I know. You can even set a sensitivity factor for each arc. This is of little use for ship visual sensors: with many watchmen supposedly on deck, and looking at every direction at any given time, your 360x360 deg AI_visual is fairly suited to surface units. Nonetheless, detection arc settings have (at least in theory) an interesting application with aircraft, whose visual awareness should be limited by the cramped space onboard, and by the exiguous crew complement. If possible, my idea was to equip planes with a visual sensor for each crewman (each sensor with a limited detection arc, and reduced sensitivity at its extreme ends). If the sensors are linked to objects with indivdual damage boxes, destroying the box would "kill" the virtual watchman connected with it, thus reducing airplane's visual

There is a "but" though. If, during an air-to-air or or air-to-sea angagement, a plane with partial visual coverage temporarily loses contact with her current target (due to a sharp turn, for instance), will she forget about the opponent?

Quote:
Originally Posted by TheDarkWraith View Post
The game iterates over a maximum of 16 sensors for each unit object.
Good to know

Quote:
Originally Posted by TheDarkWraith View Post
Whether you can define more than one type of sensor (visual, radar, etc.) for each unit object I'm not sure. I'd have to watch it in debugger to see if game recognized more than 1 type of certain sensor per unit object. Same goes for attaching sensors to gun barrels and such.
Could you please check it?
__________________
_____________________
|May the Force be with you!|
...\/

Last edited by gap; 02-17-14 at 09:06 PM.
gap is offline   Reply With Quote
Old 02-18-14, 06:42 AM   #9
Tonci87
Samurai Navy
 
Join Date: Jun 2012
Posts: 590
Downloads: 119
Uploads: 0


Default

Quote:
Originally Posted by gap View Post
Yep, I know. You can even set a sensitivity factor for each arc. This is of little use for ship visual sensors: with many watchmen supposedly on deck, and looking at every direction at any given time, your 360x360 deg AI_visual is fairly suited to surface units.
That is kind of wrong. Think about nighttime engagements and searchlights. Naturally they should have a very high sensitivity inside the area the searchlight illuminates.
Tonci87 is offline   Reply With Quote
Old 02-18-14, 07:20 AM   #10
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Tonci87 View Post
That is kind of wrong. Think about nighttime engagements and searchlights. Naturally they should have a very high sensitivity inside the area the searchlight illuminates.
They do indeed, but I am probably missing your point. What is wrong in the statement you quoted?
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 02-19-14, 10:29 AM   #11
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
Default

@ TDW

as already pointed by Trevally, have you already seen the following IRAI-related posts by Serge65?

Quote:
Originally Posted by Serge65 View Post
If the tanker is stalking you, change: data\Scripts\AI\Ship-Waypoint

strategy WaypointsCNFW(Ship)
precond
{
!Ship:CanFollowWaypoint()
}
action
{
Ship:Goto(0.7,false); ----> Ship:Goto(0.7,true);
Ship:SetThrottle(0.7);
}
}

and everything will be fine!
Quote:
Originally Posted by Serge65 View Post
By the way, found another bug. In my game, when resupply, there was not a tanker, there was a submarine (7C_AI). She was not rammed me, she ran and I could not catch up. In Sub-Navigate.aix file, in sub-strategies NavigateCNFPNEP, need to change the line: Sub Dive(0.0, false) to Ship: Goto (0.7, true). (In IRAI_0_0_41 it is associated with sub-attack.aix file and I do not know how it will work).

QUOTE - # have ship zig-zag it's course. Yes, I know, but without waypoints - it circulation.

NOTE: My little fix "For IRAI" is now fully compatible with IRAI_0_0_41.
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 02-20-14, 07:54 AM   #12
GaetVa
Watch
 
Join Date: Aug 2013
Posts: 23
Downloads: 82
Uploads: 0
Default

Hello,

Perhaps someone can answer my question. It seems that IRAI is running
only if the player is sub is not far away ennemies units. I mean, if
the player is sub is for instance at a distance of 200 km of 2 Taks forces
(which are ennemies), this 2 taks forces, even if they are closed themselves.

I make the test in the wolfpack mission, if i put my submarine at a distance of 200 km for instance, nothing happens between the merchant and the submarines, if i let my submarine closed enough, the combat arises.

Is there a solution for this ?
GaetVa is offline   Reply With Quote
Old 02-20-14, 10:11 AM   #13
GaetVa
Watch
 
Join Date: Aug 2013
Posts: 23
Downloads: 82
Uploads: 0
Default

Just to precise, to verify it, i created a trigger for the merchants classes destroyed and an event of this trigger sending a message when the merchant class is destroyed.

So when i am closed to the submarines / merchants, i received message, if i am far away from submarines / merchants, i have no message, so i presume it happen nothing if the player submarine is at a long range from the IA units.
GaetVa is offline   Reply With Quote
Old 02-20-14, 10:17 AM   #14
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by GaetVa View Post
Hello,

Perhaps someone can answer my question. It seems that IRAI is running
only if the player is sub is not far away ennemies units. I mean, if
the player is sub is for instance at a distance of 200 km of 2 Taks forces
(which are ennemies), this 2 taks forces, even if they are closed themselves.

I make the test in the wolfpack mission, if i put my submarine at a distance of 200 km for instance, nothing happens between the merchant and the submarines, if i let my submarine closed enough, the combat arises.

Is there a solution for this ?
I don't understand the perceived problem you are trying to convey Maybe you or someone else can clarify it?
TheDarkWraith is offline   Reply With Quote
Reply

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 02:27 AM.


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.