Towny - Getting started
Towny is really the biggest piece of the puzzle for my server and the after school program. It lets us create self run communities, protect property, give group project area's, and generally keep everyone together. While Towny is fairly easy to get going with, I do a lot of customization both in the config files and in the permissions to accomplish a few key game play structures.
The first big goal of my customization was to force kids to build in their towns and plots. So I needed to make the wilderness destructable, but not buildable. This creates some issues though, and so I have an extensive list of items/blocks that I do allow to be placed in the wilderness so exploration and transportation are possible.
The second goal for Towny was to help structure an economy, by using embassy plots so students could create a market in the main town I have setup. The other plot types like Inn and Farm are also useful for getting them to build specific structures.
Lastly I want them to work on building towns that can be defended from both mobs and later other players so they need to expand the borders, build walls, secret entrances, and create guard mobs to patrol.
The first big goal of my customization was to force kids to build in their towns and plots. So I needed to make the wilderness destructable, but not buildable. This creates some issues though, and so I have an extensive list of items/blocks that I do allow to be placed in the wilderness so exploration and transportation are possible.
The second goal for Towny was to help structure an economy, by using embassy plots so students could create a market in the main town I have setup. The other plot types like Inn and Farm are also useful for getting them to build specific structures.
Lastly I want them to work on building towns that can be defended from both mobs and later other players so they need to expand the borders, build walls, secret entrances, and create guard mobs to patrol.
Installation
I'm currently using the Towny 91.1.0 version which while stated as being for 1.8.3 of minecraft, I have working well in 1.10.2 and 1.9.4 so its still a viable plugin for our uses. You can follow the link in the plugin's page and download the latest version which will come as a .zip file. You'll then need to extract the files from inside; Questioner.jar, Towny.jar, TownyChat.jar, and TownyNameUpdater.jar and then place them into the /plugin folder so they can be loaded. You'll also want to go ahead and create a Towny SQL database for the plugin to use once we have it configured.
Next we'll start and then stop the server to generate the configuration folder and files for the plugin. You should see after its started booting that towny was able to start successfully.
There are a couple folders inside the /plugin/Towny folder, but the Backup, Data, and Logs folders don't have anything that you'll need to mess with, we'll be just working inside the Settings folder. Inside the config folder there are two files that we'll be adjusting, config.yml and townyperms.yml which control the plugin, and the permission nodes we can set. We'll start with townyperms.yml first as its the simpler of the two and there are just a few changes I made.
Next we'll start and then stop the server to generate the configuration folder and files for the plugin. You should see after its started booting that towny was able to start successfully.
There are a couple folders inside the /plugin/Towny folder, but the Backup, Data, and Logs folders don't have anything that you'll need to mess with, we'll be just working inside the Settings folder. Inside the config folder there are two files that we'll be adjusting, config.yml and townyperms.yml which control the plugin, and the permission nodes we can set. We'll start with townyperms.yml first as its the simpler of the two and there are just a few changes I made.
TownyPerms.yml Setup
Towny treats all players as various members of a town, or as a nomad who is a player with out a town and this file helps configure the permissions for each of these positions. There are few permissions in the default setup that I change to prevent a few things from getting messed up by the students and to make things more fair. So lets take a look through the file and make some changes:
The Nomad: I make no changes to the permissions here, as they can't do much besides look up basic plugin info and accept town invites.
Towns and their ranks:
default: This is the next permission set a player gets from Nomad after joining a town. We don't need to make any adjustments here.
mayor: This is the rank given to the player that creates the town, again nothing needs to be changed here.
assistant: The mayor can set other players to be assistants who can help claim land and configure plots. There are three lines here we're going to disable so they are a little more limited in what they can do. Find the following three lines and put a # in front of each one so that they no longer are loaded:
- towny.tax_exempt #Only mayor's should be tax exempt to prevent problems if they ran out of money on their account.
- towny.command.town.rank.vip #I don't use the vip rank and don't want assistants to assign it to people.
- towny.command.town.rank.helper #I don't use the helper rank either.
helper,donator,vip, and sheriff: I leave these alone as I don't use them.
Nations: All of these you can leave alone as they are all fine for the Nation level of play.
The Nomad: I make no changes to the permissions here, as they can't do much besides look up basic plugin info and accept town invites.
Towns and their ranks:
default: This is the next permission set a player gets from Nomad after joining a town. We don't need to make any adjustments here.
mayor: This is the rank given to the player that creates the town, again nothing needs to be changed here.
assistant: The mayor can set other players to be assistants who can help claim land and configure plots. There are three lines here we're going to disable so they are a little more limited in what they can do. Find the following three lines and put a # in front of each one so that they no longer are loaded:
- towny.tax_exempt #Only mayor's should be tax exempt to prevent problems if they ran out of money on their account.
- towny.command.town.rank.vip #I don't use the vip rank and don't want assistants to assign it to people.
- towny.command.town.rank.helper #I don't use the helper rank either.
helper,donator,vip, and sheriff: I leave these alone as I don't use them.
Nations: All of these you can leave alone as they are all fine for the Nation level of play.
Settings.yml Setup
The Settings.yml file is probably the largest configuration file out of all the plugins I use, and by quite a large margin. Thankfully, much of it is not necessary to change and its very well organized. I'll be going over the changes I made, but also leaving a link to my settings.yml file in case you just want to copy that and paste it over the other of the default file.
---------------------
First up is the "Town Claim/new defaults" section. This is an important section to change before starting any towns as it has the "town_block_size: '16'" setting which determines how large each plot is, changing this after a town is created will result in very big problems. Taxes and some min/max distances between towns are also important to help keep things manageable. I changed the following lines below:
min_plot_distance_from_town_plot: '1' #There's no pvp in my adventure world, towns can build up right next to each other almost.
min_distance_from_town_homeblock: '15' #They do have to start further apart though. so to build up against another town is quite a lot of expansion.
town_block_ratio: '16' #I doubled this so that even small groups of 3 could buy quite a lot of plots and have a larger area to call their own.
---------------------
Next up is "Default new world settings" which has some world settings for the plugin and how the plugin interacts with the world itself. I disable the reset features for blocks as they can cause issues and lag the server.
world_pvp: 'false' #I have PvP disabled in the world, so need to tell Towny that also.
force_town_monsters_on: 'true' #This forces students to build real houses that don't let monsters spawn, just mud huts.
revert_on_unclaim:
enabled: 'false' #Students don't usually unclaim, but I don't want them to lose things if they do accidently.
wild_revert_on_mob_explosion:
enabled: 'false' #This can cause server lag if kids cause enough creepers to explode.
---------------------
Next is Global town settings which has a few important settings dealing with town permissions.
allow_town_spawn: 'false' #This stops the use of the /town spawn command so no one can teleport out of combat. op's can still use this.
---------------------
SQL settings are next in "Plugin interfacing" so enter in the default settings we've used in other plugins. If you've not made any towns yet then set both:
database_load: mysql
database_save: mysql
If you do have a town already, you'll start up with load as flatfile, save as mysql, and once loaded, stop the server so it saves to mysql then go back to this file and change both to mysql.
using_essentials: 'false' #I don't use essentials, but if you do this should be changed to True.
---------------------
Finally the "Economy settings" is the last section I made changes too as I don't allow war yet in my sessions.
price_death_type: fixed #I change this to percentage so death still means something to even the rich students.
price_death: '0.05' #5% of their bank account is a pretty good hit per death but won't ruin them if they spend a whole session dying.
daily_taxes:
enabled: 'false' #Until you are sure you know how taxes will affect gameplay, its best to just leave it all disabled at the start.
---------------------
So that is towny's settings files. Once you've made all the changes you want, start up the server and make sure SQL is working, then we can begin the in game configuration and testing as well as the special permissions we'll be giving to help make the wilderness suitable for exploration and prevent students being trapped in holes.
---------------------
First up is the "Town Claim/new defaults" section. This is an important section to change before starting any towns as it has the "town_block_size: '16'" setting which determines how large each plot is, changing this after a town is created will result in very big problems. Taxes and some min/max distances between towns are also important to help keep things manageable. I changed the following lines below:
min_plot_distance_from_town_plot: '1' #There's no pvp in my adventure world, towns can build up right next to each other almost.
min_distance_from_town_homeblock: '15' #They do have to start further apart though. so to build up against another town is quite a lot of expansion.
town_block_ratio: '16' #I doubled this so that even small groups of 3 could buy quite a lot of plots and have a larger area to call their own.
---------------------
Next up is "Default new world settings" which has some world settings for the plugin and how the plugin interacts with the world itself. I disable the reset features for blocks as they can cause issues and lag the server.
world_pvp: 'false' #I have PvP disabled in the world, so need to tell Towny that also.
force_town_monsters_on: 'true' #This forces students to build real houses that don't let monsters spawn, just mud huts.
revert_on_unclaim:
enabled: 'false' #Students don't usually unclaim, but I don't want them to lose things if they do accidently.
wild_revert_on_mob_explosion:
enabled: 'false' #This can cause server lag if kids cause enough creepers to explode.
---------------------
Next is Global town settings which has a few important settings dealing with town permissions.
allow_town_spawn: 'false' #This stops the use of the /town spawn command so no one can teleport out of combat. op's can still use this.
---------------------
SQL settings are next in "Plugin interfacing" so enter in the default settings we've used in other plugins. If you've not made any towns yet then set both:
database_load: mysql
database_save: mysql
If you do have a town already, you'll start up with load as flatfile, save as mysql, and once loaded, stop the server so it saves to mysql then go back to this file and change both to mysql.
using_essentials: 'false' #I don't use essentials, but if you do this should be changed to True.
---------------------
Finally the "Economy settings" is the last section I made changes too as I don't allow war yet in my sessions.
price_death_type: fixed #I change this to percentage so death still means something to even the rich students.
price_death: '0.05' #5% of their bank account is a pretty good hit per death but won't ruin them if they spend a whole session dying.
daily_taxes:
enabled: 'false' #Until you are sure you know how taxes will affect gameplay, its best to just leave it all disabled at the start.
---------------------
So that is towny's settings files. Once you've made all the changes you want, start up the server and make sure SQL is working, then we can begin the in game configuration and testing as well as the special permissions we'll be giving to help make the wilderness suitable for exploration and prevent students being trapped in holes.
Towny permission settings
The following commands should all be edited to fit your permission groups and then pasted directly into the server console for fastest setup. This lets non-op players use town commands, and build with certain items in the wild, mostly simple blocks so they can get out of holes, railroad/redstone, torches, and a few other basic things necessary for adventuring in caves.
pex group BaseGroup add towny.command.*
pex group BaseGroup add towny.town.resident
pex group BaseGroup add towny.wild.build.2
pex group BaseGroup add towny.wild.build.3
pex group BaseGroup add towny.wild.build.4
pex group BaseGroup add towny.wild.build.6
pex group BaseGroup add towny.wild.build.12
pex group BaseGroup add towny.wild.build.27
pex group BaseGroup add towny.wild.build.28
pex group BaseGroup add towny.wild.build.46
pex group BaseGroup add towny.wild.build.50
pex group BaseGroup add towny.wild.build.58
pex group BaseGroup add towny.wild.build.63
pex group BaseGroup add towny.wild.build.65
pex group BaseGroup add towny.wild.build.66
pex group BaseGroup add towny.wild.build.68
pex group BaseGroup add towny.wild.build.152
pex group BaseGroup add towny.wild.build.157
pex group BaseGroup add towny.wild.build.176
pex group BaseGroup add towny.wild.build.323
pex group BaseGroup add towny.wild.build.328
pex group BaseGroup add towny.wild.build.342
pex group BaseGroup add towny.wild.build.408
pex group BaseGroup add towny.wild.destroy.*
pex group BaseGroup add towny.wild.switch.*
pex group BaseGroup add towny.wild.item_use.*
###Blocks town Spawning###
pex group BaseGroup add -towny.town.spawn.*
pex group BaseGroup add towny.command.*
pex group BaseGroup add towny.town.resident
pex group BaseGroup add towny.wild.build.2
pex group BaseGroup add towny.wild.build.3
pex group BaseGroup add towny.wild.build.4
pex group BaseGroup add towny.wild.build.6
pex group BaseGroup add towny.wild.build.12
pex group BaseGroup add towny.wild.build.27
pex group BaseGroup add towny.wild.build.28
pex group BaseGroup add towny.wild.build.46
pex group BaseGroup add towny.wild.build.50
pex group BaseGroup add towny.wild.build.58
pex group BaseGroup add towny.wild.build.63
pex group BaseGroup add towny.wild.build.65
pex group BaseGroup add towny.wild.build.66
pex group BaseGroup add towny.wild.build.68
pex group BaseGroup add towny.wild.build.152
pex group BaseGroup add towny.wild.build.157
pex group BaseGroup add towny.wild.build.176
pex group BaseGroup add towny.wild.build.323
pex group BaseGroup add towny.wild.build.328
pex group BaseGroup add towny.wild.build.342
pex group BaseGroup add towny.wild.build.408
pex group BaseGroup add towny.wild.destroy.*
pex group BaseGroup add towny.wild.switch.*
pex group BaseGroup add towny.wild.item_use.*
###Blocks town Spawning###
pex group BaseGroup add -towny.town.spawn.*
In game setup of a town
Towny is great for getting things up and running quickly in game and the most work I do with the students is helping them understand the differences between town plots and personal plots in a town along with specialty plots like farms and inns. In the video tutorial we'll cover all the basics of the town creation, inviting other players, and making sure everyone has a private home plot. I'll discuss some of the more advanced plot permissions below as including them in the video would drag things on.