[Mod] Advanced area protection [areas]

User avatar
ak399g
Member
Posts: 160
Joined: Tue Jul 30, 2013 02:36
In-game: SAFR
Contact:

by ak399g » Post

What's the difference between /set_owner and /add_owner? For example, I (Admin) wish to grant another player (Moderator) access to the entire city (area ID = 1). It would be a sort of co-ownership. Do I use /set_owner, or /add_owner? What would each command do in this situation?
aka SAFR

User avatar
CraigyDavi
Member
Posts: 582
Joined: Sat Aug 10, 2013 13:08
GitHub: davisonio
IRC: davisonio
In-game: CraigyDavi
Location: Hampshire, UK
Contact:

by CraigyDavi » Post

/set_owner is used for protecting areas for other people.
/add_owner is used for adding owners to an existing area.

So in your case if you wanted another player to access the entire city then using /add_owner would be best.

Unless you want them to only access a small area of the city in which case you would select a small area in the city and use /set_owner.
Last edited by CraigyDavi on Thu Mar 13, 2014 07:22, 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

by ShadowNinja » Post

ak399g wrote:What's the difference between /set_owner and /add_owner? For example, I (Admin) wish to grant another player (Moderator) access to the entire city (area ID = 1). It would be a sort of co-ownership. Do I use /set_owner, or /add_owner? What would each command do in this situation?
/set_owner creates new areas that don't have parent areas.
/add_owner adds a new area and sets its parent the the area id provided. The new area must be fully contained within the parent area.

Administrators and moderators with the 'areas' privilege are able to use and manage all areas as if they owned them.
If the city is currently unprotected you probably want "/set_owner ModeratorName The city name". If it is already protected as you you should run "/select_area 1" followed by "/add_owner 1 ModeratorName The city name".

You should generally protect cities under whoever is the main developer of it.
CragyDavi wrote:Unless you want them to only access a small area of the city in which case you would select a small area in the city and use /set_owner.
Actually the /add_owner command is designed to be used for granting sub-areas. Just select the sub-area rather that the whole area before running it.

Argos
Member
Posts: 40
Joined: Tue Mar 04, 2014 21:47

by Argos » Post

Could you consider changing the function 'areas:canPlayerAddArea' so that a player does not have to remove all sub-areas before being able to create an intersecting area ?

Something like:
- if area.owner ~= name then
+ if not area.parent and area.owner ~= name then

The following change would be useful as well, as a diagnosis tool:
- for _, area in pairs(self.areas) do
+ for id, area in pairs(self.areas) do
[...]
- return false, "The area intersects with an"
- .."area which you do not own."
+ return false, "The area intersects with area "
+ ..area.name.." ["..id.."]"
+ .." owned by "..area.owner.."."
My mods & tools:
My fork of Minetestmapper - much improved - features, manual, Windows downloads
[MOD] Wrench (rotate:wrench) - improved screwdriver alternative - manual, download

User avatar
ak399g
Member
Posts: 160
Joined: Tue Jul 30, 2013 02:36
In-game: SAFR
Contact:

by ak399g » Post

Would it at all be possible to create a "negative area"? By this, I mean imagine a cube of space. That space is owned by me (ak399). Inside that cube, there's a smaller cube of space that I wish to relinquish ownership of. Currently, I must set six "walls" of ownership around that space to have the effect of an unowned space in the middle of an owned space.
aka SAFR

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

by ShadowNinja » Post

Argos wrote:Could you consider changing the function 'areas:canPlayerAddArea' so that a player does not have to remove all sub-areas before being able to create an intersecting area ?

Something like:
- if area.owner ~= name then
+ if not area.parent and area.owner ~= name then

The following change would be useful as well, as a diagnosis tool:
- for _, area in pairs(self.areas) do
+ for id, area in pairs(self.areas) do
[...]
- return false, "The area intersects with an"
- .."area which you do not own."
+ return false, "The area intersects with area "
+ ..area.name.." ["..id.."]"
+ .." owned by "..area.owner.."."
I'll check the intersecting sub-area case. The debug info suggestion seems good.
Edit: I've implemented both of your suggestions here.
ak399g wrote:Would it at all be possible to create a "negative area"? By this, I mean imagine a cube of space. That space is owned by me (ak399). Inside that cube, there's a smaller cube of space that I wish to relinquish ownership of. Currently, I must set six "walls" of ownership around that space to have the effect of an unowned space in the middle of an owned space.
Yes, use the /area_open command on the sub-area. Re-run the comnand on the area to close it.
Last edited by ShadowNinja on Sun Mar 23, 2014 03:27, edited 1 time in total.

