[Mod] Advanced area protection [areas]
- CraigyDavi
- Member
- Posts: 582
- Joined: Sat Aug 10, 2013 13:08
- GitHub: davisonio
- IRC: davisonio
- In-game: CraigyDavi
- Location: Hampshire, UK
- Contact:
/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.
/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.
- ShadowNinja
- Developer
- Posts: 200
- Joined: Tue Jan 22, 2013 22:35
- GitHub: ShadowNinja
- IRC: ShadowNinja
- In-game: ShadowNinja
/set_owner creates new areas that don't have parent areas.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?
/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.
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.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.
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.."."
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
My fork of Minetestmapper - much improved - features, manual, Windows downloads
[MOD] Wrench (rotate:wrench) - improved screwdriver alternative - manual, download
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
- ShadowNinja
- Developer
- Posts: 200
- Joined: Tue Jan 22, 2013 22:35
- GitHub: ShadowNinja
- IRC: ShadowNinja
- In-game: ShadowNinja
I'll check the intersecting sub-area case. The debug info suggestion seems good.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.."."
Edit: I've implemented both of your suggestions here.
Yes, use the /area_open command on the sub-area. Re-run the comnand on the area to close it.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.
Last edited by ShadowNinja on Sun Mar 23, 2014 03:27, edited 1 time in total.
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
- ShadowNinja
- Developer
- Posts: 200
- Joined: Tue Jan 22, 2013 22:35
- GitHub: ShadowNinja
- IRC: ShadowNinja
- In-game: ShadowNinja
I made it work the way you want here. Update and try again.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".
Works! Thank you so much!
Last edited by ak399g on Sun Mar 23, 2014 17:23, edited 1 time in total.
aka SAFR
-
- Member
- Posts: 13
- Joined: Tue Mar 25, 2014 20:12
- ShadowNinja
- Developer
- Posts: 200
- Joined: Tue Jan 22, 2013 22:35
- GitHub: ShadowNinja
- IRC: ShadowNinja
- In-game: ShadowNinja
There isn't a video tutorial currently that I am aware of.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]
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.
- CraigyDavi
- Member
- Posts: 582
- Joined: Sat Aug 10, 2013 13:08
- GitHub: davisonio
- IRC: davisonio
- In-game: CraigyDavi
- Location: Hampshire, UK
- Contact:
You can use this mod. It provides a GUI for the areas mod.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 ...
-
- Member
- Posts: 13
- Joined: Tue Mar 25, 2014 20:12
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 ....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.
Craig i tried the gui, Im sorry but i didn't understand it either...
Thank you for your replies
- CraigyDavi
- Member
- Posts: 582
- Joined: Sat Aug 10, 2013 13:08
- GitHub: davisonio
- IRC: davisonio
- In-game: CraigyDavi
- Location: Hampshire, UK
- Contact:
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.
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.
-
- Member
- Posts: 13
- Joined: Tue Mar 25, 2014 20:12
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 ...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.
Last edited by kriskovski on Mon Apr 07, 2014 11:44, edited 1 time in total.
- Achilles
- Member
- Posts: 247
- Joined: Sun Dec 15, 2013 11:55
- In-game: Achilles
- Location: Excuse Me???? -_-
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.kriskovski wrote: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 ...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.
The Ironic Thing About Common Sense Is That It Isn't Very Common
-
- Member
- Posts: 13
- Joined: Tue Mar 25, 2014 20:12
- Achilles
- Member
- Posts: 247
- Joined: Sun Dec 15, 2013 11:55
- In-game: Achilles
- Location: Excuse Me???? -_-
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 itkriskovski 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.
The Ironic Thing About Common Sense Is That It Isn't Very Common
-
- Member
- Posts: 13
- Joined: Tue Mar 25, 2014 20:12
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 askAchilles 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 itkriskovski wrote:...
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)...
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)...
- CraigyDavi
- Member
- Posts: 582
- Joined: Sat Aug 10, 2013 13:08
- GitHub: davisonio
- IRC: davisonio
- In-game: CraigyDavi
- Location: Hampshire, UK
- Contact:
-
- Member
- Posts: 4290
- Joined: Sun Sep 09, 2012 17:31
- GitHub: Sokomine
- IRC: Sokomine
- In-game: Sokomine
Use my markers mod. It adds an easy to use formspec based gui plus physical markers.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...
A list of my mods can be found here.
- BrunoMine
- Member
- Posts: 1082
- Joined: Thu Apr 25, 2013 17:29
- GitHub: BrunoMine
- Location: SP-Brasil
- Contact:
Re: [Mod] Advanced area protection [areas]
could hurt those who try to violate the areas?
Re: [Mod] Advanced area protection [areas]
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.
Who is online
Users browsing this forum: No registered users and 50 guests