[Mod] BlockProtectNodes [2020-03-30][blockprotectnodes]

User avatar
AlexYst
Member
Posts: 109
Joined: Fri Mar 20, 2015 01:24
GitHub: y-st
IRC: AlexYst
In-game: AlexYst
Contact:

Re: [Mod] BlockProtectNodes [2018-02-11][blockprotectnodes]

by AlexYst » Post

texmex wrote:I’m sorry. That’s Minecraft. But for MT I’m thinking that the particle drawing method used in the breadcrumbs mod would suffice. The lines don’t have to be permanent either, a few seconds would suffice. Particles can now glow through the dark too.
Particles won't work for players with particles disabled. I, for one, find digging particles to be *incredibly* annoying, so I disabled them in my client. Particles for something like this wouldn't be annoying at all, but as far as I know, there's no way to selectively disable particles, and even if there was, some other player might disable all particles. Something visible to any player regardless of their settings would be better.
Pyrollo wrote:Nice aproach !

It could be good to have also an area mod like /protect command to claim vast amount of map blocks at once (giving the two corners map blocks).

This would be great for admins and probably need a privilege to be able to use.
Anything protected via such a method wouldn't be detected when a player digs, as there is no external protected block database. Instead, the mod checks for a local block-protection node, so there needs to be an actual block-protection none in the area for it to be protected. Unless ... the "/protect" command places the nodes for the admin using it, but it won't be able to automatically detect which locations for the nodes (out of 4096 possibilities per block) would be the most desirable.

Also, all blocks to be claimed would need to be loaded at the time the command was run. Any block not loaded at the time wouldn't receive a claim node, so it would remain unclaimed. With such a command being unreliable in this way, an admin might think they'd protected a spot when they really hadn't. That seems ... unsafe.
zing269 wrote:You can get a similar line effect by using an entity as a texture. I used a stripped down version from TenPlus1's protector redo in my mod to force load mapblocks, viewtopic.php?f=9&t=19840. I do get some visual glitches, like the boundaries disappearing from certain angles.
That'd work great, but last I knew, Minetest won't draw the texture on the inside unless you used a mesh-based entity, and I have no idea how to construct a mesh. Know of any good tutorials?

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: [Mod] BlockProtectNodes [2018-02-11][blockprotectnodes]

by texmex » Post

AlexYst wrote:Particles won't work for players with particles disabled. I, for one, find digging particles to be *incredibly* annoying, so I disabled them in my client. Particles for something like this wouldn't be annoying at all, but as far as I know, there's no way to selectively disable particles, and even if there was, some other player might disable all particles. Something visible to any player regardless of their settings would be better.
I understand this position. I feel like particles are a definite part of the core experience but for a truly universal solution using an entity should work:
zing269 wrote:You can get a similar line effect by using an entity as a texture. I used a stripped down version from TenPlus1's protector redo in my mod to force load mapblocks, viewtopic.php?f=9&t=19840. I do get some visual glitches, like the boundaries disappearing from certain angles.

User avatar
AlexYst
Member
Posts: 109
Joined: Fri Mar 20, 2015 01:24
GitHub: y-st
IRC: AlexYst
In-game: AlexYst
Contact:

Re: [Mod] BlockProtectNodes [2018-02-11][blockprotectnodes]

by AlexYst » Post

texmex wrote:
AlexYst wrote:Particles won't work for players with particles disabled. I, for one, find digging particles to be *incredibly* annoying, so I disabled them in my client. Particles for something like this wouldn't be annoying at all, but as far as I know, there's no way to selectively disable particles, and even if there was, some other player might disable all particles. Something visible to any player regardless of their settings would be better.
I understand this position. I feel like particles are a definite part of the core experience but for a truly universal solution using an entity should work:
zing269 wrote:You can get a similar line effect by using an entity as a texture. I used a stripped down version from TenPlus1's protector redo in my mod to force load mapblocks, viewtopic.php?f=9&t=19840. I do get some visual glitches, like the boundaries disappearing from certain angles.
I'd disagree that particles are a part of the core experience. For the longest time, we didn't have them at all. They're a fairly recent addition (past few years). Besides, I'd hardly call visual junk in the display that doesn't actually impact the game a part of the core experience, whether it adds a positive treat for users or not. That is to say, particle spawners could be used to build core features of a mod by having them indicate something like you proposed (so the particles actually convey information), but digging particles are in no way core to the experience and there needs to be a way to make this mods work without requiring users to enable digging particles. That said, I've seen several mods that just use particles as eye candy. There's nothing wrong with that, but with no way for clients to know which particles actually matter and not and only display the important ones, a few of us are going to need to keep them disabled for the game to even be a pleasant experience for us.

Zing269 did mention Simple Anchor before, and I really like their solution, but as I said, I don't understand the mesh format, which is required to make that solution work. Without some sort of guide or tutorial, I can't replicate that effect without directly copying the code. I'm not against code reuse of course, provided I actually understand the code I'm using. A copy-and-paste-without-explanation solution isn't going to work.

zing269
Member
Posts: 109
Joined: Sat Apr 30, 2016 19:10

Re: [Mod] BlockProtectNodes [2018-02-11][blockprotectnodes]

by zing269 » Post

Rather than a mesh, Simple Anchor uses a nodebox. It is creating a cube from six thin boxes, think pizza box, arranged around the central point.

User avatar
AlexYst
Member
Posts: 109
Joined: Fri Mar 20, 2015 01:24
GitHub: y-st
IRC: AlexYst
In-game: AlexYst
Contact:

Re: [Mod] BlockProtectNodes [2018-02-11][blockprotectnodes]

by AlexYst » Post

zing269 wrote:Rather than a mesh, Simple Anchor uses a nodebox. It is creating a cube from six thin boxes, think pizza box, arranged around the central point.
A nodebox? I didn't even know entities supported those. They didn't used to. I've been out of the Minetest modding business for far too long. (I'm from around the 0.4.3 era, so .... yeah.)

EDIT: Oh, wow. I just took a look at your code, and you had to get really creative to make that work. The engine supports it, but the API doesn't directly ... I would never have been able to come up with that setup. Great job on that!

zing269
Member
Posts: 109
Joined: Sat Apr 30, 2016 19:10

Re: [Mod] BlockProtectNodes [2018-02-11][blockprotectnodes]

by zing269 » Post

I must admit that I didn't come up with it, I lifted the code from TenPlus1's protection redo mod and hacked away the bits that didn't seem relevant to my use. It is definitely an ingenious solution, I would have never thought that was possible.

User avatar
AlexYst
Member
Posts: 109
Joined: Fri Mar 20, 2015 01:24
GitHub: y-st
IRC: AlexYst
In-game: AlexYst
Contact:

Re: [Mod] BlockProtectNodes [2018-06-17][blockprotectnodes]

by AlexYst » Post

Okay, I've finally added the boundary-showing command, "/showblock". It's useful to know where the block boundaries are both before and after an area is protected, so it functions even when a block isn't protected. There's a bug in the client though, so the entity responsible for marking the boundaries becomes invisible if viewed at certain angles. I have no way to work around this client bug, so it's a bit of an annoyance in-game.

Also, I finally added fire protection. While I *completely* agree with Sokomine that this functionality should be part of the fire mod and not an individual protection mod, the simple fact is that the fire mod doesn't provide this. There *needs* to be a way to protect against fire; otherwise, people will need to build using only stone-based materials. The lack of variety would make buildings ugly, meaning that the vandals would win. I'd try pull requesting to fix this, but my vital protection-related pull requests have a tendency to get blown off as "unnecessary", then later implemented by someone else and accepted. For example, I was one of the first people to try to make TNT respect protected areas, and though this feature was rejected, you can clearly see it's been implemented by someone else now.

I've also added falling "node" entity protection while I was at it. Falling nodes are particularly damaging when they're used to break non-walkable nodes within a protected area, such as ladders. They can also be an issue when used to fill in areas that were meant to be open; a vandal can block an area, but only the owner of the area can fix it, as other players can't dig away the fallen nodes, even though they weren't intended by the owner to be there. This new functionality protects against both cases.

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: [Mod] BlockProtectNodes [2018-06-17][blockprotectnodes]

by texmex » Post

Thank you for your efforts with this mod. I’m thinking of opening a small server and use this for protection. I was wondering, do you plan on implementing team features into this mod or is this more of a core mod for other mods to add such features onto?

User avatar
AlexYst
Member
Posts: 109
Joined: Fri Mar 20, 2015 01:24
GitHub: y-st
IRC: AlexYst
In-game: AlexYst
Contact:

Re: [Mod] BlockProtectNodes [2018-06-17][blockprotectnodes]

by AlexYst » Post

texmex wrote:Thank you for your efforts with this mod. I’m thinking of opening a small server and use this for protection. I was wondering, do you plan on implementing team features into this mod or is this more of a core mod for other mods to add such features onto?
For months, I've been trying to figure out the best way to add some sort of area-sharing. The team feature you mention is one option, though it lacks flexibility. If you're on a team, you couldn't have areas reserved for your private, non-team use. Trusting your teammates with a team project shouldn't require trusting your team with your main and personal base of operations, for example. Being paranoid, I could never actually join a team for fear they might mess with my base. It's not even malice I'd worry about, but people messing up my place thinking that they're doing me a favour. I've had that happen several times in the past. Not all builds are meant to be community projects, and adding balconies where they're not wanted isn't appreciated. Of course, you can't remove their additions either, or you'll make them feel bad ...

Another option I've considered is using keys. Keys are used to share protected nodes, so some similar code might make keys work to unlock protected areas like they do locked chests and doors. Until today, I didn't have any good ideas on how to make that work; there was always a difficulty of use issue. I think though that maybe using a key on the protection node could write your player ID into that node, permanently granting you access to that protected area until such a time that the owner removes your name. Maybe a "change the lock" feature could be added to allow the removal of a name without allowing the player to have kept a copy of the key and without removing the node altogether and removing all names from the list, just to replace the node without the access list. I still need to give this plan more thought though. Additionally, you'd need a key for each block (not to be confused with each node) in the area, which can be a pain. Maybe multiple protection nodes can be synced to the same key? I don't know.

I've also considered something similar to teams, but on a more individual level. You could grant a certain player access to all your areas. This has the same problem as with teams though. The one benefit is that while you might not trust a certain individual on your team (you might not be the leader and someone else recruited that member), the per-player sharing could allow you to pick and choose your personal allies in a more fine-tuned way.

A fourth option for sharing protected areas I'd come up with involves a mod I've tried multiple times to complete and release, but I've finally given up on that mod for good. The mod's premise just contradicts itself too much to be feasible. I only bring it up to show I've been considering several ideas.

Anyway, I'd definitely want to add a sharing feature of some sort, and would be happy to hear any recommendations you have.

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: [Mod] BlockProtectNodes [2018-06-17][blockprotectnodes]

by texmex » Post

Thank you for expanding on your thoughts on area-sharing. It's good to hear of a modder who is this concerned with design choices. I haven't thought about it extensively but the key solution does sound interesting.

However what I really wanted to share was this little addition of mine to the node definition. It shows the protected area by right-clicking with the node when pointing at nothing:

Code: Select all

	on_secondary_use = function(item, player, pointed_thing)
		local pos = player:get_pos()
		local block = __blockprotectnodes__:get_node_block(pos)
		local range = __blockprotectnodes__:get_block_node_range(block)
		local pos = {
			x = (range.minp.x + range.maxp.x) / 2,
			y = (range.minp.y + range.maxp.y) / 2,
			z = (range.minp.z + range.maxp.z) / 2,
		}
		minetest.add_entity(pos, "blockprotectnodes:block")
	end,
As I dislike chat commands in general (I prefer in-game solutions) I find this useful. :) Is it possible to execute a chat command in code? Anyway, the visualization part should be its own function in order to not have code duplication, I guess.

User avatar
AlexYst
Member
Posts: 109
Joined: Fri Mar 20, 2015 01:24
GitHub: y-st
IRC: AlexYst
In-game: AlexYst
Contact:

Re: [Mod] BlockProtectNodes [2018-06-17][blockprotectnodes]

by AlexYst » Post

Yeah, it's definitely possible to execute a chat command's function from elsewhere in the code; you just need to call the appropriate table value as a function. (For example, for the "/me" command, you'd call minetest.registered_chatcommands.me(name, text), passing in the "command-user"'s name and command argument.)

The block-showing feature could be tied to interacting with the node like you suggest (I'd recommend punching the node instead of right clicking it, so the right click can be used for the future sharing menu once I have that figured out; the menu would be needed for, at the very least, allowing re-keying of the protection node without digging up the node and replacing it causing a momentary lack of security), but then what do you do about unprotected areas? How do you get a visual indicator of what area *would* be protected if a node was placed at your location? Or are you recommending redundant methods of accessing the block-showing feature?

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: [Mod] BlockProtectNodes [2018-06-17][blockprotectnodes]

by texmex » Post

Or are you recommending redundant methods of accessing the block-showing feature?
Yes, I’d recommend both showing
- where the protected area would be, when punching nothing while wielding the protection node displaying a green area grid and
- where the protected area is, when punching a placed protection node displaying a red area grid.

In the case a ”wieldpunch” occurs in an already protected area the area grid is also red, indicating the prior claim.

User avatar
Stix
Member
Posts: 1385
Joined: Fri Aug 04, 2017 14:19
IRC: nil
In-game: Stix [+alts]
Location: USA

Re: [Mod] BlockProtectNodes [2018-06-17][blockprotectnodes]

by Stix » Post

Something like this may suit your needs, where there is a main area and then a sub-area for members: viewtopic.php?f=9&t=20199
Hey, what can i say? I'm the bad guy.

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: [Mod] BlockProtectNodes [2018-06-17][blockprotectnodes]

by texmex » Post

Stix wrote:Something like this may suit your needs, where there is a main area and then a sub-area for members: viewtopic.php?f=9&t=20199
Suit who’s needs? Are you saying Manipulus compatible with BlockProtectNodes?

User avatar
Stix
Member
Posts: 1385
Joined: Fri Aug 04, 2017 14:19
IRC: nil
In-game: Stix [+alts]
Location: USA

Re: [Mod] BlockProtectNodes [2018-06-17][blockprotectnodes]

by Stix » Post

texmex wrote:
Stix wrote:Something like this may suit your needs, where there is a main area and then a sub-area for members: viewtopic.php?f=9&t=20199
Suit who’s needs? Are you saying Manipulus compatible with BlockProtectNodes?
Sorry, i was referring to Alexyst as in one of his posts he mentioned how members shouldn't have to be added to the whole area, but rather a portion of it.
Hey, what can i say? I'm the bad guy.

User avatar
AlexYst
Member
Posts: 109
Joined: Fri Mar 20, 2015 01:24
GitHub: y-st
IRC: AlexYst
In-game: AlexYst
Contact:

Re: [Mod] BlockProtectNodes [2018-06-17][blockprotectnodes]

by AlexYst » Post

texmex wrote:
Or are you recommending redundant methods of accessing the block-showing feature?
Yes, I’d recommend both showing
- where the protected area would be, when punching nothing while wielding the protection node displaying a green area grid and
- where the protected area is, when punching a placed protection node displaying a red area grid.

In the case a ”wieldpunch” occurs in an already protected area the area grid is also red, indicating the prior claim.
That's a creative design choice. I like it! I'll get to work coding it when I get a chance, hopefully along with a sharing mechanism. The sharing mechanism might take more thought though, so it might not end up in the same update as the punching like I'd like it to. I'd really like to involve keys in some way though, as currently, keys are the *only* thing of any sort in Minetest Game related to sharing belongings. It'd be nice to continue that theme; I feel it'd make the mod fit in better with the rest of the game. In actuality, this is why steel is in the recipe. All ownable nodes, save for bones, contain steel as some sort of locking mechanism. Steel is the mineral of ownership, while gold is the mineral of sharing.
Stix wrote:
texmex wrote:
Stix wrote:Something like this may suit your needs, where there is a main area and then a sub-area for members: viewtopic.php?f=9&t=20199
Suit who’s needs? Are you saying Manipulus compatible with BlockProtectNodes?
Sorry, i was referring to Alexyst as in one of his posts he mentioned how members shouldn't have to be added to the whole area, but rather a portion of it.
It's not that members should not need to be added to the whole area, but that they shouldn't be added to all areas controlled by all members of the group. For example, if I have a shared build together with my team, I shouldn't need to allow my team to muck up my personal house or something.

That manipulus mod does look like a better idea for servers wanting to use player teams than my mod though. My mod is intended for a more individualised play, rather than a group-oriented one. Don't get me wrong, I think sharing is a good idea. If you're not playing together, why play on a server at all instead of your own private world? Still, bonds between individual players, and also teamwork on specific projects, would be more the direction I'd prefer to code in.

EDIT: I'm sorry for the delay, but the sharing via key and the showing of block boundaries via in-game stimuli have now been implemented. It's worth noting though that the displaying of protected block using a red entity instead of the normal cyan entity wasn't implemented. I tried using a coloured node definition, but that doesn't work with entities. I'd have to define a second bogus node, and one bogus node is already too many. All boundaries are therefore displayed in the same colour.

User avatar
Stix
Member
Posts: 1385
Joined: Fri Aug 04, 2017 14:19
IRC: nil
In-game: Stix [+alts]
Location: USA

Re: [Mod] BlockProtectNodes [2018-07-12][blockprotectnodes]

by Stix » Post

A while ago i came up with an idea for a protection mod. I think you might find some of the ideas useful, so i'll post it here:
Area_Claim:

The world is divided into claimable chunks, the dimensions of which are 18x18x18. When a chunk is claimed at sea-level or higher only that person and players they've specified can stake claims (to an infinite range) above that area. The chunk you currently occupy will be shown on the bottom-left of the HUD.

On this HUD element protected chunks will be shown by their title and unclaimed areas will be represented by computer-generated id's. This way you can easily find the borders of any given chunk, protected or otherwise.

Areas can be claimed by punching the ground with a claim-stick, which is craftable. Areas you own can be unclaimed by shift-clicking its ground with a claim-stick, and right-clicking brings up a menu with configuration options. To more visibly show the borders of a claimed chunk punch its ground with a claim-stick (note that this only works temporarily).
Hey, what can i say? I'm the bad guy.

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] BlockProtectNodes [2018-07-12][blockprotectnodes]

