Finish PVP Combat Parity with the rest + PVP Tweaks #4078

Merged
the-real-herowl merged 39 commits from Eliy21/MineClone2:combat_fixes into master 2023-12-30 05:21:24 +01:00
Contributor
  • Add missing pvp attack reach limit
  • Add minimum pvp knockbacks for non-enchant weapons and fists
  • Nerf and limit long pvp sword enchant knockbacks
  • Fix not being able to continuously damage players when holding the attack key

Testing

  • In game let another player join and see if you can damage players that are between 3 to 4.5 blocks away
  • Test if punching a player now feels similar to MC (Also test other non-enchant weapons)
  • Get a sword with knockback enchant I & II and test if the knockback on players is more closer to MC than before when running
  • Punch a player while holding the attack key and see if that player is damaged continuously
<!-- Please follow our contributing guidelines first: https://git.minetest.land/MineClone2/MineClone2/src/branch/master/CONTRIBUTING.md#how-you-can-help-as-a-programmer By submitting this pull request, you agree to follow our Code of Conduct: https://git.minetest.land/MineClone2/MineClone2/src/branch/master/CODE_OF_CONDUCT.md --> - Add missing pvp attack reach limit - Add minimum pvp knockbacks for non-enchant weapons and fists - Nerf and limit long pvp sword enchant knockbacks - ~~Fix not being able to continuously damage players when holding the attack key~~ ### Testing - In game let another player join and see if you can damage players that are between 3 to 4.5 blocks away - Test if punching a player now feels similar to MC (Also test other non-enchant weapons) - Get a sword with knockback enchant I & II and test if the knockback on players is more closer to MC than before when running - ~~Punch a player while holding the attack key and see if that player is damaged continuously~~
Eliy21 added 1 commit 2023-12-13 18:34:46 +01:00
a8806fe04e Add player invulnerability & fix not continuously damaging players when holding the attack key
Player invulnerability is the same as Minecraft's Damage Immunity https://minecraft.wiki/w/Damage#Immunity

The old code for some reason only allows a few damage by holding and does not continuously damage other players after a few hits
Eliy21 added 1 commit 2023-12-13 18:42:46 +01:00
Eliy21 changed title from WIP: Finish PVP & PVE Combat Parity + PVP Tweaks & Bug Fixes to Finish PVP & PVE Combat Parity + PVP Tweaks & Bug Fixes 2023-12-13 18:43:12 +01:00
Eliy21 added 1 commit 2023-12-13 19:49:12 +01:00
Eliy21 added 1 commit 2023-12-13 21:04:20 +01:00
Eliy21 added 1 commit 2023-12-13 21:36:59 +01:00
Member

Can you make knockback work for basic unenchanted weapons(and fists?) Like in mc?

Can you make knockback work for basic unenchanted weapons(and fists?) Like in mc?
Eliy21 added 1 commit 2023-12-14 08:46:22 +01:00
Author
Contributor

Can you make knockback work for basic unenchanted weapons(and fists?) Like in mc?

Done

> Can you make knockback work for basic unenchanted weapons(and fists?) Like in mc? Done
Eliy21 added 1 commit 2023-12-14 09:12:17 +01:00
Eliy21 added 1 commit 2023-12-14 09:16:00 +01:00
Eliy21 added 1 commit 2023-12-14 09:51:40 +01:00
Member

Can you make knockback work for basic unenchanted weapons(and fists?) Like in mc?

Done

I don't think there's enough knockback.

Using a wooden sword and sprinting mobs fly up a bit but nowhere close to the 3 or so blocks they fly back in mc under de same conditions

> > Can you make knockback work for basic unenchanted weapons(and fists?) Like in mc? > > Done I don't think there's enough knockback. Using a wooden sword and sprinting mobs fly up a bit but nowhere close to the 3 or so blocks they fly back in mc under de same conditions
Eliy21 added 1 commit 2023-12-14 10:27:33 +01:00
Author
Contributor

I don't think there's enough knockback.

Using a wooden sword and sprinting mobs fly up a bit but nowhere close to the 3 or so blocks they fly back in mc under de same conditions

Oh this PR is mainly for PVP and adding attack reach limit that already exists in PVE hence the "PVP & PVE Combat Parity" title. I didn't touch the PVE aspect on this PR except for removing that unnecessary space in mob combat which functionally does absolutely nothing in gameplay.

But for the PVP side, punching other players now feels closer to MC.

> I don't think there's enough knockback. > > Using a wooden sword and sprinting mobs fly up a bit but nowhere close to the 3 or so blocks they fly back in mc under de same conditions Oh this PR is mainly for PVP and adding attack reach limit that already exists in PVE hence the "PVP & PVE Combat Parity" title. I didn't touch the PVE aspect on this PR except for removing that unnecessary space in mob combat which functionally does absolutely nothing in gameplay. But for the PVP side, punching other players now feels closer to MC.
Member

Okay

I hacked your minimum knockback change into combat.lua and it's looking a lot better now

-- add minimum knockback if kb <= 1.5 then kb = kb + 4.875 end

Okay I hacked your minimum knockback change into combat.lua and it's looking a lot better now ` -- add minimum knockback if kb <= 1.5 then kb = kb + 4.875 end`
Author
Contributor

Okay

I hacked your minimum knockback change into combat.lua and it's looking a lot better now

Oh no. I think it's my fault for not trying to get across the point of why I didn't touch the PVE combat code and here's the big reason: It will ruin the balance of the entire combat aspect for mobs unless you test very thoroughly.

I wish it were that simple as blindly copy pasting MC mechanics into MCL without careful consideration as I've spent my sanity just balancing everything in that mob combat PR. See the actual mob combat PR(s) of which are not just one to get an idea of how delicate it is to balance that as it affects all the mobs. Not to mention to be prepended to study player meta techs and how it will affect the balance of your changes. (See my rant on knockback juggling player tech)

It's an entire can of worms and I don't advise to change it unless you want to do a deep dive into everything combat related and do thorough testing with each and every little aspect of gameplay in combat and the potential situations that may arise which you have to balance as MCL is not 1:1 with MC so you have to account and adjust for that.

> Okay > > I hacked your minimum knockback change into combat.lua and it's looking a lot better now Oh no. I think it's my fault for not trying to get across the point of why I didn't touch the PVE combat code and here's the big reason: **It will ruin the balance of the entire combat aspect for mobs unless you test very thoroughly.** I wish it were that simple as blindly copy pasting MC mechanics into MCL without careful consideration as I've spent my sanity just balancing everything in that mob combat PR. See the actual mob combat PR(s) of which are not just one to get an idea of how delicate it is to balance that as it affects **all** the mobs. Not to mention to be prepended to study player meta techs and how it will affect the balance of your changes. (See my rant on knockback juggling player tech) It's an entire can of worms and I don't advise to change it unless you want to do a deep dive into everything combat related and do thorough testing with each and every little aspect of gameplay in combat and the potential situations that may arise which you have to balance as MCL is not 1:1 with MC so you have to account and adjust for that.
Member

Currently there is zero knockback on mobs and with the recent changes it's almost impossible to survive in the early game.

The mob juggling doesn't work at all and mobs just run into you like freight trains .

Maybe I should open a ticket instead of talking about it here

Currently there is zero knockback on mobs and with the recent changes it's almost impossible to survive in the early game. The mob juggling doesn't work at all and mobs just run into you like freight trains . Maybe I should open a ticket instead of talking about it here

Okay

I hacked your minimum knockback change into combat.lua and it's looking a lot better now

Oh no. I think it's my fault for not trying to get across the point of why I didn't touch the PVE combat code and here's the big reason: It will ruin the balance of the entire combat aspect for mobs unless you test very thoroughly.

I wish it were that simple as blindly copy pasting MC mechanics into MCL without careful consideration as I've spent my sanity just balancing everything in that mob combat PR. See the actual mob combat PR(s) of which are not just one to get an idea of how delicate it is to balance that as it affects all the mobs. Not to mention to be prepended to study player meta techs and how it will affect the balance of your changes. (See my rant on knockback juggling player tech)

It's an entire can of worms and I don't advise to change it unless you want to do a deep dive into everything combat related and do thorough testing with each and every little aspect of gameplay in combat and the potential situations that may arise which you have to balance as MCL is not 1:1 with MC so you have to account and adjust for that.

