• There seems to be an uptick in Political comments in recent months. Those of us who are long time members of the site know that Political and Religious content has been banned for years. Nothing has changed. Please leave all political and religious comments out of the forums.

    If you recently joined the forums you were not presented with this restriction in the terms of service. This was due to a conversion error when we went from vBulletin to Xenforo. We have updated our terms of service to reflect these corrections.

    Please note any post refering to a politician will be considered political even if it is intended to be humor. Our experience is these topics have a way of dividing the forums and causing deep resentment among members. It is a poison to the community. We appreciate compliance with the rules.

    The Staff of SOH

  • Server side Maintenance is done. We still have an update to the forum software to run but that one will have to wait for a better time.

Thank You and DCG.

Pen32Win

Charter Member
Howdy Gents;

Thanks to all of those who sent their well-wishes for my pup and I. We fought hard and long but it was a battle that could not be won and she is now in a better place. Thanks for your support.

Since then I’ve been playing with a few things in DCG and one of the things that has always turned me off about DCG Missions are the HUGE number of Collisions. Especially with fighter units that are on CAP missions. After spending a few hours digging and following AI’s in chase view I figured it out.

On CAP missions or any other mission with a Loiter WP CFS2 has the formation circle counter-clockwise. Now DCG sets fighter units up in an Echelon Left configuration. This does two things. First the Lead A/C are always cutting across the path of the A/C behind them. Second it compresses the formation forcing the A/C closer together. I went into a DCG mission with 30 A/C formations and hand edited all of the fighter units to a Echelon Right formation.

The original looks like this:

unit_id_postion.0=####,0,0,0,0
unit_id_postion.1=####,-500,-1000,-10
unit_id_postion.2=####,-1000,-2000,-20
unit_id_postion.3=####,-1500,-3000,-30
unit_id_postion.4=####,-2000,-4000,-40
unit_id_postion.5=####,-2500,-5000,-50
unit_id_postion.6=####,-3000,-6000,-60
unit_id_postion.7=####,-3500,-7000,-70

Changed to This:

unit_id_postion.0=####,0,0,0,0
unit_id_postion.1=####,500,-1000,-10
unit_id_postion.2=####,1000,-2000,-20
unit_id_postion.3=####,1500,-3000,-30
unit_id_postion.4=####,2000,-4000,-40
unit_id_postion.5=####,2500,-5000,-50
unit_id_postion.6=####,3000,-6000,-60
unit_id_postion.7=####,3500,-7000,-70

Once I did this I had ZERO collisions involving Fighter Units.

Now the question is how do we get DCG to create Echelon Right instead of Left Formations?
 
Hey, Pen, thanks for figuring that out. Collisions have been an annoyance to me as well.

Pen, I'm afraid the only way is to prevail upon Lowengrin to do another fix. I've never seen DCG use anything except echelon left for fighters and box for bombers.

It would also be nice if the range limitation on fighters in the ETO could be fixed (currently limited to 200 nm), and if other fighter squadrons besides the player squadron would get escort missions.

There are two other problems with DCG I know about. DCG will assign strikes on ship formations after all the ships in the formation have been sunk. There is also a small editing glitch which sometimes occurs in the "squadrons" file when aircraft are transferred.

If those problems and the one you mentioned with the echelon formation (should be finger four) could be fixed, we could create really nice dynamic campaigns for both the PTO and ETO, maybe better overall than CFS3's dynamic campaign.

I suspect if a few of us would kick in a small monetary donation, we could get Lowengrin to fix all these problems. Hey, a perfectly functioning dynamic campaign would kick CFS2 up a couple more notches.:ernae:

P.S. the editing glitch in the "squadrons" file is probably something which has DGC newbies giving up in frustration. It's very easy to find and fix if you know about it, but it will stop DCG dead in it's tracks.
 
Ask, and you shall receive...

Hey Pen,

I've just written a Qbasic program that changes the formations of the fighter squadrons to Finger Four. You just run the Qbasic program after you generate a mission, and it does the job.

I haven't tested the finger four enough to know how well it does at minimizing collisions compared to other formations. I did follow a CAP around for a while, and it didn't seem to have a problem. Most of the planes in a finger four are to the right, at different altitudes, and a left turn kind of strings them out into a line.

This is hopefully the first step in a process of improving the DCG's performance and capabilities by computerized editing of the DCG text files.:iidea: Other plans include options to change the player squadron's loadouts - including different loadouts for individual planes in the flight - and also to provide escort flights for bomber formations.
I might even go as far as writing some code to swap out air groups, airfields, infrastructure files, and locations in order to get DCG to concentrate on different areas and targets at different times and to get a wide variety of air groups and aircraft into the campaigns at different times. However, all this will take a lot of head scratching to figure out algorithms for performing these tricks.:isadizzy:

Anyhow, I've got your formation-changer program thingie. It would be a simple matter to edit the program to create other formations, if you think another formation would work better. The bomber formations could also be changed. In fact, it would be easy enough to create our own formations. Creating a formation is just a matter of editing the coordinates in the program. :ernae:
 
Heres the code. Qbasic can run this code from a Notepad file with a ".BAS" extension. The code is designed to be run from the CFS2 "CAMPAIGNS" folder. Anyone who has Qbasic and an interest in DCG can just drop the Qbasic files and a notepad file containing this code into the CAMPAIGNS file. Then create a shortcut to the Qbasic.exe file. Load the program with Qbasic and run it after generating a DCG mission. The notepad file containing the code should be named in this format: "XXX.BAS"

'change formations
10 CLEAR : CLOSE : line$ = ""
20 OPEN "Mission.MIS" FOR INPUT AS #1
30 OPEN "Missionx" FOR OUTPUT AS #2
40 IF EOF(1) THEN 160
50 LINE INPUT #1, line$
60 IF LEN(line$) < 14 THEN 140
70 IF RIGHT$(line$, 14) = "-500,-1000,-10" THEN line$ = LEFT$(line$, 26) + "-300,-600,0"
80 IF RIGHT$(line$, 15) = "-1000,-2000,-20" THEN line$ = LEFT$(line$, 26) + "300,-600,150"
90 IF RIGHT$(line$, 15) = "-1500,-3000,-30" THEN line$ = LEFT$(line$, 26) + "600,-1200,150"
100 IF RIGHT$(line$, 15) = "-2000,-4000,-40" THEN line$ = LEFT$(line$, 26) + "1200,-1200,300"
110 IF RIGHT$(line$, 15) = "-2500,-5000,-50" THEN line$ = LEFT$(line$, 26) + "900,-1800,300"
120 IF RIGHT$(line$, 15) = "-3000,-6000,-60" THEN line$ = LEFT$(line$, 26) + "1500,-1800,450"
130 IF RIGHT$(line$, 15) = "-3500,-7000,-70" THEN line$ = LEFT$(line$, 26) + "1800,-2400,450"
140 PRINT #2, line$
150 line$ = "": GOTO 40
160 CLOSE
170 KILL "Mission.mis"
180 NAME "Missionx" AS "Mission.mis"
190 END

Not much to it, but I've always disliked the echelon left formation DCG uses for fighters. Anyhow, it's a start. Maybe a few dozen more lines like this can make DCG a whole new animal.:d
 
Looking Good Ettico;

The formation I had the best luck and least collisions with for the CAP Units was an Echelon Right. This ensures that there are no A/C side by side in the formation.

I've got another little project (The old BoBS Campaign) on the stove right now but will give this a try ASAP.

Bomber Formations, thinking, thinking.....Ouch...LOL
Swapping out Ships/Taskforces would be Great, it's pretty limited and in the course of a longer campaign it would be great to have.
How about deleting Taskforces when all of the ships are SUNK? OR Change their Start Date to "1999"???
 
Er...umm...the code I posted has a small bug. :redf: I manually renumbered the lines but forgot to renumber a branch. Here's the corrected code:



'change formations
10 CLEAR : CLOSE : line$ = ""
20 OPEN "Mission.MIS" FOR INPUT AS #1
30 OPEN "Missionx" FOR OUTPUT AS #2
40 IF EOF(1) THEN 160
50 LINE INPUT #1, line$
60 IF LEN(line$) < 14 THEN 140
70 IF RIGHT$(line$, 14) = "-500,-1000,-10" THEN line$ = LEFT$(line$, 26) + "-300,-600,0"
80 IF RIGHT$(line$, 15) = "-1000,-2000,-20" THEN line$ = LEFT$(line$, 26) + "300,-600,150"
90 IF RIGHT$(line$, 15) = "-1500,-3000,-30" THEN line$ = LEFT$(line$, 26) + "600,-1200,150"
100 IF RIGHT$(line$, 15) = "-2000,-4000,-40" THEN line$ = LEFT$(line$, 26) + "1200,-1200,300"
110 IF RIGHT$(line$, 15) = "-2500,-5000,-50" THEN line$ = LEFT$(line$, 26) + "900,-1800,300"
120 IF RIGHT$(line$, 15) = "-3000,-6000,-60" THEN line$ = LEFT$(line$, 26) + "1500,-1800,450"
130 IF RIGHT$(line$, 15) = "-3500,-7000,-70" THEN line$ = LEFT$(line$, 26) + "1800,-2400,450"
140 PRINT #2, line$
150 line$ = "": GOTO 40
160 CLOSE
170 KILL "Mission.mis"
180 NAME "Missionx" AS "Mission.mis"
190 END
 