User avatar
ak399g
Member
Posts: 160
Joined: Tue Jul 30, 2013 02:36
In-game: SAFR
Contact:

by ak399g » Post

I have one large area "/set_owner"'ed by "SAFR". Inside that area I have a smaller area "/add-owner"'ed by "SAFR". To that sub-area, I have run the "/area_open" command. Playing in a second window as "ak399", I'm seeing the two areas [19 (SAFR), 20 (SAFR/open)]. I am however unable to do anything in the sub-area as "ak399".
aka SAFR

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

by ShadowNinja » Post

ak399g wrote:I have one large area "/set_owner"'ed by "SAFR". Inside that area I have a smaller area "/add-owner"'ed by "SAFR". To that sub-area, I have run the "/area_open" command. Playing in a second window as "ak399", I'm seeing the two areas [19 (SAFR), 20 (SAFR/open)]. I am however unable to do anything in the sub-area as "ak399".
I made it work the way you want here. Update and try again.

User avatar
ak399g
Member
Posts: 160
Joined: Tue Jul 30, 2013 02:36
In-game: SAFR
Contact:

by ak399g » Post

Works! Thank you so much! :D
Last edited by ak399g on Sun Mar 23, 2014 17:23, edited 1 time in total.
aka SAFR

kriskovski
Member
Posts: 13
Joined: Tue Mar 25, 2014 20:12

by kriskovski » Post

Can somebody make a video tutorial, i really cant understand. I have super tall building and i want to protect it from top to bottom but i can put only 2 nodes i want to cover the whole area of the building, sorry if i sound stupid but, its hard ...

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

by ShadowNinja » Post

kriskovski wrote:Can somebody make a video tutorial? I can't understand how to use this. I have very tall building and I want to protect it, but I can only place 2 nodes. I want to cover the whole area of the building. [Edited for clarity]
There isn't a video tutorial currently that I am aware of.
However, protecting a building is trivial. Just go to one corner (such as the front bottom left), type /area_pos1, go to the other corner (such as the back top right), type /area_pos2, and type /protect <Name of area>. The name can contain spaces.

User avatar
CraigyDavi
Member
Posts: 582
Joined: Sat Aug 10, 2013 13:08
GitHub: davisonio
IRC: davisonio
In-game: CraigyDavi
Location: Hampshire, UK
Contact:

by CraigyDavi » Post

kriskovski wrote:Can somebody make a video tutorial, i really cant understand. I have super tall building and i want to protect it from top to bottom but i can put only 2 nodes i want to cover the whole area of the building, sorry if i sound stupid but, its hard ...
You can use this mod. It provides a GUI for the areas mod.

kriskovski
Member
Posts: 13
Joined: Tue Mar 25, 2014 20:12

by kriskovski » Post

ShadowNinja wrote:....Just go to one corner (such as the front bottom left), type /area_pos1, go to the other corner (such as the back top right), type /area_pos2, and type /protect <Name of area>. The name can contain spaces.
I got that, but when I punch the opposite nodes in the corner of the building whats the radius that protects and the height, i have really tall building ....
Craig i tried the gui, Im sorry but i didn't understand it either...
Thank you for your replies

User avatar
CraigyDavi
Member
Posts: 582
Joined: Sat Aug 10, 2013 13:08
GitHub: davisonio
IRC: davisonio
In-game: CraigyDavi
Location: Hampshire, UK
Contact:

by CraigyDavi » Post

You would type /area_pos set. Then you can punch the block on the bottom corner. And then punch the block at the top corner. Then you type /protect areaname It will protect the area inside the two blocks you have punched.
So you would be punching a block on the bottom of the building and one at the top.
Last edited by CraigyDavi on Mon Apr 07, 2014 11:26, edited 1 time in total.

kriskovski
Member
Posts: 13
Joined: Tue Mar 25, 2014 20:12

by kriskovski » Post

