[Mod] PlayerPlus [1.4]

User avatar
TenPlus1
Member
Posts: 2862
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Updated to version 1.4

by TenPlus1 » Post

- Added Minetest 5.0 check for player knockback y_offset.

User avatar
FreeGamers
Member
Posts: 638
Joined: Sat May 25, 2019 00:15
GitHub: is proprietary I use NotABug
Location: United States
Contact:

Re: [Mod] PlayerPlus [1.4]

by FreeGamers » Post

This is quite a cool little mod. Adds some nice additions. Adding knockback before its supported in MT Engine is pretty cool too!

I'd have to confirm the experiences of other posters in that the knock-back effect has many times sent me up into the ceiling only to be suffocated or murdered by mobs while I fell back to the ground. I eventually disabled this mod. I know of at least one other server that had to disable the knockback function in this mod as well. Luckily there is a convenient settingtype.txt to do this.

Well, today I had a player, brand new to Minetest, ask me in my server if I could add knock-back effects to combat. I told him I'd look into it again. So I looked into adding this effect again, read some posts from developers saying how this should be an MT engine function (and it should be), and I read some discussions, and looked at some other mods, tried some other mods. Eventually, I decided I'd try to give this mod a go again since I knew it functioned at least.

I found that I was able to get the knockback function tolerable (and by that I mean it doesn't send me through ceiling blocks completely all the time) by changing line 304 to different settings. I found that setting it to

Code: Select all

        local pos = player:get_pos() ; pos.y = pos.y + 0.5
Lets the play get thrown about a bit but still doesn't lift them up ridiculously. It needs to be tested a bit more, which I plan to do, but for now the zombies in my server are not hitting players through blocks above the player too much. This might be a moot point because I think the knockback is dependent on the damage of the hit or weapon. So the block clipping may still be reproducible.

auouymous
Member
Posts: 184
Joined: Sun Dec 07, 2014 09:39
GitHub: auouymous
IRC: air
In-game: auouymous

Re: [Mod] PlayerPlus [1.4]

by auouymous » Post

jeremyweston wrote:

Code: Select all

        local pos = player:get_pos() ; pos.y = pos.y + 0.5
That still produces an instantaneous upward motion, not as bad, but still bad for anyone with motion sickness. And the damage is only applied to XZ values, so the 0.5 or 1.0 Y increase won't change. But players with fly can still be knocked into ceilings because they don't fall after each knockback.

Code: Select all

        ent:set_velocity({
Changing the y=0 to y=-2 adds downward velocity and significantly reduces the upward movement of flying players.

Code: Select all

        if math.random(1, 4) > 2 then return end -- 50% chance
Adding that to line 310 reduces the chance of knockback to 50% (change the 2 to a 3 for 75% chance). Making it possible to actually approach fast attack mobs. And when combined with your fix, it helps to reduce the motion sickness factor. Adding randomness to the knockback might also be better for pvp.

Code: Select all

    collisionbox = {0, 0, 0, 0, 0, 0},
And changing line 241 to that removes the annoying visible hitbox for the knockback entity that appears around the player. I don't know if it does anything else, but I don't feel like I get 'caught' up on the hitbox when it is invisible.

But try building a wall and spawn a mese monster in front of you with your back to the wall. It will push you through the wall, with or without these changes. So you can still be suffocated if pushed into a cave wall.

User avatar
FreeGamers
Member
Posts: 638
Joined: Sat May 25, 2019 00:15
GitHub: is proprietary I use NotABug
Location: United States
Contact:

Re: [Mod] PlayerPlus [1.4]

by FreeGamers » Post

Yeah that tweak stopped the up clipping for me but I have great latency as I'm on the LAN with my server. However, for players with worse latency they were still getting thrown thousands of nodes away so I had to disable the knockback portion of this.

User avatar
TenPlus1
Member
Posts: 2862
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Update

by TenPlus1 » Post

- Added slight downward motion to knockback to stop flying players getting stuck in ceilings.

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests