| Author |
Scripting a hunter-killer group |
Teemu
Joined: Mar 12, 2002 Posts: 35 From: Helsinki, Finland
| Posted: 2002-12-10 11:32  
I've been adding a H-K group, complete with a CVE, several DDs and DEs and torpedo bombers, into my scenario.
I'm satisfied to the results, except for one thing: the torpedo bombers are lost soon after the scenario starts. I tried work around this by using EntryInterval definition, but this crashes the game after the torpedo bombers have been re-spawned 200+ times. It prints out some sort of 'too many units' Janus error. (and "Enemy losses, 173 torpedo bombers" look too silly)
Maybe you can help. Essentially it would be enough not to have the bombers "self-destruct" and not use EntryInterval. I guess they run out of fuel or something. Groups and units are included here:
[GROUP15] ;;; British hunter-killer group
Type = SHIPSQUADRON ;;; Attacker, 6 escorts, Swordfish
UnitType = CARRIER
Side = 1
Name = Hunter-killer group 1
Order1.1 = ROE,SUBMARINES,UNLIMITED,DESTROY,EVADE,FULL
Order1.2 = Speed,Telegraph,FULL
Order1.3 = Patrol,-35,50,200000
[GROUP15.1] ;;; hunter-killer destroyer pair 1 (Castle & Flower)
Type = SHIPDIVISION
UnitType = Destroyer
Side = 1
Name = H-K DD pair 1
Order1.1 = ROE,SUBMARINES,UNLIMITED,DESTROY,EVADE,FULL
[GROUP15.2] ;;; hunter-killer destroyer pair 2 (Flower & P-class)
Type = SHIPDIVISION
UnitType = Destroyer
Side = 1
Name = H-K DD pair 2
Order1.1 = ROE,SUBMARINES,UNLIMITED,DESTROY,EVADE,FULL
[GROUP15.3] ;;; hunter-killer destroyer pair 3 (Flower & B-class)
Type = SHIPDIVISION
UnitType = Destroyer
Side = 1
Name = H-K DD pair 3
Order1.1 = ROE,SUBMARINES,UNLIMITED,DESTROY,EVADE,FULL
[GROUP15.4] ;;; hunter-killer air cover (Swordfish)
Type = AIRWING
UnitType = BOMBER
Side = 1
Name = H-K air cover 1
EntryTime = 0900
EntryDate = 19431015
EntryInterval = 1001
Order1.1 = BombDC
Order1.2 = BombLow
Order1.3 = ROE,SUBMARINES,UNLIMITED,DESTROY,CONSERVE,FULL
[GROUP15.5] ;;; hunter-killer air cover (Swordfish)
Type = AIRWING
UnitType = BOMBER
Side = 1
Name = H-K air cover 2
EntryTime = 0850
EntryDate = 19431015
EntryInterval = 1007
Order1.1 = BombDC
Order1.2 = BombLow
Order1.3 = ROE,SUBMARINES,UNLIMITED,DESTROY,CONSERVE,FULL
[UNIT21] ;;; hunter-killer group's carrier
Group = 15
TypeAbrev = CVE
Class = NCVEAttacker
Name = Fencer
Location = -35,50
Orentation = 0
BoilersHot = TRUE
IconName = NSHIP
Display = SHOW_AS_GROUP
[UNIT22] ;;; hunter-killer group's destroyer, first pair
Group = 15.1
TypeAbrev = DE
Class = Ncastle
Name = Hurst Castle
Location = -35.01,50
Orentation = 0
BoilersHot = TRUE
IconName = NSHIP
Display = SHOW_AS_GROUP
[UNIT23] ;;; hunter-killer group's destroyer, first pair
Group = 15.1
TypeAbrev = DE
Class = Nflower
Name = Cowslip
Location = -35.02,50
Orentation = 0
BoilersHot = TRUE
IconName = NSHIP
Display = SHOW_AS_GROUP
[UNIT24] ;;; hunter-killer group's destroyer, second pair
Group = 15.2
TypeAbrev = DE
Class = Nflower
Name = Marigold
Location = -35.03,50
Orentation = 0
BoilersHot = TRUE
IconName = NSHIP
Display = SHOW_AS_GROUP
[UNIT25] ;;; hunter-killer group's destroyer, second pair
Group = 15.2
TypeAbrev = DD
Class = NDDOnslow
Name = Partridge
Location = -35.04,50
Orentation = 0
BoilersHot = TRUE
IconName = NSHIP
Display = SHOW_AS_GROUP
[UNIT26] ;;; hunter-killer group's destroyer, third pair
Group = 15.3
TypeAbrev = DE
Class = Nflower
Name = Cyclamen
Location = -35.05,50
Orentation = 0
BoilersHot = TRUE
IconName = NSHIP
Display = SHOW_AS_GROUP
[UNIT27] ;;; hunter-killer group's destroyer, third pair
Group = 15.3
TypeAbrev = DD
Class = NDDA
Name = Boadicea
Location = -35.05,50
Orentation = 0
BoilersHot = TRUE
IconName = NSHIP
Display = SHOW_AS_GROUP
[UNIT28] ;;; hunter-killer air cover
Group = 15.4
TypeAbrev = TB
Class = ATBSwordfishMkIII
Name = Swordfish
Location = -35,50.05
Orientation = 0
Flag = TRUE
Guide = TRUE
Altitude = 200
Throttle = 0.8
Fuel = 0.0000
BoilersHot = TRUE
IconName = AIRCRAFT2
Display = SHOW_AS_GROUP
[UNIT29] ;;; hunter-killer air cover
Group = 15.5
TypeAbrev = TB
Class = ATBSwordfishMkIII
Name = Swordfish
Location = -35.1,50.1
Orientation = 0
Altitude = 300
Throttle = 0.8
Fuel = 0.0000
BoilersHot = TRUE
IconName = AIRCRAFT2
Display = SHOW_AS_GROUP
P.S. If you're interested, the script works otherwise fine, except sinking the carrier doesn't stop the bombers from spawning. For example, it is possible to be spotted by one bomber, that attacks you, and then calls one DD sub-group and the other bomber(s) to your position. Very exciting, should you surface and run away on max speed before the destroyers arrive, or stay deep to avoid getting bombed again?
 
|
FAdmiral
Joined: Feb 28, 2002 Posts: 1401 From: Atlanta, GA, USA
| Posted: 2002-12-10 16:01  
Teemu, send me a copy of the .sdf file
for that scenario and I will see if I
can get the planes to work like they should.
From the looks of your scripting, there are
a few things I would like to try....
JIM
_________________ Contrary to popular belief, most people do possess a photographic memory. The problem is most of them are simply out of film.
 
|
Teemu
Joined: Mar 12, 2002 Posts: 35 From: Helsinki, Finland
| Posted: 2002-12-10 19:30  
I tampered Swordfish's UDF to carry 100 times the fuel. Now they won't crash, unless I assign them waypoints or patrol areas. But they will fly straight their initial orientation (for hours) until somebody spots the boat. Not very bright but will do.
If you want to toy around with the scenario, all needed unit and group blocks are there. Except u-boat.
This all is part of a huge scenario I'm scripting. I'm about one third finished, and testing shows playing the mission this far takes at least 50 days game time. And surviving is difficult most of the time. LOL!
 
|
Mark K
Joined: Feb 27, 2002 Posts: 474 From: Petaluma, California
| Posted: 2002-12-10 20:19  
I'd recommend creating an airbase in the vicity of the carrier which spawns the aircraft. You can then attach the airbase to the carrier unit so that it will (maybe) follow the carrier as it moves along.
Mark
[ This Message was edited by: Mark K on 2002-12-10 20:19 ]
 
|
Teemu
Joined: Mar 12, 2002 Posts: 35 From: Helsinki, Finland
| Posted: 2002-12-13 06:40  
Quote:
|
On 2002-12-10 20:19, Mark K wrote:
I'd recommend creating an airbase in the vicity of the carrier which spawns the aircraft.
|
|
If I do this, then I have to give up aircraft calling for backups. If my airbase is associated to a sub-group 15.4, nothing will spawn, and if to another group (for example 16), they won't communicate with the escorts.
 
|
|