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 08-23-10 04:57 PM

Quote:

Originally Posted by Ragtag (Post 1475522)
The "no sonar on surface" fix kills underwater sonar to.

what do you mean?

PL_Andrev 08-23-10 04:58 PM

Quote:

Originally Posted by Ragtag (Post 1475522)
The "no sonar on surface" fix kills underwater sonar to.

Use "sober's hydrophone fix".
With this mod I have no problem on or under surface.

TheDarkWraith 08-23-10 06:58 PM

Antar's posts about his testing with v0.0.21 caused me to dig deeper into the ship AI and see what was going on. I found more logic errors and bugs :nope: A big bug was with the merchant evade tactics. Although the merchant leader delegated roles to the ships, the ships were unable to fulfill those roles due to an error in my code. Antar that is why the DDs kept a solid formation as you mentioned.

So far here's what's fixed in v0.0.22:
v0.0.22 - more bug fixing in ship's tactics
- fixed bug of escorts coming to all stop when they are assigned the role of guard convoy and they have a contact spotted
- fixed bug of merchant leading convoy with contact detected and loses contact it immediately starts following waypoints. Now it waits some period of time before switching back to following waypoints (in that period of time it will continue to evade by changing speed and course)
- gave the leader of a convoy that is not a merchant a specified time that it is allowed to use evade tactics (course and speed changes) when it has 'lost' it's contact
- fixed bug of HK director not sitting 'still' for any period of time

I'll be packaging up v0.0.22 for release here shortly.

Krauter 08-23-10 07:43 PM

Will I ever even make it to the 1/4 point of a patrol without a new version :D

You're the best lol

Krauter

TheDarkWraith 08-23-10 07:48 PM

the release of v0.0.22 is going to be a little longer than expected. Was testing a convoy with a merchant leader and found some big bugs. Basically I now have to account for all different kinds of contacts for a merchant convoy leader. This means lots of new tactics for it. Sigh.....Oh well, it will be killer when it complete :D

TheDarkWraith 08-23-10 09:38 PM

okay we have a serious problem that the devs need to look into and fix ASAP.....if you destroy the leader of a convoy another unit will take it's place....excellent. Here's the problem: that next unit is unable to set any tactics. There's something fundamentally wrong with the C++ code in this area. It wants to change to the tactic it wants but the call to Ship:SetTactic fails :nope: All units that were assigned roles before the leader was killed keep the roles given to them also. They will not reset :damn:

SteelViking 08-23-10 10:01 PM

Quote:

Originally Posted by TheDarkWraith (Post 1475673)
okay we have a serious problem that the devs need to look into and fix ASAP.....if you destroy the leader of a convoy another unit will take it's place....excellent. Here's the problem: that next unit is unable to set any tactics. There's something fundamentally wrong with the C++ code in this area. It wants to change to the tactic it wants but the call to Ship:SetTactic fails :nope: All units that were assigned roles before the leader was killed keep the roles given to them also. They will not reset :damn:

Crap, that is bad. Are you sure that you cannot fix it or at least find a work around?

TheDarkWraith 08-23-10 10:14 PM

Quote:

Originally Posted by SteelViking (Post 1475684)
Crap, that is bad. Are you sure that you cannot fix it or at least find a work around?

I think I have a work around :D It's actually something that I should've done some time ago.
I put some conditional code in that says the leader can only set tactics if it's damage level is < some value. If it's greater than this value then all tactics and roles are removed and all ships in the convoy are in a free for all (they will act as independant units).
So far seems to be working ok but really won't know for sure until I release v0.0.22 and the work around gets tested by all (I can't test every possible scenario - it's just impossible to do)
I shouldn't have to do this work around - the game should handle this situation of leader being killed :shifty:

THE_MASK 08-23-10 10:17 PM

Quote:

