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-13-12 02:37 PM

Quote:

Originally Posted by Rongel (Post 1820690)
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...

I have nothing stopping them from firing guns. The logic says if they have a contact detected and they can fire guns then fire guns.

It would be best to open up the AI editor in game and see what's going on. That way you can see whether they have a contact detected or not when your periscope is up. If they don't then that's why they aren't firing guns :yep:

Rongel 01-14-12 06:30 AM

Quote:

Originally Posted by TheDarkWraith (Post 1820701)
I have nothing stopping them from firing guns. The logic says if they have a contact detected and they can fire guns then fire guns.

It would be best to open up the AI editor in game and see what's going on. That way you can see whether they have a contact detected or not when your periscope is up. If they don't then that's why they aren't firing guns :yep:


I'm going to be a pain in the XXX and continue with this... :D

Another test: I was surrounded with PT boats and merchants with guns. Periscope was up, and I had the map contacts on, so I could see I was clearly in sight. No shooting. Then I surfaced, and the firing started. I quickly dived again, but left periscope up and in sight. All firing stopped...

I have been searching the forums about this, and some people have asked about this earlier, also in SH 3 threads. Some people say it's working and there is no problem. So is it just my setup, faulty IRAI installation or what? Would be real nice if somebody could really confirm this issue. Because it sure isn't working on my game...

PS. What is the AI editor, and how can I use it in game?

EDIT:

I added planes to the scenario: I was submerged, periscope up, ships and patrol boats didn't attack, but the planes opened fire like they should!

Rongel 01-16-12 02:40 PM

A-ha!

Finally managed to get the ships to fire at my periscope. It only happens when there is other u-boat or a ship that the enemy is firing. I made a single mission where there is a friendly u-boat. Both of use were submerged. I lifted the periscope and made sure that I was spotted. Nothing. Theb the other u-boat surfaced and enemies opened fire at it. And it was only then, that the nearby ships targeted my periscope and attacked me. They were clearly dividing their firepower between us. And when the other u-boat was destroyed the firing stopped, and they left my periscope alone.

I bet that the situation in Trevally's wolfpack mission was the same, that there was one surfaced u-boat that triggered the periscope shooting. So they can shoot at your periscope when you are submerged and spotted, but only if they have the "shooting mode" already going on by shooting at other ships.

TheDarkWraith 01-16-12 03:58 PM

Quote:

Originally Posted by Rongel (Post 1822355)
A-ha!

Finally managed to get the ships to fire at my periscope. It only happens when there is other u-boat or a ship that the enemy is firing. I made a single mission where there is a friendly u-boat. Both of use were submerged. I lifted the periscope and made sure that I was spotted. Nothing. Theb the other u-boat surfaced and enemies opened fire at it. And it was only then, that the nearby ships targeted my periscope and attacked me. They were clearly dividing their firepower between us. And when the other u-boat was destroyed the firing stopped, and they left my periscope alone.

I bet that the situation in Trevally's wolfpack mission was the same, that there was one surfaced u-boat that triggered the periscope shooting. So they can shoot at your periscope when you are submerged and spotted, but only if they have the "shooting mode" already going on by shooting at other ships.

this sounds like a serious bug in the exe regarding the AI. I can almost see what the function CanFireGuns() for the AI is doing:

if has contact:
if contact is submarine:
if submarine is surfaced: <---- more than likely what they did :shifty:

Trevally. 01-16-12 05:20 PM

Good find Rongel:up:

Rongel 01-17-12 04:28 AM

Quote:

Originally Posted by TheDarkWraith (Post 1822405)
this sounds like a serious bug in the exe regarding the AI. I can almost see what the function CanFireGuns() for the AI is doing:

if has contact:
if contact is submarine:
if submarine is surfaced: <---- more than likely what they did :shifty:

Yep seems that way. Because the plane attack system works, I tried to switch the commands. So I replaced Ship:CanFireCannons() to Plane:CanFireCannons() and, suprise suprise, it worked and the ships were shooting at me the moment I was spotted, even when I was submerged! So simply changing the commands, this could work!

I guess the IRAI is telling the planes to attack last known place of the sub after it's dissappeared, because the ships acted that way too. That seemed to be little too much and it could cause difficulties in large convoys. Needs more testing...

Rongel 01-21-12 08:57 AM

Tested more of this periscope shooting...

Unfortunately replacing the Ship:CanFireCannons() with Plane:CanFireCannons() causes the ships to act like planes. I sneaked to this big convoy, and when the first torpedo hit, all ships that had guns started to fire at my general direction (where the ships thought I was, I was undetected I think). They continued to shoot aproximately 15 minutes and caused pretty nice chaos! I think at least three of them were destroyed by friendly fire!

http://i1231.photobucket.com/albums/...-21_130130.jpg

So it seems the only way to fix this is through exe modding... :dead:

Still it was nice to see a bit more aggressive ships. Currently when you are in periscope depth and periscope is up, surface ships can't do anything to you, if they don't have DC's (except ram).

THE_MASK 02-01-12 05:22 AM

IRAI_0_0_30\sensors\
[SensorParameters]
;Visual.

does this line look ok

Visual range factor=0.5;0.30 ;[>=0] was 0.5, decreased by 25%
should these factors be the other way around ?

pedrobas 02-01-12 09:21 AM

Quote:

Originally Posted by sober (Post 1831013)
IRAI_0_0_30\sensors\
[SensorParameters]
;Visual.

does this line look ok

Visual range factor=0.5;0.30 ;[>=0] was 0.5, decreased by 25%
should these factors be the other way around ?

I think so, i thought just the same when i saw that, :hmmm:

TheDarkWraith 02-01-12 11:10 AM

Quote:

Originally Posted by sober (Post 1831013)
IRAI_0_0_30\sensors\
[SensorParameters]
;Visual.

does this line look ok

Visual range factor=0.5;0.30 ;[>=0] was 0.5, decreased by 25%
should these factors be the other way around ?

Anything after the first ; is considered a comment and thus ignored

pedrobas 02-01-12 11:21 AM

Quote:

Originally Posted by TheDarkWraith (Post 1831128)
Anything after the first ; is considered a comment and thus ignored

Yes i know but itīs set to 0.5 and in the coment says that "was 0.5" :hmmm:

lmy76128 02-01-12 11:51 AM

i want to play more difficult
 
thanks to this mod but i want to play more difficult
can you fix the depth charges's explosion radius?
up..:yeah::hmmm:

TheDarkWraith 02-01-12 02:59 PM

Quote:

Originally Posted by pedrobas (Post 1831141)
Yes i know but itīs set to 0.5 and in the coment says that "was 0.5" :hmmm:

I never updated the comment as the versions changed :yep:

THE_MASK 02-01-12 05:43 PM

Quote:

Originally Posted by TheDarkWraith (Post 1831243)
I never updated the comment as the versions changed :yep:

Ok , i changed it to 0.3 and my crew spotting in stock fog is perfect now . 0.5 the crew could see way too far into the fog . any comments .

pedrobas 02-01-12 05:50 PM

Quote:

Originally Posted by sober (Post 1831355)
Ok , i changed it to 0.3 and my crew spotting in stock fog is perfect now . 0.5 the crew could see way too far into the fog . any comments .

Iīll try it.


All times are GMT -5. The time now is 12:50 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.