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, 08:34 PM   #1
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   #2
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   #3
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   #4
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, 10:20 AM   #5
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
@ TDW

as already pointed by Trevally, have you already seen the following IRAI-related posts by Serge65?
Yes I did and I made the change in IRAI 41. This 'fix' makes absolutely no sense. Setting the false to true just says that the unit will now zig-zag instead of going in a straight line. I don't see how this fixes anything other than making the unit zig-zag. I'm fairly certain it was just coincidence that this change fixed any problem.
TheDarkWraith is offline   Reply With Quote
Old 02-20-14, 10:26 AM   #6
GaetVa
Watch
 
Join Date: Aug 2013
Posts: 23
Downloads: 82
Uploads: 0
Default

Hello TDW,

what i mean : is AI combat arises even if the player sub is not closed
to AI ships. For instance, imagine that 2 ennemies ships are closed enough
but my sub is far away this 2 ships (about 200 km). Are this 2 ennemies ships will fight even if they are not in my line of sight ?

or my submarine need to be closed enough to this ships to make them engaging each other ?
GaetVa is offline   Reply With Quote
Old 02-20-14, 10:32 AM   #7
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by GaetVa View Post
Hello TDW,

what i mean : is AI combat arises even if the player sub is not closed
to AI ships. For instance, imagine that 2 ennemies ships are closed enough
but my sub is far away this 2 ships (about 200 km). Are this 2 ennemies ships will fight even if they are not in my line of sight ?

or my submarine need to be closed enough to this ships to make them engaging each other ?
I'm inclined to say yes they will. Every game unit is an autonomous unit unless it belongs to a group. But then again I'm also inclined to say they won't because they are out of rendering range When units are out of rendering range a completely different set of routines are used to update all the game units (the MissionEngine.dll is responsible for this). I don't recall seeing anything in MissionEngine.dll responsible for combat - it mainly just updates unit's position. I never saw it call into SHSim.act (which is responsible for combat for the most part) so I would have to say that combat doesn't exist outside of the rendering range.
TheDarkWraith is offline   Reply With Quote
Old 02-21-14, 12:57 PM   #8
Serge65
A-ganger
 
Join Date: Jan 2012
Posts: 78
Downloads: 59
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith View Post
Yes I did and I made the change in IRAI 41. This 'fix' makes absolutely no sense. Setting the false to true just says that the unit will now zig-zag instead of going in a straight line. I don't see how this fixes anything other than making the unit zig-zag. I'm fairly certain it was just coincidence that this change fixed any problem.
Not sure! This 'fix' solves the possibility of resupply without ramming and chase. I do not argue, maybe, there is also other decision. It was simple the first which has arrived in me mind, and it leads to result.

Last edited by Serge65; 02-23-14 at 11:05 AM.
Serge65 is offline   Reply With Quote
Old 03-20-14, 03:36 PM   #9
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by sober View Post
The AI is too accurate at long distances with there guns...
All I know on the topic is written down here.

In the past I have looked into AI scripts, but I couldn't find anything dealing with gun accuracy. I wonder how AI unit's veterancy comes into the picture.
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 02-20-14, 07:54 AM   #10
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   #11
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   #12
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 01:19 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.