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

Added self-revive and modified damage system #2890

Conversation

jaj22
Copy link

@jaj22 jaj22 commented Aug 2, 2023

What type of PR is this.

  1. Bug
  2. Change
  3. Enhancement

What have you changed and why?

Optional self-revive mechanic:

  • Requires first aid kit.
  • Once per 5min, reset by vehicle box restore and respawning.
  • During 5min timeout, adds desaturation effect and increased sway.

New stuff is mostly stringtabled.

I was going to add a second self-revive method where you transfer bodies to a squad AI, but that's on hold for a player event handler refactor.

Modifications to Antistasi damage system:

  • Reworked unarmoured body damage reduction. The old system had a hard 0.9 cap on body shots that sometimes worked. This system instead rescales body armour effects so that a level 1 vest is the baseline.
  • Reworked hitpoint-dependent down/kill results. Downing a unit by limb shots now consistently marks them as easier to revive. Downing an enemy with a body or head shot has a chance of killing them outright.
  • Fixed various issues with finishing off downed units. Should now be consistent and intuitive, rather than requiring leg shots or a whole SMG magazine.
  • Fixed automatic hard-kill from 50cal. Large bullets essentially kill a unit twice in two different frames, so that was a pain.

Please specify which Issue this PR Resolves.

closes #2865
closes #2845
closes #1925

Please verify the following and ensure all checks are completed.

  1. Have you loaded the mission in LAN host?
  2. Have you loaded the mission on a dedicated server?

Is further testing or are further changes required?

  1. No
  2. Yes (Please provide further detail below.)

It's had a fair amount of testing but probably needs more. Shouldn't need a DS test though, it's almost all local stuff aside from the one healing-box call.

Optional self-revive mechanic:
- Requires first aid kit.
- Once per 5min, reset by vehicle box restore and respawning.
- During 5min timeout, desaturation effect and increased sway.

Modifications to Antistasi damage system:
- Reworked unarmoured body damage reduction.
- Reworked hitpoint-dependent down/kill results.
- Fixed automatic hard-kill from 50cal.
@jaj22 jaj22 added Bug-fix Change A change to existing functionality Enhancement New feature or request labels Aug 2, 2023
@jaj22 jaj22 added this to the 3.4 milestone Aug 2, 2023
@wriley
Copy link

wriley commented Aug 18, 2023

I've been using this on my locally hosted single player game the last couple play sessions and it works great. It's nice having the option of getting back into the fight when your AI are busy or just standing there watching you bleed to death. With the desaturation and weakened condition it doesn't feel OP to me

@wriley
Copy link

wriley commented Aug 20, 2023

During play testing I did run across a case where the self-revive didn't work. I was in a truck and got hit by what I think was a grenade launcher. The truck exploded and I was down beside the truck. Using the H key did the usual popup about being back up and not feeling great but I was still stuck in a downed state. Another press of H informed me I had already used the revive. Maybe the explosion did more damage than normal?
https://imgur.com/a/GvdtmbT
RPT is attached. Timestamp of me getting exploded is 18:37:05
Arma3_x64_2023-08-19_18-19-20.zip

@jaj22
Copy link
Author

jaj22 commented Aug 20, 2023

During play testing I did run across a case where the self-revive didn't work. I was in a truck and got hit by what I think was a grenade launcher. The truck exploded and I was down beside the truck. Using the H key did the usual popup about being back up and not feeling great but I was still stuck in a downed state. Another press of H informed me I had already used the revive. Maybe the explosion did more damage than normal?

Nah, the revive just clears the incap var and sets global damage to 0.5 so it's not really possible for it to break. What seems most likely here is that you were downed again immediately after using the self-revive, as there's no invulnerability period. Cook off explosion or fire, maybe.

@MeltedPixel
Copy link

MeltedPixel commented Aug 20, 2023

During play testing I did run across a case where the self-revive didn't work. I was in a truck and got hit by what I think was a grenade launcher. The truck exploded and I was down beside the truck. Using the H key did the usual popup about being back up and not feeling great but I was still stuck in a downed state. Another press of H informed me I had already used the revive. Maybe the explosion did more damage than normal?

Nah, the revive just clears the incap var and sets global damage to 0.5 so it's not really possible for it to break. What seems most likely here is that you were downed again immediately after using the self-revive, as there's no invulnerability period. Cook off explosion or fire, maybe.

Should we maybe add in like a 5 second invulnerability period? This is mostly for small groups and single player anyway. I don't think we really need to worry about it being "over powered". Or "Abused".

@jaj22
Copy link
Author

jaj22 commented Aug 21, 2023

Should we maybe add in like a 5 second invulnerability period? This is mostly for small groups and single player anyway. I don't think we really need to worry about it being "over powered". Or "Abused".

Hmm. I'm not super-happy about this idea. One issue is that setCaptive is cleared (nearly) immediately by fn_unconscious, so if there's an enemy watching you when you revive, they'll magdump you for five seconds with no effect, which looks very weird. Other way is that we give every rebel revive that 5-second immunity and kill setCaptive at the same timing. I'll have to think whether that's likely to cause further problems.

@jaj22
Copy link
Author

jaj22 commented Aug 22, 2023

There's some related stuff here with undocumented behaviour. Antistasi will setCaptive on down but only if the killer wasn't invaders. Not sure why this is useful as vanilla AI behaviour on localhost seems to stop shooting as soon as the target is unconscious, and start again once they're conscious. On the other hand I recall getting magdumped with ACE on community, so maybe it's working around an Arma locality bug.

@jaj22
Copy link
Author

jaj22 commented Aug 22, 2023

Ah whatever, this works well on localhost and at worst it'll be a bit flaky on DS, but players won't stick with allowDamage false or anything bad like that. Five seconds is about the same time as the rollout animation takes, btw, so if there's an enemy looking right at you it's still a shootout.

Threw in a fix for the revive parameter not working for players. Not strictly related to this PR but close enough.

@killerswin2 killerswin2 self-requested a review September 2, 2023 00:57
@Bob-Murphy Bob-Murphy added the Merge conflicts There is a conflict which needs to be resolved before merging. label Sep 23, 2023
Copy link

@killerswin2 killerswin2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, after fixing merge confilcts

@Bob-Murphy Bob-Murphy added Bug Something isn't working and removed Bug-fix labels Sep 23, 2023
@jaj22 jaj22 added Ready for merge and removed Merge conflicts There is a conflict which needs to be resolved before merging. labels Sep 24, 2023
@Bob-Murphy Bob-Murphy merged commit 173e866 into official-antistasi-community:unstable Sep 24, 2023
@Bob-Murphy Bob-Murphy added the Added to changelog Added to changelog label Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Added to changelog Added to changelog Bug Something isn't working Change A change to existing functionality Enhancement New feature or request Ready for merge
Projects
None yet
6 participants