CraigyDavi wrote:You would type /area_pos set. Then you can punch the block on the bottom corner. And then punch the block at the top corner. Then you type /protect areaname It will protect the area inside the two blocks you have punched.
So you would be punching a block on the bottom of the building and one at the top.
Ok but how the mod knows the other dimensions. i have non-cube buildings and also nonstandard buildings how can i protect them fully when I can only place 2 protection points, really if somebody could make video, i know it important part for a server, I am trying to understand but ...
Last edited by kriskovski on Mon Apr 07, 2014 11:44, edited 1 time in total.

User avatar
Achilles
Member
Posts: 247
Joined: Sun Dec 15, 2013 11:55
In-game: Achilles
Location: Excuse Me???? -_-

by Achilles » Post

kriskovski wrote:
CraigyDavi wrote:You would type /area_pos set. Then you can punch the block on the bottom corner. And then punch the block at the top corner. Then you type /protect areaname It will protect the area inside the two blocks you have punched.
So you would be punching a block on the bottom of the building and one at the top.
Ok but how the mod knows the other dimensions. i have non-cube buildings and also nonstandard buildings how can i protect them fully when I can only place 2 protection points, really if somebody could make video, i know it important part for a server, I am trying to understand but ...
The two nodes that you punch make a diagonal line between two corners of a cuboid or a cube. Everything within this cube or cuboid is protected. So even if your building is a non cube, It will still fit inside the area which will be protected.
The Ironic Thing About Common Sense Is That It Isn't Very Common

kriskovski
Member
Posts: 13
Joined: Tue Mar 25, 2014 20:12

by kriskovski » Post

How to protect the building and the garden around it?
That building is tall and its inside the garden, the garden is normal trees and around all sides of the building.
Thank you again.

User avatar
Achilles
Member
Posts: 247
Joined: Sun Dec 15, 2013 11:55
In-game: Achilles
Location: Excuse Me???? -_-

by Achilles » Post

kriskovski wrote:How to protect the building and the garden around it?
That building is tall and its inside the garden, the garden is normal trees and around all sides of the building.
Thank you again.
Ask the admin on the server you play on to show you how to use the Area mod... It is easier to understand if you are shown howit works rather than told... I took ages getting used to it :P
The Ironic Thing About Common Sense Is That It Isn't Very Common

kriskovski
Member
Posts: 13
Joined: Tue Mar 25, 2014 20:12

by kriskovski » Post

Achilles wrote:
kriskovski wrote:...
Ask the admin on the server you play on to show you how to use the Area mod... It is easier to understand if you are shown how it works rather than told... I took ages getting used to it :P
Can you tell me a server with admins like you said, because I am not in server, I am tying to have my own that's why I ask

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

by TenPlus1 » Post

Your mod really works well when it comes to protecting areas and on a server can save a ton of hassle, although... would it be possible to add a protection block like in Zeg's Protector mod where a user doesn't have to ask admin to protect an area, especially when they are still building and said area needs to be deleted and expanded over time...

This would save a lot of time and effort if they could create a temporary Protection Block and place it down to protect 5 or 10 blocks in each direction without the need for admin (until they are finished)...

User avatar
CraigyDavi
Member
Posts: 582
Joined: Sat Aug 10, 2013 13:08
GitHub: davisonio
IRC: davisonio
In-game: CraigyDavi
Location: Hampshire, UK
Contact:

by CraigyDavi » Post

TenPlus1 wrote:where a user doesn't have to ask admin to protect an area
You can set it in the config so that players can protect areas themselves.

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

by TenPlus1 » Post

I've done that before and they seem to shy away from the command side of things, so having a simple and craftable block they can plop down is a lot easier for those type of users who want no hassle protection...

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

by Sokomine » Post

TenPlus1 wrote: I've done that before and they seem to shy away from the command side of things, so having a simple and craftable block they can plop down is a lot easier for those type of users who want no hassle protection...
Use my markers mod. It adds an easy to use formspec based gui plus physical markers.
A list of my mods can be found here.

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

could hurt those who try to violate the areas?

User avatar
RHR
Member
Posts: 215
Joined: Mon Jan 27, 2014 20:07
GitHub: RHRhino

Re: [Mod] Advanced area protection [areas]

by RHR » Post

Is it possible to remove a pice of a protected area? eg if you want to protect a huge area and make some small areas unprotected.

Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests