LayerAfterLayer

From CivWiki
Jump to navigation Jump to search

LayerAfterLayer is Civ+'s group management plugin. It is the successor to CivCraft's Namelayer.

The plugin adds Groups to the server. Just like a Discord server, groups can have a number of players as Members, and each Member can have a number of optional Roles. A player can also have zero roles, in which case they get the permissions defined by the @everyone pseudo-role. Roles are a named bundle of permissions. For example, you could have a Moderator role that allows kicking players from the group.

Permissions are used by a few plugins: Citadel to control the usage and creation of reinforced blocks, Sanctuary for the usage of Sanctuaries and Bastions, ReCivChat for talking in group chats, and Snitches for managing who sends alerts and who receives them.

Mechanics

Membership & Roles

A player can be added to a group using the Invite Player button in the Members List. When added, a player is automatically given the @everyone role and it can't be revoked. Other roles can be given at the same time, or at a later date.

Unlike Namelayer, members can have multiple roles at the same time. For example, you can have a Chat Moderator role that gives permission to delete messages in chat, and a Builder role that gives permission to reinforce blocks. A player with both Chat Moderator and Builder will be able to reinforce and delete chat messages.

Expiration

When you give a player a role, you can set a date when it will expire, and be automatically removed from the player. Similarly, when you invite a player you can set their entire membership to expire, and they will be automatically removed from the group after that date.

Privlege Escalation Prevention

In addition to a set of permissions they grant, roles also have a position in the list of roles. The position of a role determines its power in relation to other roles.

Most significantly about this, if you have permission to add roles to players you can only give people roles below the highest positioned role you have been granted.

Additionally, if you have permission to edit roles' permissions, you can't edit your own highest role (unless you have the highest role) and you can't give a role a permission you don't already have.

Having the highest role in a group bypasses all protections.

Blacklisting

You can blacklist a player from a group using the Blacklist Player button in the Edit Members screen. Blacklisting a player will remove them from the group if they are currently a member and prevent them from rejoining using the Join Group screen. They will also lose any permissions they would get from @not-blacklisted as a non-member.

Linking

LayerAfterLayer supports linking groups together. Group linking is directional: The relationship between linked groups are split between Taker Groups and Donor Groups. When Taker is linked to Donor, all the members on Donor are also members of Taker. Ingame, this is typically phrased as "takes members from," "gives members to," and "also has members from."

When groups are linked, all members of the Donor Group are also members of the Taker Group. Members who are inherited are automatically given the @players-from(GroupName) role.

To link a group to another, open the Edit Group dialog for the Taker Group. Then click "This group doesn't take members from any other groups" and then select the group you wish to be the Donor Group. Then click Preview and Apply.

Linking properly handles cycles, so a group can be both Donors and Takers with another group. In this double-linked circumstance, all members are shared between the two groups.

Subgroups

Subgroups are intended as a tool to help manage reinforcements for different structures. For example, you can reinforce on Agora.Farms for farms and Agora.Roads for roads, and manage them separately (move to different groups once done building, etc).

You can create a subgroup using either the Create a Subgroup button in the Group Details screen, or by attempting to use the subgroup in a command like /ctr MainGroup.NonexistentSubgroup. Subgroups can be nested, and used in commands using the syntax /ctr Group.Subgroup.Subsubgroup.

Currently a subgroup is only a bucket for reinforcements, but they are going to eventually support membership and permission overrides compared to the main group. In the current version of LayerAfterLayer, players have the exact same membership and permissions in a subgroup as the main group.

Subgroups can be merged with eachother and into a main group by browsing to their Group Details screen by clicking the "This group has N subgroups" text and then clicking Merge. A subgroup can also be moved to be under another subgroup or another main group by clicking the "Parent: Group" text in their Edit Group Details screen and then selecting the group you want to move it to.

Permissions Resolution