Originally Posted by TheDarkWraith (Post 1475690)
I think I have a work around :D It's actually something that I should've done some time ago.
I put some conditional code in that says the leader can only set tactics if it's damage level is < some value. If it's greater than this value then all tactics and roles are removed and all ships in the convoy are in a free for all (they will act as independant units).
So far seems to be working ok but really won't know for sure until I release v0.0.22 and the work around gets tested by all (I can't test every possible scenario - it's just impossible to do)
I shouldn't have to do this work around - the game should handle this situation of leader being killed :shifty:

Praise the Lord .

Sudo 08-23-10 10:30 PM

Quote:

Originally Posted by sober (Post 1475692)
Praise the Lord .

Amen. TDW, you're a hero! :salute:

SteelViking 08-23-10 10:31 PM

Quote:

Originally Posted by TheDarkWraith (Post 1475690)
I think I have a work around :D It's actually something that I should've done some time ago.
I put some conditional code in that says the leader can only set tactics if it's damage level is < some value. If it's greater than this value then all tactics and roles are removed and all ships in the convoy are in a free for all (they will act as independant units).
So far seems to be working ok but really won't know for sure until I release v0.0.22 and the work around gets tested by all (I can't test every possible scenario - it's just impossible to do)
I shouldn't have to do this work around - the game should handle this situation of leader being killed :shifty:

Hey, that is a really good idea anyway. I think that setup is pretty realistic. There is no excuse for the error in the devs coding, but at least you found a good solution.:up:

TheDarkWraith 08-23-10 10:47 PM

was going to just arbitrarily pick a number out of thin air for the max damage that the commander can sustain before all tactics and roles get reset but then I remembered this crew state:

### ======= Ship state-machine: ABANDON ======= ###
strategy StateAbandon(Ship)
{
precond
{
Ship:GetDamage() >= MAX_DAMAGE_STATE_CHANGE
}

there's the magic number: MAX_DAMAGE_STATE_CHANGE (which is 0.9)

So there is what determines when the commander isn't a commander anymore :DL

EDIT:

the work around I did didn't work correctly.....but I did manage to find another one that so far has been working perfectly!

EDIT2:

after multiple tests it's been discovered that any work around doesn't work all the time :nope: This is a game breaker :down::damn:

Ragtag 08-24-10 01:50 AM

Quote:

Originally Posted by TheDarkWraith (Post 1475523)
what do you mean?

I mean sonar doesnt work at all, surfaced or submerged. No contacts detected or reported.

Zedi 08-24-10 02:56 AM

I confirm that too. No sonar contact at all at scope deepth, the sonar will start to work only after I dived deep. Last night got the same bug reported by the others, escorts had no reaction at all they just keep sailing and more than that.. they had no intention to avoid the merchants who break the formation... is like they sail in a parallel world. They even left the convoy alone by doing this.

Finally got something that I really liked.. the abandoned ship. Hit in the stern a merchie and instead of sailing away burning and smoking, she just stopped. And was not the engine hit, only the stern part was in flame and flooded. 2 bad that when I surfaced to finish it with the deck gun, she almost got me.. the most active gun was the one from the stern :/ Wish that an abandoned ship remain really abandoned...

By giving the convoy the FFA status is not like.. returning to the stock settings? Because that happens in the stock, is really a ffa.. wich means a complete chaos. Escorts engage the enemy, merchies sail all over around trying to escape.. the only problem was the dc's.. they never hit/damaged anything.

von faust 08-24-10 10:56 AM

Quote:

Originally Posted by von faust (Post 1475376)
(excuse me for my bad English :oops:)
Hi,I have activated this MOD

http://img827.imageshack.us/img827/8600/modact.jpg

I have various contact near

....

At 12 meters the sonarman (and me !!!) does not listen anything

....

At 22 meters I listen the contact very well but the sonarman nothing !!!

......

Look my position, how is possible that the sonarman does not listen ????
I hope You undestand what I wrote :-?:O:

....

I have disabled all "no_hidrophone_on surface" MOD but I still have sound contact problem.
The "Report nearest sound contact" it's ok but when I use to "Follow nearest contact" I have "No sound contact"

http://img178.imageshack.us/img178/1539/contactx.png


All times are GMT -5. The time now is 03:59 AM.

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.