You can customize the roles members of a town may hold as well as the privileges within the town each role has. Towns require at least two roles with different weights; a "mayor" role and a default citizen role, otherwise you will encounter errors.
- If you change the number of roles, you will need to reset your data, as the role weightings stored in the database will become incompatible.
- You can change the privileges at any time in the config, though
- You can also change the role name as you see fit. It's just the weightings which can't change as those are stored in the database.
Roles are defined in the town
roles.yml file below, which is a copy of the default setup.
# ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ # ┃ HuskTowns town role config ┃ # ┃ Developed by William278 ┃ # ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ # ┣╸ This file is for configuring town roles and associated privileges. # ┣╸ Each role is mapped to a weight, identifying its hierarchical position. Each weight is also mapped to the role name. # ┣╸ Config Help: https://william278.net/docs/husktowns/config-files # ┗╸ Documentation: https://william278.net/docs/husktowns/town-roles # Map of role weight IDs to display names names: '3': Mayor '2': Trustee '1': Resident # Map of role weight IDs to privileges roles: '3': - set_bio - evict - promote - demote - withdraw - level_up - set_rules - rename - set_color - declare_war '2': - set_farm - set_plot - manage_plot_members - trusted_access - unclaim - claim - set_greeting - set_farewell - invite - set_spawn - manage_relations - spawn_privacy - view_logs '1': - deposit - chat - claim_plot - spawn
Role privileges are how you specify what rights each role has in your town. The below table is a list of all these privileges and what rights they give each role. If you don't assign a privilege to a role, nobody will be able to perform that action, so make sure they're all assigned.
✅ Remember that higher roles inherit privileges from lower-weighted roles.
|Update the town bio|
|Evict a town member|
|Promote a town member to a higher role|
|Demote a member to a lower role|
|Withdraw from the coffers to their own bank balance|
|Spend money from the coffers to level up the town|
|Update the town claim/flag rule settings|
|Rename the town|
|Set the town color|
|Make a claimed chunk into a farm|
|Make a claimed chunk into a plot|
|Add members and managers to a plot|
|Manage Town Relations, if enabled|
|Declare and manage Town Wars, if enabled|
|Build anywhere in the town, including outside of plots|
|Remove a claim|
|Create a claim|
|Update the town greeting message|
|Update the town farewell message|
|Invite a player to the town|
|Update the town spawn position|
|Update the privacy of the town spawn|
|View the town audit logs|
|Deposit money into the town coffers|
|Use the town chat|
|Teleport to the town spawn if it is private|
|Claim a vacant town plot with |
Some actions are automatically given to only the mayor—such as the ability to disband and transfer ownership of a town. Only one player can be the mayor. If you'd like a "co-mayor" setup, it's recommended that you define two roles - one true "mayor" with the highest weighting, and a "co-mayor" weighting just below that, and assign that role all the privileges.