• 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.

Huge dcgqb bugs discovered!!!

Ettico

Charter Member
As some of you may be aware, I wrote a QBasic program to supplement Lowengrin's Dynamic Campaign Generator. I thought I had the thing working properly, so I posted the code about a week ago.

Was I ever wrong!

The thing hadn't been thoroughly tested and debugged. As soon as I started testing it in the PTO, the whole thing came unglued. I did a test mission in my DCG Solomons campaign. My flight was assigned an anti-shipping strike. The first thing I noticed was that VMF-214 B flight, which should have been re-assigned to escort my flight, was sent off to escort some bombers from another airfield, which should never happen. I looked at the Mission file, and was dismayed to discover that a flight of Japanese Oscars had been assigned to "escort" my flight.

Obviously, this wasn't going to be a happy liason.:censored:

I went bug-hunting, found and swatted that bug, but several other bugs popped up in the process, and DCG also threw me a couple of unexpected curves. After several hours of bug-hunting/swatting, I flew a couple of test missions, one in my ground based Solomons campaign and one in a Marshalls carrier op. Everything went well. The correct number of CAP's and AI escorts were produced, and this time they all escorted their own bombers from their own airfields and carriers. This time VMF-214 B flight escorted my flight. Even the carrier op went well. 2 flights of Hellcats stayed back to cover the carrier group. My flight and another flight of Hellcats escorted 4 flights of bombers against a hapless IJN destroyer squadron. Another flight of Hellcats escorted some bombers to a land base where they engaged the IJN defenders. Both missions went without a hitch. There weren't even any collisions.

So I now believe I have the program correctly doing what it is supposed to do in both land and sea campaigns:


1. Changes the fighter formations to finger four. This is more realistic, and seems to reduce collisions.

2. Spreads the bomber formations vertically, which seems to reduce collisions.

3. Changes mechanized ground formations to a line astern formation so they will run on roads and railroads.

4. Since DCG does not assign AI fighter squadrons to escort duty, the program re-assigns spare CAP's as escorts. CAP's will only be assigned to escort strikes originating from the same airfields or carriers. The player flight may be reassigned to escort duty if the player gets a CAP or sweep mission. The program will always leave a minimum number of CAP's at an airfield. This minimum number is determined interactively by the user. If DCG does not assign any CAP's to an airfield, the program will not add any. This feature also facilitates long range escorted strategic bombing. Escorts are assigned without regard to range limitations of the fighters, so for realism, only long range fighters should be stationed at bases with long range bombers.

5. Screen prints a cryptic mission briefing on all the flights originating from the player airfield or carrier. Displays squadron names, mission directives, and target coordinates. If you get reassigned to escort duty, you can figure out which strike(s) you're escorting by comparing target coordinates. Then you can look at the original DCG briefing to find the target name.

6. Provides long range loadouts to CAP's reassigned as escorts. For this purpose, the program assumes that payload (1) is Guns Only Long Range, which is the case with all stock fighters and most addons.

7. Offers the player the opportunity to change the payloads on all the player flight aircraft after displaying the mission briefing. DCG only loads out fighters with rockets for strike missions. This option allows the player to switch to bombs or whatever.

8. Searches for and fixes 3 known DCG bugs. There are 2 other intermittent bugs I know of that I haven't gotten around to addressing, but they're not in the Mission file. This program currently only edits the Mission file. There is a bug which sometimes occurs in the Squadrons file when a squadron is transferred to another airfield by DCG. It is also the case that DCG will continue to assign strikes against task forces after all the ships in the task force have been sunk. I doubt if I'll even try to fix those bugs any time soon. (cripes, what a headache this has been) Those of you who have experience building DCG campaigns will be able to manually fix those problems when they occur.

I visually checked the Missions file and test flew the missions to verify that all this was being done correctly.

What a relief! :d I really wanted to get this thing working correctly. It makes a big difference in DCG campaigns.
 
In this pic, my flight, VMF-214 A flight, carrying bombs, is being escorted by VMF-214 B flight, which is visible above my left wing. None of this has ever happened before in a DCG mission, at least not without a good deal of very careful hand-editing. And to top it all off, I now have Maskrider's excellent Barakoma airfield to venture forth from.

Now I don't feel so lonely anymore when I go out on strike missions.:d
 
And you said you were not a real programmer....:costumes:​

