lammas123-PermissionGroups icon

PermissionGroups

A mod that adds permission groups.

Last updated 5 days ago
Total downloads 5
Total rating 2 
Categories Mods Libraries Misc Host Only
Dependency string lammas123-PermissionGroups-1.1.1
Dependants 0 other packages depend on this package

This mod requires the following mods to function

BepInEx-BepInExPack_CrabGame-6.0.577 icon
BepInEx-BepInExPack_CrabGame

Legacy BepInEx 6 pack for Crab Game. Preconfigured and ready to use.

Preferred version: 6.0.577
lammas123-PersistentData-1.1.1 icon
lammas123-PersistentData

A mod that allows for certain data to be saved and loaded neatly.

Preferred version: 1.1.1

README

What are permission groups?

Permission groups can be assigned to players to give them elevated permissions.

The main mod that utilizes these permissions is ChatCommands, with which you can choose who can use certain commands.

How can this be configured?

Upon running the game for the first time, it will create a config file at "BepInEx/config/lammas123.PermissionGroups.cfg", as well as two permission group files, "host.txt" and "member.txt", in your "BepInEx/config/lammas123.PermissionGroups/" directory.

In the config file, you can set the default group id ("member" by default) and the host's group id ("host" by default). These link to the permission group files saved in that directory I mentioned previously.

The permission group files follow this format:

  • Everything before the ".txt" in the file's name is the group's id. It is recommended to keep this short, lowercase, and have no spaces or special characters.
  • The first line of the file will be the permission group's display name, or how it'll show up in game, I'll get back to this later.
  • Every line after that is a different permission that permission group has.
    • To give members permission to use !help, you'd write "command.help" on a new line.
    • A single asterisk (*) on the second line of the file means that all permissions have been granted
      • This is dangerous to give out and is only given to the host by default.

You are able to add as many permission groups as you want and give them any permissions you see fit, changes apply every time you load the game.

How do I assign a permission group to someone?

You can modify the permission group id saved in the player's persistent client data file, or with ChatCommands, you can write "!setclientdata <player> PermissionGroup <permission group id>" to change it in game.

So what about the display names?

Using the BetterChat mod, you can add the player's permission group (or permission group id if you want) into their name when they send chat messages.

When adding permission groups to the formatting, use PERMISSION_GROUP to use the permission group's display name, and PERMISSION_GROUP_ID to use it's id.