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

Post Reply
User avatar
Phiwari123
Member
Posts: 120
Joined: Sat Aug 02, 2014 07:50
In-game: Phiwari123

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

by Phiwari123 » Post

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)
Spoiler
PvP is disabled for yourself (you can not take any damage by other players and can attack players who have PvP enabled for themselves)
Image

The PvP-Button as it appears in the inventory.
Image

PvP is enabled for yourself (you can take damage by other players and can attack players who have PvP enabled for themselves)
Image
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
Attachments
pvpbutton-ver1.1.2.zip
(2.97 KiB) Downloaded 232 times
minetest-pvpbutton-ver1.1.zip
(3.11 KiB) Downloaded 162 times
Last edited by Phiwari123 on Fri Sep 09, 2016 07:55, edited 10 times in total.

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

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

by TenPlus1 » Post

Nice mod :)

User avatar
Desour
Member
Posts: 1469
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: Desour
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

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

by Desour » Post

it would be nice, pvp is only be enabled if both players activate pvp
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)

User avatar
Phiwari123
Member
Posts: 120
Joined: Sat Aug 02, 2014 07:50
In-game: Phiwari123

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

by Phiwari123 » Post

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!

User avatar
Napiophelios
Member
Posts: 1035
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

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

by Napiophelios » Post

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 :)
Last edited by Napiophelios on Fri Sep 08, 2017 00:49, edited 1 time in total.

User avatar
Phiwari123
Member
Posts: 120
Joined: Sat Aug 02, 2014 07:50
In-game: Phiwari123

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

by Phiwari123 » Post

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 :)

User avatar
Minetestforfun
Member
Posts: 940
Joined: Tue Aug 05, 2014 14:09
GitHub: MinetestForFun
IRC: MinetestForFun
In-game: MinetestForFun
Location: On earth
Contact:

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

by Minetestforfun » Post

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)

User avatar
Phiwari123
Member
Posts: 120
Joined: Sat Aug 02, 2014 07:50
In-game: Phiwari123

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

by Phiwari123 » Post

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

User avatar
Clouds
Member
Posts: 102
Joined: Sat Aug 01, 2015 01:58
In-game: Cloud

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

by Clouds » Post

Finally a pvp regulator... I believe a lot of server owners have been looking for something like this for quite some time now.

User avatar
Phiwari123
Member
Posts: 120
Joined: Sat Aug 02, 2014 07:50
In-game: Phiwari123

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

by Phiwari123 » Post

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.

User avatar
Clouds
Member
Posts: 102
Joined: Sat Aug 01, 2015 01:58
In-game: Cloud

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

by Clouds » Post

It would be nice if you added support unified_inventory as almost no server uses inventory_plus anymore.

User avatar
Minetestforfun
Member
Posts: 940
Joined: Tue Aug 05, 2014 14:09
GitHub: MinetestForFun
IRC: MinetestForFun
In-game: MinetestForFun
Location: On earth
Contact:

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

by Minetestforfun » Post

+1
"inventory_plus" is indeed really uncommon now...

User avatar
benrob0329
Member
Posts: 1341
Joined: Thu Aug 06, 2015 22:39
GitHub: Benrob0329
IRC: benrob0329
In-game: benrob03
Location: Michigan
Contact:

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

by benrob0329 » Post

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.

User avatar
Clouds
Member
Posts: 102
Joined: Sat Aug 01, 2015 01:58
In-game: Cloud

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

by Clouds » Post

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.

User avatar
Phiwari123
Member
Posts: 120
Joined: Sat Aug 02, 2014 07:50
In-game: Phiwari123

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

by Phiwari123 » Post

The question is if it is better to make one version that supports both, or to make two different versions?

User avatar
Napiophelios
Member
Posts: 1035
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

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

by Napiophelios » Post

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.

User avatar
Phiwari123
Member
Posts: 120
Joined: Sat Aug 02, 2014 07:50
In-game: Phiwari123

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

by Phiwari123 » Post

Okay, that seems like a good solution then.

User avatar
Minetestforfun
Member
Posts: 940
Joined: Tue Aug 05, 2014 14:09
GitHub: MinetestForFun
IRC: MinetestForFun
In-game: MinetestForFun
Location: On earth
Contact:

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

by Minetestforfun » Post

Add both support is better ;)

User avatar
Phiwari123
Member
Posts: 120
Joined: Sat Aug 02, 2014 07:50
In-game: Phiwari123

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

by Phiwari123 » Post

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 ;)

Dorje
Member
Posts: 109
Joined: Sun Oct 04, 2015 21:19
In-game: gryphon + MajesticBird
Location: South Africa, Cape Town, Observatory, MINECRAFT!

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

by Dorje » Post

This may be a old post/topic but i had an idea for making a mod like this xD
Give me some EXTREME HARDCORE xD

i have to say this sad thing viewtopic.php?f=3&t=13458&p=195719#p195719

User avatar
Samson1
Member
Posts: 95
Joined: Wed Apr 01, 2015 19:41
GitHub: MoJo4000
IRC: Samson1
In-game: Samson1

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

by Samson1 » Post

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!

User avatar
Mg
Member
Posts: 86
Joined: Sun Mar 02, 2014 20:49
GitHub: LeMagnesium
IRC: ElectronLibre Mg
In-game: Mg
Location: Periodic Table

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

by Mg » Post

*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.
Attachments
pvpbutton.zip
PvPButton V1.3 with support of u_inv and inv+
(3.5 KiB) Downloaded 138 times
"[...] Manganese and Mercury, Molybdenum, Magnesium [...]"
Mods I shared : metatools, ignore, PvPButton with U_inv support
You can look for more in my GitHub repositories
Tox ID : D878DF75D369C10DC0D3A1A782636EA242AE64FD687EDBADCB679AFACA78910BCEAAECF825E0
Currently developper for MinetestForFun server .

User avatar
Palige
Member
Posts: 105
Joined: Sun Nov 23, 2014 14:39
GitHub: paly2
IRC: Upsilon
In-game: Upsilon
Contact:

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

by Palige » Post

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)
Sorry for my english : I am french...

Some of my minetest stuff:
MoreMesecons
Throwing Redo
PvP-Plus
A few other things

I'm hosting the Eurythmia server

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 20 guests