[Mod] Advanced area protection [areas]

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

[Mod] Advanced area protection [areas]

by ShadowNinja » Post

Areas is a advanced area protection mod based on node_ownership.

Features:
  • Players with the 'areas' privilege can dig and place in protected areas without having to grant themselves control over it.
  • Areas can be named.
  • Simpler to use.
  • 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)
  • Areas made with node_ownership can be converted with one simple command.
  • Areas can intersect.
  • Area owners are displayed on the HUD.
  • Players do not have to be online for you to grant them areas.
  • Cleaner and faster code. :-)
To convert the area data from a node_ownership installation run /legacy_load_areas 0

License: LGPLv2.1+
Dependencies: None
GitHub: https://github.com/ShadowNinja/areas
Download: https://github.com/ShadowNinja/areas/archive/master.zip
Last edited by ShadowNinja on Sun Oct 27, 2013 22:08, edited 1 time in total.

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

You should have called it "YAPM", Yet Another Protection Mod.

Sokomine
Member
Posts: 4105
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

by Sokomine » Post

All those protection mods out there do have one or the other flaw/limitation. Some are fine for very small areas - and small houses are easier to build well for less skilled players than large projects - but do not work at all for middle-sized to huge projects.

node_ownership is the protection mod I like most: It works, it protects well, it's fast - so it makes every sense to improve that mod further.

One issue I have with it is the way areas are marked. That got improved a lot in this mod, but it's still not optimal. I'd like players to be able to mark their aras on their own (at least the smaller ones). Fiddling with coordinates is too confusing for most players. Marking all four corners of an area with nodes that are well visible seems to come more natural to people. Unfortionately, most players on Redcrabs server are utterly confused when I ask them to show me two diagonally opposite corners of their area. So perhaps letting them mark all four corners and offering a formspec on those marker nodes where the players can enter how deep they want to go their area into the ground and the sky respectively and how they want it called may help.
A list of my mods can be found here.

User avatar
jojoa1997
Member
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Post

Maybe you could have areas protected by mapblock.
Coding;
1X coding
3X debugging
12X tweaking to be just right

User avatar
rubenwardy
Moderator
Posts: 6244
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: United Kingdom
Contact:

by rubenwardy » Post

PilzAdam wrote:You should have called it "YAPM", Yet Another Protection Mod.
Copyrighted by YAMM: Yet Another Mob Mod!

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

rubenwardy wrote:
PilzAdam wrote:You should have called it "YAPM", Yet Another Protection Mod.
Copyrighted by YAMM: Yet Another Mob Mod!
I have all rights for "YAMM", I invented that too: http://irc.minetest.ru/minetest/2013-04-25#i_3049464

User avatar
rubenwardy
Moderator
Posts: 6244
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: United Kingdom
Contact:

by rubenwardy » Post

But you did not baggisy / trademark it! (neither did i)

User avatar
hoodedice
Member
Posts: 1372
Joined: Sat Jul 06, 2013 06:33
GitHub: hoodedice
IRC: hoodedice
In-game: hoodedice
Location: world
Contact:

by hoodedice » Post

(c) Minetest C-55 (tm)(R) All Rights Reserved LGPL 2 Celeron C-55.

Code: Select all

ALL YOUR MODS ARE BELONG TO US

-[i]Celeron-55[/i]
Last edited by hoodedice on Wed Sep 18, 2013 12:36, edited 1 time in total.
7:42 PM - Bauglio: I think if you go to staples you could steal firmware from a fax machine that would run better than win10 does on any platform
7:42 PM - Bauglio: so fudge the stable build
7:43 PM - Bauglio: get the staple build

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

by ShadowNinja » Post

jojoa1997 wrote:Maybe you could have areas protected by mapblock.
That is what 0gb.us's landclaim_0gb_us mod does.
Unfortunately that makes it impossible to protect a precise area and very difficult to protect a large area.

User avatar
fairiestoy
Member
Posts: 191
Joined: Sun Jun 09, 2013 19:25
Location: Germany

by fairiestoy » Post

Why not mixin the landrush mod then? (which is a modified fork of landclaim_0gb_us) but instead of dividing the map into chunks, let the user decide what area to use. About storage: Just detect the outermost corners of the area protected and save all four points (if only horizontal coordinates are taken into account) of this area. How you solve the protections is your task, but i suggest to let the user set a node which has a formspec within where one can define the size of the area to be protected (as long as it doesn't intersect with another area) up to a specific limit ( we don't want users to claim the entire map ). As a visualization help, there could be a button within the formspec to show an entity ( /showarea in the landrush mod for example ) which shows the boundaries of the area to be protected. Its simple to use for new players ( due to visualization ) and it allows dynamic size settings. About the node: Once the user presses 'Proceed', the node disappears and the area is protected. Sounds intuitive enough for me.
Interesting about new things is, to figure out how it works ...

Sokomine
Member
Posts: 4105
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

by Sokomine » Post

The showarea command of the landrush mod is indeed very helpful for checking the area. It also seems pretty easy to use for players. I personally do not like the landrush mod as such because it is bundled with attacking the player upon trying to dig/build in protected aeras which are not always recognizable as such. Both mods are very diffrent in implementation.

Perhaps "mark four corners and enter height, depth and region name in a formspec" would really be easiest? How do players want to mark their regions?
A list of my mods can be found here.

User avatar
Cooper97
Member
Posts: 52
Joined: Thu Feb 21, 2013 19:55
Location: Germany

by Cooper97 » Post

I like this mod but there is a bug:
If I execute /area_pos1 or /area_pos2 it crashes the server and says: "ServerError: LuaError: error: ...\minetest-0.4.7\minetest-0.4.7\bin\...\mods\areas\pos.lua:62 attempt to index a global 'vector' (a nil value)"

