Jump to content

Dynamic Campaign Engine


MBot

Recommended Posts

Things are going well. The engine updates I wanted to do are are done. The Hornet campaign is completed and in intensive play-testing for about a month now. It plays very nice and I love it :) But then I build stuff the way I do primary for my own enjoyment, so mileages may vary. There is still some polishing going on but I think a release will come soon.

That's great to hear! I would be happy if I could do some additional testing :D

Intel i7-12700K @ 8x5GHz+4x3.8GHz + 32 GB DDR5 RAM + Nvidia Geforce RTX 2080 (8 GB VRAM) + M.2 SSD + Windows 10 64Bit

 

DCS Panavia Tornado (IDS) really needs to be a thing!

 

Tornado3 small.jpg

Link to comment
Share on other sites

Things are going well. The engine updates I wanted to do are are done. The Hornet campaign is completed and in intensive play-testing for about a month now. It plays very nice and I love it :) But then I build stuff the way I do primary for my own enjoyment, so mileages may vary. There is still some polishing going on but I think a release will come soon.

 

 

Very good news :thumbup:

[/url]All known Dynamic Campaign Engine Campaigns

Last DCE news : Crisis in PG - Blue version

Link to comment
Share on other sites

Hi guys,

Encoutering frequent crashes during mission generation so I had long debug session and found this ATO generation bug.

 

Basicaly in code there is checks for minimum number of planes per flight and for some tasks as CAP if 1 ac is requested it will break from generation loop. Problem is that before this empty package record is always created and when filling loop is exited ATO contains one or more empty package records that causes crash later in mission generation as code can't handle it.

 

 

So I solved it by adding same simplified check to draft record before it is used for ATO and it fixed issue.

 

File ATO_Generator.lua look for this code

 

 

--assign draft sorties to ATO and build packages/flights
for side, draft in pairs(draft_sorties) do																		--iterate through all sides
for n = 1, #draft do				

 

 

and change it to (look at that draftok added check):

 

--assign draft sorties to ATO and build packages/flights
for side, draft in pairs(draft_sorties) do																		--iterate through all sides
for n = 1, #draft do																						--iterate through all draft sorties beginning with the highest scored
	-- ATARIBABY added test for flight validity to prevent adding empty packages into ATO
	local availableTest = aircraft_availability[draft[n].name][draft[n].task][draft[n].loadout.name].unassigned
	local availableDraftNumber = draft[n].number
	local draftok = false
	
	if availableTest * draft[n].loadout.firepower >= draft[n].target.firepower.min then
	
		if availableDraftNumber > availableTest then
			availableDraftNumber = availableTest
		end
	
		if draft[n].task == "AWACS" or draft[n].task == "Refueling" or draft[n].task == "Transport" or draft[n].task == "Escort Jammer" or draft[n].task == "Flare Illumination" or draft[n].task == "Laser Illumination" then
			draftok = true
		elseif draft[n].task == "CAP" then
			if availableDraftNumber == 1 then
				draftok = false	
			else
				draftok = true
			end
		elseif draft[n].task == "Intercept" then
			draftok = true
		elseif draft[n].type == "F-117A" or draft[n].type == "B-1B" or draft[n].type == "B-52H" or draft[n].type == "Tu-22M3" or draft[n].type == "Tu-95MS" or draft[n].type == "Tu-142" or draft[n].type == "Tu-160" then
			draftok = true
		elseif draft[n].task == "Reconnaissance" then
			draftok = true
		else
			if availableDraftNumber == 1 then
				draftok = false
			else
				draftok = true
			end
		end
	end
	if draftok == true and draft[n].target.firepower.max > 0 and draft[n].target.firepower.max >= draft[n].target.firepower.min then	--the target of this draft sortie must have a need for firepower above the minimum firepower threshold

 

 

Also found issue in wrong random param - when first param became bigger than second and it fails.

 

 

Look into ATO_Timing.lua and change beginning to this:

 

 


for side, pack in pairs(ATO) do																					--iterate through sides in ATO
for p = 1, #pack do																							--iterate through packages in sides
	local player_start_shift = 0																			--waypoint time shift to start player at mission start

	local tot 																								--set time on target in seconds after mission start
	
	if pack[p].main[1].tot then																				--package already has a tot (target package for player intercept)
		tot = pack[p].main[1].tot																			--set package tot
	else
		-- ATARIBABY fix for bad random @2 param - intgerval is empty
		if (pack[p].main[1].tot_from + 600) < pack[p].main[1].tot_to then
			tot = math.random(pack[p].main[1].tot_from + 600, pack[p].main[1].tot_to)							--set random tot
		else
			tot = pack[p].main[1].tot_from + 600
		end 
	end

 

So far not a single crash yet.


Edited by ataribaby
Link to comment
Share on other sites

Hi Mbot, great news. It cost me a lot of hair to understand your code. Marvelous work from coder point of view ;)

 

Finihsing Mig-21 mini campaign. Am I allowed to release it with all my code modifiations please?