When determining if a player has a given permission, the plugin starts at the bottom of the list of roles, defaulting to allowing the permission if the player is a member and denying the permission if the player is not a member. If the player is a member of the group it checks the @everyone role's setting for that permission. If the player is not a member and also not on the group's Blacklist, it checks @not-blacklisted. If the player is an inherited member, it checks @players-from(GroupInheritedFrom). Then, it goes up the list of roles the player has.

Each role can have one of three settings for a permission. If the setting is Allow, the state of the permission being checked is set to Allow. A setting of Defer will check the permission's superpermissions; If the superpermissions are unset it will not change the state, otherwise it'll set the state to the superpermission's setting, and a setting of Deny will set the checked state to Deny.

These properties mean that a permission's allow/deny state is controled by the player's highest role that has the permission set to Allow or Deny.

For example, if the @everyone role has the Send Chat Messages permission set to Allow, the Citizen role also has it set to Allow, and the Muted role has permission set to Deny: When the Citizen role is higher than Muted, a player with both Citizen and Muted will have Send Chat Messages. However, when the Muted role is higher than Citizen, a player with both Citizen and Muted will not be able to send chat messages.

Merging

A group can be merged with another group by opening the Edit Group dialog for the group you want to be deleted and clicking the Merge button. The Members, Invites, Blacklist, Subgroups, Webhooks, Reinforcements, and any external plugin information (like snitches) are moved to the group that isn't deleted. All other information like Roles, Linking relationships, and Description are deleted. Members that are added to another group through merging will have no roles, unless they were already added to the group with roles before merging.

Webhooks

A group can have a number of Discord Webhooks added to it. Whenever a change is made to the group, the webhook is sent a message.

Group Descriptions

A group can have a description in multiple languages. Only the first line of the description in the language you have Minecraft set to is displayed in the Group Details screen, however hovering over it will show the full description in all languages.

In addition to natural languages, conlang descriptions are also supported.

Passwords

Groups can be configured to have a password that players can use to join the group. Additionally, groups can also be configured to be joinable without the need of a password; In which case players join by leaving the password field blank.

Special Groups

Personal Group

When you join the server for the first time, the plugin creates a group with the same name as you. This is your personal group. You can use it for anything. You can add nobody to it, or add your friends. It's useful for things that are only your's, but if you plan on sharing something you should probably create a group for that thing. At least make a subgroup of your personal group so you can fix things later.

Default Group

when you do /cto to stop reinforcing on a group, the game sets your Active Reinforcement Group to this group. By default that's your personal group, but you can set it to anything using the Mark as Default Group button in the Group Details screen.

When you join the game for the first time, this is set to your Personal Group.

Global Chat

! is another group that you are added to when you first join the server. It's intended for the players of the server to use it for speaking in. If you break the rules of the server, you might be removed and blacklisted from this group.

If you leave, you can join it using the Join a group using a password button in the Group List.

Interface

Group List

Civ+ Quick Actions
Group List
✓ X You are invited to sepia. You are a member of !. You are a member of Amelorate.
Create a new group Join a group using a password

All of the groups a player is a member of is listed here, including groups the player is an inherited member of. If the player is invited to a group, it is also shown here.

You can open this dialog by pressing Quick Actions (defaults to G) and then clicking Groups. It can also be opened using the commands /layerafterlayer, /lal, or /nl.

Create Group

Create Group
Enter a new group name, then click Next. Group NameTesting
Choose a template
Choose a template for Testing, or choose no template.
No template 1. Probably what you want 2. Tiered 3. Group chat

A new group can be created using the Create New Group button in the Groups List. You select a name for the group (up to 150 pixels long), and then select a template for the group. Templates are premade sets of roles and permissions created by the admins.

Templates
Name Description Roles
No Template The simplest possible group. The owner of the group has all permissions. @everyone has no permissions.

Use this group type if you want to create the entire structure of your group from scratch.

Owner

You can create 5 groups upon joining the server, and each day you spend ingame increases your group creation limit by 1. Unlike Namelayer, transferring a group to another player does not remove its contribution to your group creation limit. Only deleting a group created by you does.

Join Group

Join Group
Enter the group's name and password, then click Join. If you leave the password blank, the group name and an empty password will both be tried. Group NameTesting Passwordhunter2

Groups can be configured to be joinable using a passsword. Type the group name into the group name box, and the password into the password box. If the group has no password, leave the password box empty.

Group Info

Testing
ItemSprite name-tag.png: Sprite image for name-tag in Minecraft Name: Testing ItemSprite shield.png: Sprite image for shield in Minecraft This group has 1 role. ItemSprite player-head.png: Sprite image for player-head in Minecraft This group has 1 member.
Edit Create Subgroup Reinforce On This Group Mark as Default Group Leave Group

You can view a group by clicking its line in the Group List, or using the command /layerafterlayer [GroupName]. Most properties of a group are clickable; Clicking shows more details about the property. Hovering over a property shows some details about it. For example, hovering over the members count will show the first 10 members of the group.

Edit Group

Editing Testing
ItemSprite name-tag.png: Sprite image for name-tag in Minecraft Name: Testing ItemSprite book.png: Sprite image for book in Minecraft This group does not have a description yet. ItemSprite shield.png: Sprite image for shield in Minecraft This group has 1 role. ItemSprite player-head.png: Sprite image for player-head in Minecraft This group has 1 member. ItemSprite oak-sapling.png: Sprite image for oak-sapling in Minecraft This group has no subgroups. ItemSprite lead.png: Sprite image for lead in Minecraft This group doesn't take members from any other groups. ItemSprite oak-door.png: Sprite image for oak-door in Minecraft This group can't be joined using a password. ItemSprite paper.png: Sprite image for paper in Minecraft No Discord webhooks are configured. Click a property to edit it.
Delete Group Merge Into Another Group
Edit Group Name
Enter a new name for this group, then click Set Name. Group NameTesting
Set Name
Edit Group Description
Enter a description for this group in English (United States), then click Set Description. Leave the input empty to remove that description. Click a language button to switch which language you are editing. DescriptionTest Description
Set Description English (United States) Add Language
Editing Testing
ItemSprite name-tag.png: Sprite image for name-tag in Minecraft Name: Testing ItemSprite book.png: Sprite image for book in Minecraft Test Description ItemSprite shield.png: Sprite image for shield in Minecraft This group has 1 role. ItemSprite player-head.png: Sprite image for player-head in Minecraft This group has 1 member. ItemSprite oak-sapling.png: Sprite image for oak-sapling in Minecraft This group has no subgroups. ItemSprite lead.png: Sprite image for lead in Minecraft This group doesn't take members from any other groups. ItemSprite oak-door.png: Sprite image for oak-door in Minecraft This group can't be joined using a password. ItemSprite paper.png: Sprite image for paper in Minecraft No Discord webhooks are configured. You have queued changes. Click Preview to review them.
Preview Delete Group Merge Into Another Group
Preview Changes
This affects the group Testing. The English (United States) description is set to Test Descripiton.

To edit a group, click the Edit button in the Group Details screen. Then, click the property you want to edit. Properties that are unset show up in red.

Once you are finished editing the group, click Preview. The Preview Changes screen details exactly what will be changed about you group. Clicking Apply will apply the changes, and clicking Back will go back to the Edit Group screen. If you have changes queued up, the plugin will ask you if you want to discard your changes if you try to exit the Edit Group screen.

Roles

View Roles
• Primary Owner • Owner • Admin • Mod • @everyone • @not-blacklisted
Edit
Edit a Role
↑ ↓ ItemSprite name-tag.png: Sprite image for name-tag in Minecraft Primary Owner ↑ ↓ ItemSprite name-tag.png: Sprite image for name-tag in Minecraft Owner ↑ ↓ ItemSprite name-tag.png: Sprite image for name-tag in Minecraft Admin ↑ ↓ ItemSprite name-tag.png: Sprite image for name-tag in Minecraft Mod ItemSprite name-tag.png: Sprite image for name-tag in Minecraft @everyone ItemSprite name-tag.png: Sprite image for name-tag in Minecraft @not-blacklisted
New Role

Clicking a role's name will view/edit the role's permissions. The up/down arrows are used to move the role up or down in the list, and clicking the nametag icon will rename the role.

Editing Permissions

View Permissions for Owner
✓ ItemSprite player-head.png: Sprite image for player-head in Minecraft Manage Members ✓ ItemSprite writable-book.png: Sprite image for writable-book in Minecraft Edit Group ✓ ItemSprite barrier.png: Sprite image for barrier in Minecraft Delete Group ✓ ItemSprite stone-bricks.png: Sprite image for stone-bricks in Minecraft Reinforcements ✓ ItemSprite sponge.png: Sprite image for sponge in Minecraft Bastions ✓ ItemSprite beacon.png: Sprite image for beacon in Minecraft Sanctuaries ▼✓ ItemSprite sculk-sensor-side.png: Sprite image for sculk-sensor-side in Minecraft Snitches X ItemSprite shield.png: Sprite image for shield in Minecraft Doesn't Trigger Snitches ▼ItemSprite paper.png: Sprite image for paper in Minecraft Chat ✓ ItemSprite bucket.png: Sprite image for bucket in Minecraft Delete chat messages
Edit Permissions for Owner
▶✓ / X ItemSprite player-head.png: Sprite image for player-head in Minecraft Manage Members ▶✓ / X ItemSprite writable-book.png: Sprite image for writable-book in Minecraft Edit Group ▶✓ / X ItemSprite barrier.png: Sprite image for barrier in Minecraft Delete Group ▶✓ / X ItemSprite stone-bricks.png: Sprite image for stone-bricks in Minecraft Reinforcements ▶✓ / X ItemSprite sponge.png: Sprite image for sponge in Minecraft Bastions ▶✓ / X ItemSprite beacon.png: Sprite image for beacon in Minecraft Sanctuaries ✓ / X ItemSprite dispenser-front.png: Sprite image for dispenser-front in Minecraft Ignored by Seeing-Trap Dispensers ▼✓ / X ItemSprite sculk-sensor-side.png: Sprite image for sculk-sensor-side in Minecraft Snitches ✓ / X ItemSprite bell.png: Sprite image for bell in Minecraft Gets Snitch Notifications ✓ / X ItemSprite shield.png: Sprite image for shield in Minecraft Doesn't Trigger Snitches ✓ / X ItemSprite sponge.png: Sprite image for sponge in Minecraft Clear Snitch Logs ✓ / X ItemSprite book.png: Sprite image for book in Minecraft View Snitch Logs ✓ / X ItemSprite name-tag.png: Sprite image for name-tag in Minecraft Rename Snitches ▼✓ / X ItemSprite paper.png: Sprite image for paper in Minecraft Chat ✓ / X ItemSprite book.png: Sprite image for book in Minecraft Read chat messages ✓ / X ItemSprite writable-book.png: Sprite image for writable-book in Minecraft Send chat messages ✓ / X ItemSprite redstone.png: Sprite image for redstone in Minecraft Read chat history ✓ / X ItemSprite bucket.png: Sprite image for bucket in Minecraft Delete chat messages
Done Delete Role

You can click the ✓ or X buttons next to a permission to set it to Allow or Deny. The / sets it to Defer, which means that other roles or the permission's superpermission controls the role.

Clicking the ▶ glyph will show all subpermissions of that permission. Setting the permission will also set all of its subpermissions, unless the subpermission is set to something different.

Members

View Members
• ItemSprite player-head.png: Sprite image for player-head in Minecraft Amelorate — 1 role
Edit Quick Invite Member
Edit Members
• ItemSprite player-head.png: Sprite image for player-head in Minecraft Amelorate — 1 role Filter by player name
Filter Invite Player Blacklist Player
Invite a Player
Enter the name of a player to invite, then click Invite. Invited players must accept the invite from their own group list before they become members. Player Name
Invite Invite Online Player
Blacklist a Player
Enter the name of a player to blacklist, then click Blacklist. Blacklisted players can't join the group until they are unblacklisted. Player Name
Blacklist
Edit Amelorate
• ItemSprite player-head.png: Sprite image for player-head in Minecraft Amelorate — 1 role Membership expires: never
Edit Roles Edit Membership Expiration Remove Member

A player can be invited, removed, roled, or blacklisted from this screen. Hovering a player's name will show details about their membership, and clicking their name will show options to edit their membership. The Edit Roles button on the Edit Member screen allows toggling a member's roles by clicking the role, and adding expiration dates to their roles by clicking the clock icon on an enabled role. The Edit Membership Expiration will allow setting an expiration date on the player's membership of a group, removing them after the date has passed.

Setting Expirations

Set Membership Expiration for Amelorate
This member's expiration is never. Enter a duration like 30d, 2w, or 6mo, then click Set Expiration. +------------------------------------------------------------+ | DURATION SYNTAX GUIDE | +------------------------------------------------------------+ | A duration is a whole number plus a unit letter. | | Combine several units with spaces or commas to stack them. | +------------------------------------------------------------+ | UNITS | | | | s seconds d days | | m minutes w weeks | | h hours mo months (30 days) | | y years (365 days) | | | | A bare number is treated as days: 30 equals 30 days. | +------------------------------------------------------------+ | EXAMPLES | | | | 30d → 30 days | | 2w → 2 weeks | | 6mo → 6 months | | 1y 2w 3d → 1 year, 2 weeks, 3 days | | 1h 30m → 1 hour, 30 minutes | +------------------------------------------------------------+ Duration
Set Expiration No Expiration
Edit Roles for Amelorate
✓ Owner ItemSprite clock-00.png: Sprite image for clock-00 in Minecraft
Set Role Expiration for Owner
This role's expiration is never. Enter a duration like 30d, 2w, or 6mo, then click Set Expiration. +------------------------------------------------------------+ | DURATION SYNTAX GUIDE | +------------------------------------------------------------+ | A duration is a whole number plus a unit letter. | | Combine several units with spaces or commas to stack them. | +------------------------------------------------------------+ | UNITS | | | | s seconds d days | | m minutes w weeks | | h hours mo months (30 days) | | y years (365 days) | | | | A bare number is treated as days: 30 equals 30 days. | +------------------------------------------------------------+ | EXAMPLES | | | | 30d → 30 days | | 2w → 2 weeks | | 6mo → 6 months | | 1y 2w 3d → 1 year, 2 weeks, 3 days | | 1h 30m → 1 hour, 30 minutes | +------------------------------------------------------------+ Duration
Set Expiration No Expiration

Expiration dates are defined as a duration into the future. For example, typing 3m will have the player's membership expiring 3 minutes from the time you press the Set Expiration button. If you had 3m as the duration, and then waited 2 minutes before clicking the Preview & Apply buttons on the Edit Group screen then the player's role/membership will expire 1 minute afterwards.

Settings

Group Settings
Sort groups by number of members Show group creation and modification metadata Maximum lines in hover text: 10 Automatically accept group invites Notifications when groups you are in are modified
Group Settings
Setting Default What it does
Sort groups by number of members On When enabled, groups are sorted in the Group List by how many players are in that group. If there is a tie, the groups are sorted alphabetically.

When disabled, groups are sorted alphabetically.

Show group creation and modification metadata Off Displays the date a group was created, who created it, and when it was last modified
Maximum lines in hover text 10 When you hover over a group's properties in the Group Details screen, the hover text is capped to this many lines to prevent it from overflowing past the edges of your screen.
Automatically accept group invites Off When you're invited to a group, it is automatically accepted if you are online.

If you are offline the invite will be accepted when you log in. In either case you are notified in chat. If disabled you are still notified, but you will have to accept the invite manually.

Notifications when groups you are in are modified Off If a group is changed in any way, you are sent a message in chat

References