Page 1 of 1

[Mod] PvP-Button [1.1] [pvpbutton]

PostPosted: Fri Aug 28, 2015 15:35
by Phiwari123

Mod Description


The mod is currently not under development due to another project, however it will be continued in the future. Scroll down for a version supporting unified inventory. The normal version is under the "Download" section.
This is my first mod. It adds a PvP-button to the player's inventory. By pressing the button a player can disable/enable PvP for him-/herself and decide like that whether he/she wants to be attackable by others or not. (For use on servers)

+ Screenshots

Current Version: 1.1.2
License: LGPL 2.1 or later
Download: Attachment at the end of this post.

Installation & Download


Install this mod by extracting the archive and pasting the folder into your mods-directory.

Dependencies: inventory_plus needs to be installed in order to use this mod.

Updates


Ver. 1.1.2: Code has been shortened.
Ver. 1.1: Players now can only fight against each other if BOTH of them have PvP enabled for themselves.

Plans for future versions: PvP-Request

Re: [Mod] PvP-Button [1.0] [pvpbutton]

PostPosted: Fri Aug 28, 2015 16:33
by TenPlus1
Nice mod :)

Re: [Mod] PvP-Button [1.0] [pvpbutton]

PostPosted: Sun Aug 30, 2015 08:39
by DS-minetest
it would be nice, pvp is only be enabled if both players activate pvp

Re: [Mod] PvP-Button [1.0] [pvpbutton]

PostPosted: Sun Aug 30, 2015 10:38
by Phiwari123
You mean that both have to have PvP enabled to fight? That's a good idea, i will look into that and update the mod...

Edit: Okay, i updated it. Look in the first post for more information!

Re: [Mod] PvP-Button [1.1] [pvpbutton]

PostPosted: Sun Aug 30, 2015 19:54
by Napiophelios
Just a couple of suggestions:
add support for us inventory++ users with an inventory_plus button image
(just throw an image named : inventory_plus_pvp.png into the texture folder)

when pvp is disabled I dont think the green lettered hud display is neccessary
when pvp is enabled I think the red letters is fitting but I dont like the little image with it
it just kinda looks out of place.

anyway I like the mod,there was just enough room for one more button in my inventory
and this one is a nice addition.

Thanks, keep up the good work :)

Re: [Mod] PvP-Button [1.1] [pvpbutton]

PostPosted: Mon Aug 31, 2015 05:55
by Phiwari123
Napiophelios wrote:add support for us inventory++ users with an inventory_plus button image
(just throw an image named : inventory_plus_pvp.png into the texture folder)

when pvp is disabled I dont think the green lettered hud display is neccessary
when pvp is enabled I think the red letters is fitting but I dont like the little image with it
it just kinda looks out of place.


Thanks for these suggestions! I will implement those changes in the next version.
Also I might remove the chat-message that is sent to one when enabling/disabling PvP since the red letters in the upper right corner are somehow already well visible and additional messages (à la "PvP was enabled.") are probably just unnecessary. But I'll see!

Also, any other ideas or suggestions for improvement are always welcome :)

Re: [Mod] PvP-Button [1.1] [pvpbutton]

PostPosted: Mon Aug 31, 2015 12:13
by Minetestforfun
Great idea and mod !

In my point of view, you need to add a cooldown between two PVP switch to avoid some status abuse ;) (the cooldown can be 30sec)

Re: [Mod] PvP-Button [1.1] [pvpbutton]

PostPosted: Mon Aug 31, 2015 12:30
by Phiwari123
Minetestforfun wrote:In my point of view, you need to add a cooldown between two PVP switch to avoid some status abuse ;) (the cooldown can be 30sec)


Good idea, will add that for the next version :D

Re: [Mod] PvP-Button [1.1] [pvpbutton]

PostPosted: Tue Sep 01, 2015 01:22
by Clouds
Finally a pvp regulator... I believe a lot of server owners have been looking for something like this for quite some time now.

Re: [Mod] PvP-Button [1.1] [pvpbutton]

PostPosted: Wed Sep 02, 2015 17:50
by Phiwari123
Minetestforfun wrote:Great idea and mod !

In my point of view, you need to add a cooldown between two PVP switch to avoid some status abuse ;) (the cooldown can be 30sec)


Thanks for this idea! I will look into that and probably add this in the next version.

The current update contains just the shortening of the code suggested by Napiophelios.

Re: [Mod] PvP-Button [1.1] [pvpbutton]

PostPosted: Thu Sep 03, 2015 23:55
by Clouds
It would be nice if you added support unified_inventory as almost no server uses inventory_plus anymore.

Re: [Mod] PvP-Button [1.1] [pvpbutton]

PostPosted: Fri Sep 04, 2015 12:07
by Minetestforfun
+1
"inventory_plus" is indeed really uncommon now...

Re: [Mod] PvP-Button [1.1] [pvpbutton]

PostPosted: Fri Sep 04, 2015 23:36
by benrob0329
Please don't drop support for inventory_plus or ++ though because some of us still use it.

I like the fact that it doesn't override the default inventory, so the new shift click function worked out of the box.

Re: [Mod] PvP-Button [1.1] [pvpbutton]

PostPosted: Sat Sep 05, 2015 01:45
by Clouds
benrob0329 wrote:Please don't drop support for inventory_plus or ++ though because some of us still use it.

I like the fact that it doesn't override the default inventory, so the new shift click function worked out of the box.


There is no need to drop support just add additional support.

Re: [Mod] PvP-Button [1.1] [pvpbutton]

PostPosted: Sat Sep 05, 2015 08:23
by Phiwari123
The question is if it is better to make one version that supports both, or to make two different versions?

Re: [Mod] PvP-Button [1.1] [pvpbutton]

PostPosted: Sat Sep 05, 2015 22:37
by Napiophelios
Phiwari123 wrote:The question is if it is better to make one version that supports both, or to make two different versions?


Well I dont use unified inventory (its very laggy for me) but seems like it would be best to just add support for it in the same mod. 3-D armor has support for both Inventory Plus and Unified Inventory, maybe get some ideas from that.

Re: [Mod] PvP-Button [1.1] [pvpbutton]

PostPosted: Sun Sep 06, 2015 07:21
by Phiwari123
Okay, that seems like a good solution then.

Re: [Mod] PvP-Button [1.1] [pvpbutton]

PostPosted: Mon Sep 14, 2015 13:38
by Minetestforfun
Add both support is better ;)

Re: [Mod] PvP-Button [1.1] [pvpbutton]

PostPosted: Thu Sep 17, 2015 12:54
by Phiwari123
It might take some more days until i release the update that supports both, because I didn't have much time the last few days and probably will have time at the weekend. Also I will try to implement all (or many) of the other suggestions you made ;)

Re: [Mod] PvP-Button [1.1] [pvpbutton]

PostPosted: Thu Oct 08, 2015 00:28
by Dorje
This may be a old post/topic but i had an idea for making a mod like this xD

Re: [Mod] PvP-Button [1.1] [pvpbutton]

PostPosted: Tue Oct 27, 2015 13:17
by Samson1
Very good mod! I think it should have a command and an option to disable the button so that you could enable PvP for you or some other player like:
/give "playername" PvP


Thanks for the mod!

Re: [Mod] PvP-Button [1.1] [pvpbutton]

PostPosted: Sat Apr 23, 2016 12:32
by Mg
*bumps that thread innocently*

Sooo, I was asked a while ago (about thirty minutes ago) to add that mod into MinetestForFun's Skyblock Server, when I realized that it didn't have support for Unified Inventory (which we use). Consequently, I coded support for U_inv, and realized as I read the thread that a support for both was requested. Now, I'll be clear, as far as I've been able to see, Inventory+ is broken in my configuration (MT-0.4.13-dev and MTGame-0.4.13-dev), so I just copied the code which was used previously.

So that version should be able to detect and support either u_inv or inv+.

How to get it to work:
Step 1: Download
Step 2: Unzip into the mod directory
Step 3: Profit.

Re: [Mod] PvP-Button [1.1] [pvpbutton]

PostPosted: Wed Apr 27, 2016 15:30
by Palige
Thank you for this nice mod, I use it on my server ! (I modified it to make it compatible with unified_inventory, sorry @Mg, I hadn't seen your post... https://github.com/paly2/Mynetest-serve ... /pvpbutton)