Can you fix this bug please? Seems to be in pos.lua, line 62
Sorry for my bad english. (I am from germany.)

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

Cooper97 wrote:I like this mod but there is a bug:
If I execute /area_pos1 or /area_pos2 it crashes the server and says: "ServerError: LuaError: error: ...\minetest-0.4.7\minetest-0.4.7\bin\...\mods\areas\pos.lua:62 attempt to index a global 'vector' (a nil value)"

Can you fix this bug please? Seems to be in pos.lua, line 62
You need a dev version of Minetest, this mod doesnt work with 0.4.7 stable.

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

by ShadowNinja » Post

I have added a owners display to the HUD, inspired by the landrush mod by Brenaweb.
This will only work on very recent servers (from today). Otherwise moving from one area to another will just change the color of the text to black.
I have attempted to add a /show_area command, and it almost worked. The issue is that Minetest only accepts X and Y values for visual_scale, Z is ignored. For now you will have to use the /select_area command, which places markers at the opposite corners of the area.
The protection management node is a good idea, I will see if I can implement it in a way that makes things easier for players. Perhaps it would only have settings for width, height, and depth.

Sokomine
Member
Posts: 4105
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

by Sokomine » Post

Thanks for further developing the mod! I hope a way can be found so that it is really easy to use. The node_ownership mod was already very good as far as protection and ressource efficency go. With that code cleaned up and improved where needed, plus some easy handling that can be done by players, there's hope for a really good protection mod.
A list of my mods can be found here.

User avatar
fairiestoy
Member
Posts: 191
Joined: Sun Jun 09, 2013 19:25
Location: Germany

by fairiestoy » Post

A few things i would like to mention too:
( i didn't take a closer look into your code )
Keep in mind what TNT and Technic stuff does. On landrush we fixed already problems with TNT (somehow) and the screwdriver which had a really annoying security issue. But still the problem with constructers remain. Also stuff from the circular are not behaving correctly, so many stuff to workaround.
Last edited by fairiestoy on Sat Sep 28, 2013 02:23, edited 1 time in total.
Interesting about new things is, to figure out how it works ...

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

Is there any plan to support screwdrivers and buckets.

You can open steel doors and use a screwdriver within protected areas.

You can place water and lava in a protected areas, although it stops you placing lava_source and water_source.

Otherwise great mod. But these issues would be good to resolve.

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

by ShadowNinja » Post

CraigyDavi wrote:Is there any plan to support screwdrivers and buckets.
Yes, however this has to be fixed in the buckets and screwdriver mods, not individual protection mods. See minetest_game #221.

User avatar
fairiestoy
Member
Posts: 191
Joined: Sun Jun 09, 2013 19:25
Location: Germany

by fairiestoy » Post

Shadow, since you are ( iirc ) also working on technic, you should then consider updating the cans. Griefing with them is still possible, when we are talking about the responsibility of this specific mods :)
Interesting about new things is, to figure out how it works ...

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

ShadowNinja wrote:
CraigyDavi wrote:Is there any plan to support screwdrivers and buckets.
Yes, however this has to be fixed in the buckets and screwdriver mods, not individual protection mods. See minetest_game #221.
Thanks. I will change my bucket file now.

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

ShadowNinja wrote:
CraigyDavi wrote:Is there any plan to support screwdrivers and buckets.
Yes, however this has to be fixed in the buckets and screwdriver mods, not individual protection mods. See minetest_game #221.
Unfortunatly it does not work for me :(
Can anyone see the problem with it? My error is something about a nil value from the start (line 22).

User avatar
fairiestoy
Member
Posts: 191
Joined: Sun Jun 09, 2013 19:25
Location: Germany

by fairiestoy » Post

Probably your minetest version is outdatet. Since the minetest.is_protected interface is not that old. Consider updating your minetest and it should work then.
Interesting about new things is, to figure out how it works ...

User avatar
Megaf
Member
Posts: 99
Joined: Fri Nov 01, 2013 18:00
GitHub: megaf
IRC: Megaf
In-game: Megaf
Contact:

by Megaf » Post

Thanks ShadowNinja, Using this mod now to replace node_ownership, it works fine. Thank you!
ShadowNinja wrote:Areas is a advanced area protection mod based on node_ownership.

Features:
  • Players with the 'areas' privilege can dig and place in protected areas without having to grant themselves control over it.
  • Areas can be named.
  • Simpler to use.
  • 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)
  • Areas made with node_ownership can be converted with one simple command.
  • Areas can intersect.
  • Area owners are displayed on the HUD.
  • Players do not have to be online for you to grant them areas.
  • Cleaner and faster code. :-)
To convert the area data from a node_ownership installation run /legacy_load_areas 0

License: LGPLv2+
Dependencies: None
GitHub: https://github.com/ShadowNinja/areas
Download: https://github.com/ShadowNinja/areas/archive/master.zip
Megaf Server v4.0 Address: mt.megaf.info Port 30003

User avatar
minermoder27
Member
Posts: 138
Joined: Wed Nov 20, 2013 23:24
GitHub: ZNixian
In-game: minermoder27
Location: Unfortunately, not in Baikonur

by minermoder27 » Post

Maybe if you give someone a sub area you should be able to remove it.
My best mods:
Buildtest

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

by ShadowNinja » Post

Megaf wrote:Thanks ShadowNinja, Using this mod now to replace node_ownership, it works fine. Thank you!
You're welcome, glad you like it. :-)
minermoder27 wrote:Maybe if you give someone a sub area you should be able to remove it.
You can, use /remove_area (or /recursive_remove_areas if they have their own sub-areas that you want to remove).

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests