PDA

View Full Version : Thank You and DCG.



Pen32Win
October 11th, 2008, 11:48
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?

Ettico
October 11th, 2008, 13:01
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.

Hern07
October 11th, 2008, 17:48
Check your PM

Ettico
October 21st, 2008, 16:35
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:

Ettico
October 21st, 2008, 17:31
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

Pen32Win
October 21st, 2008, 17:38
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"???

Ettico
October 21st, 2008, 18:34
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

Ettico
October 21st, 2008, 19:20
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.

Pen32Win
October 21st, 2008, 19:27
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!

Ettico
October 21st, 2008, 19:51
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.

Ettico
October 21st, 2008, 22:13
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.

Pen32Win
October 21st, 2008, 22:33
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.

Ettico
October 21st, 2008, 22:47
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.

Pen32Win
October 21st, 2008, 22:52
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.

Ettico
October 21st, 2008, 23:09
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?

Pen32Win
October 21st, 2008, 23:37
Roger That... Keep up the Great work.

Ettico
October 23rd, 2008, 08:53
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

Pen32Win
October 23rd, 2008, 21:11
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.

Ettico
October 24th, 2008, 17:03
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.

Ettico
October 24th, 2008, 17:54
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.

Pen32Win
October 24th, 2008, 22:38
Bravo! Sounds like you've got a plan and a good one at that.
Right now I've got about 25 little pieces of a big puzzle I'm working on. GSL, aircraft, missions and such ,which I plan to roll up into three releases. Two of them are DCG based. 2 back to back six month campaigns.The PNG AoO is getting busy again.

Talon
October 25th, 2008, 14:11
Interesting stuff,I've been working on some DCG campaigns also the last month.I haven't really worked with the DCG in years but I'm learning it again.I got my TF's to do what I wanted and get have gotten my butt kicked several times.I n one mission all I had left was 2 carriers and a cruiser in my TG but got 1 of the Japanese carriers.

I was also working on NG using P-40's but nothing historical just fun missions.I'm also working on the CATF and have 15 historical missions done so far.


Talon

Pen32Win
October 25th, 2008, 16:09
I've been doing a lot of PNG Stuff. I'm revamping all of the srock GSL's but I haven't figured out what to do about PM. That'll be a challenge I may have to take up with MR. I did a revamp of them several years ago but so many new objects are out now that they really need some work. I'n the past week I've done Lae, Salamaua and am working on Cape Glcstr right now. Even though MS put that one in the wrong place too.

I've got to get back to work on Rabaul too....Crap, that's what I forgot!!!:banghead:

Anyway, my objective is to update, create, what ever is need to fix up all of the Airfields from Kavieng to Rabaul to PM to Hollandia. As far as Ship we're in pretty good shape, Aircraft we're good other than I've got a bit more work to do on a base P-40 and P-39 airfile. I think I've finally got an P-38 airfile that the AI's and player can use realistically in all missions. Though TR's double MOI's didn't work with the original DCC P-38 airfiles/CFG. I based it off the stock one and the only thing I haven't been able to do is get rid of that nasty turning stall, even when doing 300knts. That one I can't figure out.

I'm drifting again! Time to go back to work.

Ettico
October 26th, 2008, 01:49
Sounds like you guys are doing some good. I'm looking forward to seeing the new Rabaul and Port Moresby.

My little program may be ready sooner than I expected if I can figure out how to finish it off. I've gotten it to the point where it changes the flight formations, converts ground formations to columns so they can run on roads and rr tracks, allows the player to change player squadron payloads, creates escprt waypoint paths for each strike flight, and collects info on the locations and numbers of CAP fights.

The final step is to assign the created escort waypoint paths to the spare CAP's. Sounds simple, but it's not. I'm beginning to get a glimmer of an idea how to go about it, but it's still not quite clear in my mind.:isadizzy:

Here's a better version of the code I posted before. The "Hit ENTER for no change" part wasn't working right in the earlier version. QBasic works different from older forms of Basic. Anyhow, this fixes the "change payloads" part. This isn't the latest version, just a fix of the earlier one I posted.

A real programmer could have done this job a lot better and a lot faster, but the end result is all that matters. If the final version works, it won't matter how clumsy and inefficient it is.

'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"
520 IF line$ = "is_player_aircraft=1" THEN load = 1: count = 0
530 IF load = 0 THEN 600
545 IF LEFT$(line$, 7) <> "payload" THEN 600
550 count = count + 1: PRINT : PRINT "Assign payload to aircraft "; count; " "; line$
560 x = LEN(line$) - 8: x$ = RIGHT$(line$, x)
565 y$ = ""
570 PRINT "desired payload (hit ENTER for no change)"
575 INPUT y$
576 IF y$ <> "" THEN x$ = y$
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

Ettico
October 26th, 2008, 12:21
It was a grim struggle between me and the code. The program now looks like a monkey has been pecking around on my keyboard. The really strange part is, the thing actually works. After finding and eliminating all the stupid bugs in the code, it now changes the fighter formations to Finger Four, spreads the bomber formations vertically, changes ground formations to colums, allows editing of the player flight payloads, AND ASSIGNS ESCORT FLIGHTS.

Now all that remains is some flight testing and figuring out how to edit the Mission Summary text to reflect the changes - which might turn out to be the most hardedest part of all.

The goodest part of the whole deal is, now that I have the code, I can keep tinkering with the formations until I get collisions down to a bare minimum.:d And I'm pretty sure I can get some choo-choo trains running in Europe.

The other goodest part is, players can now fly long range escort missions in Europe. It's just a matter of getting assigned as a CAP, and then getting piggy-backed on top of a bomber flight that's going deep. But fighter strikes and sweeps will still be limited to a 200 nm radius.

The other other good part is, players who like to fly bombers will now get some help from the little friends. Just load your airfield up with P-51's, and you're bound to pick up at least one flight of them.

Later on I'll take a stab at cleaning up the DCG editing bug in the "squadrons" file, and do something to prevent strikes from being assigned to SUNK task forces.

I've been putting this off for months, fearing I'd never get it done. But once I got started, it only took a couple of days. My head sure hurts though.:isadizzy:

Pen32Win
October 26th, 2008, 13:23
That's absolutly great E!!! This little program of yours is really going to enhance DCG. I have just one question about the transforming of ground formations into columns. Is it going to do it to ship formations too?

Ettico
October 26th, 2008, 15:40
That's absolutly great E!!! This little program of yours is really going to enhance DCG. I have just one question about the transforming of ground formations into columns. Is it going to do it to ship formations too?

Hi Pen,

No, the program should leave the ship formations alone. It looks at the formation coordinates generated by DCG to determine which ones to change. Each DCG-generated formation type has a unique set of coordinates.

But you made me look...:d

Still not finished debugging it though. I forgot to do something to prevent it from assigning more than one escort flight to each bomber flight - which would be disastrous. If that happened, the escort flights would appear at the same place at the same time and would anhiliate each other. I created the escort waypoint paths by starting with the bomber waypoint path and adding 2000 to the altitude, and a couple of other minor changes.

Ettico
October 26th, 2008, 17:53
Dang. I found a DCG editing glitch. It happens to waypoint 3 when the player squadron gets assigned a fighter sweep. I've seen it happen twice. There's an integer missing just after the "=" sign at waypoint.3
It doesn't happen with other squadrons that get sweep missions, just the player squadron.

[waypoint_path.19]
id=5019
waypoint.0=2,1,N51* 17.43',E0* 36.90',+0,,,,0,,9084,1,1
waypoint.1=1,1,N51* 21.97',E1* 8.91',+15038,,,,295,0,0,1,1
waypoint.2=1,1,N51* 13.59',E1* 10.2',+15038,,,,295,0,1,1,1
waypoint.3=,1,N51* 21.39',E1* 18.00',+15038,,,,295,0,1,1,1
waypoint.4=1,1,N51* 13.59',E1* 9.36',+15038,,,,295,0,1,1,1
waypoint.5=1,1,N51* 27.63',E0* 47.1',+15038,,,,295,0,0,1,1
waypoint.6=4096,1,N51* 17.43,E0* 36.90,+0,,,,295,,0,0,1

I can rig my program to look for it and clean it up, but that's another fine mess Mr. Lowengrin has gotten me into. :173go1:This might explain the occasional "corrupt mission file" messages.

Oh well. That's another advantage of having a DCG mission file editor. I can fix minor DCG bugs with it.

