Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

listen for hit event in addition to kill event to check HP for soft kills #3313

Open
DanAlbert opened this issue Dec 22, 2023 · 3 comments
Open
Labels
enhancement New feature or request

Comments

@DanAlbert
Copy link
Member

https://wiki.hoggitworld.com/view/DCS_func_getLife and https://wiki.hoggitworld.com/view/DCS_func_getLife0 can be used to determine how damaged a unit is. We could listen for https://wiki.hoggitworld.com/view/DCS_event_kill and check the health, and register the kill after some predefined amount (settings controllable, probably) rather than requiring a total kill. It'd make rockets and most CBUs less useless.

Within a single mission a soft kill is often enough to render the unit inoperable anyway, there's just no way for us to carry the damage over between turns. This would sort of approximate that.

@DanAlbert DanAlbert added the enhancement New feature or request label Dec 22, 2023
@SnappyComebacks
Copy link
Contributor

Hopefully there's other options, but the two possible options I could suggest to simulate a soft kill is to force ROE green, or set the unit as static / unmanned.

@DanAlbert
Copy link
Member Author

DCS AI won't know that those targets don't need to be dealt with again. Better to just kill them.

@Starfire13
Copy link
Contributor

Yeah. Would be very nice if parked aircraft would blow up after getting strafed, instead of just smoking till they despawn. Would mean no longer having to use 2000lb bombs on a plane to ensure a kill. 20 mike mike, rockets, etc would become useful.

@DanAlbert DanAlbert mentioned this issue Jan 4, 2024
@zhexu14 zhexu14 mentioned this issue Mar 8, 2024
zhexu14 added a commit that referenced this issue Mar 9, 2024
This PR partially addresses #3313 by:
- Tracking DCS hit events and storing the unit hit point updates in
state.json
- Adding logic to kill aircraft when the hit points is reduced to 1, as
opposed to the DCS logic of hit points to 0. This behavior allows
Liberation to track deaths to parked aircraft, which are uncontrolled
and seem to have different damage logic in DCS.
- Tracking damage to TheaterGroundObjects across turns and killing the
unit when the unit's hitpoints reduces to 1 or lower.

Intention is to build on this PR by also tracking front line objects and
statics (buildings). However, larger refactoring is required and so
splitting those into a separate PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants