Page 1 of 14

[Mod] Protector Redo [3.4] [protector]

Posted: Thu May 29, 2014 09:37
by TenPlus1
Zeg's Protector mod has been around for a while and works really well, although the odd block did get through it's protection and the screwdriver managed to rotate protected nodes, so I reworked the mod to use Minetest 0.4.9's is_protected function so that nothing can slip by this protection mod... Player Factions and MineClone2 support added also :)
screenshot.jpg
screenshot.jpg (82.31 KiB) Viewed 2400 times
ContentDB: https://content.minetest.net/packages/T ... /protector

License: Code: MIT, Media: CC0 / CC-BY-SA 3.0

Lucky Blocks: 10

Usage:
  • Placing a Protector protects a defined area around itself (set by protector.radius)
  • Also protects signs from other people changing text and screwdriver from rotating nodes
  • Punching a Protector shows protected area as a coloured field which disappears after 10 seconds
  • Using a Protector as a tool shows information on that area to see if someone already owns it
  • Right-clicking a Protector allows you to share the area with other users, enter nick (exactly) and hit enter
  • Users with 'protection_bypass' privelage can bypass protection which is handy for admin
  • This mod is a drop-in replacement for current Protector mod by Zeg9
Also available are:
  • Protection Logo's (can be placed around your build without looking out of place)
  • Protected Wood and Steel Doors (only players on list can open)
  • Protected Chests (as above, only players on list can access chest)
Crafts:
Spoiler

Code: Select all

S = Stone,  W = Wood,  I = Steel Ingot, C = Copper Ingot, G = Gold Ingot, B = Protector

Protection      Protected       Protected       Protected       Protector
Block	        Wood Door       Steel Door      Chest           Tool
+-+-+-+         +-+-+-+         +-+-+-+         +-+-+-+         +-+-+-+
|s|s|s|         | |w|w|         | |i|i|         |w|w|w|         |i|i|i|
+-+-+-+         +-+-+-+         +-+-+-+         +-+-+-+         +-+-+-+
|s|g|s|         | |w|c|         | |i|c|         |w|c|w|         |i|B|i|
+-+-+-+         +-+-+-+         +-+-+-+         +-+-+-+         +-+-+-+
|s|s|s|         | |w|w|         | |i|i|         |w|w|w|         |i|i|i|
+-+-+-+         +-+-+-+         +-+-+-+         +-+-+-+         +-+-+-+

Note: Place protector block into crafting to return protector logo and vice versa.
Settings:
Spoiler
The following lines can be added to your minetest.conf file to configure specific features of the mod:

protector_radius = 5
- Sets the area around each protection node so that other players cannot dig, place or enter through protected doors or chests.

protector_pvp = true
- true or false this setting disabled pvp inside of protected areas for all players apart from those listed on the protector node.

protector_night_pvp = true
- true or false this setting enables pvp in all areas at night time only except for spawn protection.

protector_spawn = 10
- Protect an area 10 nodes around static spawnpoint.

protector_hurt = 2
- When set to above 0, players digging in protected areas will be hurt by 2 health points (or whichever number it's set to)

protector_flip = true
- When true players who dig inside a protected area will flipped around to stop them using lag to grief into someone else's build

Re: Protector mod Redo

Posted: Thu May 29, 2014 11:23
by 4aiman
+1

Re: Protector mod Redo

Posted: Thu May 29, 2014 13:43
by Sokomine
Nice picture :-) And good to see that the protector mod's beeing modernized. I personally still prefer the areas mod, but for small buildings, protector is far less complicated and easier to use for players.

Re: Protector mod Redo

Posted: Thu May 29, 2014 15:52
by Bas080
This is great. Keeping the good mods good, even making them beter!

Re: Protector mod Redo

Posted: Thu May 29, 2014 23:38
by philipbenr
I like the mod TenPlus1. And the screenshot. ;)

Re: Protector mod Redo

Posted: Fri May 30, 2014 13:53
by Krock
Ah nice. I did the same a while again, just not that official.
Good to have a new version now.

Re: Protector mod Redo

Posted: Sun Jun 15, 2014 08:17
by TenPlus1
Thanks folks :) I've just added a new update to help hide the protection a little better...

Re: Protector mod Redo

Posted: Sun Jun 15, 2014 19:44
by Calinou
What's the license? I'm interested for inclusion in Carbone, I've been looking for a simple protection mod like that.

You'll need to put up some license in order for this mod to be moved to Mod Releases. If you don't care about what people can do with the mod, release it under CC0.

As for the privilege name, I'd appreciate if there was an universal privilege for accessing locked containers as well as protected nodes. How about “access”?

Re: Protector mod Redo

Posted: Mon Jun 16, 2014 19:56
by TenPlus1
This mod is released under WTFPL license...

As for the 'locked' privelage, all of the locked items involved would have to be changed in some way to make this happen... e.g. If user != owner then NO, else if privelage = locked then YES... sorta thing in each locked chest, door etc.

Re: [mod] Protector Redo (0.5)

Posted: Tue Sep 02, 2014 09:11
by TenPlus1
Protection radius can now be changed using protector.radius variable in init.lua, default is 5...

Re: [Mod] Protector Redo [0.5] [protector]

Posted: Mon Sep 22, 2014 19:17
by boo09
Ten how do until add it on kindle???

Re: [mod] Protector Redo (0.5)