Great Work E! This is going to put a whole new face on DCG generated missions. :ernae:​

Real Escorts, no collisions, realistic deployment of VF units........ Way Cool Jr.

As soon as I finish playing with all of the parts and pieces I'm going to have to try this with the player unit as a bomber sqn. Something like the 3/90th (A)'s B-25 Commerce Killers or the RAAF's No#30 Sqn's Beaufighters or 2/89th or No#22 Sqn's A-20's. And to have an Escort!!! Lots of things to base a DCG Campaign on....... Being able to customize the P/L will come in major league handy!​
 
And you said you were not a real programmer....:costumes:​




Great Work E! This is going to put a whole new face on DCG generated missions. :ernae:​

Real Escorts, no collisions, realistic deployment of VF units........ Way Cool Jr.​


As soon as I finish playing with all of the parts and pieces I'm going to have to try this with the player unit as a bomber sqn. Something like the 3/90th (A)'s B-25 Commerce Killers or the RAAF's No#30 Sqn's Beaufighters or 2/89th or No#22 Sqn's A-20's. And to have an Escort!!! Lots of things to base a DCG Campaign on....... Being able to customize the P/L will come in major league handy!​

Hi Pen,

Believe me, I'm not a real programmer. I'm just persistent. After I post the latest version of the code, you can get a real programmer to look at it, laugh, and tell you what I just said.:d

I don't care as long as I get it doing what I want it to do. All the internal bumbling around won't be visible.

The code, however, will be visible in the QBasic editing window. Anyone who decides to use the thing needs to scroll the cursor down to a point below the code to avoid accidentally "editing" it, or add some spaces above the code and keep the cursor there. Hey, it could happen. If you accidentally hold the ENTER key down too long after editing your loadouts with the cursor in the wrong place, you'll blow it all up. No problem really, you can just reload the code.

The collisions haven't been entirely eliminated, just reduced a lot, as nearly as I can tell. Half my flight wiped out in one test mission taking off from Barakoma carring heavy bombs. The next time I tried it I climbed out faster after lifting off, and the wingmen didn't crash. Oddly enough, they didn't crash when I took off from the carrier either. It looked dicey though. They were too close together when they flew over the carrier at mission start.
 
Here's the latest version of the code. I'll go get the instructions I posted earlier and edit them in here.

Note: You have to ground start to make this work. If you don't ground start, my program won't know which airfield you're taking off from. I probably could have figured out a workaround for air starts, but heck - who needs em?

You can get your QBasic here:
http://www.petesqbsite.com/sections/...on/intro.shtml

The version of QBasic I'm using is shareware, no longer supported by MS. As far as I know, it's OK to upload and share it. But for now it's easy enough to get it from the site above if you don't already have it. It's a small download.

Drop the QBasic files into your CFS2 CAMPAIGNS folder and create a shortcut to QBasic.exe

If you have multiple installs, you'll need to drop copies of QBasic into all your CAMPAIGNS folders and create individually named shortcuts for each install. You can rename a shortcut by right clicking on it and selecting the rename option.

You can copy it and paste the code into a notpad file. Name the file DCGQB.BAS - or whatever else you want to name it, but it must have a ".BAS" extension. Drop it into your CAMPAIGNS folder. Then you can load the file with QBasic and run it after you generate a DCG mission. You can keep QBasic active on the toolbar while you're flying missions.

I'm not giving any guarantees. This is still BETA. But this is the version that produced couple of clean missions in a land-based campaign and a carrier campaign.

BTW, it also gives the bad guys escorts, so don't get cocky. Keep those carriers covered.


' DCGQB by Ettico - QuickBasic for dummy DCG fans
CLEAR : CLOSE
CLS
PRINT "You must generate a DCG mission before running this program."
PRINT
PRINT "This program may re-assign some CAP's as escorts."
PRINT
PRINT "Please enter your recommended minimum number of CAP's you want the"
PRINT "program to keep at each carrier or airfield if possible."
PRINT "I recommend a minimum of (2) CAP's per task force for carrier operations."
PRINT "I recommend (0) to (1) CAP per airfield for ground based operations."
PRINT "If you've already made your recommendation, just hit ENTER at the prompt."
q$ = ""
INPUT q$
IF q$ = "" THEN GOTO 5
x = VAL(q$) + 1
KILL "capcfg"
OPEN "capcfg" FOR OUTPUT AS #1
PRINT #1, x
CLOSE

