ACE3 icon indicating copy to clipboard operation
ACE3 copied to clipboard

Cookoff - Finale Chance for full vehicle destruction

Open JonBons opened this issue 3 years ago • 2 comments

When merged this pull request will:

  • Restricted cookoff jet/ring flame effects to a single execution
  • After the cookoff jet/ring flame effects have finished a finale can happen (based on random roll) that results in catastrophic destruction of the vehicle (ex. https://youtu.be/qfldUOrXCGk)
    • Adds Destruction Finale Chance CBA setting to adjust the random roll chance of finale
    • Adds ace_vehicle_damage_canHaveFinale to disable feature via configs

Depends upon https://github.com/acemod/ACE3/pull/9060

JonBons avatar Oct 05 '22 05:10 JonBons

Imo we should drop the hard cap for flame-out stages in favor of #9758 's GVAR(cookoffDuration) setting. We can tweak 9758's implementation of the setting, but I think it should be done in a similar fashion.

johnb432 avatar Apr 04 '24 07:04 johnb432

Imo we should drop the hard cap for flame-out stages in favor of #9758 's GVAR(cookoffDuration) setting. We can tweak 9758's implementation of the setting, but I think it should be done in a similar fashion.

This was echoed in internal discussion. I'm trying to implement such changes, but it's harder than I initially anticipated.

* _After the cookoff jet/ring flame effects have finished a finale can happen (based on random roll) that results in catastrophic destruction of the vehicle (ex. https://youtu.be/qfldUOrXCGk)_
  
  * _Adds `Destruction Finale Chance` CBA setting to adjust the random roll chance of finale_
  * _Adds `ace_vehicle_damage_canHaveFinale` to disable feature via configs_

Why are we adding a separate config entry for this? We have https://github.com/acemod/ACE3/blob/dda6b9d2dc2d896a53b6e81001e595b17bee1596/addons/cookoff/functions/fnc_cookOff.sqf#L75

I understand it isn't quite the same (the only difference I can spot is that it happens at a specific time and that an explosion is spawned), but can't we either live with it or tweak that to get the desired behaviour, instead of adding yet another config entry?

Assuming we scrap the above from this PR, the remaining thing this PR adds is:

* _Restricted cookoff jet/ring flame effects to a single execution_

But that would be also scrapped, in favor of 9758's cookoff duration setting.


I went ahead and pushed a commit with the changes I think are necessary to make it compatible with 9758's cookoff duration setting and added a time between cookoff ending and final explosion happening. The final explosion is controlled by GVAR(destroyVehicleAfterCookoff) || _detonateAfterCookoff solely, the new config entry ace_vehicle_damage_canHaveFinale was removed as I deemed it unnecessary.

These changes fix a bug with the current implementation: QGVAR(intensity) was never updated after the final stage, meaning the PFH runs infinitely long, until the variable is manually set or the vehicle is deleted.

johnb432 avatar Apr 17 '24 12:04 johnb432

I worry that the changes changed the intention of the original PR, but if #9758 does what you say it does it sounds like this PR was going to be defunct anyway. With that in mind, I agree with your points and am approving this