[Mod] markers - gui for areas mod [0.2][markers]

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

[Mod] markers - gui for areas mod [0.2][markers]

by Sokomine » Post

There are lots of protection mods out there which all take a diffrent approach and have their pros and cons. To me, ShadowNinjas areas mod, which is based on node ownership, is the most flexible and useful.

It has one drawback: The chat commands and the interface as such are not very intuitive.

That's where this mod comes in: It tries to make it far easier by taking into account what I've seen players do when they want to show a moderator which area they want.

In order to see how it works, let's start with crafting the actual markers:
Image
Craft them and place one at each of the four corners of your area. When you place a marker, it will show you how far it is away from the marker you placed before that - useful for measuring distances.

Do not worry about height.

If anything goes wrong, dig the marker and place it again at the same location.

When done, right-click on the last marker you placed. It will show you a menu:
Image

Please enter three values: "This many blocks up: " - this is how far you want your area to stretch into the sky (relative to the marker you clicked on!). Same goes for "and this many blocks down:" - there you can enter a number that's heigh enough to stretch down to the floor of your cellar. "The area shall be named:" - that ought to be obvious. Try to pick a name that describes what you built or intend to build there - perhaps with your player name included.
Image
The above picture shows the filled out formspec. In this case it's a very small area that reaches only 2 blocks into the ground and 6 into the sky - it's a very small tent. You can click on "Buy area" now. Don't worry about the price! Areas do not cost anything (yet).
Image
Finished. The area has been protected for you. You can now dig up the markers and use them for your next area - or let them remain where they are - just do as you like.

But that's not all: You may have forgotten how large your area is, or you want to find out where one is located, who else owns it, add a second owner etc...all of that can be done with chat commands. But there's also a gui for that now. Craft a marker stone:
Image
Place that marker stone somewhere in your protected area and right-click on it. It shows you a menu:
Image
Change owner allows you to give your area to another player who will then own it.
Rename allows to rename the area (change its description).
My areas will give you a list of all areas you own or are subowner of.
Player's areas does the same as My areas - except for the player shown instead of yourshelf.
Add allows you to grant build access to the area to another player. The player will get a subarea of the same size as yours and can dig/build inside it.
Local areas lists all areas that contain the position the marker stone is located at. Since each player that can build there has its own area, there can be more than one. There can also be smaller sub-areas for other purposes (i.e. pieces of land that are part of a town).
Show main area allows you to switch the display to the main area for this region if you're currently displaying a subaera.
List subareas lists the subareas a main area contains.
The commands listed under Admin commands: offer the same functionality as those mentioned above - except that they're shown for all admins/moderators with the areas priv - even if they don't own that particular area.

Image
This is how the area info display looks for areas that are owned by other players.

The compass picture at the bottom shows where you can find the area. In this case, it's 1667 m west and 179 m south of the markers position. If the marker is located inside the areas boundaries, you'll see the top of the marker instead of the compass, and the numbers given will show you how far it is from the marker's location to the borders of the area.

This is a sample area list that shows my areas on VanessaE's survival server:
Image
You can click on each entry and will get a preview of where the area is:
Image
Double-click on an entry to get the area info display known from above.

If the player who owns an area was not considerate enough to place a marker stone, you can get the same functionality with a land title register. It's a tool that you can craft like this:
Image
Wield it and left or right click on a position you want to check. The same menu will open that would open would there have been a marker stone.
Image
Even on old servers, there's plenty of unprotected, unowned land. Clicking on "List all areas" will show you a list of all main areas the server knows about.

Download: https://github.com/Sokomine/markers/archive/master.zip
Browse code: https://github.com/Sokomine/markers
Version: 0.2
Licence: GPLv3
License for pictures: WTFPL (thanks to VanessaE for creating them! And look at the marker stone in HDX.)
Depends on: areas

What needs to be done in the future?
Apart from general feedback and tests with random players, what needs to be added is a way to "pay" for an area. A very simple function for calculating a price is already included. You can edit that function and let it display almost any text. Writing a function that actually charges the requested price is still missing. Mostly that's because it depends a lot on the server itshelf - they all have their own, diffrent monetary system. Giving areas away for free might not be such a good idea as players might spam with it and protect more than what they can use. By default, the size of areas is limited to 1024 m^2 and a height of 100 m. You can change those config values at the start of the init.lua file.

A second semi-graphical display like the compass/marker stone ought to be added that shows how large the area is in each dimension. That might be easier to take in than the text in the area's description. Also information about how high the area is is not displayed yet.

Currently, creating a new area inside your own area creates a new main area instead of a subarea of your area. That's not a big problem in general but could be annoying if areas are charged for (who wants to pay twice?).