Ettico
October 27th, 2008, 18:28
Well, the program basically works now. It leaves at least one CAP at each airfield and distributes the spare CAPs out to the strike flights, including fighter strikes. If you want to play defense, you just have fewer or no bombers in your lineup. Even without bombers, strike-capable fighters will get strike missions, sometimes with escorts.I flew a test mission yesterday, with 10 squadrons at my airfield. It was mighty quiet. No AI screaming all the way down after colliding. All I heard was the drone of the engines as they all headed toward the continent. It was a mighty big strike. Only one lonely CAP was left at the airfield.The program still has one glitch that I know of, but it's not a glitch that corrupts the mission file. It just prevents the glitchy stuff from being included in the mission file. I still haven't figured out what causes it.The player flight still isn't getting any ling range escort missions, because DCG almost never gives the player flight a CAP mission. When it does, the other CAP's always snatch up the escort missions first. The player flight is at the very end of the mission file, and always gets left out. I'll figure out something to do about that, so the player can get some long range escort missions. There's also the occasional DCG glitch I mentioned in my previous post. That needs to be looked for and fixed when it happens.Overall, I'm happy with the results, if not the code itself. A real programmer would probably laugh at the code. I don't care as long as it works. In fact, maybe I'll put some funny variable names in the code, just for chuckles. Funny variiable names can produce some hilarious phrases.

miamieagle
October 28th, 2008, 05:42
Ettico I"am willing to pay Lowengrin if he is able to upgrade the DCG with the quality of IL46 for CFS2. I think its worth it.

We can make a petition through the community.What do you think!:jump:

Ettico
October 28th, 2008, 06:25
Ettico I"am willing to pay Lowengrin if he is able to upgrade the DCG with the quality of IL46 for CFS2. I think its worth it.

We can make a petition through the community.What do you think!:jump:

I'm all for it, miami. I haven't talked to Paul about it. He just mentioned it once in his forum. Programming is hard work. He deserves to be paid if he'll do it.

My little program brings DCG up to the point where it is viable for certain kinds of ETO campaigns. The lack of escorts and the wrong formations were the main things holding it back. But there is so much more that could be done.

Everyone who is iinterested should send Paul an email. If he gets enough emails, he might decide it's worth it to do an upgrade and offer it as payware.

P.S. But either way, I'm almost ready to start building an enormous DCG campaign for the ETO. I mainly just needed long range escorts and columns for ground formations. It won't have all the goodies IL-46 has, but it should be interesting enough to keep a guy busy for a long time.

Pen32Win
October 28th, 2008, 13:47
Hey E,

I'm going to say this but I don't want you to stop from trying it. I made a 12 month long DCG Campaign with 12 Ship formations, 1 popping up each month, it didn't work, DCG Freaked Out.... Couldn't even finish creating the mission. Cut it to six and it was OK, haven't gone back to find the exact limit.

Ettico
October 28th, 2008, 17:17
Hey E,

I'm going to say this but I don't want you to stop from trying it. I made a 12 month long DCG Campaign with 12 Ship formations, 1 popping up each month, it didn't work, DCG Freaked Out.... Couldn't even finish creating the mission. Cut it to six and it was OK, haven't gone back to find the exact limit.

Hi Pen,

I've had up to 8 ship formations in a campaign and it didn't freak out. The Leyte campaign I uploaded has 7 or 8. I've also had up to 21 ground formations in a campaign, and up to 52 squadrons.

But I don't recommend having that much stuff active in a mission. When I talk about a big campaign, I don't mean having that much stuff in one mission, or even having that much in one set of campaign files. When I do Europe I plan to break it up into several areas, with a different set of campaign files for each area.

Europe is too big to fit into a single campaign. The squadrons would get too spread out, and you couldn't get all the infrastructure in. Think in terms of several campaigns, with each campaign being focused on an area.

I think my QB program is ready to go. I've fixed all the known glitches in it, and I've even got it fixing a DCG glitch. The problem I mentioned about the player flight not getting any long range escorts will work itself out when the targets are more than 200 nm away. DCG keeps fighters within 200 nm of their bases. When the targets are further away, the fighters just get CAP missions, which makes them available to be switched to escorts. When the targets are within the 200 nm limit, the player squadron gets lots of short range escort missions and strikes assigned by DCG, and practically no CAP missions.

In the end I might still decide DCG is not the way to go in Europe. But if nothing else, the addition of AI escorts will make things much more interesting in the PTO. Look at it this way. Your carrier is attacked by a flock of bombers - and they have escorts. You think kates are easy to shoot down? Well, maybe. Or maybe not. Depends on what's on your six.:d Or, your fighter squadron is assigned a strike mission against an airfield. Normally in DCG missions you'd be on your own, often facing too many bandits that are just waiting for you to attack the airfield so they can swoop down and wipe out your squadron. But this time you have escorts.

Ettico
October 28th, 2008, 21:35
I just flew a test mission. This was the first one I flew all the way from start to finish. We won, 38 to 7.

I really wasn't expecting it to go that way. I've generated so many missions in this campaign testing my program that all the crews in the campaign are now aces. The AI escorts must have had a chilling effect on the Germans. No American bombers were lost.

There were zero collisions. I don't know if that was due to the formation changes, or the skill of the AI, or a combination of the two. Whatever. mission accomplished.

Things didn't go so well for the Germans this time. Hopefully this wasn't a representative mission. I don't want it to be so one-sided. Things started going bad for the Germans right away. Halfway across the channel, one of their squadrons of Heinkels ran almost head-on into my horde. They were jumped by two squadrons of fighters and wiped out. The assigned escorts aren't really escorts. They're fighter sweeps that just happen to be sweeping just above a flight of bombers. They'll attack anything. It only took them a couple of minutes to eliminate the heinkels, then they continued on their merry way.

I escorted my bombers to Calais without opposition, then headed south along the coast looking for trouble. I found it in the form of a squad of 110's that were chasing a flight of bombers headed my way. I and my squad eventually wiped out the 110's, but they put up a good fight for 110's. Judging by their shooting and flying, they were obviously all aces, but overmatched by my aces and their P-51C's. I got 3 of them. One of my kills happened when I was shooting at a 110 from close range and missing high because I couldn't hold the P-51's nose down. Then another 110 flew right in front of me, right through my bullet stream. Surprised me so much I forgot to take a screenshot.

The 110's kept peppering me with their defensive guns until they damaged my engine. With only 44 rounds of ammo left, I headed for the house, only to be chased by the sole surviving 110. With my engine damaged, I couldn't outrun him. I tried to set him up for a shot by my wingman, but he kept gaining on me and got close enough to start shooting. Already damaged, low and slow, and not wanting to get hit by the 110's nose guns, I decided to do something even if it was wrong. I started turning on him, and just then my wingman nailed him. My engine didn't quit, so I made it back in one piece.

I don't like fighting 110's. They can be had, but they always damage my plane with their defensive guns.

So that's how it went. No bomber losses, no collisions, no mission file corruption. There was a lot of fighting going on somewhere. Kills kept getting called out. But my side only lost 7 planes, against 38 German losses. Since I don't like 110's anyhow, I may sideline them. The Germans probably need more top-line fighters.

Pen32Win
October 28th, 2008, 22:55
That's odd about the ships. It happened in the very first month when the 1st Convoy went active, no other shipping units had activated yet, only one per month. Going to have to revisit that one at another time.

Post the Gunstation section of that nasty 110. I'll tone it down a bit.

Sounds like things are working great. Leaps and Bounds ahead of the 20 collisions per mission we used to get.

Gotta get back to my Beaufighter, working on one that'll work well for both player and AI. Got the A-20 and B-25C/D Pappy Gunn Strafer done!

Ettico
October 29th, 2008, 01:25
That's odd about the ships. It happened in the very first month when the 1st Convoy went active, no other shipping units had activated yet, only one per month. Going to have to revisit that one at another time.

Post the Gunstation section of that nasty 110. I'll tone it down a bit.

Sounds like things are working great. Leaps and Bounds ahead of the 20 collisions per mission we used to get.

Gotta get back to my Beaufighter, working on one that'll work well for both player and AI. Got the A-20 and B-25C/D Pappy Gunn Strafer done!

I dunno. I've never had TF's activating at different times, or at least not more than 6 of them. It is odd. Unactivated TF's are OK. Activated TF's are OK. But a combination of activated and unactivated are not OK. Go figure. If it's like that, it probably means deactivating the SUNK TF's won't work. They'll have to be edited out.

Lol. There were several nasty 110 tail guns, and they hit me all over. But I hit them where it hurts the most, so I guess we're even.

Looks like you've got a lot of good stuff in the works, Pen. Infrastructure, planes, campaigns...Well, you keep doing the hard stuff and I'll keep doing the easy stuff.:d