![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
|
|
03-20-21, 12:03 PM
|
#1 |
|
Navy Seal
![]() Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
|
As far as the strafe strategy will only be used in certain circumstances, I think we can live with the involved oddities. Some of them are not even so impossible; for one thing, I am sure I have read reports of ASW aircraft killing themselves with their own bombs dropped at too a low altitude.
That said, I will add a couple of quick thoughts: - is the min_height parameter in cmdr_AIAirplane controller doing anything? - Is there in SHSim.act anyhing that can be used to get aircraft altitude so that, when their height drops too much they can switch to normal flight or to any other tactic that won't result in a suicidal conduct? Else, is it possible to differentiate strategies by aircraft unit type?
|
|
|
03-20-21, 01:44 PM
|
#2 | |
|
Grey Wolf
![]() Join Date: Oct 2010
Location: Poland
Posts: 875
Downloads: 72
Uploads: 3
|
Quote:
Setting it high (like really high, 200 m or more) prevents even B-18, the worst offender so far, from crashing into ocean. It still flies like pilot just downed a case of beer by himself, but it does so at higher altitude. Now, all that's needed is: - make planes fly more stable - make them, if possible, drop bombs on first pass (now, even with Strafe behaviour, they usually make several circles and turns before they find a good position to drop bombs) First I hope can be achieved with fine-tuning wings/rudders drag and engine parameters. For second, no clue now but perhaps something will click if we keep changing all values... |
|
|
|
03-20-21, 05:37 PM
|
#3 |
|
GLOBAL MODDING TERRORIST
|
Depending on distance to target?
There is a AI Command. StrafingTooClose There's A LOT of Commands TDW didn't use. NeedToDescend LaunchTorpedoesStrafe MoveAroundCannonTarget Etc. |
|
|
03-21-21, 05:51 AM
|
#4 | ||
|
Grey Wolf
![]() Join Date: Oct 2010
Location: Poland
Posts: 875
Downloads: 72
Uploads: 3
|
Quote:
For distance to target, GetContactRelDistOnWater works fine. Quote:
----- If any players who are currently playing a campaign using TWoS are reading this thread - Coastal Commma... wait, uhm, BdU Training Division would find it very helpful if you share your experiences with planes in game currently: how dangerous do you consider them to be, what are your usual reaction/tactic in dealing with them, what types of planes are most common in your game (my tests are very "clinical" and may not reflect real combat engagements). |
||
|
|
03-21-21, 02:35 PM
|
#5 |
|
Grey Wolf
![]() Join Date: Oct 2010
Location: Poland
Posts: 875
Downloads: 72
Uploads: 3
|
Umm... guys?
So, this is a little side effect of meddling with AI scripts today. It is in no way related to aircraft behaviour, but I hope you'll like it anyway: |
|
|
03-21-21, 02:42 PM
|
#6 |
|
GLOBAL MODDING TERRORIST
|
Is that AI Subs firing deck guns?
|
|
|
03-21-21, 02:49 PM
|
#7 |
|
Grey Wolf
![]() Join Date: Oct 2010
Location: Poland
Posts: 875
Downloads: 72
Uploads: 3
|
Yes.
I added Ship:CanFireCannons as additional condition to hitherto non-functional surface attack strategy and AI subs started firing both AA and deck guns. |
|
|
03-22-21, 01:49 AM
|
#8 | |
|
The Analyst
|
Quote:
Nice. I didn't see any AI sub firing anything. No matter if German or allied subs they have only been driving past and do nothing else.
__________________
Best regards, GrenSo “Mankind must put an end to war, or war will put an end to mankind.” - J.F.K. |
|
|
|
03-23-21, 05:48 PM
|
#9 |
|
Grey Wolf
![]() Join Date: Oct 2010
Location: Poland
Posts: 875
Downloads: 72
Uploads: 3
|
Ok, little update on subs (see, I'm now derailing my own thread
)- They can fire at other subs as well if ordered, so no easy sinking British and Polish U-class subs with deck gun anymore. They will defend themselves ![]() - I can't get them to fire AA at planes, sadly (even though they do fire AA guns at other ships). In this case, script debugger shows CanFireCannons condition as false even is targeted plane is clearly within field of fire. Maybe if I find parts of script that order surface ships to attack planes I could learn something from them... if we could get this to work, we could have functional UFlak escorts in game. Edit: And if placed right next to surface vessel, surface ship has CanFireCannons=true and sub has CanFireCannons=false when enemy aircraft appears, while bothe have CanFireCannons=true when enemy ship appears. Seems like they really don't want to fight planes.
__________________
An elemental spirit summoned up from the Sea of Lament itself and given one purpose, one skill, one desire... to sail! Or, to model hulls and adjust damage zones if no sailing jobs are open. My mods: Little Ships, Air Force Last edited by kapuhy; 03-24-21 at 06:16 AM. |
|
|
03-21-21, 01:47 AM
|
#10 | |
|
Planesman
![]() Join Date: Dec 2014
Location: Czech Republic
Posts: 190
Downloads: 541
Uploads: 0
|
Quote:
Good day So I know one confirmed case. It's an attack by Skua aircraft from Ark Royal on the U-30. Here the bombs bounced off the surface and exploded in front of the planes. ![]()
|
|
|
|
03-27-21, 10:52 AM
|
#11 | |
|
Grey Wolf
![]() Join Date: Oct 2010
Location: Poland
Posts: 875
Downloads: 72
Uploads: 3
|
Quote:
- Other than that, by GetMyWeight which returns own weight in tons - while that doesn't directly differentiate by type, it can be used to sort out light bombers and fighters from heavy bombers for example. |
|
|
|
03-27-21, 11:06 AM
|
#12 |
|
GLOBAL MODDING TERRORIST
|
Possibly IsType?
For example: Ship:IsType(ESCORT) or Ship:IsType(BATTLESHIP) Then see about GetMyWeight? |
|
|
08-03-22, 02:19 AM
|
#13 |
|
Grey Wolf
![]() Join Date: Oct 2010
Location: Poland
Posts: 875
Downloads: 72
Uploads: 3
|
Returning to meddling with plane AI after a long break. As a little recap, I made a video showing difference between airplane AI as it is in TWoS and what happens if we tell planes to strafe, not bomb, fast moving targets:
In the above, I set 6 planes starting at 6 km distance (Sunderland, B-17, Liberator, Swordfish, Martlet, Catalina) to bomb our boat which is simply sailing in straight line at flank speed. Results: - unmodified AI: only level bombers even drop bombs, and after 3 minutes U-Boat is more or less intact (only light damage from guns). - "strafing" planes: two planes crash into sea, but remaining ones score several hits in 3 minutes sending U-Boat to the bottom. Edit: - Behaviour is only modified for targets moving over 5 kts. For static/slow targets planes use SetCourseBomb approach which is much safer. - I tried to add condition checking plane's own speed to break off the attack if in danger of stalling, but to my suprise GetCurrentSpeed() function returns unit's maximum, not current speed so it proved useless for this. Only thing that somewhat reduces stalling is increasing plane minimum height, but this has to be done on plane-by-plane basis.
__________________
An elemental spirit summoned up from the Sea of Lament itself and given one purpose, one skill, one desire... to sail! Or, to model hulls and adjust damage zones if no sailing jobs are open. My mods: Little Ships, Air Force Last edited by kapuhy; 08-03-22 at 04:35 AM. |
|
|
08-03-22, 05:22 PM
|
#14 |
|
Navy Seal
![]() Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
|
Brilliant!
Other than increased stalling chances for strafing planes, have you noticed any other undesired side effect? On a partly unrelated note: as you probably know coastal defenses featured in TWoS are in reality floating gun platforms. This is the only workaround I and Vecko found to land units not being able to shoot their guns. IIRC in stock game coastal batteries can aim and follow targets, but they never fire. Do you think we can fix them by editing their AI routines, the way you did with AI sub's deck guns? Edit: have you tried if the GetCurrentSpeedKnots() function works as supposed? Last edited by gap; 08-04-22 at 04:00 AM. |
|
|
08-04-22, 11:11 AM
|
#15 | |||
|
Grey Wolf
![]() Join Date: Oct 2010
Location: Poland
Posts: 875
Downloads: 72
Uploads: 3
|
Quote:
Quote:
Quote:
By the way, ship-weapons.aix script uses the same function to ensure an escort is not going too slow before dropping DC's. I bet this is bugged too and related to destroyers blowing themselves occasionally. |
|||
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