by Sokomine » Post

Stix wrote: A while ago i came up with an idea for a protection mod. I think you might find some of the ideas useful, so i'll post it here:
Sounds a lot like landrush to me. Except that that has 16x16x16 blocks in size.
A list of my mods can be found here.

User avatar
Stix
Member
Posts: 1385
Joined: Fri Aug 04, 2017 14:19
IRC: nil
In-game: Stix [+alts]
Location: USA

Re: [Mod] BlockProtectNodes [2018-07-12][blockprotectnodes]

by Stix » Post

Sokomine wrote:
Stix wrote: A while ago i came up with an idea for a protection mod. I think you might find some of the ideas useful, so i'll post it here:
Sounds a lot like landrush to me. Except that that has 16x16x16 blocks in size.
Oh, bummer :(
Hey, what can i say? I'm the bad guy.

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

Re: [Mod] BlockProtectNodes [2018-07-12][blockprotectnodes]

by Krock » Post

Sokomine wrote: A while ago i came up with an idea for a protection mod. I think you might find some of the ideas useful, so i'll post it here:
Claim stick? Are you sure that you got this idea not from this mod here?
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
Stix
Member
Posts: 1385
Joined: Fri Aug 04, 2017 14:19
IRC: nil
In-game: Stix [+alts]
Location: USA

Re: [Mod] BlockProtectNodes [2018-07-12][blockprotectnodes]

by Stix » Post

Krock wrote:
Sokomine wrote: A while ago i came up with an idea for a protection mod. I think you might find some of the ideas useful, so i'll post it here:
Claim stick? Are you sure that you got this idea not from this mod here?
Yeah, i got the ideas for the claim-stick/chunks from there, but with some added twists for my own personal preferences.

Some notable differences are:

1. Only VIP members can claim above your area if claimed at sea-level or higher (no more sky-islands over-shadowing your house/garden!).
2. Unprotected areas are still view'able on the HUD via computer-generated id's.
3. An protected areas' dimensions can be viewed via command and a left-click with a claim-stick = user friendly.
4. Same as above; unclaiming areas and bringing up a config formspec is more user friendly.
5. ???
6. Profit.

I also had an idea for bulk-adding players access to your areas.

Big enough difference @Krock? :P.
Hey, what can i say? I'm the bad guy.

User avatar
AlexYst
Member
Posts: 109
Joined: Fri Mar 20, 2015 01:24
GitHub: y-st
IRC: AlexYst
In-game: AlexYst
Contact:

Re: [Mod] BlockProtectNodes [2018-07-12][blockprotectnodes]

by AlexYst » Post

Stix wrote:A while ago i came up with an idea for a protection mod. I think you might find some of the ideas useful, so i'll post it here:
Area_Claim:

The world is divided into claimable chunks, the dimensions of which are 18x18x18. When a chunk is claimed at sea-level or higher only that person and players they've specified can stake claims (to an infinite range) above that area. The chunk you currently occupy will be shown on the bottom-left of the HUD.

On this HUD element protected chunks will be shown by their title and unclaimed areas will be represented by computer-generated id's. This way you can easily find the borders of any given chunk, protected or otherwise.

Areas can be claimed by punching the ground with a claim-stick, which is craftable. Areas you own can be unclaimed by shift-clicking its ground with a claim-stick, and right-clicking brings up a menu with configuration options. To more visibly show the borders of a claimed chunk punch its ground with a claim-stick (note that this only works temporarily).
I'd love to have that HUD-based map, but I don't think the API allows for that. We'd need the map to scroll with the player as they walk. If we ignored that and used a jerking, timed update instead, we'd still need the ability to draw images, which we lack. I actually ran into that problem when trying to build a map in the inventory menu. I ended up with a dot matrix structure composed of coloured full stop characters, but it's really laggy and slow.

I guess clicking with the claim stick could be used to place protection nodes instead of having players place them directly. From there, the shift-clicking anywhere in the block could remove the claim node. Is there an advantage to this method though? Should I make it a configurable option?

Increasing the claim size to 18^3 wouldn't work for technical reasons. In a Landrush-type system, it'd work perfectly, because the protected areas are stored in an ever-loaded, tabular database. This mod uses physical claim nodes though, so we have to worry about protected areas being loaded while their respective claim nodes are in unloaded blocks. Because blocks are sixteen nodes in width, height, and depth, the claims necessarily must have dimensions that sixteen is evenly divisible by: 1, 2, 4, 8, or 16 metres.

Blocking claims above another claim to an infinite height presents the same problem: the claim node below may reside in an unloaded block, so we can't know if an area too far below has been claimed or not. Again, it'd be possible in a Landrush-type system, but not the system used by this mod.

User avatar
Stix
Member
Posts: 1385
Joined: Fri Aug 04, 2017 14:19
IRC: nil
In-game: Stix [+alts]
Location: USA

Re: [Mod] BlockProtectNodes [2018-07-12][blockprotectnodes]

by Stix » Post

AlexYst wrote:
Stix wrote:A while ago i came up with an idea for a protection mod. I think you might find some of the ideas useful, so i'll post it here:
Area_Claim:

The world is divided into claimable chunks, the dimensions of which are 18x18x18. When a chunk is claimed at sea-level or higher only that person and players they've specified can stake claims (to an infinite range) above that area. The chunk you currently occupy will be shown on the bottom-left of the HUD.

On this HUD element protected chunks will be shown by their title and unclaimed areas will be represented by computer-generated id's. This way you can easily find the borders of any given chunk, protected or otherwise.

Areas can be claimed by punching the ground with a claim-stick, which is craftable. Areas you own can be unclaimed by shift-clicking its ground with a claim-stick, and right-clicking brings up a menu with configuration options. To more visibly show the borders of a claimed chunk punch its ground with a claim-stick (note that this only works temporarily).
I'd love to have that HUD-based map, but I don't think the API allows for that. We'd need the map to scroll with the player as they walk. If we ignored that and used a jerking, timed update instead, we'd still need the ability to draw images, which we lack. I actually ran into that problem when trying to build a map in the inventory menu. I ended up with a dot matrix structure composed of coloured full stop characters, but it's really laggy and slow.

I guess clicking with the claim stick could be used to place protection nodes instead of having players place them directly. From there, the shift-clicking anywhere in the block could remove the claim node. Is there an advantage to this method though? Should I make it a configurable option?

Increasing the claim size to 18^3 wouldn't work for technical reasons. In a Landrush-type system, it'd work perfectly, because the protected areas are stored in an ever-loaded, tabular database. This mod uses physical claim nodes though, so we have to worry about protected areas being loaded while their respective claim nodes are in unloaded blocks. Because blocks are sixteen nodes in width, height, and depth, the claims necessarily must have dimensions that sixteen is evenly divisible by: 1, 2, 4, 8, or 16 metres.

Blocking claims above another claim to an infinite height presents the same problem: the claim node below may reside in an unloaded block, so we can't know if an area too far below has been claimed or not. Again, it'd be possible in a Landrush-type system, but not the system used by this mod.
No, the HUD would work like the current one in the Areas mod, but with added computer-generated id's.

Also if i understand you then it already uses a landrush type protctection: no matter where you stake your claim within a cube area it protects that area only.

*EDIT: wait i thought this mod already used a landrush-type system.
Hey, what can i say? I'm the bad guy.

User avatar
AlexYst
Member
Posts: 109
Joined: Fri Mar 20, 2015 01:24
GitHub: y-st
IRC: AlexYst
In-game: AlexYst
Contact:

Re: [Mod] BlockProtectNodes [2018-07-12][blockprotectnodes]

by AlexYst » Post

Stix wrote:No, the HUD would work like the current one in the Areas mod, but with added computer-generated id's.

Also if i understand you then it already uses a landrush type protctection: no matter where you stake your claim within a cube area it protects that area only.

*EDIT: wait i thought this mod already used a landrush-type system.
Okay, I misunderstood about the map. No map then. What good are the labels in the HUD if you can't see where one block ends and another begins? Due to lag and the fact that the server has to tell the client when to update the label and to what, you don't really see borders like you'd said. You might be eight nodes in before the label updates. As for showing computer-generated IDs, what's the point of that? The mod has an ID-like system, so it'd be as easy as converting that system's IDs into string form for display. A string format's already been decided because the IDs are displayed on the nodes themselves, so that's done too. But I have to ask, what value does it add to display the IDs in the HUD?

This mod is similar to Landrush in that you can put the claim noes in any spot in the area and it'll protect the area. Areas are predefined. However, it's very different from Landrush in how the claim data is stored. Last I knew, Landrush was storing this data in a separate file that is loaded into memory at startup time, into a table. This table can be consulted no matter what parts of the map are loaded, so you can check to see if any place anywhere is protected. This mod stores the protection data in the map itself though, in the form of data in the protection nodes. That means if the block with the node isn't loaded, the protection data isn't loaded and that area isn't protected. As long as the protection areas are identical to the loadable areas (known as map blocks, these areas are 16^3 in size), this doesn't matter. You can't build or dig in unloaded areas, so unloaded areas don't need their protection data available.

However, if the protected areas are increased to 18^3 in size, they're no longer aligned with the map blocks. A protected area might have 16^3 of it's space in one block, 16^2*2 space in each of three other blocks, 2^2*16 space in each of three more blocks, and 2^3 space in an eighth block. Now imagine that someone put a claim node in the protected area in the block that overlaps by only 2^3 (8) nodes. Someone else comes along and tries to build, but the 2^3 area isn't loaded. The game would allow them to build and dig in the rest of the "protected" area. In cases such as this, the "protection" wouldn't actually protect against anything!

This mod is like Landrush in that it uses a grid, but it's not like Landrush in how it's constructed. This mod was entirely built from scratch, not forked from that mod.

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

Re: [Mod] BlockProtectNodes [2018-07-12][blockprotectnodes]

by amadin » Post

Is that mod the same viewtopic.php?f=11&t=9035 ? Still no one protection mod which protect default minetest chest and doors.

Post Reply

Who is online

Users browsing this forum: No registered users and 20 guests