[Mod] Protector Redo [2.0] [protector]

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Protector Redo [1.2] [protector]

by TenPlus1 » Thu Oct 08, 2015 11:59

Ferk: I understand what you are suggesting now, will look into that.
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Protector Redo [1.3] [protector]

by TenPlus1 » Fri Oct 09, 2015 14:19

Updated to 1.3: Code has been tidied and tweaked so that on_place is now inside node definition, also protected zone display appears for 5 seconds now instead of 10.
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Protector Redo [1.3] [protector]

by TenPlus1 » Thu Oct 22, 2015 09:37

Fixed protector overlap bug thanks to Xanthin, could any server owner using this mod please update.
 

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

Re: [Mod] Protector Redo [1.3] [protector]

by Sokomine » Fri Oct 23, 2015 05:27

I'm always unhappy when a server uses a protector-based mod instead of an areas based one. It is very tricky to protect even a relatively small building due to all those overlapping problems. Most of the time the griefers win, and the time used to build a house is wasted more than ever :-( There are other players who seem to get along with the way protectors work, but I don't.

Would it be possible to add at least a command that allows owners of an area to add people who can build there to more than one protector in one go? It's sometimes tricky to find all conflicting protectors. Or, perhaps easier, add a command so that a player can allow other players to build everywhere where he (the player granting the right) has a protector. And if there's overlapping, some information like "Protector at x,y,z owned by whoever causes a conflict" might be more informative. A "fill this area with protectors owned by me" command might also help. In general, er, I want something like areas :-)
A list of my mods can be found here.
 

User avatar
firefox
Member
 
Posts: 1185
Joined: Wed Jan 14, 2015 07:34
In-game: Red_Fox

Re: [Mod] Protector Redo [1.3] [protector]

by firefox » Fri Oct 23, 2015 06:55

i guess that would mean that you have to use areas instead of protectors, but another idea would be to add different types of protectors with different sizes.

the protector/logo uses stone and iron/copper.
other protectors could be made from sandstone/obsidian and use bronze/mese shards.
the types could be:
- road sign (a protector with a small area to be paced under roads)
- tower protector (a protector with a slightly smaller area that is much higher than the others)
- landmark (a protector with a wider area than the others)

the road sign would not only be for roads but also to cover small holes in the protection or to operate in high populated areas.
the tower protector can also be used for trees.
the landmark would be good for farms or very large buildings.
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Protector Redo [1.3] [protector]

by TenPlus1 » Fri Oct 23, 2015 07:54

Sokomine: I see many MANY builds on server which are easily protected with node protection instead of areas, and in the later versions the protection radius can be increased. imho this is still the easiest and quickest way to protect buildings.
 

User avatar
Ferk
Member
 
Posts: 330
Joined: Tue Aug 18, 2015 17:18
GitHub: Ferk

Re: [Mod] Protector Redo [1.3] [protector]

by Ferk » Fri Oct 23, 2015 08:08

She's got a point that it would probably make sense to show if any protectors from other players conflict when you are placing the protector. Specially if they actually prevent any player from building there, even if they are owners.
Perhaps you could search for conflicting ones just like this?
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
local conflicting_protectors = minetest.find_node_near(pos, 2*protector_radius, {"protector:protect"})

And then exclude from the array anything owned by the player scanning.
{ ☠ Dungeontest ☠ , ᗧ••myarcade•• }
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Protector Redo [1.3] [protector]

by TenPlus1 » Fri Oct 23, 2015 08:39

Ferk: Protector Redo already does that when placing protection, it checks 2x area around itself to see if anyone else's protection is present, also when used as a tool it will show you the location of nearby protectors.
 

User avatar
Ferk
Member
 
Posts: 330
Joined: Tue Aug 18, 2015 17:18
GitHub: Ferk

Re: [Mod] Protector Redo [1.3] [protector]

by Ferk » Fri Oct 23, 2015 08:42

Ok, then maybe those servers are using the old protector. They should update to protector redo then.
{ ☠ Dungeontest ☠ , ᗧ••myarcade•• }
 

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

Re: [Mod] Protector Redo [1.3] [protector]

by Sokomine » Sat Oct 24, 2015 16:31

It might also be possible to allow to place a protector if there's a conflicting protector owned by someone else but where the placer is amongst those who have been added to the protector. The owner of the conflicting protector could be added to the new protector automaticly.
A list of my mods can be found here.
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Protector Redo [1.3] [protector]

by TenPlus1 » Sat Oct 24, 2015 19:40

