[Mod] Protector Redo [2.9] [protector]

User avatar
Ferk
Member
 
Posts: 337
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

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: 2645
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: 1512
Joined: Wed Jan 14, 2015 07:34
Location: Xanadu
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.
building inspiration: viewtopic.php?f=3&t=15550 --- my game: viewtopic.php?f=49&t=15860 --- =(^.^)= nyan~
 

User avatar
TenPlus1
Member
 
Posts: 2645
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: 337
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: 2645
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
 

User avatar
Fixer
Member
 
Posts: 894
Joined: Sun Jul 31, 2011 11:23
Location: Ukraine
IRC: Fixer
In-game: Fixer

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

by Fixer » Fri Nov 13, 2015 17:54

Changed protector recipe's to give 1 instead of 4

reason?
 

User avatar
firefox
Member
 
Posts: 1512
Joined: Wed Jan 14, 2015 07:34
Location: Xanadu
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 ....
building inspiration: viewtopic.php?f=3&t=15550 --- my game: viewtopic.php?f=49&t=15860 --- =(^.^)= nyan~
 

User avatar
TenPlus1
Member
 
Posts: 2645
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
Location: On earth
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: 2645
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: 548
Joined: Tue Jun 16, 2015 16:23

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: 548
Joined: Tue Jun 16, 2015 16:23

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: 1512
Joined: Wed Jan 14, 2015 07:34
Location: Xanadu
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.)
building inspiration: viewtopic.php?f=3&t=15550 --- my game: viewtopic.php?f=49&t=15860 --- =(^.^)= nyan~
 

User avatar
TenPlus1
Member
 
Posts: 2645
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.
 

User avatar
Fixer
Member
 
Posts: 894
Joined: Sun Jul 31, 2011 11:23
Location: Ukraine
IRC: Fixer
In-game: Fixer

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

by Fixer » Thu Dec 24, 2015 20:53

Added protector_drop and protector_hurt settings to minetest.conf

Excellent :} This is excellent feature, thank you very much. Must have.
 

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

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

by firefox » Fri Dec 25, 2015 21:58

that killed 1 of my ninja skills, but on the other hand: it is now impossible to sneak into the Inner Sanctum without finding the hidden entrance, yay!
building inspiration: viewtopic.php?f=3&t=15550 --- my game: viewtopic.php?f=49&t=15860 --- =(^.^)= nyan~
 

User avatar
everamzah
Member
 
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

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

by everamzah » Fri Dec 25, 2015 23:13

I haven't tried this yet, but what do you do when a player has a lot of armor and HP, as well as multiple tools? When one drops, they could switch to any other.
 

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

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

by firefox » Sat Dec 26, 2015 16:08

everamzah wrote:I haven't tried this yet, but what do you do when a player has a lot of armor and HP, as well as multiple tools? When one drops, they could switch to any other.

usually you can't switch tools fast enough before the digged blocks are replaced.
building inspiration: viewtopic.php?f=3&t=15550 --- my game: viewtopic.php?f=49&t=15860 --- =(^.^)= nyan~
 

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

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

by TenPlus1 » Sat Dec 26, 2015 20:39

..and if you switch tools while one is dropping you may lose the 2nd tool completely :) muhahahah
 

User avatar
Fixer
Member
 
Posts: 894
Joined: Sun Jul 31, 2011 11:23
Location: Ukraine
IRC: Fixer
In-game: Fixer

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

by Fixer » Sun Dec 27, 2015 00:40

firefox wrote:
everamzah wrote:I haven't tried this yet, but what do you do when a player has a lot of armor and HP, as well as multiple tools? When one drops, they could switch to any other.

usually you can't switch tools fast enough before the digged blocks are replaced.


This requires very good skill, weak blocks and computer :}. Also, if by some megaluck intruder gets inside, his tools will be on outside, there will be probably owner, not far from here, with some swords to kill him and gather his tools :}
Also, if all goes well, there will be owned steel trapdoor in MTG, yes, that will protect some known weak spots *cough* and you will have complete safety :}

I will try to break into some Xanadu houses just for test (the noob way :}).
 

Dragonop
Member
 
Posts: 1178
Joined: Tue Oct 23, 2012 12:59
Location: Argentina
GitHub: Dragonop
IRC: Dragonop
In-game: Dragonop

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

by Dragonop » Sun Dec 27, 2015 02:48

I will try as well, but I will ask the owner for permission first hehe

Edit: it's possible, if you have some skill and fast fingers you are able to, but most of the times you will leave your tools behind, so finding a weak spot, and using steel/bronze tier tools is what trespassers might do (if smart enough).
Roofs are still really weak tho :p
You could use a tool to break the roof, you drop inside, and then you use another tool to get your fist tool back (clicking, because it won't fall).

Edit2: sorry TenPlus1 for posting this here, but it might help you improve the method, I hope.
 

amadin
Member
 
Posts: 548
Joined: Tue Jun 16, 2015 16:23

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

by amadin » Sun Dec 27, 2015 09:06

You posted new advice to griefers here, you must wrote this to private message only. I hope you will remove your last message.
 

Dragonop
Member
 
Posts: 1178
Joined: Tue Oct 23, 2012 12:59
Location: Argentina
GitHub: Dragonop
IRC: Dragonop
In-game: Dragonop
 

User avatar
Fixer
Member
 
Posts: 894
Joined: Sun Jul 31, 2011 11:23
Location: Ukraine
IRC: Fixer
In-game: Fixer
 

PreviousNext

Return to Mod Releases



Who is online

Users browsing this forum: h-v-smacker and 4 guests