Looking Good Ettico;

The formation I had the best luck and least collisions with for the CAP Units was an Echelon Right. This ensures that there are no A/C side by side in the formation.

I've got another little project (The old BoBS Campaign) on the stove right now but will give this a try ASAP.

Bomber Formations, thinking, thinking.....Ouch...LOL
Swapping out Ships/Taskforces would be Great, it's pretty limited and in the course of a longer campaign it would be great to have.
How about deleting Taskforces when all of the ships are SUNK? OR Change their Start Date to "1999"???

I'm sure you're right about the echelon right formation being the best to minimize collisions. Well, you already know how to edit the "Mission" file to change formations. Editing the code I posted is the same thing, except you only have to do it once.:d

Yep. Getting rid of SUNK task forces would be an obvious improvement. However, that will have to be done before generating a mission. Doing it after generating a mission would totally blow DCG's mind.

That's a problem I haven't quite worked out. File management stuff like swapping task forces and eliminating SUNK task forces has to be done BEFORE generating a mission, or DCG is likely to apply results of the previous mission incorrectly, or might even crash. Effectively, that means DCG has to be run first to apply results of the previous mission. Then the QB program will have to be run to do file management stuff like swapping task forces and eliminating sunk task forces. Then another DCG mission will have to ge generated (after the QB deletes the "events" and "debrief" files). Then the QB program will have to run again to edit the "Mission" file, changing formations, loadouts, creating escort flights and such.

But all this is going to get complicated, programming-wise. I've done some complicated stuff with files using Qbasic before, but it's been years. So I'd better take it a step at a time, simple stuff first. That means editing the "Mission" file after generating a mission - changing formations, loadouts, and assigning escorts.
 
Roger that, read you 5x5.

Out of the ones you listed to work on first IMHO the Attachment of Escorts to Bomber Formations would be the biggest step forward.

Great work!
 
Damn. :banghead:The second posting of the code still had a bug in it. I edited the bug out. The second edition should work now.

Note: for some reason, I wasn't able to edit the first version, but now I can. I fixed it too.
 
I flew a test mission in the ETO after using the formation editor to change all the fighters in the campaign to finger four. There are 16 fighter squadrons in the campaign I'm fooling with. It's a summer '43 campaign that concentrates mostly on Wolfi and Rami's airfields in Western Europe.

The good news is, I didn't notice any fighter collision messages, though I might have missed one. I was busy much of the time, running from bandits and looking for an airfield to bomb that wasn't swarming with bandits. They were swarming all over the place. I counted four squadrons of bandits around the airfield I was supposed to bomb. They were laying for me. One good thing about DCG is, it doesn't cuss you out if you attack a different target than the one you're assigned. So don't be a fool. If they're laying for you, go elsewhere.

The bad news is, there were a few bomber collisions. I don't know what to do about the bombers. Level bombers have to be in tight formations to get good bombing patterns. I'll try spreading them out a little. I guess every little bit helps.

The other bad news is, the bombers took a beating from the German fighters due to lack of escorts. The Allied fighters will fly CAP's and strikes, but only the player squadron ever gets escort duty. You're right, Pen, that needs to be fixed. That will give an added bonus. DCG currently limits fighters to 200 nm in the ETO, but the bombers can go anywhere. Attaching fighters as escorts will allow the fighters to go deep and see some pretty scenery. But it's not as easy as it sounds...

So I'm looking at spreading out the bombers a little bit first. Then I'm going to fix it so the player squadron can easily be loaded with something besides little pitty-pat rockets that look like firecrackers and have about the same effect.:d Then I'll start working on escorts.
 
What Kind of Bombers Ettico? Level or Attack Bombers?

I think you're right if you're talking about Attack Bomber formations. They need a BIG Spread out formation because of the old "Pass Bye, Turn 180, Then Attack problem. A-20's, Beaufighters, B-25 Strafers, KI-45's, etc...all just love to run each other over during the turn about. Especially if the targets on the ground are packed in tight. Don't have nearly as bad a problem with the small single engine Attack Bombers SBD, Val, TBF.... MOI's coming into play...