If a player is added to an already existing protection node and tries to place their own protector inside that area it wont work, it's up to the main player who owns that area to place another node and add the player themselves.
 

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

Re: [Mod] Protector Redo [1.3] [protector]

by Sokomine » Sat Oct 24, 2015 23:31

TenPlus1 wrote:If a player is added to an already existing protection node and tries to place their own protector inside that area it wont work, it's up to the main player who owns that area to place another node and add the player themselves.

...who can't place that protector either because the next best protector from player2 will interfere. In the area between player1 and player2, neither can place a protector even though they share all the protectors they can find. I know why that is the case (=undefined situation in case build privs at one end are removed), but still...it is extremly annoying. It's also something based on the core of how protectors work.
A list of my mods can be found here.
 

User avatar
Ferk
Member
 
Posts: 330
Joined: Tue Aug 18, 2015 17:18
GitHub: Ferk

Re: [Mod] Protector Redo [1.3] [protector]

by Ferk » Sun Oct 25, 2015 01:28

Maybe there could be some priority value.

Something like allow the protector to be placed in an unprotected node even if other protectors conflict in the area, but after doing so make the placed protector have a lower priority than any of the conflicting protectors that were placed before it. In such a way that you can still own the piece of land in between conflicting areas without affecting the areas around that were previously owned.

You'll have a smaller area but you'll still be able to protect it and fill the gap in case you ever want to get closer to the neighbor without doing a complete merge.
{ ☠ Dungeontest ☠ , ᗧ••myarcade•• }
 

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

Re: [Mod] Protector Redo [1.3] [protector]

by Sokomine » Sun Oct 25, 2015 02:42

Ferk wrote:Something like allow the protector to be placed in an unprotected node even if other protectors conflict in the area, but after doing so make the placed protector have a lower priority than any of the conflicting protectors that were placed before it. In such a way that you can still own the piece of land in between conflicting areas without affecting the areas around that were previously owned.

That's a good idea! All it'd take is storing the date when a protector was placed (first comes..) and some more logic when there's more than one of them lurking around. That way, griefers won't be able to exploit those holes by griefing anymore.
A list of my mods can be found here.
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Protector Redo [1.3] [protector]

by TenPlus1 » Sun Oct 25, 2015 08:31

Which leads to an overcomplicated and laggy mod checking protectors around an area instead of simple placing them properly in the first place.
 

User avatar
Ferk
Member
 
Posts: 330
Joined: Tue Aug 18, 2015 17:18
GitHub: Ferk

Re: [Mod] Protector Redo [1.3] [protector]

by Ferk » Sun Oct 25, 2015 08:59

Don't you already check for protectors around the area? I just checked the code and it looks like it does.

The expensive call is already done. And you are even already iterating over the result. The only thing this would add is maybe having to do 1 or 2 more iterations (I don't expect more than 3 protectors in the same area which means only 1 or 2 more get_meta(), the only expensive call in the loop). And this is in the worst case scenario, most of the time you could even return already as soon as you find a node with no priority assigned (and assume no priority is highest priority) and when placing it, if there were no conflicting areas not owned by you (which you are checking for already as well) you don't have to save any priority/timestamp since a protector placed without conflicts would always be highest priority.

The thing is that there are cases where "placing it properly in the first place" is not possible. See this case

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
.P....
......
..x.R.
......
.P....


R is your protector, P is other people (with one dot in each direction of radius in a square), the x is what you want to protect. Trying to protect it will always get you in conflict with the other protectors, who are maybe by people that don't want to give you permissions to access their house area, even if they would be ok with you expanding one dot to the side as long as you don't disturb their areas.
{ ☠ Dungeontest ☠ , ᗧ••myarcade•• }
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Protector Redo [1.3] [protector]

by TenPlus1 » Sun Oct 25, 2015 10:43

Adding this would cause players to become lazy and develop no planning skills as a result... I would gladly add the new checks if I felt they were needed, but in my opinion it overcomplicates a mod that works well on a standalone and sever environment without causing much lag or jittery movement.
 

User avatar
firefox
Member
 
Posts: 1185
Joined: Wed Jan 14, 2015 07:34
In-game: Red_Fox

Re: [Mod] Protector Redo [1.3] [protector]

by firefox » Tue Oct 27, 2015 09:41

so a simple solution to this would be to add mini protectors with a small radius to fill those gaps between areas.
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Protector Redo [1.3] [protector]

by TenPlus1 » Tue Oct 27, 2015 10:14

Then I would have to rewrite the mod to check for different sizes of protector which could slow things down. It's still a better idea to plan things out beforehand.
 

User avatar
Ferk
Member
 
Posts: 330
Joined: Tue Aug 18, 2015 17:18
GitHub: Ferk

Re: [Mod] Protector Redo [1.3] [protector]

by Ferk » Tue Oct 27, 2015 10:20

You only need to check once using the bigger size radius like you already do now, when a protector is found just see if it's a small radius type (could be determined by metadata) and ignore it if it's too far. Doesn't add anything expensive to compute (the find_nodes_in_area and get_metadata has to be done anyway), other than some math you can do with vector.distance which only needs to run when there's an actual small protector and that I'd guess is already faster than the get_meta (it's just arithmetic, no database query or I/O needed for that).

