SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
08-06-22, 01:43 PM | #91 |
Village Idiot
|
Ok. Let me open some files and I'll post back ASAP.
|
08-06-22, 03:47 PM | #92 |
Village Idiot
|
Ok. Are you playing with TDW's Script for Planes?
|
08-06-22, 03:49 PM | #93 |
Grey Wolf
Join Date: Oct 2010
Location: Poland
Posts: 874
Downloads: 72
Uploads: 3
|
Yes, Airplane.aix file as it is is TWoS 2.2.24
|
08-06-22, 04:00 PM | #94 |
Village Idiot
|
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() } |
08-06-22, 04:37 PM | #95 |
Grey Wolf
Join Date: Oct 2010
Location: Poland
Posts: 874
Downloads: 72
Uploads: 3
|
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. |
08-06-22, 05:26 PM | #96 |
Village Idiot
|
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 |
08-06-22, 05:28 PM | #97 |
Village Idiot
|
Another thing is I'm not certain the way you've coded is correct or will work.
|
08-06-22, 06:00 PM | #98 | |
Grey Wolf
Join Date: Oct 2010
Location: Poland
Posts: 874
Downloads: 72
Uploads: 3
|
Quote:
That makes two of us :-) I'm pretty much using old point-and-click games method of using everything on everything until something works. |
|
08-06-22, 06:11 PM | #99 |
Village Idiot
|
|
08-07-22, 04:55 AM | #100 | |
Grey Wolf
Join Date: Oct 2010
Location: Poland
Posts: 874
Downloads: 72
Uploads: 3
|
Quote:
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": 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... |
|
08-07-22, 01:26 PM | #101 | |
Admiral
|
Quote:
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.
__________________
|
|
08-07-22, 01:33 PM | #102 |
Village Idiot
|
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? |
08-07-22, 07:02 PM | #103 |
Navy Seal
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
|
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 Last edited by gap; 08-07-22 at 07:17 PM. |
08-07-22, 07:25 PM | #104 |
Village Idiot
|
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. |
08-08-22, 04:53 AM | #105 |
Navy Seal
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
|
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
|
|
|