SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SHIII Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=195)
-   -   [TEC] Make AI-Uboats attack Convois, via Radio (https://www.subsim.com/radioroom/showthread.php?t=147005)

urfisch 01-18-09 12:22 PM

[TEC] Make wolfpacks attack Convois, via Radio!
 
Ive been gambling with this topic since years...and now there seems some kind of idea, that might make the ai-boats behave as ai-wolfpacks!

theres another thread on that (http://www.subsim.com/radioroom/showthread.php?t=146905) but i want to ask the whole community about the following tec-question. where might the behavior of "called airstrikes" be stored?

i mean the dependence of:

- sending radio message "contact report"
- airplanes are send to your position, if youre "near" a german airfield


where could this be coded? i looked through the "cfgs" and the "dats"...nothing. now i came across some topics in other forums, where the "simdata.dll" is defined as the main controlling unit for this game. does anyone agree on that?

but for me its a bunch of hyroglyphs...i have no idea how to find the strings, that might be responseable for the airstrikes. but if one of you finds them, we could make some new "air-units" - uboats! to get an overview how this idea works, take look into the other thread (http://www.subsim.com/radioroom/showthread.php?t=146905)

thx a lot in advance!

:up:

bigboywooly 01-18-09 12:53 PM

Airstrike cfg in the Cfg folder governs the strike rates
How often etc

[AirStrikeSettings]
; AirStrike Creation Parameters
; Airstrike Session:
; 1. Compute airbases in range according to their aircraft maximum ranges
; 2. Compute air coverage factors on allies/axis/neutral on the target zone
; 3. Compute airstrike probability from each base
; 3.1 check number of aircraft that can strike at that range and conditions, and compute a coverage factor based on the range of each aircraft type
; and detection area around submarine ( 10 km radius )
; 3.2 multiply coverage factor for the target area with :
; - current airstrike probability againt that side
; - nigft factor ( if necessary )
; - airbase competence
; - close to airbase factor
; 3.3 check probability for airstrike
; 3.4 add more aircraft probabilistically for a large target


Maximum Aircraft Range=2000 ;[>0] in kilometers
Poor Airbase Modifier=0.2 ;[>0] Modifier for poor airbase (carrier) rating
Novice Airbase Modifier=0.6 ;[>0] Modifier for novice airbase (carrier) rating
Competent Airbase Modifier=1.4 ;[>0] Modifier for competent airbase (carrier) rating
Veteran Airbase Modifier=2.4 ;[>0] Modifier for veteran airbase (carrier) rating
Elite Airbase Modifier=3.0 ;[>0] Modifier for elite airbase (carrier) rating
Night Modifier=0.2 ;[>0] Modifier on strike probability at night
Default Air Strike Probability=35 ;[>0] Default probability to send an airstrike from a airbase (carrier)
Enemy Air Strike Probability Increase on Radio Messages Sent=25 ;[>0] Increase over the default probability on a radio message sent
Friendly Air Strike Probability Increase on Contact Report Sent=50 ;[>0] Increase over the default probability on a contact message sent
Enemy Air Strike Probability Increase on Player Detection=40 ;[>0] Increase over the default probability on player detection
Atenuation Factor=10 ;[>0] decrease from an increased probability to default one on each air session
Logic Steps Between Air Sessions=20 ;[>0] steps between air fighting sessions, 10*Logic Interval(90sec)

But there is probably a trigger somewhere too

urfisch 01-18-09 12:56 PM

yep, and this trigger is needed to modify the airbases with our aiboats...i think?! i also do not know, how the aiboats are lead to your position. there must be given some pararmeters for the planes, which are created by the trigger (your radio message "contact report" or similar.

A6Intruder 01-18-09 01:32 PM

Quote:

Originally Posted by urfisch
yep, and this trigger is needed to modify the airbases with our aiboats...i think?! i also do not know, how the aiboats are lead to your position. there must be given some pararmeters for the planes, which are created by the trigger (your radio message "contact report" or similar.

Just a thought. Ask Rowi in german Ubi-Forum about that. ImO he did something like that in LSH 3 with german airplanes. Would be a wonder if he could not help you with that. Would be great if that could work.:up:
Kind regards

urfisch 01-18-09 04:41 PM

sure, it would be more than great. i sent him a pm...

rowi58 01-19-09 02:18 AM

Hi,

a "call" by "radio message" only works with NONE-SCRIPTED air units - as bigboywooly mentioned above. A "call" for ai-subs (wolfpack) - similar to the cofiguration in the "Airstrike.cfg" - is impossible (imo).

Ai-subs must be scripted into the RND and/or SCR files.

Greets
rowi58

Hunter 01-19-09 03:15 AM

How about adding AI boats to Air folder as unscripted arcrafts will it be possible to call them then?

rowi58 01-19-09 03:28 AM

Sure, if subs can fly :rotfl:. And you must have "AirBase" for subs too. And just remeber the maxium speed of subs: the "AirBase" must be very near to the (possible) convoy routes.

So it is better to script the "wolfepacks" into the RND or SCR files.

Greets
rowi58

urfisch 01-19-09 05:58 AM

ok. but if the subs are scripted into the layers...they are still not available through radio. that is, what needs to be achieved! so the way with airbases is the way we have to experiment with! (and there must not be so many bases, as you can set their range.)

but how do we get the aiboats linked to airbases? so they work the same way as planes do?

tater 01-19-09 07:27 PM

I've made "air boats" in sh4. You can make a plane that will happy drive along in the water, with the 3d model of a sub, or whatever you like.

iambecomelife 01-19-09 07:49 PM

Quote:

Originally Posted by urfisch
ok. but if the subs are scripted into the layers...they are still not available through radio. that is, what needs to be achieved! so the way with airbases is the way we have to experiment with! (and there must not be so many bases, as you can set their range.)

but how do we get the aiboats linked to airbases? so they work the same way as planes do?

I think all you have to do is go to data\land\[airbase]. Design a new "airbase" that spawns the new unit. For instance, let's say you wanted American subs. Instead of the text below:

[Unit]
ClassName=LargeAirBaseUS
UnitType=406
MaxSpeed=0.000000
MinSpeed=0.000000
Length=1
Width=1
[AirGroup 1]
StartDate=19380101
EndDate=19420601
Squadron1Class=LBSPBYCatalina
Squadron1No=2
[AirGroup 2]
StartDate=19420602
EndDate=19451201
Squadron1Class=LBSPBYCatalina
Squadron1No=1
Squadron2Class=LBB24LiberatorUS
Squadron2No=2
Squadron3Class=LBMk.3
Squadron3No=2

You would modify it to:


[Unit]
ClassName=[SubmarineSpawnpointUS]
UnitType=406
MaxSpeed=0.000000
MinSpeed=0.000000
Length=1
Width=1
[AirGroup 1]
StartDate=19380101
EndDate=19420601
Squadron1Class=[New Sub Unit]
Squadron1No=2
[AirGroup 2]
StartDate=19420602
EndDate=19451201
Squadron1Class=[New Sub Unit]
Squadron1No=1
Squadron2Class=[New Sub Unit]
Squadron2No=2
Squadron3Class=[New Sub Unit]
Squadron3No=2

bigboywooly 01-20-09 12:41 AM

I tried something similar for my test mission

[Unit]
ClassName=NormalSubBaseGe
UnitType=406
MaxSpeed=0.000000
MinSpeed=0.000000
Length=1
Width=1

[AirGroup 1]
StartDate=19410102
EndDate=19430101
Squadron1Class=Resupply Uboat
Squadron1No=1

And didnt spawn anything - using a regular AI sub though

urfisch 01-20-09 05:42 AM

Quote:

Originally Posted by bigboywooly
I tried something similar for my test mission

[Unit]
ClassName=NormalSubBaseGe
UnitType=406
MaxSpeed=0.000000
MinSpeed=0.000000
Length=1
Width=1

[AirGroup 1]
StartDate=19410102
EndDate=19430101
Squadron1Class=Resupply Uboat
Squadron1No=1

And didnt spawn anything - using a regular AI sub though

is the ai-boat scripted in itself and defined as "Resupply Uboat"? otherwise it will not even spawn and nothing happens. if it is defined as "Resupply Uboat" it may spawn, but stay there and do nothing - if there are no scripts for these boats. i dont know, how the ai-boats work.

and there may be another problem. as mentioned before, there are parameters sent, which trigger the spawn of luftwaffe planes, which attack your convoi. maybe these triggers do not make the uboats spawn, even they are defined as "air units"...

any thoughts on that? the idea is as simple as it gets. so there must be a working solution!

Hunter 01-20-09 06:15 AM

I guess that Ai-sub and/or other units should be added to airfolder to be spawned ba a base.

tater 01-20-09 10:15 AM

What I did in sh4 was to make a new plane, and point it at the 3d model of a boat as an experiment. When that worked, I cloned a plane, and changed the 3d model in the dat to a boat, messed with the sim, etc. Had to live in the Air folder.

urfisch 01-20-09 10:38 AM

Quote:

Originally Posted by tater
What I did in sh4 was to make a new plane, and point it at the 3d model of a boat as an experiment. When that worked, I cloned a plane, and changed the 3d model in the dat to a boat, messed with the sim, etc. Had to live in the Air folder.

anyone tested this?

anyway, if this works...the cloned "airplane-boats" do not have the properties of the ai-boats...right? and therefore will not attack or dive, or do similar things.

tater 01-20-09 10:53 AM

No, it acted like a plane in the first test (it WAS a plane, just a different 3d model. Dunno about sh3, but in sh4 you can simply point the cfg at a different model path, and boom, it uses it.

The 2d experiment, actually changed the sim of the plane so that it would drive around on the water. It was none the less a PLANE, and acted like one, just not flying (hence "airboat" :) )

The goal in my experiments was a boat that would happily drop the fully functional AI air torpedo in sh4.

bigboywooly 01-20-09 11:19 AM

Quote:

Originally Posted by urfisch
Quote:

Originally Posted by bigboywooly
I tried something similar for my test mission

[Unit]
ClassName=NormalSubBaseGe
UnitType=406
MaxSpeed=0.000000
MinSpeed=0.000000
Length=1
Width=1

[AirGroup 1]
StartDate=19410102
EndDate=19430101
Squadron1Class=Resupply Uboat
Squadron1No=1

And didnt spawn anything - using a regular AI sub though

is the ai-boat scripted in itself and defined as "Resupply Uboat"? otherwise it will not even spawn and nothing happens. if it is defined as "Resupply Uboat" it may spawn, but stay there and do nothing - if there are no scripts for these boats. i dont know, how the ai-boats work.
!

Resupply boat is the IXB AI class name
No wasnt scripted
The Sub ( air ) base was placed in the campaign files

Was using blank campaign files so any other scripts wouldnt matter anyway
Besides that shouldnt be a problem as air units are scripted and still spawn from air bases

No Tater SH3 doesnt have that feature to point to a 3d model
Another improvement when using multiple variations of the same ship

May try a clone of the AI IXB but change the type= to an airplane
See if it spawns that way using a normal airbase
Though not sure what the behaviour will be like if does
lol

Stiebler 01-22-09 04:04 AM

Can't make it work
 
Urfisch's interesting idea led me to carry out some tests with NYGM.

First, I cloned Sergbuto's AI U-boats (all type VIIAs) and gave them new class names, also max speeds of 10 knots. These data were copied into a copy of the cfg file for a FW200 bomber, not a U-boat cfg file. Then I cloned the AI U-boat turms, gave them new names, and referenced the new turms in the new AI U-boats. Then I cloned the German large air base, gave it a new name, gave it an altitude of 15 feet, and gave it three squadrons of 6, 6 and 4 AI U-boats. Then I placed the new turns in the \library folder, the new AI U-boats in the *\Air* folder, and the new airbase in the \Land folder.

Second, I went to Mission Editor. The platform library recognises all these changes without difficulty, and it was easy to create a mission with the new German airbase to spawn AI U-boats ('air-boats') placed in mid-ocean, an Allied convoy going in small circles around the airbase, and a player U-boat to approach the convoy.

The mission loaded without any problems, and I sailed my U-boat round and round the convoy, both close and outside convoy spawning range. All the time signalling to BdU (also the convoy signalled its position every three hours). All this was in early 1944, when air attacks are a real threat from the normal airbases.

I saw nothing at all of air-boats, which should have shown up on the map as blue circles after spawning. Nor was the convoy disturbed.

Third, I added the new German airbase, to spawn air-boats, close to Newfoundland where there a lot of convoys in campaign mode. I sailed a U-boat from France out to Newfoundland (January 1944), waited for convoys to arrive close to the new German airbase, and made the same approaches with the U-boat as in Mission Editor.

Again, there was no sign of any air-boats being spawned.
I did all this testing in almost perfect weather conditions, since the airbases never spawn aircraft in bad visibility.

So I cannot demonstrate that this idea works, although the conventional Allied airbases spawned over the U-boat all right, after all the signalling!

One other item of interest - I tried again, after placing roster entries for the new airbase as British, and for the new air-boats as British, and played the original mission again.
Once again, I never saw anything, but this time something definitely saw my U-boat. While close to the new airbase, and far away from any convoy, and sending numerous radio signals while cruising at slowest speed, the game became sluggish (other units nearby), then the stealth meter suddenly went red! Weather conditions were perfect, but there was nothing to see in any direction. I tried to look underwater, but the water was too dark in deep water and it was impossible to tell if there were any submerged U-boats. (Sergbuto's AI U-boats are designed to operate underwater, not on the surface.)
It was possible to shake off the hidden detection by running off at full speed, since the AI air-boats were limited to 10 knots, but then sending out more radio messages resulted in the same phenomenon, being detected by something invisible.
No Allied unit ever appeared on the main map close to the U-boat, although proper aircraft appear on the map.

It has occurred to me that Urfisch's idea might work in principle, but German air-boats perhaps respond only to the convoy signals, but not to those of the U-boat. This makes the idea impracticable, because it would be necessary to make the convoy signal its progress far too often - and there would have to be a lot of air-boat bases in the Atlantic to respond. It might even slow up the game, if every convoy has to struggle across the whole Atlantic attacked by air-boats, while the player is nowhere near. There is also the problem of weapons load-out. My air-boats had a load-out of bombs in their air .cfg file, so they were probably bombing the ocean bed after every attack! But how would you add a load-out of deck-guns or torpedoes?

Time to give up, I think. Pity.

Stiebler.

Hitman 01-22-09 04:44 AM

In SH2 we had a similar problem, in that scripting german U-Boat bases to spawn AI U-Boats caused the game to become laggish as battles happened thousands of miles away from the player. I solved that by making the bases attached to the convoy be in fact ALLIED, hence they would only detect the player U-Boat and spawn.....german U-Boats. :)

Is it possible to attach an allied airbase to a unit in the convoy? That way, when the player gets close the convoy would inmediately detect it and spawn the wolfpack :hmm:

Nevertheless, the first problem to be solved seems to be the effective spawning of the U-Boats. Once this is solved, then it will be time to think how to place them properly in the campaign.


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