But I think adding a smaller version is not really a solution to the problem, would be best the prioritization (which I believe it's not much difference in speed as well). However, it's entirely your call, it's your mod and it's fine if you decide you want to leave it like it is.
{ ☠ Dungeontest ☠ , ᗧ••myarcade•• }
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Protector Redo [1.4] [protector]

by TenPlus1 » Fri Nov 13, 2015 12:22

Updated to version 1.4:

  • Changed protector recipe's to give 1 instead of 4
  • Added [+] button to interface when adding names
  • Added /delprot command for server admin to remove protectors in bulk
  • Tweaked and tidied code
 

Fixerol
Member
 
Posts: 633
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer

Re: [Mod] Protector Redo [1.4] [protector]

by Fixerol » Fri Nov 13, 2015 17:54

Changed protector recipe's to give 1 instead of 4

reason?
 

User avatar
firefox
Member
 
Posts: 1185
Joined: Wed Jan 14, 2015 07:34
In-game: Red_Fox

Re: [Mod] Protector Redo [1.4] [protector]

by firefox » Fri Nov 13, 2015 18:59

maybe because some players spam their protectors all over the landscape, taking the rare crystal biomes all for themselves and then never log in again ....
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Protector Redo [1.4] [protector]

by TenPlus1 » Sat Nov 14, 2015 07:53

Exactly that firefox, on Xanadu I'm fed up removing landscapes full of protectors and making the recipe a little more expensive should help in the long run.

Note: Players who have been banned or not on server for over 4 months will soon have protectors removed so that other players can build.
 

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

Re: [Mod] Protector Redo [1.4] [protector]

by Minetestforfun » Mon Nov 16, 2015 16:09

TenPlus1 wrote:Note: Players who have been banned or not on server for over 4 months will soon have protectors removed so that other players can build.


Happy to see you speaking about this improvement, it will be possible to tweak this "counter" in the "minetest.conf" ?
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Protector Redo [1.5] [protector]

by TenPlus1 » Thu Dec 03, 2015 12:37

Updated to version 1.5:

- Added protected trapdoor (craft trapdoor + copper ingot)
 

amadin
Member
 
Posts: 471
Joined: Tue Jun 16, 2015 16:23
GitHub: Amadin

Re: [Mod] Protector Redo [1.5] [protector]

by amadin » Thu Dec 03, 2015 14:42

Can anybody write settings for minetest.conf that increase the speed of protected block return to the place if not owner dig it?
 

amadin
Member
 
Posts: 471
Joined: Tue Jun 16, 2015 16:23
GitHub: Amadin

Re: [Mod] Protector Redo [1.5] [protector]

by amadin » Wed Dec 23, 2015 12:21

Do you can add support for chicken and bunny to protector? Because other players can kill my animals even in protected fence wood cage.
 

User avatar
firefox
Member
 
Posts: 1185
Joined: Wed Jan 14, 2015 07:34
In-game: Red_Fox

Re: [Mod] Protector Redo [1.5] [protector]

by firefox » Wed Dec 23, 2015 14:04

amadin wrote:Do you can add support for chicken and bunny to protector? Because other players can kill my animals even in protected fence wood cage.
maybe tamed animals should have the same PvP protection that players get in protected areas, so that only the owner can kill them.

for Xanadu i recommend you to use invisible glass slabs. (the slabs are harder than the full blocks and can't be broken by hand.)
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Protector Redo [1.6] [protector]

by TenPlus1 » Wed Dec 23, 2015 16:29

Updated to version 1.6:

- Added protector_drop and protector_hurt settings to minetest.conf

...these settings were added to stop players using lag to grief through protected areas and inside buildings by dropping their tools and hurting them.
 

PreviousNext

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 27 guests