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 08-06-22, 01:43 PM   #91
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,319
Downloads: 130
Uploads: 0


Default

Ok. Let me open some files and I'll post back ASAP.
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 08-06-22, 03:47 PM   #92
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,319
Downloads: 130
Uploads: 0


Default

Ok. Are you playing with TDW's Script for Planes?
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 08-06-22, 03:49 PM   #93
kapuhy
Grey Wolf
 
Join Date: Oct 2010
Location: Poland
Posts: 873
Downloads: 72
Uploads: 3
Default

Quote:
Originally Posted by Jeff-Groves View Post
Ok. Are you playing with TDW's Script for Planes?
Yes, Airplane.aix file as it is is TWoS 2.2.24
kapuhy is offline   Reply With Quote
Old 08-06-22, 04:00 PM   #94
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,319
Downloads: 130
Uploads: 0


Default

OK. So We are on the same page then.
One thing I see missing is

precond
{
Plane:CanFireCannons()
}

So not sure how the Strafe command will work with out that.

Now Strafe is listed as a valid command in the sim file.
No notes on the value after the call but I suspect a precentage of chance of firing.

You may need to set it like so,

precond
{
Plane:HasCannons(),
Plane:CanFireCannons()
}
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 08-06-22, 04:37 PM   #95
kapuhy
Grey Wolf
 
Join Date: Oct 2010
Location: Poland
Posts: 873
Downloads: 72
Uploads: 3
Default

Ok, so I just set it like this:

strategy BombCourseStrafe(Plane)
{
precond
{
Plane:HasCannons() and Plane:CanFireCannons() and Plane:GetContactRelDistOnWater() <= 3500 and Ship:GetContactSpeed() > 5
}
action
{
Plane:Strafe(1.0);
#Ship:SetThrottle(1.0);
}
}


In game, not seeing any difference (repeating the same test, I had as before Liberator crashing into sea and other planes delivering accurate bomb drops). As for bolded value after Strafe: whatever it means, I tend to see better results with this value being lower. When I set it to 100.0, planes started to crash into each other and into sea more often.
kapuhy is offline   Reply With Quote
Old 08-06-22, 05:26 PM   #96
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,319
Downloads: 130
Uploads: 0


Default

That's kind of why I think We may need to create a new strategy,
then call it when needed.
Look at how TDW did the Ship strategies.
If you really look at his AirPlane.aix?
It seems pretty lame for some reason. Not saying it's wrong but to me?
It seems lacking in many areas.
I'm only looking at the files included in TWOS
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 08-06-22, 05:28 PM   #97
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,319
Downloads: 130
Uploads: 0


Default

Another thing is I'm not certain the way you've coded is correct or will work.
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 08-06-22, 06:00 PM   #98
kapuhy
Grey Wolf
 
Join Date: Oct 2010
Location: Poland
Posts: 873
Downloads: 72
Uploads: 3
Default

Quote:
Originally Posted by Jeff-Groves View Post
That's kind of why I think We may need to create a new strategy,
then call it when needed.
Look at how TDW did the Ship strategies.
If you really look at his AirPlane.aix?
It seems pretty lame for some reason. Not saying it's wrong but to me?
It seems lacking in many areas.
I'm only looking at the files included in TWOS
It is much less complex than ships strategies to be sure (on the other hand, aircraft tactics against U-Boats boils down to "beeline towards target and hope it doesn't dive before you reach it")

Quote:
Originally Posted by Jeff-Groves View Post
Another thing is I'm not certain the way you've coded is correct or will work.
That makes two of us :-) I'm pretty much using old point-and-click games method of using everything on everything until something works.
kapuhy is offline   Reply With Quote
Old 08-06-22, 06:11 PM   #99
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,319
Downloads: 130
Uploads: 0


Default

Quote:
Originally Posted by kapuhy View Post
aircraft tactics against U-Boats boils down to "beeline towards target and hope it doesn't dive before you reach it"
And may be why one needs to increase the speed of the Plane in some situations.
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 08-07-22, 04:55 AM   #100
kapuhy
Grey Wolf
 
Join Date: Oct 2010
Location: Poland
Posts: 873
Downloads: 72
Uploads: 3
Default

Quote:
Originally Posted by Jeff-Groves View Post
And may be why one needs to increase the speed of the Plane in some situations.
It would be even better if one could order the plane to lead the target. Now there's a TurnToFaceTargetTrajectory function but when I tried to apply it to planes game kept crashing on me.

As for land units, gap certainly can elaborate on this but from what I see, the workaround used by them was to assign ship AI commander controller to land unit, which allows it to use ship strategies (and since it cannot move, only ship strategy that's available to it is shooting at any detected target that moves into range). That works very well, only downside being that bunkers bounce up and down as if they were floating on waves.

I tried to add another .aix file with instructions for CoastalDefense AI "commander":

 
strategy CoastalDefense(CoastalDefense)
{
precond
{
Ship:IsType(LANDUNIT) and Plane:HasCannons() and Ship:CanFireCannons()
}
action
{
Ship:FireCannons();
}
}


Game accepts it (as in, does not CTD on me. When I added the file including obvious syntax errors just to see if game even "sees" the file, it CTD'd on loading the mission) but after checking with AI script debugger - land units using CastalDefense AI do not use the strategy from that file.

EDIT: it just occured to me that unlike modified "ship" bunker from TWoS, stock land units don't have any sensors so they might not fire cannons because they cannot detect any target...
kapuhy is offline   Reply With Quote
Old 08-07-22, 01:26 PM   #101
Mad Mardigan
Admiral
 
Mad Mardigan's Avatar
 
Join Date: Sep 2016
Location: Grand Rapids, Mi.
Posts: 2,327
Downloads: 491
Uploads: 0


wolf_howl15

Quote:
Originally Posted by kapuhy View Post
It would be even better if one could order the plane to lead the target. Now there's a TurnToFaceTargetTrajectory function but when I tried to apply it to planes game kept crashing on me.

As for land units, gap certainly can elaborate on this but from what I see, the workaround used by them was to assign ship AI commander controller to land unit, which allows it to use ship strategies (and since it cannot move, only ship strategy that's available to it is shooting at any detected target that moves into range). That works very well, only downside being that bunkers bounce up and down as if they were floating on waves.

I tried to add another .aix file with instructions for CoastalDefense AI "commander":

 
strategy CoastalDefense(CoastalDefense)
{
precond
{
Ship:IsType(LANDUNIT) and Plane:HasCannons() and Ship:CanFireCannons()
}
action
{
Ship:FireCannons();
}
}


Game accepts it (as in, does not CTD on me. When I added the file including obvious syntax errors just to see if game even "sees" the file, it CTD'd on loading the mission) but after checking with AI script debugger - land units using CastalDefense AI do not use the strategy from that file.

EDIT: it just occurred to me that unlike modified "ship" bunker from TWoS, stock land units don't have any sensors so they might not fire cannons because they cannot detect any target...
Stock, land units... like cannons or artillery pieces, may not... but... there must be some means to make the stock ones have the sense to fire at targets at sea.


Just as an example... I recall with FotRS-U or was that... TMOverhauled v2.5 BH edition, was patrolling near a small island making way for... the Sulu Sea, after passing through that narrow passage on the west side of Borneo... I believe... Got tagged by shell fire, &... I was like... 9-10 nm's away from that sucker. As I best recall the day hours, was like... just around dusk/twilight... as I recall.


Now, I know that is pertaining to SH4... & may... or may NOT be, applicable here... what with it being SH5... but, wouldn't hurt to look into & see if there aren't similarities there, that could be used... here, in SH5 land.


Hope this info.... helps... as always.









M. M.
__________________
Mad Mardigan is offline   Reply With Quote
Old 08-07-22, 01:33 PM   #102
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,319
Downloads: 130
Uploads: 0


Default

There is an obj_sensor in the sim file of the stock land units.
I assume it's a Visual sensor as I've not really checked the ID's
The Land units use AICostalDefense. Note the spelling.

I'm wondering about a strange thing in the GR2 files on them though.
GrannyViewer lists 3 Bones but only 2 appear and there seems to be no connection to the missing Base Bone?
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 08-07-22, 07:02 PM   #103
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Hi Maciej and Jeff, during the last few days I have been following the discussion on this thread but private life duties prevented me from replying before. Sorry for that. My notes below:

- Unfortunately I can't provide any detail on what was done in the past for fixing stock land units. To be totally honest my commitment in that field was marginal, to say the least. TDW dealt with that. My only contribution was carrying out a few tests. At that time I thought TDW had tried every possible tweak for fixing the buggy stock AI, but the 'recent' discovery by Maciej on how to fix AI sub's deck gun, has proved me wrong and gives me new hopes.

- IIRC, my (unsuccessful) tests were carried out on a tweaked version of stock land units with sensors added. Indeed, any new tweak should be tested on a set of similarly modified units.

- The "floating coastal defenses" weren't my idea either. Vecko proposed them. I only helped him setting up the files and providing 3D models. The bunker currently featured in TWoS is my elaboration of a SHIII or SHIV model. It is more correct for German coastal defenses than for British ones though. In the meanwhile I have created the model of a typical British gun emplacement that I will be glad to share with the community if we find a proper way to implement coastal defenses in game.

- Talking bout the aforementioned floating coastal defenses, yes they are basically land units with the ship AI commander controller in place of the regular AICostalDefense controller. We gave them a huge mass and very high drag coefficients and we lowered their center of mass so to minimize pitch and roll, but this is not perfect. Other inconveniences are that they need to be placed unrealistically close to coasts, and that water depth under them can't be too shallow, otherwise they get 'stuck' just like regular sea units and they fail to shoot their guns.

- Talking about 'copyright' issues, I totally agree with Jeff. At this point, the release of single IRAI files tweaked conveniently, shouldn't be a taboo as long as all the due credit is given to their original author. If that wasn't possible, many mods based on New UIs, Fx Updates, etc, wouldn't ever been released
__________________
_____________________
|May the Force be with you!|
...\/

Last edited by gap; 08-07-22 at 07:17 PM.
gap is offline   Reply With Quote
Old 08-07-22, 07:25 PM   #104
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,319
Downloads: 130
Uploads: 0


Default

I haven't looked at the 'Land Units' in TWoS.

Don't think they would help to be honest as We are looking at getting the Stock Land Units working.

TDW, as good as he was? Is not the end all be all.
And yes I will admit he and I did not see eye to eye.
But that does not make him nor I right or wrong.

I can tell you TDW did NOT share much as to AI Scripting.
And when he did? It was with a worthless copyright BS included.
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 08-08-22, 04:53 AM   #105
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Jeff-Groves View Post
I haven't looked at the 'Land Units' in TWoS.

Don't think they would help to be honest as We are looking at getting the Stock Land Units working.
I am afraid not, sorry. Anyway I was never satisfied with those lame floating gun platforms. Hopefully one day we will replace them with proper coastal defenses
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Reply


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 10:48 AM.


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