5 OPEN "capcfg" FOR INPUT AS #1
INPUT #1, mincap
CLOSE
line$ = "": load = 0: gcount = 0: ccount = 0: alt = 0: alt$ = ""
pcount = 0: rf = 0: airflag = 0: capflag = 0: pathflag = 0: pflag = 0: player = 0: wp0 = 0: rcount = 0: rflag = 0
gstart = 0: linecount = 0: gstart = 0: id = 0: name$ = ""
DIM groups$(52, 7)
DIM paths$(364)
DIM caps(52, 2)
DIM airfields$(50, 3)
OPEN "Mission.MIS" FOR INPUT AS #1
10 IF EOF(1) THEN 20
LINE INPUT #1, line$
IF LEFT$(line$, 8) = "[runway." THEN rcount = rcount + 1: rflag = 1
IF rflag = 0 THEN 10
IF LEFT$(line$, 3) = "id=" THEN airfields$(rcount, 1) = RIGHT$(line$, 4)
IF LEFT$(line$, 9) = "base_lat=" THEN airfields$(rcount, 2) = RIGHT$(line$, (LEN(line$) - 9))
IF LEFT$(line$, 9) = "base_lon=" THEN airfields$(rcount, 3) = RIGHT$(line$, (LEN(line$) - 9)): rflag = 0
GOTO 10
20 CLOSE
OPEN "Mission.MIS" FOR INPUT AS #1
OPEN "Missionx" FOR OUTPUT AS #2
400 IF EOF(1) THEN 1700
LINE INPUT #1, line$
linecount = linecount + 1
IF LEFT$(line$, 13) = "[unit.0]" THEN gstart = linecount
IF LEFT$(line$, 11) = "waypoint.6=" THEN gstart = linecount + 2
IF LEFT$(line$, 3) = "id=" THEN id$ = RIGHT$(line$, 4)
IF LEFT$(line$, 18) = "name=%name_string." THEN name$ = line$
430 IF LEFT$(line$, 8) = "[runway." THEN rf = 1
IF rf <> 1 THEN 600
IF LEFT$(line$, 3) <> "id=" THEN 600
rf = VAL(RIGHT$(line$, 4)): ccount = ccount + 1: caps(ccount, 1) = rf: rf = 0
600 IF LEN(line$) < 13 THEN 1380
IF RIGHT$(line$, 9) = "0,300,0.0" THEN line$ = LEFT$(line$, 26) + "0,-150,0": GOTO 1380
IF RIGHT$(line$, 10) = "-300,0,0.0" THEN line$ = LEFT$(line$, 26) + "0,-300,0": GOTO 1380
IF RIGHT$(line$, 9) = "300,0,0.0" THEN line$ = LEFT$(line$, 26) + "0,-450,0": GOTO 1380
IF RIGHT$(line$, 10) = "0,-600,0.0" THEN line$ = LEFT$(line$, 26) + "0,-600,0": GOTO 1380
IF RIGHT$(line$, 13) = "-300,-300,0.0" THEN line$ = LEFT$(line$, 26) + "0,-750,0": GOTO 1380
IF RIGHT$(line$, 12) = "300,-300,0.0" THEN line$ = LEFT$(line$, 26) + "0,-900,0": GOTO 1380
IF RIGHT$(line$, 9) = "0,600,0.0" THEN line$ = LEFT$(line$, 26) + "0,-1050,0": GOTO 1380
IF RIGHT$(line$, 14) = "-500,-1000,-10" THEN line$ = LEFT$(line$, 26) + "-300,-600,0": GOTO 1380
IF RIGHT$(line$, 15) = "-1000,-2000,-20" THEN line$ = LEFT$(line$, 26) + "300,-600,150": GOTO 1380
IF RIGHT$(line$, 15) = "-1500,-3000,-30" THEN line$ = LEFT$(line$, 26) + "600,-1200,150": GOTO 1380
IF RIGHT$(line$, 15) = "-2000,-4000,-40" THEN line$ = LEFT$(line$, 26) + "1200,-1200,300": GOTO 1380
IF RIGHT$(line$, 15) = "-2500,-5000,-50" THEN line$ = LEFT$(line$, 26) + "900,-1800,300": GOTO 1380
IF RIGHT$(line$, 15) = "-3000,-6000,-60" THEN line$ = LEFT$(line$, 26) + "1500,-1800,450": GOTO 1380
IF RIGHT$(line$, 15) = "-3500,-7000,-70" THEN line$ = LEFT$(line$, 26) + "1800,-2400,450": GOTO 1380
IF RIGHT$(line$, 14) = "-1000,-500,-10" THEN line$ = LEFT$(line$, 37) + "-30": GOTO 1380
IF RIGHT$(line$, 13) = "1000,-500,-20" THEN line$ = LEFT$(line$, 36) + "-60": GOTO 1380
IF RIGHT$(line$, 13) = "200,-1000,-30" THEN line$ = LEFT$(line$, 36) + "-90": GOTO 1380
IF RIGHT$(line$, 15) = "-2000,-2000,-40" THEN line$ = LEFT$(line$, 38) + "-120": GOTO 1380
IF RIGHT$(line$, 15) = "-3000,-3000,-50" THEN line$ = LEFT$(line$, 38) + "-150": GOTO 1380
IF RIGHT$(line$, 15) = "-1000,-3000,-60" THEN line$ = LEFT$(line$, 38) + "-180": GOTO 1380
IF RIGHT$(line$, 15) = "-1800,-4000,-70" THEN line$ = LEFT$(line$, 38) + "-210"
1380 PRINT #2, line$
IF line$ = "type=air" THEN gcount = gcount + 1
IF gcount = 0 THEN 400
IF LEFT$(line$, 12) = "waypoint.3=," AND LEN(line$) > 36 THEN line$ = LEFT$(line$, 11) + "1" + RIGHT$(line$, (LEN(line$) - 11))
x = LEN(name$)
n$ = RIGHT$(name$, (x - 6)): x = x - 6
n$ = LEFT$(n$, (x - 1))
IF groups$(gcount, 3) = "" THEN groups$(gcount, 3) = LTRIM$(id$)
IF groups$(gcount, 6) = "" THEN groups$(gcount, 6) = STR$(gstart)
IF groups$(gcount, 7) = "" THEN groups$(gcount, 7) = n$
IF line$ = "players_formation=1" THEN player = gcount
IF LEFT$(line$, 9) = "directive" THEN groups$(gcount, 1) = line$
IF groups$(gcount, 7) = "" THEN 1382
FOR I = 1 TO gcount
x = LEN(groups$(I, 7))
IF MID$(line$, 2, x) = groups$(I, 7) THEN groups$(I, 7) = line$
NEXT I
1382 IF player = 0 AND LEFT$(line$, 10) = "waypoint.6" THEN runway$ = RIGHT$(line$, 8): runway$ = LEFT$(runway$, 4): groups$(gcount, 2) = runway$
IF player = 0 THEN 1384
IF LEN(line$) < 38 THEN 1384
IF gcount <> player THEN 1384
IF groups$(player, 2) <> "" THEN 1384
IF LEFT$(line$, 10) <> "waypoint.0" THEN 1384
runway$ = RIGHT$(line$, 8): runway$ = LEFT$(runway$, 4): groups$(player, 2) = runway$

1384 FOR I = 1 TO rcount
IF groups$(gcount, 2) = airfields$(I, 1) THEN groups$(gcount, 4) = airfields$(I, 2): groups$(gcount, 5) = airfields$(I, 3)
NEXT I
IF LEN(line$) < 37 OR LEFT$(line$, 11) <> "waypoint.3=" THEN 400
x = INSTR(1, line$, "N")
IF x = 0 THEN x = INSTR(1, line$, "S")
y = INSTR(1, line$, "E")
IF y = 0 THEN y = INSTR(1, line$, "W")
p = INSTR(1, line$, "+")
IF p = 0 THEN 400
lat$ = MID$(line$, x, ((y - 2) - x))
lon$ = MID$(line$, y, ((p - 2) - y))
IF lat$ <> groups$(gcount, 4) THEN 400
IF lon$ <> groups$(gcount, 5) THEN 400
line$ = "waypoint.3=" + "1" + RIGHT$(line$, (LEN(line$) - 14))
groups$(gcount, 1) = "directive=32"
GOTO 400
1700 CLOSE

FOR I = 1 TO gcount
r = VAL(groups$(J, 2))
n = 0
FOR J = 1 TO ccount
IF r = caps(J, 1) THEN n = 1
NEXT J
IF n = 0 THEN ccount = ccount + 1: caps(ccount, 1) = r
NEXT I

FOR I = 1 TO gcount
name$ = groups$(I, 7)
x = LEN(name$)
name$ = LEFT$(name$, (x - 2)): x = x - 2
name$ = RIGHT$(name$, (x - 15)): x = x - 15
y = INSTR(name$, "=")
name$ = RIGHT$(name$, (x - y))
groups$(I, 7) = name$
NEXT I
gcount = 0
OPEN "Missionx" FOR INPUT AS #1
1710 IF EOF(1) THEN 1720
LINE INPUT #1, line$
IF LEFT$(line$, 10) = "waypoint.0" AND LEN(line$) < 38 THEN 1720
IF line$ = "type=air" THEN gcount = gcount + 1
IF gcount = 0 THEN 1710
IF groups$(gcount, 1) <> "directive=128" AND groups$(gcount, 1) <> "directive=2048" THEN 1710
IF LEN(line$) < 37 OR LEFT$(line$, 9) <> "waypoint." THEN 1710
IF LEFT$(line$, 10) = "waypoint.0" THEN pcount = pcount + 1: paths$(pcount) = groups$(gcount, 2)
pcount = pcount + 1
IF LEFT$(line$, 10) <> "waypoint.1" THEN 1715
x = LEN(line$) - 5
line$ = LEFT$(line$, x)
line$ = RIGHT$(line$, (x - 12))
line$ = "waypoint.1=32" + line$ + groups$(gcount, 3) + ",1,1"
1715 paths$(pcount) = line$
GOTO 1710
1720 CLOSE
pcount = pcount - 3
FOR I = 1 TO ccount
FOR J = 1 TO gcount
vr = VAL(groups$(J, 2))
IF vr = caps(I, 1) AND groups$(J, 1) = "directive=32" THEN caps(I, 2) = caps(I, 2) + 1
NEXT J
NEXT I
FOR I = 1 TO pcount
p$ = paths$(I)
K = LEN(p$)
IF K < 5 THEN 1900
p1 = INSTR(p$, "+") + 1
p2 = INSTR(p1, p$, ","): p3 = p2 - p1
a$ = MID$(p$, p1, p3): a = VAL(a$) + 2000: a$ = LTRIM$(STR$(a))
n1$ = LEFT$(p$, (p1 - 1)): n2$ = RIGHT$(p$, (K - p2 + 1))
p$ = n1$ + a$ + n2$: K = LEN(p$)
IF LEFT$(p$, 10) = "waypoint.1" THEN p$ = LEFT$(p$, K)
IF LEFT$(p$, 10) = "waypoint.2" THEN p$ = LEFT$(p$, K)
IF LEFT$(p$, 10) = "waypoint.3" THEN p$ = LEFT$(p$, K)
IF LEFT$(p$, 10) = "waypoint.4" THEN p$ = LEFT$(p$, K)
IF LEFT$(p$, 10) = "waypoint.5" THEN p$ = LEFT$(p$, K)
IF LEFT$(p$, 10) = "waypoint.2" THEN p4 = INSTR(p$, ",")
IF LEFT$(p$, 10) = "waypoint.2" THEN p$ = "waypoint.2=1," + RIGHT$(p$, (K - p4))
IF LEFT$(p$, 10) = "waypoint.3" THEN p4 = INSTR(p$, ",")
IF LEFT$(p$, 10) = "waypoint.3" THEN p$ = "waypoint.3=1," + RIGHT$(p$, (K - p4))
IF LEFT$(p$, 10) = "waypoint.4" THEN p4 = INSTR(p$, ",")
IF LEFT$(p$, 10) = "waypoint.4" THEN p$ = "waypoint.4=1," + RIGHT$(p$, (K - p4))
paths$(I) = p$
1900 NEXT I
FOR I = 1 TO gcount
runway = VAL(groups$(I, 2))
FOR J = 1 TO ccount
IF groups$(I, 1) <> "directive=32" THEN 2080
IF runway <> caps(J, 1) THEN 2080
IF caps(J, 2) < mincap THEN 2080
groups$(I, 0) = "available": caps(J, 2) = caps(J, 2) - 1
IF groups$(player, 1) <> "directive=32" AND groups$(player, 1) <> "directive=8" THEN 2080
IF groups$(player, 0) = "available" THEN 2080
IF caps(J, 2) >= mincap THEN groups$(player, 0) = "available": groups$(I, 0) = ""
2080 NEXT J
NEXT I
FOR I = 1 TO (pcount - 7) STEP 8
FOR J = 1 TO gcount
IF groups$(J, 0) <> "available" THEN 3070
IF groups$(J, 2) <> paths$(I) THEN 3070
groups$(J, 0) = "assigned": groups$(J, 1) = "directive=16"
paths$(I) = STR$(J)
3070 NEXT J
NEXT I
G = 0
OPEN "Missionx" FOR INPUT AS #1
OPEN "Missionxx" FOR OUTPUT AS #2
4020 IF EOF(1) THEN 5000
LINE INPUT #1, line$
IF line$ <> "type=air" THEN 4200
PRINT #2, line$
G = G + 1
4030 LINE INPUT #1, line$
IF LEFT$(line$, 10) = "directive=" THEN line$ = groups$(G, 1)
PRINT #2, line$
IF LEFT$(line$, 3) <> "id=" THEN 4030

4050 FOR I = 1 TO (pcount - 7) STEP 8
p = VAL(paths$(I))
IF p <> G THEN 4160
FOR J = 1 TO 7
PRINT #2, paths$(I + J)
LINE INPUT #1, line$
NEXT J
4160 NEXT I
GOTO 4020
4200 PRINT #2, line$
GOTO 4020
5000 CLOSE
KILL "Missionx"
NAME "Missionxx" AS "Missionx"
G = 0: linecount = 0
OPEN "Missionx" FOR INPUT AS #1
OPEN "Missionxx" FOR OUTPUT AS #2
6020 IF EOF(1) THEN 6500
LINE INPUT #1, line$
linecount = linecount + 1
FOR I = 1 TO gcount
x = VAL(groups$(I, 6))
IF linecount <> x THEN 6022
G = G + 1
6022 NEXT I
IF G = 0 THEN 6200
IF LEFT$(line$, 8) <> "payload=" THEN 6025
IF groups$(G, 1) = "directive=32" THEN line$ = "payload=1"
IF groups$(G, 1) = "directive=16" THEN line$ = "payload=1"

6025 IF LEN(line$) < 37 OR LEFT$(line$, 14) <> "waypoint.3=512" THEN 6200
IF groups$(G, 1) <> "directive=32" THEN 6200
line$ = "waypoint.3=" + "1" + RIGHT$(line$, (LEN(line$) - 14))
GOTO 6200
6030 IF LEN(line$) < 37 OR LEFT$(line$, 9) <> "waypoint." THEN 6200
K = LEN(line$)
line$ = LEFT$(line$, (K - 3)) + "1,1"
IF LEFT$(line$, 10) = "waypoint.6" THEN line$ = LEFT$(line$, (K - 8)) + "0,0,1"
6200 PRINT #2, line$
GOTO 6020
6500 CLOSE
KILL "Missionx"
FOR I = 1 TO gcount
IF groups$(I, 1) = "directive=8" THEN groups$(I, 1) = ": armed recon at: "
IF groups$(I, 1) = "directive=16" THEN groups$(I, 1) = ": escort to: "
IF groups$(I, 1) = "directive=32" THEN groups$(I, 1) = ": combat air patrol at: "
IF groups$(I, 1) = "directive=128" THEN groups$(I, 1) = ": strike at: "
IF groups$(I, 1) = "directive=2048" THEN groups$(I, 1) = ": anti-ship strike at: "
IF I = player THEN groups$(I, 1) = ": YOUR SQUADRON " + groups$(I, 1)
NEXT I
OPEN "Mission.mis" FOR INPUT AS #1
OPEN "Missionxx" FOR INPUT AS #2
OPEN "Missionx" FOR OUTPUT AS #3
6510 IF EOF(1) THEN 6900
IF EOF(2) THEN 6900
LINE INPUT #1, line1$
LINE INPUT #2, line2$
line$ = line2$
IF LEFT$(line1$, 11) = "waypoint.0=" THEN line$ = line1$
PRINT #3, line$
GOTO 6510
6900 CLOSE
KILL "missionxx"
G = 0: linecount = 0
OPEN "Missionx" FOR INPUT AS #1
7000 IF EOF(1) THEN 7900
LINE INPUT #1, line$
linecount = linecount + 1
IF line$ = "type=air" THEN G = G + 1
IF G = 0 THEN 7000

IF LEN(line$) < 37 OR LEFT$(line$, 11) <> "waypoint.3=" THEN 7000
x = INSTR(1, line$, "N")
IF x = 0 THEN x = INSTR(1, line$, "S")
y = INSTR(1, line$, "E")
IF y = 0 THEN y = INSTR(1, line$, "W")
p = INSTR(1, line$, "+")
IF p = 0 THEN 7900
lat$ = MID$(line$, x, ((y - 2) - x))
lon$ = MID$(line$, y, ((p - 2) - y))
groups$(G, 4) = lat$
groups$(G, 5) = lon$
GOTO 7000
7900 CLOSE
PRINT "Some of the fighter squadrons' missions may have been changed."
PRINT "The current mission plan for squadrons at your airfield follows:"
PRINT
FOR I = 1 TO gcount
IF groups$(I, 2) <> groups$(player, 2) THEN 7930
PRINT groups$(I, 7); " "; groups$(I, 1); " "; groups$(I, 4); " "; groups$(I, 5)
7930 NEXT I
PRINT
PRINT "hit ENTER to continue."
INPUT q$
' change player squad payloads
PRINT
PRINT "You can change your squadron's payloads now."
PRINT
PRINT "Enter only the number of the desired payload, as found in the aircraft DP file."
PRINT "Be careful! If you enter something invalid, you will corrupt the mission file."
PRINT
PRINT "If you accidentally corrupt the mission file, go to your 'MISSIONS' folder."
PRINT "Copy 'Mission' from the 'MISSIONS' folder, drop it into your 'CAMPAIGNS' folder,"
PRINT "and run DCGQB again."
PRINT
PRINT "Just keep hitting ENTER at the prompt if you don't want to change your payloads."
PRINT
G = 0: linecount = 0: count = 0
gstart = VAL(groups$(player, 6))
OPEN "Missionx" FOR INPUT AS #1
OPEN "Missionxx" FOR OUTPUT AS #2
8000 IF EOF(1) THEN 8900
LINE INPUT #1, line$
linecount = linecount + 1
IF linecount < gstart THEN 8880
IF LEFT$(line$, 8) <> "payload=" THEN 8880
count = count + 1
IF count = 1 THEN PRINT "player "; line$: GOTO 8010
PRINT "wingman "; count; " "; line$
8010 q$ = ""
INPUT "desired payload (hit ENTER for no change)"; q$
IF q$ = "" THEN 8880
line$ = LEFT$(line$, 8) + q$
8880 PRINT #2, line$
8890 GOTO 8000
8900 CLOSE
8910 KILL "Mission.mis"
KILL "Missionx"
NAME "Missionxx" AS "Mission.mis"
10000 CLEAR : END
 
I've generated and checked out several Solomons DCG missions, and I haven't seen anything wrong. In fact, I think I now have the best DCG campaigns in the history of DCG.:d

Since there are no bombers at Barakoma, I still get boring CAP's. I accept the CAP missions, but I don't fly CAP. In the last mission, for example, both divisions of VMF-214 got CAP's over Barakoma. I climbed up to altitude, didn't see any bandits around Barakoma, and headed northwest on a hunting expedition. As I was nearing Ballale I stumbled upon 2 squads of B-25's. I tagged along with them. South of Torokina over Bougainville I was pleasantly surprised to see VMF-223 2nd division come in from the north and escort attach to one of the B-25 squads. I was surprised again when VMF-223 1st division showed up and followed suit. I'm still not accustomed to seeing escorts in DCG missions.

We had ourselves a convoy - 2 squadrons of B-25's, all of VMF-223, and my division of VMF-214. I moved out ahead. With Torokina in sight, a division of Zeros appeared at 12 low, in perfect position to be attacked, so I attacked them. There was a very cool dogfight in which my division wiped out the Zero division with no losses. I got 3. Meanwhile the rest of the convoy disappeared to the north. I assumed they were headed for Rabaul. I was low on ammo so I headed back south. I got back to Barakoma and killed some time, waiting for the rest of the mission to resolve itself. I started seeing reports of fighting and bombing around Rabaul. If I'd had more ammo I could have gotten into that fight too. As it was, the convoy made a decent accounting of itself.

Life was good. I landed at Barakoma and got a promotion.:d


In the first pic, I'm about to let that guy have it. In the second pic, I had let him have it.
 
Back
Top