Hope this is helpful. Please test it with your players. Ultimately, I hope that Redcrab comes back and installs it on his server (you're allowed to hope, aren't you..?)
Last edited by Sokomine on Wed May 24, 2017 13:34, edited 3 times in total.
A list of my mods can be found here.

User avatar
LuxAtheris
Member
Posts: 169
Joined: Fri Oct 25, 2013 00:54
Location: Aether

by LuxAtheris » Post

OMG Awesome mod here dude!
Believe you can and you’re halfway there.

User avatar
webdesigner97
Member
Posts: 1328
Joined: Mon Jul 30, 2012 19:16
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97
Location: Cologne, Germany
Contact:

by webdesigner97 » Post

This looks very cool and it is very useful!

User avatar
Krock
Developer
Posts: 4648
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

by Krock » Post

+1

This makes it alot easier to work with the protection mod.
Alot tools are included too, like a GUI for all areas by that player.
I like it!
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
Inocudom
Member
Posts: 3121
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Post

Sokomine, you are one of the most outstanding members in this community.

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

by Sokomine » Post

What's still missing is some useful way to handle how much a player can protect. I do limit the size of the area to 1024 m^2, but that won't stop players from protecting lots of areas without any chance of them ever going to build anything there. Another limitation comes from the basic areas mod which limits self-protection to 3 areas (configurable).

I plan to add a price of x cobble per m^2 (height does not count). Areas less than 100 m from spawn will be more "expensive", while areas further out will be cheaper. The idea is that cobble is not a very good material for building while beeing available in large quantities on (almost) any server. The money mods used are just too diffrent. The amount of cobble the inventory can contain will limit the size of the areas indirectly.

Of course this won't work at all on creative servers. For those, limiting the amount of areas a player can have might be best.

Regular players who have proven that they know how to handle self-protection and apply it in a useful way might be omitted from paying the cobble price and the amount of areas limitation.

What do you think of these suggestions? Server owners: What would you prefer?
A list of my mods can be found here.

Josh
Member
Posts: 1146
Joined: Fri Jun 29, 2012 23:11
Location: Victoria, Australia

by Josh » Post

Look's cool, much easier way of protecting areas.

gsmanners
Member
Posts: 159
Joined: Fri Jan 10, 2014 21:37

by gsmanners » Post

This is very nice, though I should admit that I bumped up the min to 4096 (64x64). Seems a bit more reasonable.

I like the idea of giving players credits, and my own idea on the matter is basically that it should measure how much active time you've spent. I think 40 credits per hour is pretty reasonable, all things considered.

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

What a great mod! This makes the areas mod much easier to use.

I am using this on my server at the moment. And it is great not to be bothered by anyone anymore thanks to the simplicity of this.

Very nice!

CWz
Member
Posts: 197
Joined: Tue Dec 24, 2013 17:01
GitHub: chaoswormz
IRC: CWz
In-game: CWz
Location: Banana Land

Re: [Mod] markers - gui for areas mod

by CWz » Post

Got this error which crashed my server
19:53:09: ERROR[main]: ERROR: An unhandled exception occurred: /home/chaoswormz/.minetest/mods/markers/init.lua:339: attempt to index a nil value
19:53:09: ERROR[main]: stack traceback:
19:53:09: ERROR[main]: /home/chaoswormz/.minetest/mods/markers/init.lua:339: in function 'get_marker_formspec'
19:53:09: ERROR[main]: /home/chaoswormz/.minetest/mods/markers/init.lua:600: in function 'on_rightclick'
19:53:09: ERROR[main]: /usr/share/minetest/builtin/item.lua:326: in function </usr/share/minetest/builtin/item.lua:319>

