[Mod] Advanced area protection [areas]

User avatar
ShadowNinja
Developer
Posts: 200
Joined: Tue Jan 22, 2013 22:35
GitHub: ShadowNinja
IRC: ShadowNinja
In-game: ShadowNinja

Re: [Mod] Advanced area protection [areas]

by ShadowNinja » Post

MangleFox70 wrote:Having added areas.self_protection = true to my conf file, users still get the error that they don't have self protection ability (can't protect).
There are a few things involved in self-protection.
First it has to be enabled of course, but there are still a few restrictions on it. Only players with the "interact" privilege (or whatever "areas.self_protection_privilege" is) can use self protection. There is also a size limitation (max 64 wide, 128 high by default) and a maximum number of areas per player (4 by default).

If you exceed any of these limitations you have to ask a moderator to protect new areas for you. This is to prevent abuse of the protection system to protect overly large areas or too many areas. Your players are probably protecting overly large areas or too many of them.

If you want to change these limitations on your server you can change the size with something like "areas.self_protection_max_size = (128, 256, 128)" or "areas.self_protection_max_areas = 8".

Also, if you want a few players to be able to have more/bigger areas while applying a lower limit to the general population just grant these people the "areas_high_limit" privilege. The specific limits can be configured with the "areas.self_protection_max_size_high" and "areas.self_protection_max_areas_high" settings (which default to "(512, 512, 512)" and "32" respectively, as of this writing).

It's also possible that the areas the players are trying to add overlap with another area. This would happen if you've protected a large area around spawn or even the whole map.
MangleFox70 wrote:I'm having to add the "areas" priv temporarily, let them protect, and then revoke the privilege.
You shouldn't do that, it temporarily gives them access to all areas administrative functionality, including the ability to remove or reassign any area. You can protect areas for other players by using the "/set_owner" command.

If it still won't work after you've tried this, please tell me the exact error message that your players are getting, or login with a test account and try it yourself (make sure to give the test account "interact"). Also provide the last few lines in the server's log after you run these commands, if there's anything relevant in them.

User avatar
MangleFox70
Member
Posts: 62
Joined: Mon Feb 01, 2016 14:50
GitHub: Cat5TV
IRC: MangleFox70
In-game: MangleFox70
Contact:

Re: [Mod] Advanced area protection [areas]

by MangleFox70 » Post

Thanks ShadowNinja. This is a lot of good information. We'll have to spend a Saturday tinkering with this. Much appreciated!
#ThePixelShadow on YouTube
A Weekly Minetest Webcast hosted by MangleFox70
Have a mod you'd like featured? Want to participate in our show? Join servers.minetest.tv Port 30000 for creative or 30001 for survival.
Upload your own skin via our web site: Minetest.TV

User avatar
MangleFox70
Member
Posts: 62
Joined: Mon Feb 01, 2016 14:50
GitHub: Cat5TV
IRC: MangleFox70
In-game: MangleFox70
Contact:

Re: [Mod] Advanced area protection [areas]

by MangleFox70 » Post

Hey ShadowNinja,
Okay here is my testing...
1) My loaded conf file contains: areas.self_protect = true
2) Mod is enabled and working... known because if I have "areas" perm, it works.
3) Login as new account, attempt to protect something and receive: "You can't protect that area. Self protection is disabled or you do not have the necessary privilege." This area is only 4 blocks in size so does not exceed a maximum. Player has "interact" priv.

Any ideas? Thanks!!

UPDATE: I edited settings.lua manually and changed this line to true:
setting("boolean", "self_protection", false)

I thought the conf overrode that, but I guess not. So, it is working now, but not thanks to the conf file.
#ThePixelShadow on YouTube
A Weekly Minetest Webcast hosted by MangleFox70
Have a mod you'd like featured? Want to participate in our show? Join servers.minetest.tv Port 30000 for creative or 30001 for survival.
Upload your own skin via our web site: Minetest.TV

User avatar
ShadowNinja
Developer
Posts: 200
Joined: Tue Jan 22, 2013 22:35
GitHub: ShadowNinja
IRC: ShadowNinja
In-game: ShadowNinja

Re: [Mod] Advanced area protection [areas]

by ShadowNinja » Post

MangleFox70 wrote:My loaded conf file contains: areas.self_protect = true
[...]
I edited settings.lua manually and changed this line to true:

Code: Select all

setting("boolean",  "self_protection", false)
Notice the difference? You set "areas.self_protect", but the mod is looking for "areas.self_protection". That must be the issue.
I wouldn't recommend editing the mod, as that makes it harder to update the mod, and if it's harder you're less likely to do it often.

User avatar
MangleFox70
Member
Posts: 62
Joined: Mon Feb 01, 2016 14:50
GitHub: Cat5TV
IRC: MangleFox70
In-game: MangleFox70
Contact:

Re: [Mod] Advanced area protection [areas]

by MangleFox70 » Post

Good catch -- I'll verify that! However I had originally done it as per viewtopic.php?p=206808#p206808 so the current iteration is in fact my 3rd attempt (had tried self_protection, self_protect_privilege, then self_protect). I will definitely try the correct one again and let you know.

Thanks!
#ThePixelShadow on YouTube
A Weekly Minetest Webcast hosted by MangleFox70
Have a mod you'd like featured? Want to participate in our show? Join servers.minetest.tv Port 30000 for creative or 30001 for survival.
Upload your own skin via our web site: Minetest.TV

iZacZip
Member
Posts: 48
Joined: Sat Dec 05, 2015 10:37

Re: [Mod] Advanced area protection [areas]

by iZacZip » Post

ShadowNinja wrote: [*]Players that have a certain privilege will be able to protect a set number of areas within a size limit by themselves using the /protect command. (If the server administrator enables it)[/*]
• *Sometimes* you can protect large areas via markers. But not always, of course.
Ignore my old posts.

miloszs
Member
Posts: 184
Joined: Thu Jul 07, 2016 21:20
GitHub: miloszs
IRC: miloszs mmmm
In-game: miloszs mmmm
Location: Poland

Re: [Mod] Advanced area protection [areas]

by miloszs » Post

how i can add player to my parotect area? and ow i can remove protected area?

amadin
Member
Posts: 549
Joined: Tue Jun 16, 2015 16:23

Re: [Mod] Advanced area protection [areas]

by amadin » Post

.
Last edited by amadin on Wed Dec 18, 2019 19:51, edited 1 time in total.

User avatar
ShadowNinja
Developer
Posts: 200
Joined: Tue Jan 22, 2013 22:35
GitHub: ShadowNinja
IRC: ShadowNinja
In-game: ShadowNinja

Re: [Mod] Advanced area protection [areas]

by ShadowNinja » Post

A "protection stick" would still require size limitations unless a number of sticks were consumed proportional to the size of the area.

The stick would have to be fairly difficult to craft for it to serve as an effective replacement for the area number limit, and if it was that hard it would be impossible for new players to protect any areas for a while. You could give players some protection sticks on first join, but then you could just make a bunch of throwaway accounts, dump the sticks on the ground, and then pick them up as your main player.

If you find the default settings too restrictive, you can just increase the number and size of allowed areas through the configuration.

mase
Member
Posts: 91
Joined: Tue Feb 21, 2017 20:16
In-game: mase

Re: [Mod] Advanced area protection [areas]

by mase » Post

Maybe you could add support to prevent mobs spawning in protected areas.
When I build a fortress surrounded by walls, monsters can spawn inside.
Or is there another way to do this? Using special materials is not enough, as
mobs can spawn in a garden.

User avatar
BrunoMine
Member
Posts: 1082
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine
Location: SP-Brasil
Contact:

Re: [Mod] Advanced area protection [areas]

by BrunoMine » Post

mase wrote:Using special materials is not enough, as
mobs can spawn in a garden.
This may be a MOB-engine error (mobs_redo?)

mase
Member
Posts: 91
Joined: Tue Feb 21, 2017 20:16
In-game: mase

Re: [Mod] Advanced area protection [areas]

by mase » Post

Yes, mobs redo. Mobs cannot spawn in protected areas? Did not notice yet.

User avatar
BrunoMine
Member
Posts: 1082
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine
Location: SP-Brasil
Contact:

Re: [Mod] Advanced area protection [areas]

by BrunoMine » Post

According to the documentation, there is a setting to prevent this.
https://github.com/tenplus1/mobs_redo/b ... pi.txt#L11

I do not know if this prevents mobs from invading a protected area, so you should mount a wall.

mase
Member
Posts: 91
Joined: Tue Feb 21, 2017 20:16
In-game: mase

Re: [Mod] Advanced area protection [areas]

by mase » Post

Thx! I did not notice this setting.

mase
Member
Posts: 91
Joined: Tue Feb 21, 2017 20:16
In-game: mase

Re: [Mod] Advanced area protection [areas]

by mase » Post

Could you please add protection of mesecons buttons and switches?

User avatar
ShadowNinja
Developer
Posts: 200
Joined: Tue Jan 22, 2013 22:35
GitHub: ShadowNinja
IRC: ShadowNinja
In-game: ShadowNinja

Re: [Mod] Advanced area protection [areas]

by ShadowNinja » Post

mase wrote:Could you please add protection of mesecons buttons and switches?
That would have to be done in mesecons.

User avatar
Codesound
Member
Posts: 365
Joined: Thu Jun 09, 2016 14:56

Re: [Mod] Advanced area protection [areas]

by Codesound » Post

Hi,

sorry for my stupid question:

I'm the moderator of my private server; how you can give the area privileges to another/s user/s? (in my private server)

/grant user areas (is right?)

thanks for this beautiful mod

R

User avatar
ShadowNinja
Developer
Posts: 200
Joined: Tue Jan 22, 2013 22:35
GitHub: ShadowNinja
IRC: ShadowNinja
In-game: ShadowNinja

Re: [Mod] Advanced area protection [areas]

by ShadowNinja » Post

Yes.

User avatar
Codesound
Member
Posts: 365
Joined: Thu Jun 09, 2016 14:56

Re: [Mod] Advanced area protection [areas]

by Codesound » Post

thanks again....

R

User avatar
admicos
Member
Posts: 13
Joined: Fri Feb 24, 2017 14:31
GitHub: admicos
IRC: admicos
In-game: admicos
Contact:

Re: [Mod] Advanced area protection [areas]

by admicos » Post

I am using this mod and a player can pass through walls by breaking a protected block. Also, chests can be opened inside protected areas. Is there any fixes for those?

User avatar
Andrey01
Member
Posts: 2574
Joined: Wed Oct 19, 2016 15:18
GitHub: Andrey2470T
In-game: Andrey01
Location: Russia, Moscow

Re: [Mod] Advanced area protection [areas]

by Andrey01 » Post

admicos wrote:I am using this mod and a player can pass through walls by breaking a protected block. Also, chests can be opened inside protected areas. Is there any fixes for those?
You must have Protector Redo mod to protect your chests

User avatar
admicos
Member
Posts: 13
Joined: Fri Feb 24, 2017 14:31
GitHub: admicos
IRC: admicos
In-game: admicos
Contact:

Re: [Mod] Advanced area protection [areas]

by admicos » Post

Andrey01 wrote:
admicos wrote:I am using this mod and a player can pass through walls by breaking a protected block. Also, chests can be opened inside protected areas. Is there any fixes for those?
You must have Protector Redo mod to protect your chests
Thanks!

User avatar
karahan117
New member
Posts: 1
Joined: Tue Apr 25, 2017 23:27
GitHub: karahan117
IRC: karahan117
In-game: karahan117
Location: Istanbul, Turkey
Contact:

Re: [Mod] Advanced area protection [areas]

by karahan117 » Post

I am using the mod in my server but It is a bit buggy isn't it? Players can easily wall through the blocks via breaking blocks and just moving towards. Also posted this problem in Github Issues, waiting for a solution :(

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] Advanced area protection [areas]

by Sokomine » Post

karahan117 wrote: I am using the mod in my server but It is a bit buggy isn't it? Players can easily wall through the blocks via breaking blocks and just moving towards. Also posted this problem in Github Issues, waiting for a solution :(
Protection mods - of which advanced area protection is one - protect player's buildings against unwanted modification, against griefing. It is not their purpose to keep players out of certain areas. Why would you want that anyway? Your items go into locked chests. Placed blocks are protected thanks to the areas mod.
A list of my mods can be found here.

User avatar
ratmix
Member
Posts: 149
Joined: Mon May 01, 2017 19:45
In-game: ratmix
Contact:

Re: [Mod] Advanced area protection [areas]

by ratmix » Post

Is it, or could it be, possible to allow building in a protected area while making blocks in that area unbreakable?
Use case: PVP islands where players are given blocks to get between islands.
King of the Hill :: Modern Warfare Server RATMIX.COM:30000 | King of the Hill Community Site

Post Reply

Who is online

Users browsing this forum: No registered users and 23 guests