Posted: Mon Sep 22, 2014 21:17
by Calinou
TenPlus1 wrote:Protection radius can now be changed using protector.radius variable in init.lua, default is 5...
I suggest increasing it, right now you need to spam it quite a bit to cover large buildings.

Carbone uses 12 radius, which translates to a 25³ box. This is what PreciousStones (a CraftBukkit plugin) used for gold blocks and it was a smart choice there.

Re: [Mod] Protector Redo [0.6] [protector]

Posted: Fri Oct 03, 2014 17:17
by TenPlus1
ADDED: Protected Doors (steel and wood) and Protected Chests that only players listed on Protection Nodes can open...

Re: [Mod] Protector Redo [0.6] [protector]

Posted: Sun Oct 26, 2014 11:57
by digitalmouse
Looks cool, and trying it out now on my little Pi server. You don't say it explicitly, but are the areas protected only flat planes? or (like in WorldEdit) can I specify a cuboid/3-dimensional space to protect?

And lastly, do the markers remain visible for everyone? (unless there is a hide marker option i missed seeing in the old Zeg docs). Would look kinda weird of the land was filled with a bunch of little protector markers. :D

Otherwise, good job!

Re: [Mod] Protector Redo [0.6] [protector]

Posted: Sun Oct 26, 2014 16:40
by TenPlus1
If area protection is set to 5 (default) then 5 blocks all around the protection node (up/down, left/right, back/forward) is protected... You can punch the protector to see the purple field of the area protected also...

Protection blocks are simple to use and easy to see but the protection logo is a lot smaller and blends in a little better with it's background (copper ingot surrounded by stone)...

Re: [Mod] Protector Redo [0.6] [protector]

Posted: Sun Oct 26, 2014 16:48
by TenPlus1
On popular request I've remade the Item Frame mod so that it works with Protector Redo... Instead of frames and pedestals having owners, anyone can remove or place an item within but if inside a protected area then only the players listed in the protector node can access them...

Download below:

Re: [Mod] Protector Redo [0.6] [protector]

Posted: Tue Dec 09, 2014 20:06
by Rochambeau
Could you add the function, that no hostile mobs spawn in protected areas?

Re: [Mod] Protector Redo [0.6] [protector]

Posted: Wed Dec 10, 2014 09:09
by TenPlus1
This isn't a function for protector mod, it has to be placed inside the mobs mod you are using, e.g. for Mobs Redo, edit the api.lua file and add the following after line:794

Code: Select all

-- Check if protected area using bogus name so mobs will not spawn
if minetest.is_protected(pos, "-") then
   return
end
Update: this feature has been added to latest Mobs Redo...

Re: [Mod] Protector Redo [0.7] [protector]

Posted: Fri Feb 13, 2015 19:20
by TenPlus1
Added new "To Inventory" and "To Chest" buttons so players can quickly copy everything across in 1-click... Also chests can now be named so you know what's inside just by hovering over it...

Image

Re: [Mod] Protector Redo [0.7] [protector]

Posted: Sun Mar 01, 2015 22:32
by Miner59
Hi,
what can be really annoying is, when you hided your protection blocks somewhere and you need to find it again.
And it's extremely annoying when you set protector.radius too something like 15. :-)
Can you maybe add another line, where the location of the protection block is printed in the chat, when you punch an area with a protection block. I think this would be very useful sometimes. Here's my suggestion:

Code: Select all

					minetest.chat_send_player(whois,"This area is owned by "..meta:get_string("owner")..".")
					if meta:get_string("members") ~= "" then
						minetest.chat_send_player(whois,"Members: "..meta:get_string("members")..".")
					end

--my suggestion is to add following line. It occurs 2 times, second time with position[1] instead of pos.
					minetest.chat_send_player(whois,"Protection block is located at: "..minetest.pos_to_string(pos))
Maybe only print it if you're the owner of the protection block or for admins, but I would print it everytime.

Re: [Mod] Protector Redo [0.7] [protector]

Posted: Mon Mar 02, 2015 09:04
by TenPlus1
Miner59: feature added... thanks for suggestion...

Re: [Mod] Protector Redo [0.7] [protector]

Posted: Tue Mar 03, 2015 23:31
by Kilarin
TenPlus1 wrote:
Miner59 wrote:Maybe only print it if you're the owner of the protection block or for admins, but I would print it everytime.
Miner59: feature added... thanks for suggestion...
Oh YES! Just tested this in Xanadu, and this is GREAT!

Re: [Mod] Protector Redo [0.7] [protector]

Posted: Sun Mar 08, 2015 12:05
by fireglow
Big thanks for this updated mod!

Re: [Mod] Protector Redo [0.7] [protector]

Posted: Sun Mar 29, 2015 20:04
by freakedenough
Stairs can't be placed upside-down when this mod is enabled..why?

Is there another one that works?

Re: [Mod] Protector Redo [0.7] [protector]

Posted: Mon Mar 30, 2015 19:24
by TenPlus1
freakedenough: very strange indeed, stairs work fine with my own stairs mod but the build-in stairs wont rotate the stair upside-down... will look into it... thanks for letting me know...

Update: Minetest's built in stairs mod uses abm's to rotate stairs and slabs, but using this minimal version with rotate on place in effect it works fine with protector mod...

Unzip inside mods directory and enable 'stairs' for your world to replace built-in stairs mod and all should run fine :)