It will be a pleasure for me to add it to the DCE Campaigns post :thumbup:

 

 

@Mbot Will the new DCE system allow chopper's campaigns?

I would really like to fly Gazelle in a Iran-Irak war environment :music_whistling:

I tried to do it but of course it didn't work :cry:

What is exactly the problem with helos in DCE ? I wanted to add IA flights to other campaigns just to add targets of opportunities but DCS crashed each time. Are they too slow fo the system ?

[/url]All known Dynamic Campaign Engine Campaigns

Last DCE news : Crisis in PG - Blue version

Link to comment
Share on other sites

I have just discovered that in mission editor the player's helicopter flight is created as usual but without chopper type ! In fact I think that the system is looking for a plane not an helicopter !

How can I tell to DCE that I fly a Chopper ? In oob_air_init ?

[/url]All known Dynamic Campaign Engine Campaigns

Last DCE news : Crisis in PG - Blue version

Link to comment
Share on other sites

Been trying a few of these. Just out of curiousity- what kind of FPS do you guys pull on a day one mission typically? Does not have to be accurat. I ask because I drag around 15 to 30 fps on my i5 3.5, gtx 1080 ti 16 gb Ram, SSD. I realize that my CPU is probably the culprit, I just wonder what people with decent systems manage to get here.

 

I tried both the F-15 (Nevada) and the F-18 PG, campaigns with very similar results. Playable, but just barely.

Link to comment
Share on other sites

I have test-flown a great many missions that at are poorly optimized, resulting in unnecessary CPU loading. For example: AI flights that have no influence on the pilot experience; combat action invisible to the pilot; group activity far from the mission operating area; airplane and vehicle groups replaceable by statics.

Link to comment
Share on other sites

+1!

 

Been having the greatest fun in ages using these campaigns- and to anyone having perf issues, use the "Prune" tool mentioned above.

 

Just a minor question:

 

Is it possible to make it so you don't attack the same target several times repeadetly? I am using the excellent "Hornet over PG" campaign, but have been tasked to attack the same harbour 4+ times in a row. I know it is because there are still units alive there, but some way to increase variation would be cool:)

 

Can't wait for MBots finished Hornet campaign!

Link to comment
Share on other sites

+1!

 

 

 

Been having the greatest fun in ages using these campaigns- and to anyone having perf issues, use the "Prune" tool mentioned above.

 

 

 

Just a minor question:

 

 

 

Is it possible to make it so you don't attack the same target several times repeadetly? I am using the excellent "Hornet over PG" campaign, but have been tasked to attack the same harbour 4+ times in a row. I know it is because there are still units alive there, but some way to increase variation would be cool:)

 

 

 

Can't wait for MBots finished Hornet campaign!

You can use the skipmission.bat file to force it to rebuild a new mission for you.

 

Markeebo

 

Sent from my SM-G955U using Tapatalk

Link to comment
Share on other sites

Things are going well. The engine updates I wanted to do are are done. The Hornet campaign is completed and in intensive play-testing for about a month now. It plays very nice and I love it :) But then I build stuff the way I do primary for my own enjoyment, so mileages may vary. There is still some polishing going on but I think a release will come soon.

 

Curious as to an update on this. Would love to give it a shot and promote it on the Alert 5 Podcast! We're all fans of your previous campaigns!

Come check me out on

YouTube!

Twitch!

Have a listen to the Alert 5 Podcast - YOUR source for the latest combat flight simulation news!

Link to comment
Share on other sites

  • 2 weeks later...

For some reason campaigns are not progressing on my openbeta. First mission ends ok, I can see a debriefing text file as well as a y/n dialog on results. But after the second mission it never appears again. So I have the only option to replay 2nd mission endlessly. I am pretty sure its because of ED changes. Does anyone find the fix for that?

 

P.S. I dont use prune script since it will limit the battle only at the player area. So no battle damage across the whole map. Original mission is heavy, it lags on the airfield, but once I am airborne its pretty good.

Link to comment
Share on other sites

There should be a Debug mission briefing.bat inside your campaign directory. It has the same effect as ending the mission, you should get an error message, most likely the same problem I had.

 

Here's my message from another thread.

 

 

Hi PB0, I have a problem with my current campaign, Harrier over Caucasus :

 

When Debrief_StatsEvaluation.lua starts, I get this error message :

 

..\..\..\..\..\..\..\bin\luae.exe: .\Scripts/DEBRIEF_StatsEvaluation.lua:156: bad argument #1 to 'find' (string expected, got nil)

stack traceback:

[C]: in function 'find'

.\Scripts/DEBRIEF_StatsEvaluation.lua:156: in main chunk

[C]: in function 'require'

Scripts/Debrief_Master.lua:29: in main chunk

[C]: ?

 

Apparently, it's because the event "crash" doesn't have an initiator, which crashes the "find" function.

 

Adding

 

if events[e].initiator ~= nil then

 

in the line just above and a

 

end

 

in the line under seems to have solved the problem.

Link to comment
Share on other sites

  • 2 weeks later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...