[Mod] Protector+ [protectorplus]

User avatar
Aqua
Member
 
Posts: 641
Joined: Wed Aug 22, 2012 09:11

[Mod] Protector+ [protectorplus]

by Aqua » Tue Nov 06, 2012 06:05

Hello this mod is basically glomie's protector mod, but with more protect's with bigger ranges. Also it doesn't depend on moreores. There is also multiple owners and sharing land by left-clicking on block and typing names in the space! I will add lava prevention in next version!

Features:
-Protect(5 block range) crafted with steel ingots surrounding a locked chest.
-Bigger Protect(10 block range) crafted with a protect on top of another protect.
-Biggest Protect(20 block range) crafted with 4 bigger protects in a 2x2 square.

1.0 (Doesn't Work)
2.0 (Works! And now with multiple owners aka sharing land!)

License: WTFPL

Screenshots:

Image

Biggest Protector In Action.
Image
Last edited by Aqua on Mon Dec 10, 2012 10:19, edited 1 time in total.
Hi there ^.~
 

User avatar
Nightfighter
Member
 
Posts: 39
Joined: Sat Oct 06, 2012 11:01

by Nightfighter » Tue Nov 06, 2012 06:32

wow it could protect+1
cool textures too.
my mods: Concrete Invisiblocks
more coming out soon
mods are cool!!
 

User avatar
Zeg9
Member
 
Posts: 608
Joined: Fri Sep 21, 2012 11:02

by Zeg9 » Tue Nov 06, 2012 09:27

You could use my code for multiple members, it's in glomie's topic.
I made a few (a lot of?) mods for minetest: here is a list.
See also the MT-Faithful texture pack (work in progress).
 

trukoil
Member
 
Posts: 145
Joined: Mon Oct 22, 2012 03:32

by trukoil » Tue Nov 06, 2012 09:56

Lol i was thinking to make this mod! Good job
I don't always sign a post
but when i do, i dig.
 

User avatar
Aqua
Member
 
Posts: 641
Joined: Wed Aug 22, 2012 09:11

by Aqua » Tue Nov 06, 2012 10:53

Zeg9 wrote:You could use my code for multiple members, it's in glomie's topic.


That's a good idea thanks =D
Hi there ^.~
 

Lelix
Member
 
Posts: 94
Joined: Sat Apr 14, 2012 12:51

by Lelix » Tue Nov 06, 2012 15:52

good
 

trukoil
Member
 
Posts: 145
Joined: Mon Oct 22, 2012 03:32

by trukoil » Wed Nov 07, 2012 07:39

A server got griefed by lava, so i thought, it's possible for the protector block to convert lava, in its range, to air?
I don't always sign a post
but when i do, i dig.
 

User avatar
Aqua
Member
 
Posts: 641
Joined: Wed Aug 22, 2012 09:11

by Aqua » Wed Nov 07, 2012 08:03

trukoil wrote:A server got griefed by lava, so i thought, it's possible for the protector block to convert lava, in its range, to air?


Yes, i think i can do that for the next update. Thanks!
Hi there ^.~
 

trukoil
Member
 
Posts: 145
Joined: Mon Oct 22, 2012 03:32

by trukoil » Wed Nov 07, 2012 08:35

Or even better, a master lava protector, available only for admins, that convert lava in air for 1000 blocks in every direction, except the bottom, so caves will still have lava, but there won't be lava from the ground to the upper limit (some server limits the upper to 1000, so no one could put lava over) and an inversed master lava protector that gives protection to the bottom instead of the upper.
I don't always sign a post
but when i do, i dig.
 

User avatar
Aqua
Member
 
Posts: 641
Joined: Wed Aug 22, 2012 09:11

by Aqua » Wed Nov 07, 2012 09:13

Great idea trukoil!
Last edited by Aqua on Mon Dec 10, 2012 10:20, edited 1 time in total.
Hi there ^.~
 

User avatar
0gb.us
Member
 
Posts: 841
Joined: Sun Sep 16, 2012 01:55

by 0gb.us » Thu Nov 08, 2012 07:36

Aw. You beat me to releasing a protection plugin that doesn't depend on moreores. I finished building it, I've just been to busy to release it. Meh. Mine still protects against bucket-based attacks, so I'll still release it when I have time. My main feature though is the lack of dependency.

I like the varied ranges on yours. Sometimes you just what to protect a bigger area, but don't want to see protect blocks everywhere. These would go great in a twinkly cave on my server. SOmeone found a large cave half filled with water, covered the top in glass, and placed underwater torches. The effect is mesmerizing, but the current short-range protect blocks detract from the beauty.
 

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

by Sokomine » Thu Nov 08, 2012 15:28

What impact does the larger protector have on server performance? 5x5x5=125 but 20x20x20=8000. Even if we take into account that on average only halve that many blocks have to be searched it's still ~63 vs 4000....on every dig/place. For larger areas, the node/area protection approach seems more sensible to me. Maybe there is a useful way of mixing both?
A list of my mods can be found here.
 

User avatar
Aqua
Member
 
Posts: 641
Joined: Wed Aug 22, 2012 09:11

by Aqua » Fri Nov 09, 2012 04:33

Sokomine wrote:What impact does the larger protector have on server performance? 5x5x5=125 but 20x20x20=8000. Even if we take into account that on average only halve that many blocks have to be searched it's still ~63 vs 4000....on every dig/place. For larger areas, the node/area protection approach seems more sensible to me. Maybe there is a useful way of mixing both?


I sort of understand you. Are you saying that this larger area of protection might effect the server performance? What do you mean in your last two sentences?
Hi there ^.~
 

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

by Sokomine » Fri Nov 09, 2012 05:47

The protector mod and derived mods protect the land by plugging into the place/dig routines of Minetest. If a player places or digs a node, a function in the protector mod is called and checks if the operation is allowed or not. In order to find out what to reply, the function searches for possible protector nodes in the environment. With a normal protector that protects within a radius of 5 blocks, the mod has to search 5 blocks into each direction (they could all be the protector we're looking for). Thus it's even worse than what I stated above...the normal protector already needs to search 10x10x10=1000 nodes. A protector that has a radius of 20 covers 40x40x40=64000 blocks. And players dig up and place a lot of blocks. Computers are fast nowerdays and the data is most likely already in memory so it might work. But it is not efficient.

For larger areas (especially if the total amount of areas that are to be protected is rather small) the other approach seems better: Store who owns which area and check against that list on every place/dig. That is the approach node_ownership takes. The disadvantage of that is that you have to know the coordinates, take care of overlapping regions etc. - plus someone with privs has to do the actual protection whereas protector-mod allows players to protect their areas with a simple block.

Basicly I'd take the node_ownership approach (because it's much more efficient) and add protector-like blocks for easier handling of the areas.
A list of my mods can be found here.
 

sky
Member
 
Posts: 152
Joined: Tue Oct 16, 2012 11:59

by sky » Fri Nov 09, 2012 14:21

i dont get it what this protector protects?? and from who protects??
 

User avatar
Aqua
Member
 
Posts: 641
Joined: Wed Aug 22, 2012 09:11

by Aqua » Sat Nov 10, 2012 07:14

This protect if placed by a player will not allow other players to build or destroy in the protects range. It is used on servers for protection from griefers.
Hi there ^.~
 

sky
Member
 
Posts: 152
Joined: Tue Oct 16, 2012 11:59

by sky » Sat Nov 10, 2012 07:35

nice idea with this someone can make a server and to be someone admin and admin to give to players protector blocks to protect they'r area nice mode Aqua
 

tux_peng
Member
 
Posts: 99
Joined: Thu Dec 06, 2012 18:21

by tux_peng » Sun Dec 09, 2012 01:10

There should be a permission node to bypass all protections

Also, the game has 'default:chest_locked', but the mod refers to 'default:locked_chest'
Servers now up (Economy, no PvP) Forum up already! http://tuxcraft.info
 

User avatar
Aqua
Member
 
Posts: 641
Joined: Wed Aug 22, 2012 09:11

by Aqua » Sun Dec 09, 2012 03:08

tux_peng wrote:There should be a permission node to bypass all protections

Also, the game has 'default:chest_locked', but the mod refers to 'default:locked_chest'


I'll look into it =D
Hi there ^.~
 

tux_peng
Member
 
Posts: 99
Joined: Thu Dec 06, 2012 18:21

by tux_peng » Mon Dec 10, 2012 03:16

only biggest_protect seems to do anything

I just found another bug, an area can overlap another- making a place where noone can build
http://minetest.net/forum/viewtopic.php?pid=55913#p55913
Last edited by tux_peng on Mon Dec 10, 2012 04:13, edited 1 time in total.
Servers now up (Economy, no PvP) Forum up already! http://tuxcraft.info
 

User avatar
Aqua
Member
 
Posts: 641
Joined: Wed Aug 22, 2012 09:11

by Aqua » Mon Dec 10, 2012 06:27

Yes, you are right only the biggest protect works, but only up to 5 blocks. Okay back to the init.
Hi there ^.~
 

User avatar
Aqua
Member
 
Posts: 641
Joined: Wed Aug 22, 2012 09:11

by Aqua » Mon Dec 10, 2012 07:06

Okay, I have fixed the crafting and the biggest protect which now works with a range of 20 blocks in all directions. The other two still don't work. I'm ripping my hair out here!!! =(
Hi there ^.~
 

User avatar
Aqua
Member
 
Posts: 641
Joined: Wed Aug 22, 2012 09:11

by Aqua » Mon Dec 10, 2012 10:15

I spent the whole day fixing it up and now it works! I've tried it and made sure everything works! Now there can be multiple player (sharing)!
Hi there ^.~
 

tux_peng
Member
 
Posts: 99
Joined: Thu Dec 06, 2012 18:21

by tux_peng » Mon Dec 31, 2012 00:24

Maybe I got bad files, I will redownload now. But the smaller protectors still don't seem toi work...
Servers now up (Economy, no PvP) Forum up already! http://tuxcraft.info
 

User avatar
Aqua
Member
 
Posts: 641
Joined: Wed Aug 22, 2012 09:11

by Aqua » Mon Dec 31, 2012 04:14

Works fine for me I've tested it in a LAN game
Hi there ^.~
 

tux_peng
Member
 
Posts: 99
Joined: Thu Dec 06, 2012 18:21

by tux_peng » Mon Dec 31, 2012 18:29

Weird, I modified the begest protect to be half the size, so It would work for my server-- do you think it would be possible to create a PvP flag?
Servers now up (Economy, no PvP) Forum up already! http://tuxcraft.info
 

User avatar
Aqua
Member
 
Posts: 641
Joined: Wed Aug 22, 2012 09:11

by Aqua » Tue Jan 01, 2013 00:52

I'll look at the code again and yes I think its possible to make a PvP flag.
Hi there ^.~
 

tux_peng
Member
 
Posts: 99
Joined: Thu Dec 06, 2012 18:21

by tux_peng » Tue Jan 01, 2013 03:25

Aqua wrote:I'll look at the code again and yes I think its possible to make a PvP flag.


Cool, thank. My server is currently NoPvP, but areas would make it interesting
Servers now up (Economy, no PvP) Forum up already! http://tuxcraft.info
 

tux_peng
Member
 
Posts: 99
Joined: Thu Dec 06, 2012 18:21

by tux_peng » Tue Jan 01, 2013 03:56

I made a small change to init.lua

http://pastebin.com/duhTwNTz

It replaces the hard coded protector sizes with variables defined at the top of the file
Servers now up (Economy, no PvP) Forum up already! http://tuxcraft.info
 

Shizaku
Member
 
Posts: 10
Joined: Wed Feb 27, 2013 08:10

by Shizaku » Fri Mar 08, 2013 09:05

can someone plz tell me how to get the protector to work seems like only the biggest one is working. i seen in the forms someone was working on it all day and got it to work. can you plz show what you didn under init to fix this its not working and i would really like this to work so i can build things without people recking them dont want to place the biggest one everywhere.
Last edited by Shizaku on Fri Mar 08, 2013 09:06, edited 1 time in total.
 

Next

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 69 guests

cron