In thread b6c61700:
/build/buildd/minetest-201404200513/src/main.cpp:1889: int main(int, char**): Assertion '0' failed.
Debug stacks:
DEBUG STACK FOR THREAD b4bffb40:
#0 virtual void* CurlFetchThread::Thread()
DEBUG STACK FOR THREAD b6c61700:
#0 int main(int, char**)
(Leftover data: #1 Dedicated server branch)
(Leftover data: #2 virtual void ServerMap::save(ModifiedState))
(Leftover data: #3 virtual void Database_SQLite3::saveBlock(MapBlock*))
(Leftover data: #4 void ItemStack::serialize(std::ostream&) const)

Nubelite
Member
Posts: 161
Joined: Mon Jul 16, 2012 23:10

Re: [Mod] markers - gui for areas mod

by Nubelite » Post

I couldn't get it to work for me, but might be me.

I tried my hand at trying to modify this to what i am looking for exactly. I would like to set one stone to protect a predefined area without a time limit.

I don't see how i can modify markers.marker_placed to use only one stone with a preset -dist +dist for the pos.

twoelk
Member
Posts: 1482
Joined: Fri Apr 19, 2013 16:19
GitHub: twoelk
IRC: twoelk
In-game: twoelk
Location: northern Germany

Re: [Mod] markers - gui for areas mod

by twoelk » Post

Nubelite wrote:I couldn't get it to work for me, but might be me.

I tried my hand at trying to modify this to what i am looking for exactly. I would like to set one stone to protect a predefined area without a time limit.

I don't see how i can modify markers.marker_placed to use only one stone with a preset -dist +dist for the pos.
Aren't you rather looking for something like the Landrush-mod ?

User avatar
Krock
Developer
Posts: 4648
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] markers - gui for areas mod

by Krock » Post

twoelk wrote:
Nubelite wrote:I would like to set one stone to protect a predefined area without a time limit.
Aren't you rather looking for something like the Landrush-mod ?
How about simple_protection? There, you can define the area sizes easily.

EDIT: bump = edit
Last edited by Krock on Wed Sep 24, 2014 15:50, edited 1 time in total.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

Vazon
Member
Posts: 191
Joined: Sat Aug 17, 2013 17:20
IRC: Vazon
In-game: Vazon
Location: Tennessee, U.S

Re: [Mod] markers - gui for areas mod

by Vazon » Post

I have been thinking about this mod a lot on my server and I think a two add on would be nice.

1- Once the area has been claimed the markers remove themselves, otherwise once you make a set you almost never have to make another and make the crafting a little bit harder.

2- Add merge claims, when a player has 2 claims next to one another, they can merge them into 1 by putting markers on the corners of the. example:
x = claim 1, o = claim 2, m = markers

m x x x x o o o o m
x x x x x o o o o o
m x x x x o o o o m

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

Re: [Mod] markers - gui for areas mod [0.2][markers]

by Sokomine » Post

Added the missing pictures for now.
A list of my mods can be found here.

User avatar
jp
Banned
Posts: 947
Joined: Wed Dec 18, 2013 09:03
GitHub: kilbith
Location: France

Re: [Mod] markers - gui for areas mod [0.2][markers]

by jp » Post

Some thoughts on this mod :

1. It sometimes a pain to align correctly the 4 markers as a perfect rectangle. To solve that, there is an easier way : 2 markers placed as the diagonal of a rectangle (like the WorldEdit & Areas positions).

2. The recipe for the markers are cheap. Too cheap. Every newcomer, usual short-term player have the effortless possibility to appropriate land(s) (with their highly-scattered crappy cobbles & planks homes) without considering the (future) expectations of the serious builders. It curbs the good evolution of the map. So, a more costly recipe can bring a more deserving use of these markers.

User avatar
Minetestforfun
Member
Posts: 940
Joined: Tue Aug 05, 2014 14:09
GitHub: MinetestForFun
IRC: MinetestForFun
In-game: MinetestForFun
Location: On earth
Contact:

Re: [Mod] markers - gui for areas mod [0.2][markers]

by Minetestforfun » Post

@jp
I agree => +1

User avatar
Fritigern
Member
Posts: 43
Joined: Mon Sep 29, 2014 11:01
In-game: Fritigern
Location: Spokane, WA

Re: [Mod] markers - gui for areas mod [0.2][markers]

by Fritigern » Post

Markers appears to have crashed my server. This is not the first time, but it's the first time that i have remembered to copy the error so i can paste it here:

Code: Select all

01:00:27: ACTION[ServerThread]: <USERNAME_WITHELD> places node markers:mark at (408,1,-254)
01:00:27: ACTION[ServerThread]: facedir: 3
01:00:30: ACTION[main]: IRC: Disconnected.
01:00:31: ERROR[main]: WARNING: endSave() failed, map might not have saved.WARNING: beginSave() failed, saving might be slow.WARNING: endSave() failed, map might not have saved.WARNING: beginSave() failed, saving might be slow.WARNING: endSave() failed, map might not have saved.WARNING: beginSave() failed, saving might be slow.WARNING: endSave() failed, map might not have saved.WARNING: beginSave() failed, saving might be slow.WARNING: endSave() failed, map might not have saved.WARNING: beginSave() failed, saving might be slow.WARNING: endSave() failed, map might not have saved.WARNING: beginSave() failed, saving might be slow.WARNING: endSave() failed, map might not have saved.WARNING: beginSave() failed, saving might be slow.WARNING: endSave() failed, map might not have saved.WARNING: beginSave() failed, saving might be slow.WARNING: endSave() failed, map might not have saved.WARNING: beginSave() failed, saving might be slow.WARNING: endSave() failed, map might not have saved.WARNING: beginSave() failed, saving might be slow.ERROR: An unhandled exception occurred: ...test/bin/../worlds/Pacata/worldmods/markers/init.lua:340: attempt to index field '?' (a nil value)
01:00:31: ERROR[main]: stack traceback:
01:00:31: ERROR[main]: 	...test/bin/../worlds/Pacata/worldmods/markers/init.lua:340: in function 'get_marker_formspec'
01:00:31: ERROR[main]: 	...test/bin/../worlds/Pacata/worldmods/markers/init.lua:601: in function 'on_rightclick'
01:00:31: ERROR[main]: 	/home/balaam/Minetest/bin/../builtin/game/item.lua:326: in function </home/balaam/Minetest/bin/../builtin/game/item.lua:319>
01:00:31: ERROR[main]: 	(tail call): ?
Using the currently latest Minetest git version (0.4.10-174-g96fcca4-dirty)
I hope this helps making this mod even better.

EDIT: The cause was that four markers were placed in a straight line. Right-clicking the last marker then causes the above issue with a forced shutdown of the server as a result.
--
This is NOT a sig.

User avatar
afflatus
Member
Posts: 362
Joined: Tue Apr 01, 2014 19:47
GitHub: 0-afflatus
IRC: afflatus
In-game: afflatus
Location: Avalonia
Contact:

Re: [Mod] markers - gui for areas mod [0.2][markers]

by afflatus » Post

It would be just so great to have a button for your own areas in the dialog's first screen.
I'm constantly switching between screens to get to the listing I want, which is tiresome during times of high lag.

This mod is really great for players, but as admin I'm increasingly using the areas command-line. That's not a criticism as I guess that was your intention.
Grailtest is stirring ...

User avatar
afflatus
Member
Posts: 362
Joined: Tue Apr 01, 2014 19:47
GitHub: 0-afflatus
IRC: afflatus
In-game: afflatus
Location: Avalonia
Contact:

Re: [Mod] markers - gui for areas mod [0.2][markers]

by afflatus » Post

I disagree with jp.

There is nothing to stop an admin either re-assigning abandoned areas, asking players to rebuild in a suitable style or setting area_open to allow bulldozing. It is _so_ much better than dealing with complaints from griefed players.

Please keep it cheap and simple.
Grailtest is stirring ...

User avatar
afflatus
Member
Posts: 362
Joined: Tue Apr 01, 2014 19:47
GitHub: 0-afflatus
IRC: afflatus
In-game: afflatus
Location: Avalonia
Contact:

Re: [Mod] markers - gui for areas mod [0.2][markers]

by afflatus » Post

I found the settings rather gnomic and hard to understand. They are done in a way that doesn't look like they are supposed to be edited. Did I miss something?
Grailtest is stirring ...

u34

Re: [Mod] markers - gui for areas mod [0.2][markers]

by u34 » Post

afflatus wrote:I found the settings rather gnomic and hard to understand. They are done in a way that doesn't look like they are supposed to be edited. Did I miss something?
its just a simple way to mark your building area,
after 60*60*24 time the protection is over.

+1 for the mod ...

important note:
when u want to delete an element you've to set YES into the input-field...
how can i move the area-sticks to another position?
must i redo the same process to mark the positions?

User avatar
12Me21
Member
Posts: 873
Joined: Tue Mar 05, 2013 00:36
GitHub: 12Me21
Location: (Ignore all of my posts before 2018)

Re: [Mod] markers - gui for areas mod [0.2][markers]

by 12Me21 » Post

If you place all 4 markers above each other (to try to protect a 1x1 area) it will crash the game...

User avatar
afflatus
Member
Posts: 362
Joined: Tue Apr 01, 2014 19:47
GitHub: 0-afflatus
IRC: afflatus
In-game: afflatus
Location: Avalonia
Contact:

Re: [Mod] markers - gui for areas mod [0.2][markers]

by afflatus » Post

Or even if you just place one on top of the other.
Grailtest is stirring ...

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

Re: [Mod] markers - gui for areas mod [0.2][markers]

by Sokomine » Post

12Me21 wrote: If you place all 4 markers above each other (to try to protect a 1x1 area) it will crash the game...
That bug is fixed in the current version. I ought to have announced it here...
afflatus wrote: Or even if you just place one on top of the other.
That is also fixed. Thank you for reporting it!

@All: Please update your version of markers!
A list of my mods can be found here.

Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 12 guests