Page 1 of 2

[Mod] Land Rush [landrush]

Posted: Sat Feb 16, 2013 07:10
by BrandonReese
[Mod] Land Rush [landrush]

Code license: GNU LGPL version 2
Image license: CC Attribution-ShareAlike 3.0
Plugin dependencies: none (bucket, default, and fire are supported, however), money2 for land sale

This is a fork of 0gb.us' landclaim mod http://forum.minetest.net/viewtopic.php?id=3679.

Imagine the entire map is divided into chunks. You place your land rush land claim block and it protects that chunk (then the land claim block disappears).

Chunk size is configurable, default is 16x16. There are three stages of vertical protection:
-30 thru 120
120 thru vertical map limit,
-200 thru -30.

This is a partial protection mod. This is intended for PvP type maps.
1) Your areas are fully protected if you are offline.

2) You are not protected if you are online, but you will receive chat messages when somebody starts to grief one of your protected areas. Anybody you have shared the area with will also be notified. The griefer also gets a chat message that they are griefing in case it's an accident. This way you can initiate a conversation with the griefer or go and fight them.


There are two modes for this Mod

1) You are required to claim areas you wish the build on. You cannot dig or build in unclaimed areas. The exception to this are ladders, you can place and dig ladders in unclaimed areas to get yourself out of a hole or something like that. With this mode you really have to give people a few land rush land claim blocks when they first log in. Edit init.lua and change requireClaim = true to use this mode.

2) Anybody can dig or build in unclaimed areas. Edit init.lua and change requireClaim = false to use this mode.

Auto Ban
This protection has an option to auto ban players who repeatedly try to dig in claimed areas. I'm tired of people using lag to break through protected walls to get into areas that are meant to be private then steal stuff out of nodes that can't be locked like furnaces and auto crafters. This should deter that. The default settings gives the player a chat and audio warning after a couple of digging attempts, and bans them after roughly 5 digging attempts. The level of the offense is based on a weighted formula, so if they dig in one protected area (A), then attempt to dig in another area (B) 200 nodes away the digging attempt in area (B) isn't judged as severe, a second digging attempt in area (B) would be judged more severely. By default all offenses are cleared after 24 hours. If you have ChatPlus installed you can enter an admin name and that admin will get a mail message through chat plus when a player has been auto banned. Auto ban has 4 stages, 3 temp bans (10 min, 20 min, 30 min bans) then a permanent ban.

Damage Player for attempting to dig in claimed areas
Players are dealt damage for attempting to dig in claimed areas.

HUD
Displays the land owner in the lower left of the screen. This updates every couple of seconds so if you are moving around a lot it may not be 100% accurate until you stand still for a little while.

Land Sale
Sell your unused land claims. Craft a sale block and place it anywhere inside the claim, right click the block to set the price. Other players punch the block to purchase the claim.

Craft Recipe

Land Claim Block

S = Stone
I = Steel Ingot
M = Mese / Mese Crystal

S I S
I M I
S I S

Land Sale Block

W = Default Wood Planks
X = nothing

X WW
X W X
WW X

Chat Commands
/showarea - Draws a box around the current chunk you are in
/landowner - shows the current owner of the chunk you are in
/unclaim - remove your claim on the current chunk you are in
/sharearea <name> - shares the area with <name>
/unsharearea <name> - removes <name> from the share
/mayedit - Shows who has permissions to edit the claim

Download: https://github.com/Bremaweb/landrush/archive/master.zip

Posted: Sat Feb 16, 2013 12:28
by jojoa1997
i like this mod. perfect for a pvp

Posted: Tue May 28, 2013 07:06
by Cooper97
Hello Brandon, I like your land rush mod, but it protects only if you are offline and if you are online it sends you a text message. How can I change this? It should protect always. How can I change it?

I have also an improvement suggestion. If a player grief a not protected house and protect it then, then nobody can repair the griefing. Can you please add a privilege like "landrush" and everyone who have the privilege "landrush" (only admins) can build in protected areas, and can execute the command /unclaim in all areas. Is that possible?
Regards
Cooper97

Posted: Tue May 28, 2013 13:50
by BrandonReese
I actually updated it a couple of days ago and added an onlineProtection option. Update your mod from the latest github version which defaults to online protection being on. You can change online protection by changing

Code: Select all

local onlineProtection = true
to

Code: Select all

local onlineProtection = false

Posted: Tue May 28, 2013 14:40
by Cooper97
Thanks for your answer. Can you implement my improvement suggestion with the "landrush" privilege?

Posted: Fri Jun 07, 2013 02:55
by BrandonReese
I have added the landrush privilege, it doesn't work with the unclaim or sharearea commands yet, I overlooked that. I'll update it soon to include those. With the landrush privilege you can build/dig anywhere, claimed or unclaimed.

Posted: Fri Jun 07, 2013 12:06
by Cooper97
Thanks. Your mod is awesome.

Posted: Sun Jun 16, 2013 05:02
by BrandonReese
Added auto ban feature

Posted: Mon Jun 17, 2013 15:02
by Cooper97
BrandonReese wrote:Added auto ban feature
Thanks but what means that? Auto ban for all players who dig inadvertently in a protected area?

Posted: Mon Jun 17, 2013 15:15
by BrandonReese
Cooper97 wrote:
BrandonReese wrote:Added auto ban feature
Thanks but what means that? Auto ban for all players who dig inadvertently in a protected area?
I describe the auto ban in first post. You get several warnings that you can be banned (chat messages and an audio warning) and chat messages telling you to use /landowner and /showarea to see if the player is allowed to dig in the area.

It's optional and it's off by default, and you can make the ban strict or lenient. The settings are explained pretty well in the init.lua file in the comment next to each setting.

I'm thinking about putting something in the hud to warn them as well in case they miss the other warnings.

Posted: Mon Jun 17, 2013 16:41
by Cooper97
It works great with 0.4.6 and with version 0.4.7.
The Land Rush mod is really awesome!
The autoban feature is also very great. Thanks.

Posted: Tue Jun 18, 2013 20:46
by Inocudom
As another form of warning players, five hearts of damage could be dealt by digging in protected areas.

It would be a good idea to have this mod explain itself to a player every time he/she enters a server that has it.

Posted: Tue Jun 18, 2013 20:50
by BrandonReese
Inocudom wrote:As another form of warning players, five hearts of damage could be dealt by digging in protected areas.

It would be a good idea to have this mod explain itself to a player every time he/she enters a server that has it.
I've been thinking about dealing damage to a player and/or destroying the tool they are using before banning them. I've also been working on a temp ban so the first time they are banned for 10 minutes, 20, 30, then permanent ban.

Posted: Tue Jun 18, 2013 21:05
by VanessaE
Inocudom, I LIKE that idea! A legit player will surely have food handy anyway, whilst a griefer trying to nuke someone's structure probably won't. Can we take this one step further and outright kick the player from the server automatically above some reasonable threshold?

Posted: Tue Jun 18, 2013 22:16
by BrandonReese
VanessaE wrote:Inocudom, I LIKE that idea! A legit player will surely have food handy anyway, whilst a griefer trying to nuke someone's structure probably won't. Can we take this one step further and outright kick the player from the server automatically above some reasonable threshold?
There is an Auto Ban feature that has an adjustable threshold. I'm still working on the balance, and I have a temp ban written but not tested yet.
BrandonReese wrote: The level of the offense is based on a weighted formula, so if they dig in one protected area (A), then attempt to dig in another area (B) 200 nodes away the digging attempt in area (B) isn't judged as severe, a second digging attempt in area (B) would be judged more severely. By default all offenses are cleared after 24 hours.

Posted: Tue Jun 18, 2013 22:29
by VanessaE
If I can remember to, I'm gonna have to stea...er..*ahem* "borrow" some of the code for use in my fork of node_ownership :-)

Posted: Tue Jun 18, 2013 22:46
by BrandonReese
VanessaE wrote:If I can remember to, I'm gonna have to stea...er..*ahem* "borrow" some of the code for use in my fork of node_ownership :-)
If we just happen to come up with the same solution with very similar code I won't think anything of it :)

Posted: Wed Jun 19, 2013 12:57
by rubenwardy
Wow! ThAnks for supporting my mod :P
I might use a modified version of this in my up coming capture the flag game.

Posted: Wed Jun 19, 2013 14:25
by arsdragonfly
very nice mod.I wish it could work with minetestmapper, and chunks owned by different players will be tinted with different colors :-)

Posted: Wed Jun 19, 2013 14:36
by BrandonReese
arsdragonfly wrote:very nice mod.I wish it could work with minetestmapper, and chunks owned by different players will be tinted with different colors :-)
I'm planning something like that, I haven't started on it yet, but I'm trying to figure out how to do that. It will be a separate script that would need to be ran separate from minetestmapper.

Posted: Thu Jun 20, 2013 05:06
by BrandonReese
Added damage to player when digging in claimed areas

Added 3 temp bans before the permanent ban ( 10 min, 20 min, 30 min ).

Added a hud item in the lower left of the screen to display the land owner for the claim you are standing in. The hud item updates every second so if you are running it may not be 100% accurate until you stand still for a little bit (I may slow this down to 2 or 3 seconds if 1 second puts too much of a load on the server)

Posted: Thu Jun 20, 2013 16:22
by Inocudom
You could also add a low humming noise to give protected areas an ambient sound. Below is an existing mod that should help with doing that.
http://forum.minetest.net/viewtopic.php?id=6295

Posted: Thu Jun 20, 2013 16:56
by BrandonReese
Inocudom wrote:You could also add a low humming noise to give protected areas an ambient sound. Below is an existing mod that should help with doing that.
http://forum.minetest.net/viewtopic.php?id=6295
I think that would just end up getting annoying because there are large expenses of land that are claimed so you would hear the humming a lot.

Posted: Sun Jun 23, 2013 04:41
by BrandonReese
Updated, added the ability to sell claims, see first post for details.

Posted: Sat Jun 29, 2013 03:19
by BrandonReese
Changed sale block recipe so it wouldn't conflict with the wood shield recipe