Something like

local MIN_KNOCKBACK = 4.5 -- we need to balance this value
if kb < MIN_KNOCKBACK then kb = MIN_KNOCKBACK end

And then test it on creepers and magma cubes perhaps...

> > Okay > > > > I hacked your minimum knockback change into combat.lua and it's looking a lot better now > > Oh no. I think it's my fault for not trying to get across the point of why I didn't touch the PVE combat code and here's the big reason: **It will ruin the balance of the entire combat aspect for mobs unless you test very thoroughly.** > > I wish it were that simple as blindly copy pasting MC mechanics into MCL without careful consideration as I've spent my sanity just balancing everything in that mob combat PR. See the actual mob combat PR(s) of which are not just one to get an idea of how delicate it is to balance that as it affects **all** the mobs. Not to mention to be prepended to study player meta techs and how it will affect the balance of your changes. (See my rant on knockback juggling player tech) > > It's an entire can of worms and I don't advise to change it unless you want to do a deep dive into everything combat related and do thorough testing with each and every little aspect of gameplay in combat and the potential situations that may arise which you have to balance as MCL is not 1:1 with MC so you have to account and adjust for that. > Something like ``` local MIN_KNOCKBACK = 4.5 -- we need to balance this value if kb < MIN_KNOCKBACK then kb = MIN_KNOCKBACK end ``` And then test it on creepers and magma cubes perhaps...
Author
Contributor

Okay since you insisted on this. If you want to add that minimum knockback of which you really have to test thoroughly as I see you just blindly copied my PVP code into PVE, which is already bad since there's subtle difference in the way the mob code works vs pvp so you must test for it, here's the thing you have to solve first: Find the code responsible for the hidden MCL exclusive quirk that exponentially increases knockback on the right timing of the second hit of your attack on mobs which is obviously not in MC. Unless you account for that your code has the potential to knockback mobs as if you had the knockback enchant while unenchanted. That's the minimum even before the very thorough testing that you need. There's more but see if you can solve that first. EDIT: (On second thought that is already a bit much so I think it will be fine if you just solved that one and just do thorough testing. Forgive my ranting, my Mob Combat PR trauma is resurfacing lol)

EDIT2:

Now that I've calmed down and has taken a rest from testing this PR, I realized that I may have been forcing the way I did my mob combat PR onto you @Bakawun and I'd like to apologize. Although it would be very nice if you could do something about that MCL exclusive quirk, you don't have to mind what I said and just do your own stuff. I can always add a PR in the future like what I'm doing now with this PR.

Okay since you insisted on this. If you want to add that minimum knockback of which you really have to test thoroughly as I see you just blindly copied my PVP code into PVE, which is already bad since there's subtle difference in the way the mob code works vs pvp so you must test for it, here's the thing you have to solve first: Find the code responsible for the hidden MCL exclusive quirk that exponentially increases knockback on the right timing of the second hit of your attack on mobs which is obviously not in MC. Unless you account for that your code has the potential to knockback mobs as if you had the knockback enchant while unenchanted. That's the minimum even before the very thorough testing that you need. ~~There's more but see if you can solve that first.~~ EDIT: (On second thought that is already a bit much so I think it will be fine if you just solved that one and just do thorough testing. Forgive my ranting, my Mob Combat PR trauma is resurfacing lol) EDIT2: Now that I've calmed down and has taken a rest from testing this PR, I realized that I may have been forcing the way I did my mob combat PR onto you @Bakawun and I'd like to apologize. Although it would be very nice if you could do something about that MCL exclusive quirk, you don't have to mind what I said and just do your own stuff. I can always add a PR in the future like what I'm doing now with this PR.
Eliy21 added 1 commit 2023-12-14 12:57:59 +01:00
Author
Contributor

Something like

local MIN_KNOCKBACK = 4.5 -- we need to balance this value
if kb < MIN_KNOCKBACK then kb = MIN_KNOCKBACK end

And then test it on creepers and magma cubes perhaps...

Sorry looking back again after I finished testing this PR, I realized that there's a possibility that this comment is for me which I hope it isn't. The scope of this PR is PVP so it probably isn't but just making sure.

> Something like > ``` > local MIN_KNOCKBACK = 4.5 -- we need to balance this value > if kb < MIN_KNOCKBACK then kb = MIN_KNOCKBACK end > ``` > > And then test it on creepers and magma cubes perhaps... Sorry looking back again after I finished testing this PR, I realized that there's a possibility that this comment is for me which I hope it isn't. The scope of this PR is PVP so it probably isn't but just making sure.
the-real-herowl added the
gameplay
controls
combat
#P4 priority: medium
player
labels 2023-12-14 22:10:20 +01:00
the-real-herowl added this to the 2 - Next milestone 2023-12-14 22:10:25 +01:00
the-real-herowl added the
Testing / Retest
needs discussion
labels 2023-12-14 22:10:38 +01:00
the-real-herowl requested review from the-real-herowl 2023-12-14 22:10:50 +01:00
Member

can we also make it so that only the zombie and baby zombies that are set alight on fire to make the player burn apon being attacked only instead of every single mob causing the player to burn including the passive mobs when they walk past you when they are burning atm they cause the player to bur and it's super annoying it's only meant to be the zombies and baby zombies that only come in contact with the player only when it hits you then they player catches fire

can we also make it so that only the zombie and baby zombies that are set alight on fire to make the player burn apon being attacked only instead of every single mob causing the player to burn including the passive mobs when they walk past you when they are burning atm they cause the player to bur and it's super annoying it's only meant to be the zombies and baby zombies that only come in contact with the player only when it hits you then they player catches fire
Author
Contributor

can we also make it so that only the zombie and baby zombies that are set alight on fire to make the player burn apon being attacked only instead of every single mob causing the player to burn including the passive mobs when they walk past you when they are burning atm they cause the player to bur and it's super annoying it's only meant to be the zombies and baby zombies that only come in contact with the player only when it hits you then they player catches fire

Is that burning mechanic in MC? I rarely encounter burning passive mobs in MC much more be burned by them to remember if this was how it's done there because I don't think they will make an exception for it. If you link a wiki or any other evidence then I'll conclude that there must be a significant gameplay balancing reason to warrant such weird exception. Normally it would make sense to expect that if a burning mob burns you then other mobs will too.

All that being said, this is a PVP PR and mobs are out of scope for this PR. I probably should just remove the PVE in the title.

> can we also make it so that only the zombie and baby zombies that are set alight on fire to make the player burn apon being attacked only instead of every single mob causing the player to burn including the passive mobs when they walk past you when they are burning atm they cause the player to bur and it's super annoying it's only meant to be the zombies and baby zombies that only come in contact with the player only when it hits you then they player catches fire > Is that burning mechanic in MC? I rarely encounter burning passive mobs in MC much more be burned by them to remember if this was how it's done there because I don't think they will make an exception for it. If you link a wiki or any other evidence then I'll conclude that there must be a significant gameplay balancing reason to warrant such weird exception. Normally it would make sense to expect that if a burning mob burns you then other mobs will too. All that being said, this is a PVP PR and mobs are out of scope for this PR. I probably should just remove the PVE in the title.
Eliy21 changed title from Finish PVP & PVE Combat Parity + PVP Tweaks & Bug Fixes to Finish PVP ~~& PVE~~ Combat Parity + PVP Tweaks & Bug Fixes 2023-12-15 02:45:18 +01:00
Eliy21 changed title from Finish PVP ~~& PVE~~ Combat Parity + PVP Tweaks & Bug Fixes to Finish PVP Combat Parity with PVE + PVP Tweaks & Bug Fixes 2023-12-15 02:46:03 +01:00
Eliy21 changed title from Finish PVP Combat Parity with PVE + PVP Tweaks & Bug Fixes to Finish PVP Combat Parity with *cough*pve*cough* + PVP Tweaks & Bug Fixes 2023-12-15 02:48:08 +01:00
Eliy21 changed title from Finish PVP Combat Parity with *cough*pve*cough* + PVP Tweaks & Bug Fixes to Finish PVP Combat Parity with the rest + PVP Tweaks & Bug Fixes 2023-12-15 03:02:36 +01:00
Eliy21 added 1 commit 2023-12-15 16:42:53 +01:00
60367cdbe0 Revert unreliable bugfix
There are times when the continuous damage when punching players does not happen so will not fix at the moment as using other weapons does still work.
Eliy21 changed title from Finish PVP Combat Parity with the rest + PVP Tweaks & Bug Fixes to Finish PVP Combat Parity with the rest + PVP Tweaks 2023-12-15 16:43:31 +01:00
Eliy21 added 1 commit 2023-12-15 16:52:30 +01:00
Eliy21 added 1 commit 2023-12-15 16:59:12 +01:00
Eliy21 added 1 commit 2023-12-15 17:27:13 +01:00
Eliy21 added 1 commit 2023-12-15 19:17:20 +01:00
Eliy21 added 1 commit 2023-12-15 20:49:10 +01:00
Author
Contributor

@the-real-herowl I encountered a sort of critical bug in your player invulnerability code that makes a player permanently invulnerable and it cannot be reset by leaving or rejoining the server. It's quite a game breaking bug that I encountered in my tests which I fixed in this PR by switching to the code I used in mob invulnerability and I believe that the bugged code is also in master and in release 0.85 so if people decided to do combat intensely (I tested on pvp), someone might accidentally become the god of the server.

@the-real-herowl I encountered a sort of critical bug in your player invulnerability code that makes a player permanently invulnerable and it cannot be reset by leaving or rejoining the server. It's quite a game breaking bug that I encountered in my tests which I fixed in this PR by switching to the code I used in mob invulnerability and I believe that the bugged code is also in master and in release 0.85 so if people decided to do combat intensely (I tested on pvp), someone might accidentally become the god of the server.
Eliy21 added 1 commit 2023-12-15 22:02:13 +01:00
Eliy21 added 1 commit 2023-12-15 23:56:10 +01:00
Eliy21 added 1 commit 2023-12-16 08:58:30 +01:00
Eliy21 added 1 commit 2023-12-16 10:20:33 +01:00
Eliy21 added 1 commit 2023-12-16 10:46:23 +01:00
Eliy21 added 1 commit 2023-12-16 12:48:21 +01:00
Eliy21 added 1 commit 2023-12-16 13:59:04 +01:00
Eliy21 added 1 commit 2023-12-17 17:39:09 +01:00
Eliy21 added 1 commit 2023-12-17 18:48:43 +01:00
Eliy21 added 1 commit 2023-12-17 20:59:21 +01:00
Eliy21 added 1 commit 2023-12-17 21:01:38 +01:00
Eliy21 added 1 commit 2023-12-17 22:16:00 +01:00
Eliy21 added 1 commit 2023-12-17 22:19:00 +01:00
Eliy21 added 1 commit 2023-12-18 22:31:43 +01:00
Eliy21 added 1 commit 2023-12-18 22:42:30 +01:00
Eliy21 added 1 commit 2023-12-18 23:04:21 +01:00
Member

You're probably aware of this, but make sure that the bows/arrows don't do a "one hit kill" on players. Also, arrows that fall from a removed block shouldn't have knockback.

You're probably aware of this, but make sure that the bows/arrows don't do a "one hit kill" on players. Also, arrows that fall from a removed block shouldn't have knockback.
Author
Contributor

You're probably aware of this, but make sure that the bows/arrows don't do a "one hit kill" on players. Also, arrows that fall from a removed block shouldn't have knockback.

The only think I've changed so far in bows/crossbows is the increase or additions of knockbacks themselves. Other things like damage or behavior remains the same. As of this PR or post 0.85 the damage on players does not onehit kill and the arrows dug doesn't give knockback and becomes an item that you can pick up.

> You're probably aware of this, but make sure that the bows/arrows don't do a "one hit kill" on players. Also, arrows that fall from a removed block shouldn't have knockback. The only think I've changed so far in bows/crossbows is the increase or additions of knockbacks themselves. Other things like damage or behavior remains the same. As of this PR or post 0.85 the damage on players does not onehit kill and the arrows dug doesn't give knockback and becomes an item that you can pick up.
Eliy21 added 1 commit 2023-12-19 16:31:35 +01:00
Eliy21 added 1 commit 2023-12-19 17:15:45 +01:00
Eliy21 added 1 commit 2023-12-19 17:49:52 +01:00
Eliy21 added 1 commit 2023-12-19 18:19:16 +01:00
Member

You're probably aware of this, but make sure that the bows/arrows don't do a "one hit kill" on players. Also, arrows that fall from a removed block shouldn't have knockback.

The only think I've changed so far in bows/crossbows is the increase or additions of knockbacks themselves. Other things like damage or behavior remains the same. As of this PR or post 0.85 the damage on players does not onehit kill and the arrows dug doesn't give knockback and becomes an item that you can pick up.

I believe that what @the-real-herowl was doing, was shooting an arrow straight up into the air. And when it landed, it killed him. just something to make sure of so we don't have a regression.

> > You're probably aware of this, but make sure that the bows/arrows don't do a "one hit kill" on players. Also, arrows that fall from a removed block shouldn't have knockback. > > The only think I've changed so far in bows/crossbows is the increase or additions of knockbacks themselves. Other things like damage or behavior remains the same. As of this PR or post 0.85 the damage on players does not onehit kill and the arrows dug doesn't give knockback and becomes an item that you can pick up. I believe that what @the-real-herowl was doing, was shooting an arrow straight up into the air. And when it landed, it killed him. just something to make sure of so we don't have a regression.
Author
Contributor

I believe that what @the-real-herowl was doing, was shooting an arrow straight up into the air. And when it landed, it killed him. just something to make sure of so we don't have a regression.

I've shot a regular bow and an enchantet bow with Power V at full charge directly straight up into the air and tried to catch the arrow with no armor and it still didn't kill me.

> I believe that what @the-real-herowl was doing, was shooting an arrow straight up into the air. And when it landed, it killed him. just something to make sure of so we don't have a regression. I've shot a regular bow and an enchantet bow with Power V at full charge directly straight up into the air and tried to catch the arrow with no armor and it still didn't kill me.

I believe that what @the-real-herowl was doing, was shooting an arrow straight up into the air. And when it landed, it killed him. just something to make sure of so we don't have a regression.

I've shot a regular bow and an enchantet bow with Power V at full charge directly straight up into the air and tried to catch the arrow with no armor and it still didn't kill me.

The only enchantment that was needed for that bug was Punch II. It was basically knocking the player into the ground and the player would take fall damage.

I would test it myself, but I sadly don't have the time for it for now.

> > > I believe that what @the-real-herowl was doing, was shooting an arrow straight up into the air. And when it landed, it killed him. just something to make sure of so we don't have a regression. > > I've shot a regular bow and an enchantet bow with Power V at full charge directly straight up into the air and tried to catch the arrow with no armor and it still didn't kill me. The only enchantment that was needed for that bug was Punch II. It was basically knocking the player into the ground and the player would take fall damage. I would test it myself, but I sadly don't have the time for it for now.
Author
Contributor

The only enchantment that was needed for that bug was Punch II. It was basically knocking the player into the ground and the player would take fall damage.

I would test it myself, but I sadly don't have the time for it for now.

I've tested it now with Punch II bow and I didn't die.

> The only enchantment that was needed for that bug was Punch II. It was basically knocking the player into the ground and the player would take fall damage. > > I would test it myself, but I sadly don't have the time for it for now. I've tested it now with Punch II bow and I didn't die.
Eliy21 added 1 commit 2023-12-20 16:50:46 +01:00
Eliy21 added 1 commit 2023-12-21 16:52:32 +01:00
the-real-herowl modified the milestone from 2 - Next to 0.87.0 - Prismatic 2023-12-24 19:59:14 +01:00
the-real-herowl added the
#P2: HIGH
label 2023-12-29 11:38:44 +01:00
the-real-herowl modified the milestone from 0.87.0 - Prismatic to 1 - Now 2023-12-29 11:41:57 +01:00
the-real-herowl approved these changes 2023-12-30 05:20:24 +01:00
the-real-herowl modified the milestone from 1 - Now to 0.86.0 - Another Look 2023-12-30 05:20:40 +01:00
the-real-herowl merged commit d11526f8e8 into master 2023-12-30 05:21:24 +01:00
Sign in to join this conversation.
No reviewers
No project
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: VoxeLibre/VoxeLibre#4078
No description provided.