The (un)official Subzone guide

Discussion in 'Player Guides, Tips and Tricks' started by ShelLuser, Dec 17, 2017.

  1. Hi gang!

    Subzones are to town what the compass is to the wild -- ShelLuser, 17th of December 2017

    I have to admit feeling a little pressured (also my own doing) but that's perfectly fine :)

    Subzones

    As you may know Aikar and the developers released a new update recently (time of writing) which introduces sub-zones. So what are subzones? A subzone is basically a "mini-residence" inside your normal residence, and it allows for tons of customization.

    I've set up several examples on my 3rd residence: 3749.

    Some things to know about subzones:
    • They have their own entry/departure messages, just like a regular residence (see screenshot above). But this can be turned off.
    • They have their own permission flags. By default a subzone has the same permissions as the residence its in, but you can override this if you want.
    • You can teleport to them (so 'abuse' it as a named location).
    • They can even have their own named locations (but there's a little more to it than that).
    • They can be of any size you want. From a single block up to your whole residence.
    • They cannot have their own biome (with special thanks to AncientTower for suggesting this!).
    What's the use of subzones?

    Subzones can be used for many different things, and I'm sure that other players will come up with uses which I haven't thought of here. But it usually all boils down to giving (or denying) players access to some part(s) of your residence.

    For example.... You're working on your residence and turned off move so that players won't get any spoilers. Unfortunately the player who just won your auction did exactly the same thing and they insist that they pick up the items themselves; you're not allowed to visit. Subzones can help you give players access to a small part of your residence while keeping the rest locked.

    Another one: Let's say you run a shop, and you have some players to help you. To do that they need access to your (shop) chests so that they can restock items. However, you don't want to give them a container flag because that would also give them access to your storage. A good way to set this up would be to create a new residence group, add the players to that group and then place access signs above your chests which give the group access (use #groupname for that).

    This will work just fine for 'normal' chests, but what about this:

    Can't place access signs here...

    Don't get confused: even if I were to remove the item frames and place access signs then it still wouldn't work because the sign won't be directly above the chest.

    So now we have a way to fix that: by creating a subzone. In my case I created a subzone which covers the entire shop section (so the 1st and 2nd floors) and then gave my friend AyanamiKun container, build and createshop permission flags.

    As a result Aya can now easily restock her own chests, and more: if she wants to then she can also replace her shop signs (break them and place new ones), and all of that without my help. And these permissions are only active within this area ("subzone"). So once she goes back to my storage then everything is back to normal, she can't access any chests nor break any blocks any longer.

    Pretty neat, right?

    Creating your own subzone(s)

    Selecting blocks

    To create a subzone you must first select the blocks which will make up your subzone. Remember: air is considered to be a block as well ("minecraft:air"). After you made a selection you can then tell the server that you'd like to add the selected blocks as an actual subzone.

    The trick is to select 2 blocks in the opposite corners of the area which you want to use for your subzone. You can do that in several ways, either by clicking on them with a stick or by using commands. I'm going to cover both options.

    But first, to show what I mean:

    I didn't want to wait for daytime, so asked Aya to shine some light ;)

    Let's assume that I want to create a subzone here (the area with the gray blocks). As you can see the green and the red wool blocks are in the opposite corners of the area (3 x 3). So if I wanted to create a subzone there I would first select the green block, then the red block and after that I would have selected the whole square because all the blocks in between get automatically selected as well.

    So how to do this? First get yourself a stick, just a regular stick. The same thing you'd use to eggify animals. Then use the: /toggleeditwand command, you will get a confirmation.

    Now: if you left click on a block you will set the first position. In my example above I would left click on the green wool. If you right click on a block you'll set the second position. In the above example that would be the red wool. And after you selected both positions you'll have selected the whole area. In other words: you created a selection. As you can see a selection is fully virtual.

    And as I mentioned earlier; all blocks in between are automatically selected:

    Here I made a selection using the wand

    Note that it doesn't matter which block you select first or second, the only thing which is important is that you select the blocks in the opposite corners. So, in the above example I could also have easily clicked the upper left and the lower right blocks (so: the corners without any wool).

    Once you have selected both blocks you can use the //size command to check if the selection is what you expected of it:


    If you want to check then use F3 to open the debug screen, this will show you the coordinates of your current position as well as that of the block you're looking at.

    Now that you have the selection you want you can use: /res sz add <name> to add ("create") the new subzone. In my example above I used: /res sz add test1.

    Warning: Be sure to use /toggleeditwand after you're done, otherwise you may get some pretty unexpected results later :eek:

    But what if you can't click on the blocks?

    So if you check my last example you'll notice that the red and green blocks are on the same level. In specific: y64. So when I created the subzone and walked into it then this happened:

    No entry message?

    That's because I selected a flat square; going from the green wool to the red wool. Something you'll immediately notice once I remove a block and then jump in the hole:


    This is not very useful if you want to create a subzone which gives players a greeting, or if you want to use it to block players (like an invisible wall, horror mazes ftw! :D). Players need to be 'inside' a subzone before anything will happen.

    But since you can't click on air you can't use the wand to select the whole area you need. Now what?

    We have 2 options... Edit our selection or use a different way to create the selection.

    #1 Edit the selection

    First we're going to expand our selection, and for that we're going to need the //expand command: //expand <amount of blocks> <direction>. In my example I want the area to be 5 blocks higher, so I used: //expand 5 u ('u' stands for up): expand the selection 5 blocks upwards, so make it 5 blocks taller:

    3 x 3 x 5 = ? ;)

    You can expand a selection in all directions: North, east, south, west, up and down.

    #2 Create a selection with commands

    So... Although you can use the wand to create a selection it might be a whole lot easier to simply remember a few commands. In the above example I could also have used //hpos1 and //hpos2 to select both wool blocks. Basically the //hposx command selects the block you're currently looking at. This can be useful if you're trying to make selections which are further away or more difficult to click on with a stick.

    Another useful command is //pos1 and //pos2. This selects your current position. So while standing on the green wool I could use //pos1, then walk to the red wool and use //pos2. This would have selected the area above the ground.

    Now, there a dozen more ways to make area selections. You can even select circles, spheres, and more. However, I won't be covering those in this tutorial because I don't think there's any need. For regular subzone usage these commands should do just fine.

    And some extra editing techniques...

    We can do more than just expanding a selection; you can also move it around by using the //shift command: //shift <amount of blocks> <direction>. Lets say that I wanted to create a 3 x 3 area in which everyone can place and remove blocks. This could be an ideal way to allow players to place and use their shulker boxes on your residence.

    I'd select the area with a wand (as shown previously), but instead of expanding it I would shift it 1 block upwards: //shift 1 u. This would create a 3 x 3 selection right above the ground which is 1 block high. More than enough for players to place their shulker boxes (if you'd make it higher they could stack the blocks, which isn't what we wanted).

    And finally you can also shrink a selection using the //contract command: //contract <amount of blocks> <direction to shrink>. So if you accidentally made your selection too big you can use this to make it smaller. If I had a 3 x 5 x 3 area (Minecraft coordinates: XYZ) while I wanted the area to be 3 blocks high I would use: //contract 2 d. So making the area 2 blocks lower.

    It's probably best to go by trial and error here (remember the //size command which will show you exactly how big your current selection is). But to give a real example:

    Free sugarcane on 3749!

    If you check this out you'll notice that you can only destroy the middle cane block. Therefor you can harvest the cane but can't actually break it. How I did that? Simple...

    First I simply stood in one corner of the area (on the dirt) and used: //pos1, then I walked to the opposite corner (near the wall) and used //pos2. This selected the area right above the ground, so the bottom cane section so to speak.

    As such I followed up with: //shift 1 u to move the selection 1 block upwards, this selected the middle block.

    Now all I had to do is make the actual subzone and the rest is history as they say :cool: So: /res sz add canes. Then I applied the right permission flags, but I'll explain more about that further below.

    I think that the selection part could be the trickiest to grasp for some players. But don't worry: keep in mind that you're now basically entering "Senior Staff territory" and there's a reason why not everyone is senior ;) Just try, and be sure to use //size to check what you selected.

    Finally: //deselect. If you want to start all over then this command will clear your current selection. Sometimes very useful to have around.

    End of part I
  2. Creating / removing subzones

    After you made a selection (see above) you can then create the subzone using: /res sz add <name>, where 'name' is the name of your subzone.

    Removing an existing subzone is also easy: /res sz remove <name>, where 'name' is once again the name of your subzone.

    And finally to get an overview of your currently defined subzones: /res sz list.

    Using an actual subzone

    So now that we have a subzone, what can we actually do with it? Well, a lot.

    Edit entry/depart messages

    The entry and depart messages are the first things you'll probably notice (if you created a zone you can walk into). Sometimes this may be useful, but what if you can't edit these (because you're not a supporter)? Or what if you are a supporter but simply have no need for this at all?

    Simple: just remove 'm!

    There's a welcome message, but nothing is shown when I left the (green) subzone

    /res message remove [residence] <enter|leave|both>

    So just stand in your subzone and then use the above command. To get the example in the screenshot you'd only remove the leave message: /res message remove leave. If you can't stand in your subzone (for example in my canes subzone which is above the ground) then you can use ! to 'target' it. So if I wanted to remove the messages in my 'canes' subzone I'd use: /res message remove !shelluser-3.canes both. Of course using the number also works: /res message remove !3749.canes both.

    Overriding permissions

    Also known as: locking up your friends :D


    If you have a residence which has move turned off then you can still create an area where players are allowed to enter. For example as an auction pick up. It's really very simple: just override the required flag(s) which are active on your residence.

    In the example above I used /res set move f, while on my residence. Aya didn't have any flags so she couldn't enter anymore. So then I went into my subzone and while standing inside I used: /res set move t. By doing so I overruled the deny flag which was set on the residence itself.

    But there's still a problem:


    By default you cannot teleport to subzones, instead you'll be placed closely next to them. Easily solved though by using: /res tpset. That's right: subzones can have their own entry point, and it works just like using /res tpset on your main residence: it defines the point where you enter.

    So now I asked Aya to use: /v shelluser-3.test2 and the result can be seen above. Pretty cool right?

    Note that I have inverted the example in the mean time. So if you visit my 3rd residence you'll notice that you cannot enter this subzone anymore instead of not being able to enter the entire residence ;)

    Setting up teleportation

    As shown above you can use /res tpset in a subzone and then you can teleport to it using: /v <res>.<subzone>. For example: /v shelluser.shop (on SMP2).

    But you can also combine this with overriding permissions. This is going to get a little more complex, but bear with me....

    The left sign gives you an error, the right sign will work

    So: first I created a subzone called test5; after making the selection I used: /res sz add test5. Then I created a named location inside the subzone which I also called test5: /res loc add test5. And to make it even more complicated I then turned off the namedtp flag for my main residence: /res set namedtp f (while outside my subzone), and turned it on for the subzone itself: /res set namedtp on (while standing inside my subzone).

    As a result /v shelluser-3@test5 gives you an error because you don't have the required namedtpflag. But teleporting to the subzone does work: /v shelluser-3.test5@test5. What makes this so cool is that the named location is exactly the same: test5. The only difference is the area which you're teleporting to.

    Teleporting to the main residence fails because of the denied namedtp flag. But teleporting to the subzone works just fine because it has an explicitly allowed namedtp flag. Even though both point to the same location.

    And another example

    With thanks to AyanamiKun for this screenshot

    Residence 3749 has a 4 in a row game on it. And this was always a bit of an issue because to allow players to actually place items to play they needed... the place flag (Mr. Obvious has spoketh! :rolleyes:). However: I could only set global flags (for the whole residence). And a place flag means that you can place blocks, but not remove them. Real fun if you accidentally placed something on the ground outside the gaming area :confused: (fortunately this only happened once as far as I know, and that was when Tuqueque, Matheus and me were discussing subzones).

    But no more! :cool:

    In the current situation I created a subzone inside the playing area. I set a global place allow flag but also a global move deny flag. As a result players can now easily place gaming pieces (as demonstrated by Aya above) but you can't walk in, nor can you place these items anywhere else on the residence.

    See for yourself!

    If you visit my 3rd residence then you can find all the examples I used in this tutorial and check 'm out for yourself. Including the teleport signs. You can even kill the time by playing a game of four in a row :p

    And there you have it...

    I hope this is useful for some of you, but if you still have any questions be sure to ask! I'm actually a little nervous about this tutorial, also because it's a bit more technical than usual.
  3. Nice guide :)
  4. I played the last game when it was in beta, and it is a great invention(for MC)

    Also, nice guide
  5. Should be noted, that removing residence messages for subzones is currently limited to Gold+ supporters. I 'think' we are going to make a change to allow anyone to remove subzone enter/leave messages.
    ShelLuser likes this.
  6. To be honest this guide was a bit meh at first in my opinion because I even forgot to add how you'd actually create/remove/list subzones :confused:

    But that's fixed now! :)

    I think that's a lot more fair. I can definitely understand that editing messages is a support only thing but considering the fact that resetting to default or changing it to number only is also accessible to 'quartz supporters' then it simply makes sense that they can also hide subzones.

    Thanks for your comment!