Skip to content

Advanced regions setup

Thijs Wiefferink edited this page Feb 12, 2017 · 6 revisions

This guide is written to make sure that you can setup the regions you want to use with AreaShop is quickly and efficiently as possible. Below is an overview of what the steps are that we take to get it all ready.

  1. Making a plan.
  2. Create WorldGuard regions, add to AreaShop.
  3. Add signs to the regions.
  4. Edit region settings per group.
  5. Next steps.

Do you not understand a part of the guide? Please send me a message or create a ticket and I'll help you and also fix the guide :).

Making a plan

The most important part is making a plan, because that will make everything easier for the next steps, and will give you the setup that you want, instead of having to redo everything while figuring something out at the end.

In order to be able to make a plan you first need to know the basics of AreaShop, the following things are smart to do:

  • Get a working setup of AreaShop (/as should show a list of commands instead of an error), dependencies you need to have.
  • Read the features list: Get an idea about the basic possibilities of AreaShop.
  • Know how the configuration system works: Understand how the group system works (we will be using it in this guide) and get an idea of all the settings AreaShop offers (no need to get into detail just get a first glance).

Pick a group of regions you would like to create, that have the same properties. For example, you want to have cells in you prison that players can rent or you want to have shops that players can buy in survival. For now, just pick 1 type, after you finished the guide you can do the other type(s). This would be for example be one hallway of prison.

Create WorldGuard regions, add to AreaShop

Now the time is there to create the WorldGuard regions and add them to AreaShop. The command to use is /as stack, this command is capable of creating a bunch of regions that are in a straight line, adding them to AreaShop as buy/rent, and optionally adding a group to them. The command has the same principle as //stack from WorldEdit, make a thing once and then repeat.

Now give the group of regions that you want to add a name (for example 'hall-a' or 'survival-shops') and use this name for the [group] parameter of the /as stack command. Use this command to create and add all regions of the type that you are creating. As example I take this shopping place from my server:

Shopping center

Here we have 4 rows of regions, one on the bottom floor on the left side, one on the right side, and two more on the top floor. So this means that we can get the job done by using /as stack just 4 times. What would be done here is selecting the inside of the first region with WorldEdit (selection made visible by WorldEditCUI):

Shop selection

Then look into the direction where the rest of the shops should be, and use the command /as stack 7 1 shop- buy survival-shops. Breakdown of this action:

  • The selection marks the first WorldGuard region that should be created.
  • 7 regions will be created, with 1 block in between them, meaning the first one will be at the selection, and 6 more will be created in the direction you are looking at.
  • shop- is given as name, this will make region names like shop-001, shop-002 until shop-007 (don't want the leading zero's? Change the stackRegionNumberLength setting in config.yml and then use /as reload before executing /as stack).
  • buy is given as region type, this will create buy regions (owned permanently after purchase by the player).
  • survival-shops is given as the group name, this is to give all the regions this group to be able to change region settings for all of them easily later.

Now use the /as stack command to create all the regions of the type that you are doing. To check your actions apart from the confirmation messages, you can use /as info all to list all the regions, and /as groupinfo <groupname> to list all regions in a particular group.

Add signs to the regions

It is likely that you want to have a sign displaying the status of the region, although it is not necessary (players could use /as find in combination with /as buy to find and buy regions). If you want signs then follow the steps below:

  1. Get a sign at the place in each region where you want it, I recommend using //stack from WorldEdit for this.
  2. Use the /as linksigns command to get into sign linking mode.
  3. Left click to select a sign (max 100 blocks away in the direction of your cursor, it does not have to be in build range)
  4. Right click to select a region (the line of your cross hair should intersect the region within 100 blocks).
  5. If you have selected a sign an region then they will be linked directly, the sign should now display information about the region (don't worry about the layout of the sign just yet, this can easily be edited later).
  6. Go back to step 3., after selecting a sign and region you can immediately select another pair of them, continue until all of them are linked.

Edit regions settings per group

Now all the regions are added, and optionally signs have been linked, but you still need to set all the properties of the regions. Use the following steps to setup your region settings:

  1. Use /as reload to make sure that all changes that have been made ingame are saved to disk (and make sure you do not edit anything ingame while working on the settings files).
  2. Open the groups.yml file and the default.yml file.
  3. In groups.yml find the group that you just created, it should list all the regions that you have added.
  4. Below a group name you can use all the settings that default.yml offers, check this page for where to add them. You only need to add settings that you actually want to change, the others will still be taken from the default.yml file. For example you probably want to change the price, so you add the price:
survival-shops:
  name: Survival-Shops
  priority: 0
  buy:
    price: 123.45
  regions:
  - shop-001
  - shop-002
  - shop-003
  - shop-004
  - shop-005
  - shop-006
  - shop-007

Now save your edited config files and use /as reload to use them in AreaShop, did you change something ingame? Then save a backup of your groups.yml file because otherwise it will be overwritten. Changes should be visible ingame immediately.

Next steps

Things that you might want to do next: