The point is, as I've said again and again, a Dynamic campaign doesn't mean it has to be a carbon copy of Falcon 4's system! There were many approaches to Dynamic campaigns in previous flightsims, and while they all were different from each other, they all were a hell of a lot better than simply flying canned missions 1-20 that will be the same everytime except for random elements and have no deeper purpose.

To illustrate that to you, here is the deal: Since I got bored with the topic yesterday, I sat down and in 4 hours wrote a force / stockpile / supply logic in lua.

It works like that:

There are five types of assets to the enemy side (I only wrote logic for the enemy side yet):
1. Fighter force (16 planes)
2. Bomber force (8)
3. SAMs (8)
4. Factories (4)
5. Supply / repair trucks (50)

The first three assets have a replenish rate that varies with the number of operating factories. The more factories inactive, the lower the rate. If a factory is taken out, it will be repaired, with the repair rate depending on the number of supply trucks, which also have a replenish rate that again depends on the number of operating factories. The logic is tuned to and works in conjunction with the Random / Fast Mission Generator of DCS.

Since I'm still brand-new to programming and have no idea how to interface the program with DCS, it requires user input. You enter the number of destroyed assets in the mission debrief, and the program will calculate the max assets available to the enemy for the next mission. If the asset number descends below the number the Fast Mission Generator works with on Max Settings, the program will inform you about it, so that for the next mission the user knows how many of the assets he has to delete via the group menu in the next generated mission. "House rules" are that if you want to go after a factory, you have to select the biggest building that is nearest to the default waypoint 1 in the generated mission. Another house rule is that taking out a bridge nearest to waypoint 1 equals 10 truck kills. Since I also have no idea yet how to program a graphical user interface, the program runs in simple CMD.exe.

Now, for anyone more familiar with programming, or the DCS team itself, it would be child's play to interface the logic with DCS itself and register the asset losses directly from the mission debrief log and limit the number of max assets available automaticly for the next mission.

With or without that interface though, the logic results in meaning and purpose for the player when he flies the missions. He will select targets based on what is most appropriate for the current situation in a dynamic environment. It also has a save function when you leave the program (as in Rogue-like RPGs - saving is only available on leaving the program). It also provides much variation and opportunity for different mission profiles and even planes:
Do you want to take down the fighter force first? Go ahead, but be aware that their replenish rate will be high as long as factory production is still high. So, maybe go ahead and strike a factory first if the mission generator puts out a sensible position of waypoint 1 that offers that opportunity. Have taken down 1-2 factories? Keep an eye on their repair status and maybe go after trucks or a bridge the next mission. Get shot down by SAMs a lot while fighting the remaining fighter force? Fly a dedicated SEAD mission!

THAT is what a Dynamic campaign is about. To give purpose and (with the help of the random mission generator) variation to each mission, so that no mission is ever the same.

Here is the code:

Code:
-- Dynamic Campaign for DCS MiG21

local socket = require("socket")
math.randomseed (os.time())

-- Load Game function

repeat 
print ("Do you want to start a new game (n) or load (l) a previous game?")
start = io.read ()
until start == "l" or start == "n"

if start == "l" then
dofile ("dcsdce.lua")

else

-- New Game Stockpile

ef = 16
eb = 8
es = 8
efac = 4
etruck = 50

-- Factory and Supply truck efficiency

efaceff = 1
etruckeff = 1

end

repeat


-- Next Mission Brief

-- Intel

print ()
print ("INTEL")
print ()
print ("Enemy production is at "..(efaceff * 100).."%.")
print ("Their supply truck efficiency is at "..(etruckeff * 100).."%.")
print ("They have "..efac.." out of 4 factories operating.")
print ("Their factory repair rate is at "..(0.3 * etruckeff).." per day.")
print ("They have "..math.floor (ef).." fighters and "..math.floor (es).." SAMs left.")
print ()
if ef < 8 then

print ("For your next mission, the enemy fighter max is "..math.floor (ef).." .")

end

if eb < 6 then

print ("For your next mission, the enemy bomber max is "..math.floor (eb).." .")

end

if es < 6 then

print ("For your next mission, the enemy SAM max is "..math.floor (es).." .")

end
print ()
print "Go fly now and press Enter after your sortie."
io.read ()

-- Debrief

print "DEBRIEFING:"
print ()
print "How many fighters were shot down?"
efl = io.read ()
print "How many bombers were shot down?"
ebl = io.read ()
print "How many SAMs were destroyed?"
esl = io.read ()
print "How many factories were destroyed?"
efacl = io.read ()
print "How many trucks were destroyed?"
etruckl = io.read ()

if efl == "" then efl = 0
end
if ebl == "" then ebl = 0
end
if esl == "" then esl = 0
end
if efacl == "" then efacl = 0
end
if etruckl == "" then etruckl = 0
end

-- Supply truck efficiency

etruckeff = (etruck - etruckl) / 50

-- Number of Factories

efac = efac - efacl + 0.3 * etruckeff
if efac > 4 then efac = 4
end

-- Factory Efficiency

efaceff = efac / 4

-- Attrition and Reinforcements / New Stockpile

ef = ef - efl + 4 * efaceff 
if ef > 16 then ef = 16
end
eb = eb - ebl + 1 * efaceff
if eb > 8 then eb = 8
end
es = es - esl + 1 * efaceff
if es > 8 then es = 8
end
etruck = etruck - etruckl + 1 * efaceff
if etruck > 50 then etruck = 50
end


-- Continue Game

print ()
repeat 
print ("Do you want to sortie again? (y/n)")
sa = io.read ()
until sa == "y" or sa == "n"

until sa == "n"

-- Intel (Summary) before leaving
 
print ()
print ("Enemy production is at "..(efaceff * 100).."%.")
print ("Their supply truck efficiency is at "..(etruckeff * 100).."%.")
print ("They have "..efac.." out of 4 factories operating.")
print ("Their factory repair rate is at "..(0.3 * etruckeff).." per day.")
print ("They have "..math.floor (ef).." fighters and "..math.floor (es).." SAMs left.")
print ()

print "Press Enter to save your game."
io.read ()

-- Save Game function

savefile = io.open ("dcsdce.lua" , "w+")
savefile:write ("ef = "..ef.." eb = "..eb.." es = "..es.." efac = "..efac.." etruck = "..etruck.." efaceff = "..efaceff.." etruckeff = "..etruckeff.."")
savefile:close ()
print ()
print ("Your Campaign has been saved to 'dcsdce.lua'.")
io.read ()


Anyone who is interested in programming, go right ahead and improve it or use it as an inspiration and feel free to think about interfacing it or something similar with the DCS program and a GUI. It is just a bare bones program yet (as I said, I came up with it in just a few hours and I'm still new to programming) that serves as a learning opportunity for me and to illustrate the concept.

Anything that gives purpose and meaning to the missions you fly in a continued and dynamic context is better than just a string of scripted missions that are always the same and - at best - just "branch" into different paths, whose number depends on the time the mission designer put in to write some more scripted missions. Flight sims should not be RPGs with branching, scripted "story lines". Flightsims should be about conducting and / or participating in an air campaign that has certain strategic goals, in an environment that changes dynamically according to the performance of the player and / or the participating sides.

Best regards
heartc

P.S. The randomizer I put into there up at the top was just a preparatory measure. It doesn't serve a function yet, but you can picture how to easily randomize the initial stockpile for example to allow for randomized initial conditions for each new campaign. Also, in the header, it says "for MiG21", because I optimized it for a fast mover. You could easily adopt it though for low intensity CAS planes or easily fly the Mirage in it.