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

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

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

by Sokomine » Fri Jan 03, 2014 02:26

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 » Fri Jan 03, 2014 04:45

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

User avatar
webdesigner97
Member
 
Posts: 1323
Joined: Mon Jul 30, 2012 19:16
Location: Bergisch Gladbach, Germany
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97
 

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

by Krock » Fri Jan 03, 2014 10:26

+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!
Mod Search Engine - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 

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

by Inocudom » Fri Jan 03, 2014 15:20

Sokomine, you are one of the most outstanding members in this community.
Recovering from the abomination I am. Clocking time for Garry's Mod I am too.
 

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

by Sokomine » Tue Jan 14, 2014 03:15

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 » Wed Jan 15, 2014 20:14

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

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

by gsmanners » Thu Jan 16, 2014 05:32

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
Location: Hampshire, UK
GitHub: davisonio
IRC: davisonio
In-game: CraigyDavi

by CraigyDavi » Sat Feb 01, 2014 14:46

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: 195
Joined: Tue Dec 24, 2013 17:01
Location: Banana Land
GitHub: chaoswormz
IRC: CWz
In-game: CWz

Re: [Mod] markers - gui for areas mod

by CWz » Thu Apr 24, 2014 17:02

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 » Fri May 23, 2014 04:50

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: 1256
Joined: Fri Apr 19, 2013 16:19
Location: northern Germany
GitHub: twoelk
IRC: twoelk
In-game: twoelk

Re: [Mod] markers - gui for areas mod

by twoelk » Fri May 23, 2014 07:13

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: 4141
Joined: Thu Oct 03, 2013 07:48
Location: Switzerland
GitHub: SmallJoker

Re: [Mod] markers - gui for areas mod

by Krock » Fri May 23, 2014 14:10

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.
Mod Search Engine - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 

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

Re: [Mod] markers - gui for areas mod

by Vazon » Thu Jun 19, 2014 03:20

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: 3616
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

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

by Sokomine » Fri Sep 12, 2014 17:12

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

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

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

by jp » Wed Sep 24, 2014 07:27

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.
[Mods] Crafting GuideSpectator ModeX-Decor[+]
[Maps] New York CityMinecraft Imported Maps
[Textures] PixelBOX Reloaded

Like my stuff? Consider donating.
 

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

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

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

by Fritigern » Tue Nov 04, 2014 09:14

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: 317
Joined: Tue Apr 01, 2014 19:47
Location: Avalonia
GitHub: 0-afflatus
IRC: afflatus
In-game: afflatus

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

by afflatus » Tue Jan 27, 2015 13:49

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 dreaming ...
 

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

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

by afflatus » Tue Jan 27, 2015 13:54

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 dreaming ...
 

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

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

by afflatus » Tue Jan 27, 2015 13:55

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 dreaming ...
 

User avatar
cHyper
Member
 
Posts: 759
Joined: Fri May 06, 2011 08:49
Location: Austria
GitHub: cHyper-0815OL
IRC: cHyper
In-game: cHyper

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

by cHyper » Tue Jan 27, 2015 20:12

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
Location: (Ignore all of my posts before 2018)
GitHub: 12Me21

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

by 12Me21 » Sun Mar 08, 2015 21:31

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: 317
Joined: Tue Apr 01, 2014 19:47
Location: Avalonia
GitHub: 0-afflatus
IRC: afflatus
In-game: afflatus

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

by afflatus » Tue Mar 10, 2015 23:34

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

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

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

by Sokomine » Sun Mar 22, 2015 04:35

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.
 

Next

Return to Mod Releases



Who is online

Users browsing this forum: erstazi and 11 guests