SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SH5 Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=249)
-   -   [WIP] IRAI (Intelligent Random AI) (https://www.subsim.com/radioroom/showthread.php?t=171973)

TheDarkWraith 01-11-12 03:10 AM

Quote:

Originally Posted by charognard (Post 1819174)
Yes i have understand how tactics and leader work.

I have set a mission with 2 convoy, and on ub near of each. Well, the first sub detected taunt the escort and all DD from the 2 convoy ( exept few who stay with marchants ). Even if the second is at 5km...

I have tryed to set in my mission single DD, indépendant groups from convoy and DD grouped with marchand, in all case, it s the same...

But, this isn t the main problem, if 8 DD come on the first contact and kill it, after they can go on the second, but, 8 DD elite, set with late equipement, can t kill an IP sub running fast, it s the most important probleme. In sh3, if you stay at IP, the first DC have great chance to kill you...

if you have v31 installed remove it. That version (single file) really loosened up the AI's sensors. Set the difficulty settings to 100/100 and disable fatigue model. Now you need to adjust the DC settings to give them a larger damage radius and higher MinEF and MaxEF so that they do more damage in that larger damage radius. The DCs were adjusted so that the escorts could DC at shallow depths and not destroy themselves like they did in stock game.

If you want to adjust the depth which DC attacks can be made then you need to edit the \data\Scripts\AI\init.aix file. I have a setting in there that controls the minimum depth they can start DC attacks.

Stew U-582 01-11-12 03:36 AM

Thanks for replying so quickly. You must keep a keen eye on
subsim. Everytime ive asked something of you ive got a response within
the hour.
I had a look at the sim file but think ill leave it be. I was just suprised
at the AI behaviour. Usually if I tried to take on a Taskforce with so
many escorts I would have got hammered , Im not used to getting
away but Early War you should be able to get away without too much
trouble. Later years is a diferent story. Im keen to see how the AI
changes over time.

Thanks Again

BTW I realy enjoy the mods youve released , thanks for sharing with the
comunity.
Finally im going to try RealNav , wish me luck.

THE_MASK 01-11-12 03:40 AM

If you use realnav be sure to download Trevallys auto scripts .

http://www.subsim.com/radioroom/down...o=file&id=3098

charognard 01-11-12 04:40 AM

Quote:

Originally Posted by TheDarkWraith (Post 1819210)
if you have v31 installed remove it. That version (single file) really loosened up the AI's sensors. Set the difficulty settings to 100/100 and disable fatigue model. Now you need to adjust the DC settings to give them a larger damage radius and higher MinEF and MaxEF so that they do more damage in that larger damage radius. The DCs were adjusted so that the escorts could DC at shallow depths and not destroy themselves like they did in stock game.

If you want to adjust the depth which DC attacks can be made then you need to edit the \data\Scripts\AI\init.aix file. I have a setting in there that controls the minimum depth they can start DC attacks.

How can i remove fatigue model plz ? And what is the minimum depth DC setting name into your .aix ?

TheDarkWraith 01-11-12 10:32 AM

Quote:

Originally Posted by charognard (Post 1819233)
How can i remove fatigue model plz ? And what is the minimum depth DC setting name into your .aix ?

Looked over my init.aix file and remembered some things:

FULL_THROTTLE_DISTANCE = 2000.0; this is the distance from contact that the warships will use full throttle until (you could set this distance as low as 500.0 with no problem)
PLASTER_DC_SETUP_RUN_SPEED = 0.5; this is the speed the warships will use when setting up for a DC run
PLASTER_DC_RUN_SPEED = 0.8; this is the speed the warships will use for their DC run (set to 1.0 for them to use full throttle)

for a sub contact the warships will use the PLASTER_DC_SETUP_RUN_SPEED inbetween FULL_THROTTLE_DISTANCE and PLASTER_DC_SETUP_DISTANCE. They will use PLASTER_DC_RUN_SPEED between PLASTER_DC_SETUP_DISTANCE and PLASTER_DC_RUN_DISTANCE

set all of these to 0 to remove fatigue model:
SHIPFATIGUESENSORREDUCTIONCRUISEMIN = 15; # min sensor reduction amount for each tier in cruise
SHIPFATIGUESENSORREDUCTIONCRUISEMAX = 30; # max sensor reduction amount for each tier in cruise
SHIPFATIGUESENSORREDUCTIONALERTMIN = 25; # min sensor reduction amount for each tier in alert
SHIPFATIGUESENSORREDUCTIONALERTMAX = 50; # max sensor reduction amount for each tier in alert
SHIPFATIGUESENSORREDUCTIONDAMAGEDMIN = 35; # min sensor reduction amount for each tier in damaged
SHIPFATIGUESENSORREDUCTIONDAMAGEDMAX = 70; # max sensor reduction amount for each tier in damaged
SHIPFATIGUESENSORREDUCTIONDAMAGEDALERTMIN = 45; # min sensor reduction amount for each tier in damaged
SHIPFATIGUESENSORREDUCTIONDAMAGEDALERTMAX = 90; # max sensor reduction amount for each tier in damaged

for ship DCs you have to look into the Ship-weapons.aix file:

precond
{
Ship:CanFireDCRacks() and Ship:GetContactDepth() <= -8 and Ship:GetCurrentSpeed() >= 2
}

if you make the -8 value smaller (less negative) then they will DC sooner. Notice that I also have a speed restriction on them. They have to be moving at 2 knots or more of speed.

charognard 01-11-12 11:41 AM

Quote:

Originally Posted by TheDarkWraith (Post 1819340)
Looked over my init.aix file and remembered some things:

FULL_THROTTLE_DISTANCE = 2000.0; this is the distance from contact that the warships will use full throttle until (you could set this distance as low as 500.0 with no problem)
PLASTER_DC_SETUP_RUN_SPEED = 0.5; this is the speed the warships will use when setting up for a DC run
PLASTER_DC_RUN_SPEED = 0.8; this is the speed the warships will use for their DC run (set to 1.0 for them to use full throttle)

for a sub contact the warships will use the PLASTER_DC_SETUP_RUN_SPEED inbetween FULL_THROTTLE_DISTANCE and PLASTER_DC_SETUP_DISTANCE. They will use PLASTER_DC_RUN_SPEED between PLASTER_DC_SETUP_DISTANCE and PLASTER_DC_RUN_DISTANCE

set all of these to 0 to remove fatigue model:
SHIPFATIGUESENSORREDUCTIONCRUISEMIN = 15; # min sensor reduction amount for each tier in cruise
SHIPFATIGUESENSORREDUCTIONCRUISEMAX = 30; # max sensor reduction amount for each tier in cruise
SHIPFATIGUESENSORREDUCTIONALERTMIN = 25; # min sensor reduction amount for each tier in alert
SHIPFATIGUESENSORREDUCTIONALERTMAX = 50; # max sensor reduction amount for each tier in alert
SHIPFATIGUESENSORREDUCTIONDAMAGEDMIN = 35; # min sensor reduction amount for each tier in damaged
SHIPFATIGUESENSORREDUCTIONDAMAGEDMAX = 70; # max sensor reduction amount for each tier in damaged
SHIPFATIGUESENSORREDUCTIONDAMAGEDALERTMIN = 45; # min sensor reduction amount for each tier in damaged
SHIPFATIGUESENSORREDUCTIONDAMAGEDALERTMAX = 90; # max sensor reduction amount for each tier in damaged

for ship DCs you have to look into the Ship-weapons.aix file:

precond
{
Ship:CanFireDCRacks() and Ship:GetContactDepth() <= -8 and Ship:GetCurrentSpeed() >= 2
}

if you make the -8 value smaller (less negative) then they will DC sooner. Notice that I also have a speed restriction on them. They have to be moving at 2 knots or more of speed.

A great thx TDW, i think i ll can do something ith this values...

Well, is a DD can use his canon to hit a low depth immerged sub and can he inflict somme damages ?? Is there any historical event like this ?

charognard 01-12-12 12:41 PM

Quote:

FULL_THROTTLE_DISTANCE = 2000.0; this is the distance from contact that the warships will use full throttle until (you could set this distance as low as 500.0 with no problem)
I have changed it to 500, but DD allways coming at 15knt... Any another ideas ?

TheDarkWraith 01-12-12 02:59 PM

Quote:

Originally Posted by charognard (Post 1820042)
I have changed it to 500, but DD allways coming at 15knt... Any another ideas ?

what are you trying to accomplish? You want them at full throttle all the time? If so you need to change the DC_setup_speed and run speed and set them to 1.0

charognard 01-12-12 03:08 PM

here my settings :

Quote:

CANCEL_CURRENT_TACTIC_DAMAGE = 0.9;
CONVOY_LEADER_ACTION_SPEED_CHANGE_MIN = 0.4;
CONVOY_LEADER_ACTION_SPEED_CHANGE_MAX = 1.0;
CONVOY_LEADER_ACTION_COURSE_CHANGE = 40.0;
CONVOY_LEADER_ACTION_COURSE_SPEED_CHANGE_TIME = 4.0;
CONVOY_LEADER_CONTACT_LOST_CONTINUE_ACTION_TIME = 300.0; # 10 mins
MERCHANT_CONVOY_LEADER_ACTION_SPEED_CHANGE_MIN = 0.5;
MERCHANT_CONVOY_LEADER_ACTION_SPEED_CHANGE_MAX = 1.0;
MERCHANT_CONVOY_LEADER_ACTION_COURSE_CHANGE = 45.0;
MERCHANT_CONVOY_LEADER_ACTION_COURSE_SPEED_CHANGE_ TIME = 2.0;
MERCHANT_CONVOY_LEADER_CONTACT_LOST_CONTINUE_ACTIO N_TIME = 300.0; # 10 mins
GENERAL_ERROR_INIT_DISTANCE = 350.0; # used as -min and max value of a Random function
GENERAL_ERROR_DISTANCE_EPSILON = 10; # used as -min and max value of a Random function
SPIRAL_DISTANCE_INIT_MIN_ERROR = -350.0; # used as min value of a Random function
SPIRAL_DISTANCE_INIT_MAX_ERROR = 350.0; # used as max value of a Random function
SPIRAL_DISTANCE_MIN_EPSILON = -20; # used as min value of a Random function
SPIRAL_DISTANCE_MAX_EPSILON = 20; # used as max value of a Random function
SPIRAL_MIN_SHIP_SPEED = 0.5; # used as min value of a Random function
SPIRAL_MAX_SHIP_SPEED = 1.0; # used as max value of a Random function
SPIRAL_MIN_RUDDER_ANGLE = 5.0;
SPIRAL_MAX_RUDDER_ANGLE = 40.0;
# Hunter-Killer group spiral search time upon lost contact
HK_SPIRAL_MIN_SEARCH_TIME = 15.0; # used as min value of a Random function
HK_SPIRAL_MAX_SEARCH_TIME = 30.0; # used as max value of a Random function
# Hunter-Killer group wait time inbetween spiral searches
HK_WAIT_TIME = 4.0; # used as max value of a Random function
HK_MIN_NEXT_SPIRAL_DISTANCE = 1000.0; # used as min value of a Random function
HK_MAX_NEXT_SPIRAL_DISTANCE = 2000.0; # used as max value of a Random function
INVESTIGATE_FOLLOW_WAYPOINTS_TIME = 990.0; # 15 mins (90 to account for CONTACT_LOST_BEGIN_SEARCH_TIME)
CONTACT_LOST_BEGIN_SEARCH_TIME = 15.0;
FULL_THROTTLE_DISTANCE = 200.0;
PLASTER_DC_SETUP_RUN_SPEED = 0.8;
PLASTER_DC_RUN_SPEED = 1.0;
PLASTER_DC_SETUP_DISTANCE = -50.0;
PLASTER_DC_RUN_DISTANCE = 200.0;
PLASTER_DC_RETURN_DISTANCE = -300.0;
PLASTER_TWO_DC_SETUP_DISTANCE = 50.0;
PLASTER_TWO_DC_RUN_DISTANCE = -200.0;
PLASTER_TWO_DC_RETURN_DISTANCE = 500.0;
PLASTER_DC_FOLLOW_WAYPOINTS_TIME = 780.0; # 10 mins (180 to account for PLASTER_DC_CONTACT_LOST_BEGIN_SEARCH_TIME)
# for escorts that are guarding convoy but attacking a contact, this is the time they can keep attacking when contact is lost
PLASTER_GUARD_CONVOY_DC_WAYPOINTS = 180.0;
# needs to be <= sim.cfg [AI detection] Lost Contact Time (in seconds)
# this is the time that if a unit is a director and the contact lost time >
# MAX_CONTACT_LOST_DC_TIME it waits until contact lost time is this value before
# heading back to convoy and following it's waypoints (not part of HK group)
DIRECTOR_DISTANCE_FROM_CONTACT = 750.0;
DIRECTOR_SETUP_SPEED = 0.8;
DIRECTOR_SEARCH_TIME = 450.0; # 15 mins
MERCHANT_ZIGZAG_CONTACT_DISTANCE = 3000.0;
MERCHANT_CONTACT_DETECTED_WAYPOINTS_DISTANCE = 8000.0;
MERCHANT_CONTACT_DETECTED_COURSE_SPEED_CHANGE_TIME = 2.0; # this number is a base value that will be added to a Random function with this as the -min and max values of it
MERCHANT_CONTACT_DETECTED_COURSE_CHANGE = 45.0; # used as a -min and max value of a Random function
MERCHANT_CONTACT_DETECTED_SPEED_CHANGE_MIN = 0.6; # used as a min value of a Random function
MERCHANT_CONTACT_DETECTED_SPEED_CHANGE_MAX = 1.0; # used as a max value of a Random function
CONVOY_ESCORT_SPIRAL_TIME = 600.0;

vlad29 01-12-12 03:51 PM

Have a question re. aircraft firepower:

In game aircrafts became more aggressive (in comparison with vanilla) , and that's great:yeah: But is it historically plausible that a pair of Hurricanes or Spits in 1939 could sank the U-boat without bombs only with the on-board weapon (machineguns)? Asking because in SHV with IRAI 0.0.31 5-6 battle turns of a fighters pair on sub reduce the hull-integrity value from 100 to 0 %:o
Almost sure You'll not find the historical cases of such event even because there were no such an idiots among U-boat captains that should wait for several airplane attacks without submerging as well as among fighter-pilots who dare to spent all munition on a U-boot and attack it without a couple of bombs under wings:06:

TheDarkWraith 01-12-12 05:07 PM

Quote:

Originally Posted by vlad29 (Post 1820169)
Have a question re. aircraft firepower:

In game aircrafts became more aggressive (in comparison with vanilla) , and that's great:yeah: But is it historically plausible that a pair of Hurricanes or Spits in 1939 could sank the U-boat without bombs only with the on-board weapon (machineguns)? Asking because in SHV with IRAI 0.0.31 5-6 battle turns of a fighters pair on sub reduce the hull-integrity value from 100 to 0 %:o
Almost sure You'll not find the historical cases of such event even because there were no such an idiots among U-boat captains that should wait for several airplane attacks without submerging as well as among fighter-pilots who dare to spent all munition on a U-boot and attack it without a couple of bombs under wings:06:

I either have them continue on following waypoints when they have no bombs or have them attack you with their guns if they have ammo. I think the latter is more realistic.

I didn't change the damage values of the shells for the guns. Maybe those need to be adjusted :hmmm:

Hartmann 01-12-12 09:27 PM

Perhaps the damage value of the cannon rounds is too high.

I doubt that gunfire or light cannon shells can cause extensive damage to an u-boat or sunk it, only cause light damage or small leakings, it´s more realistic.

Except if the plane use heavy armour piercing shells , like 37 mm BK3,7 anti-tank cannon used by stuka plane or 6-pounder Class M" (57mm) cannon in the havilland mosquito.

" 900 lb (408 kg)of armour was added within the engine cowlings, around the nose and under the cockpit floor to protect the engines and crew from the heavily armed U-Boats, which were intended to be the primary target of the Mk XVIII. Two or four .303 (7.7 mm) Browning machine guns were retained in the nose and were used to "sight" the main weapon onto the target.

Rongel 01-13-12 04:35 AM

One question!

Would it be possible to get enemy ships and torpedo boats to shoot at your periscope when you are submerged?

It's a bit too easy to stay in periscope depth and linger around ships when they don't attack you. Even if they have guns and have clearly seen you, nothing, only if you surface they start firing. I got two PT boats circling around my periscope at 200 meters, but they just watched and waited. Has anyone witnessed other kind of behaviour?

This is propably part of the games mechanic but it would be great if they could be little more aggressive. Be more agressive!

Trevally. 01-13-12 12:40 PM

Im sure they do attach your scope if it is raised Rongel.

I posted a pic of this in the Wolfpack thread:up:

Rongel 01-13-12 02:10 PM

Quote:

Originally Posted by Trevally. (Post 1820635)
Im sure they do attach your scope if it is raised Rongel.

I posted a pic of this in the Wolfpack thread:up:

Hmm... I'm not so sure about this, I tested this about pretty thoroughly. When I was surfaced at first, they started to shoot at me and continued a while even when I submerged.

But then I tested another method, I was submerged and then put periscope up, dd's spotted me and tried to ram me, they clearly saw me. But no one fired at my persicope which was up all the time. I had even two patrol boats circling around the periscope, but no shots were fired. At least 20 min passed, but nothing... But still interesting to hear other experiences! :DL.

Studying you pic now...


All times are GMT -5. The time now is 05:10 PM.

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