I've never had much of a problem with the Level Bombers giving each other greif. B-24's, B-17's, B-25's, B-26's, Betty, Kate, Helen, Lily, Nell, Sally....etc.

In the PTO the unescorted Bombers really play heavily in favor of the USAAF. They're much better at defending themselves and much harder to bring down than the IJAF/IJN Bombers. They (US) also tend to fly higher and faster. Most of the time the lighter IJAF/IJN fighters are climbing to intercept and the USAAF/USN fighters are diving, especially P-38's.
 
What Kind of Bombers Ettico? Level or Attack Bombers?

I think you're right if you're talking about Attack Bomber formations.
I've never had much of a problem with the Level Bombers giving each other greif.

I'm using the stock overhaul B-24 in this campaign. They're level bombers, designated as 2/2. It may be that the AI just have a problem handling them. I have noticed them bouncing up and down some in formation.

I tried some 2/5 designated B-25's in one mission, and most of them were reported as destroyed. I don't know what happened to them. It didn't say they collided - just said they were destroyed.
 
Try the Alphasim Freeware B-24. You'll have to split it apart as the D and J are in the same folder and you know how that goes. Once done it's a great replacemant for the Stocker and very, very FPS freindly.
 
Try the Alphasim Freeware B-24. You'll have to split it apart as the D and J are in the same folder and you know how that goes. Once done it's a great replacemant for the Stocker and very, very FPS freindly.

Thanks, Pen, I will try that one.

I'm still going to tinker with the bomber formation. When I get around to uploading, some people will want to use different planes, so I want to get the formations as user-friendly as possible. :ernae: For starters, I want to try spreading the bombers vertically. That way they will still be in a tight formation for bombing, but larger altitude differences might keep them from colliding.

Edited to add: I'm glad you mentioned the unescorted bomber advantage in the PTO. The US level bombers, especially the stocker B-25, don't have much of a problem defending themselves against the lightly-built Japanese planes. Also, in carrier ops, you don't want to be sending all your fighters off escorting bombers and leaving the carriers unprotected. I've never been much concerned about escorts in the PTO.

But Europe is different. German fighters can and will destroy unescorted bombers. The only chance unescorted bombers have is if the Germans aren't defending the target the bombers are going for. Plus, who cares if the Germans get away with bombing Bodney?
 
This code changes the fighter formations to Finger Four, spreads the bomber formations vertically to minimize collisions, and allows the player to change the player squadron payloads.

The next step will be to add some lines to collect information on the flights as the "Mission" file is being read and edited. Once that's done, I hope to be able to add some code to reassign needless CAP flights to escorts.


'change formations: change player flight payloads
100 CLEAR : CLOSE : line$ = "": load = 0: count = 0
200 OPEN "Mission.MIS" FOR INPUT AS #1
300 OPEN "Missionx" FOR OUTPUT AS #2
400 IF EOF(1) THEN 1600
500 LINE INPUT #1, line$
520 IF line$ = "is_player_aircraft=1" THEN load = 1
530 IF load = 0 THEN 600
540 CLS : PRINT "Assign payloads to your flight"
545 IF LEFT$(line$, 7) <> "payload" THEN 600
550 count = count + 1: PRINT : PRINT "aircraft "; count; " "; line$
560 x = LEN(line$) - 7: x$ = RIGHT$(line$, x)
570 PRINT "desired payload (hit ENTER for no change)"
575 INPUT x$
580 line$ = "payload=" + x$
600 IF LEN(line$) < 13 THEN 1400
700 IF RIGHT$(line$, 14) = "-500,-1000,-10" THEN line$ = LEFT$(line$, 26) + "-300,-600,0": GOTO 1380
800 IF RIGHT$(line$, 15) = "-1000,-2000,-20" THEN line$ = LEFT$(line$, 26) + "300,-600,150": GOTO 1380
900 IF RIGHT$(line$, 15) = "-1500,-3000,-30" THEN line$ = LEFT$(line$, 26) + "600,-1200,150": GOTO 1380
1000 IF RIGHT$(line$, 15) = "-2000,-4000,-40" THEN line$ = LEFT$(line$, 26) + "1200,-1200,300": GOTO 1380
1100 IF RIGHT$(line$, 15) = "-2500,-5000,-50" THEN line$ = LEFT$(line$, 26) + "900,-1800,300": GOTO 1380
1200 IF RIGHT$(line$, 15) = "-3000,-6000,-60" THEN line$ = LEFT$(line$, 26) + "1500,-1800,450": GOTO 1380
1300 IF RIGHT$(line$, 15) = "-3500,-7000,-70" THEN line$ = LEFT$(line$, 26) + "1800,-2400,450": GOTO 1380
1310 IF RIGHT$(line$, 14) = "-1000,-500,-10" THEN line$ = LEFT$(line$, 37) + "-30": GOTO 1380
1320 IF RIGHT$(line$, 13) = "1000,-500,-20" THEN line$ = LEFT$(line$, 36) + "-60": GOTO 1380
1330 IF RIGHT$(line$, 13) = "200,-1000,-30" THEN line$ = LEFT$(line$, 36) + "-90": GOTO 1380
1340 IF RIGHT$(line$, 15) = "-2000,-2000,-40" THEN line$ = LEFT$(line$, 38) + "-120": GOTO 1380
1350 IF RIGHT$(line$, 15) = "-3000,-3000,-50" THEN line$ = LEFT$(line$, 38) + "-150": GOTO 1380
1360 IF RIGHT$(line$, 15) = "-1000,-3000,-60" THEN line$ = LEFT$(line$, 38) + "-180": GOTO 1380
1370 IF RIGHT$(line$, 15) = "-1800,-4000,-70" THEN line$ = LEFT$(line$, 38) + "-210
1380 IF load = 1 AND line$ = "points=2" THEN load = 0
1400 PRINT #2, line$
1500 line$ = "": GOTO 400
1600 CLOSE
1700 KILL "Mission.mis"
1800 NAME "Missionx" AS "Mission.mis"
1900 CLEAR : END
 
Very Cool E;

I'll get this saved and hope to have a chance to test it this weekend.
Reading through you last post I came up with an idea. Now, I don't know just what you can do or what kind of limitations you have with the code so if it's over the top just say so. Here it is.

The program looks at the mission and...

1. Counts the number of Fighter Units at a certain airfield. Could use the type_id numbers to check the Unit Faimly.
2. Subtract 1 from that number to hold for a CAP over the airfield.
3. Count the number of Bomber Units assigned to the same airfield.
4.Attach Remaining Fighter Units to Bombers
5. Any Fighter unit above and beyond that number is open for F/B of shipping/ground formation CAP missions.

I know, but heck, being crazy keeps me from going insane....

Keep up the great work and I'll talk to you before S/O shuts down for the weekend.
 
Very Cool E;

I'll get this saved and hope to have a chance to test it this weekend.
Reading through you last post I came up with an idea. Now, I don't know just what you can do or what kind of limitations you have with the code so if it's over the top just say so. Here it is.

The program looks at the mission and...

1. Counts the number of Fighter Units at a certain airfield. Could use the type_id numbers to check the Unit Faimly.
2. Subtract 1 from that number to hold for a CAP over the airfield.
3. Count the number of Bomber Units assigned to the same airfield.
4.Attach Remaining Fighter Units to Bombers
5. Any Fighter unit above and beyond that number is open for F/B of shipping/ground formation CAP missions.

I know, but heck, being crazy keeps me from going insane....

Keep up the great work and I'll talk to you before S/O shuts down for the weekend.

Hi Pen,

That's pretty close to what I had in mind, except my plan is to only convert CAP's to escorts, but leaving at least one CAP to cover each airfield/carrier, and only assigning escorts to strike flights originating from the same runway/carrier that the CAP originates from. That way, we can assign the right types of fighters to do escort duty by simply putting them at the same airfields as the bombers. That way we won't be getting P-47D's flying all the way to Berlin as escorts. DCG often assigns more than one CAP to an airfield/carrier if two or more fighter squadrons are assigned to the airfield/carrier. The spare CAP's are the ones I'm looking to reassign.

The plan also includes giving fighters assigned to fly strikes a chance to get escorts as well as bombers.

This plan should work well enough in carrier ops as long as there are two carriers per task force. That will insure at least two CAP's covering each carrier group. For example, a CVL could be placed alongside a CV, loaded with only a couple of fighter flights, to ensure enough CAP for the TF.

With my limited programming skills it's a struggle, but I have a general plan in mind, and I've made some progress in the programming.

One thing I forgot to mention. The ability to change formations means we can put mobile ground forces in columns. That means mobile mech can be made to run along the roads, and trains can be made to run on the tracks, like with CFS3.
 
BTW, line 600 in the last code I posted should branch to line 1380 instead of line 1400. It still worked when I tested it though.

Unfortunately, Qbasic doesn't have a RENUMBER command. Every time I renumber some lines I also have to renumber all the branches.
 
Back
Top