DCS-BR-Tools / briefing-room-for-dcs

An advanced mission generator for Eagle Dynamic's DCS World.
GNU General Public License v3.0
207 stars 28 forks source link

DSMC auto completion not working #963

Closed Koene1999 closed 1 month ago

Koene1999 commented 1 month ago

BR Version: 0.5.202408.11 DCS Version: 2.9.7.59263

Brief Description:

A mission saved with DSMC does not autocomplete objectives that have already been destroyed (which it should according to issue #243). I tried testing it in a simple example mission.

Expected:

When starting DSMC_Caucasus - Operation Flaming Harvest_001.miz, objective COURAGE should auto complete because the unit is destroyed.

Mission and Template Zip:

DSMC Test Mission.zip

Mission modified: N

Koene1999 commented 1 month ago

I tried Briefing Room version 0.5.201.21 (the first version where auto completion was added), there the auto completion worked fine. Could something have broken it in later updates?

john681611 commented 1 month ago

Does the unit show as dead on the map? This is potentially due to ED messing with the events and haven broken them more than once over the last few patches. Is DSMC still in development? Is so please make sure you're using the latest patch of that too.

Koene1999 commented 1 month ago

Well, the unit does not exist anymore because it was killed in the previous mission. DSMC is still in development, i use the latest version (1.3.9).

I hope this answers your question. If i can assist by testing things, i'm happy to help.

john681611 commented 1 month ago

I don't use DSMC but its fairly easy to test. If you create a mission then del.... Oh I think I know why this may no longer work Do me a favor and on a fresh mission with DSMC off. Play it check it works then delete a destroy objective's units in the ME and try again. I bet that won't trigger the auto complete code.

Koene1999 commented 1 month ago

I made a new mission without DSMC support. Mission works. When i remove the unit in the ME and restart, it does not autocomplete. Missionstatus looks like this: Status It normally shows x/x units left, it does not show that because there are no units left, but it does not trigger as complete.

I also made a new mission with DSMC support enabled and followed the same steps. It give the exact same result. It seems DSMC support does not make a difference except for adding the DSMC_ prefix to the mission name.

john681611 commented 1 month ago

Ok confirmed its what I think it is and its not a simple fix :/ A while ago I made it so you could make major changes in the ME as long as groups existed with the assigned prefix it would work. This has broken the DSMC support as it grabs the groups on mission start. So if DSMC deletes the units then the script will not pickup on it

Koene1999 commented 1 month ago

Makes sense. I am not familliar with the source code of BR, but it seems to be able to track the amount of targets left at an objective. Would it not be possible to add a quick check after the groups have been grabbed at mission start to check if less than 1 targets are left at an objective? And if so, mark the task as complete?

john681611 commented 1 month ago

Yeah that is likely the quick fix

john681611 commented 1 month ago

Please try this version: https://github.com/akaAgar/briefing-room-for-dcs/releases/tag/beta-release-240826-180861-10564959498-1

Koene1999 commented 1 month ago

Following the same steps as before, the objective now marks as complete if no units are left.

Thank you so much for your effort into BR these past years!