[Mod] Protector+ [protectorplus]

User avatar
Aqua
Member
Posts: 641
Joined: Wed Aug 22, 2012 09:11
Location: Sydney~Singapore
Contact:

[Mod] Protector+ [protectorplus]

by Aqua » Post

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
Location: in a alien world

by Nightfighter » Post

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
Location: France

by Zeg9 » Post

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

User avatar
trukoil
Member
Posts: 145
Joined: Mon Oct 22, 2012 03:32
Location: Minetest

by trukoil » Post

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
Location: Sydney~Singapore
Contact:

by Aqua » Post

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 » Post

good

User avatar
trukoil
Member
Posts: 145
Joined: Mon Oct 22, 2012 03:32
Location: Minetest

by trukoil » Post

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
Location: Sydney~Singapore
Contact:

by Aqua » Post

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 ^.~

User avatar
trukoil
Member
Posts: 145
Joined: Mon Oct 22, 2012 03:32
Location: Minetest

by trukoil » Post

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
Location: Sydney~Singapore
Contact:

by Aqua » Post

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
Location: 0gb.us:30000
Contact:

by 0gb.us » Post

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

by Sokomine » Post

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
Location: Sydney~Singapore
Contact:

by Aqua » Post

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

by Sokomine » Post

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.

User avatar
sky
Member
Posts: 152
Joined: Tue Oct 16, 2012 11:59
Location: SKY

by sky » Post

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
Location: Sydney~Singapore
Contact:

by Aqua » Post

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 ^.~

User avatar
sky
Member
Posts: 152
Joined: Tue Oct 16, 2012 11:59
Location: SKY

by sky » Post

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

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

by tux_peng » Post

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
Location: Sydney~Singapore
Contact:

by Aqua » Post

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 ^.~

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

by tux_peng » Post

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 ... 913#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
Location: Sydney~Singapore
Contact:

by Aqua » Post

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
Location: Sydney~Singapore
Contact:

by Aqua » Post

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
Location: Sydney~Singapore
Contact:

by Aqua » Post

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 ^.~

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

by tux_peng » Post

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
Location: Sydney~Singapore
Contact:

by Aqua » Post

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

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests