Skip to content

[1] Terminology & setting up OpenRP's global config.yml

Bozga Rareș Ionuț edited this page Dec 28, 2020 · 2 revisions

Hi! Thanks for downloading OpenRP! Here, helpful information can be found on how to make OpenRP feel closer to what your server is!


Terminology

Let's get accustomed to some terms before we begin.

(X)'s Config, (X)'s Messages
(e.g. Chat's Config, Descriptions' Messages)

This refers to a specific plugin's configuration file.
For example, Chat's Config can be found in plugins/OpenRP/chat/config.yml.
It's "Chat's Config" because it is found in the chat folder.

Channel identifier/ID, Field identifier/ID

This refers to the identifier name for a channel in OpenRP Chat, or a field in OpenRP Descriptions.
For example, take a look at this configuration section:

channels:

   in-character:

      display-name: In Character Chat
      commands: []
      use-perm: orpchat.default
      read-perm: orpchat.default
      color-code-perm: orpchat.usecolors
      format: '[IC] &e{player} &fwould say: "{message}&f"'
      range: 15
      cooldown: 3

This has been taken straight out of OpenRP Chat's default configuration. As you can see, it shows one channel, with its settings.
The channel's identifier is in-character in this case, because it's how OpenRP identifies your channel in it's list and for the API.

(X) module
(e.g. Roll module, Time module)

This simply refers to one of four features this plugin offers: Chat, Descriptions, Rolls, and Time. The module list can be found in the main configuration, under enabled.


You should now be ready to begin setting up OpenRP!

OpenRP's global config.yml and messages.yml

OpenRP's config looks like this, and can be found in plugins/OpenRP/config.yml

# OpenRP Main Configuration.

admin-perm: "openrp.admin"

# Which modules to enable?
enabled:
- chat
- descriptions
- rolls
- time

# Would you like notifications for this plugin?
auto-updates: true

Let's go over it step by step.

admin-perm
This simply denotes the permission required for a player to use the /openrp command.

enabled
This contains the list of features you want OpenRP to have.
Say you already have a chat plugin, and you wouldn't want OpenRP to do it for you.
In that case, you can simply remove the - chat line entirely, which would simply remove all of OpenRP Chat's features.

enabled:
- descriptions
- rolls
- time

auto-updates
Set this to true if you would like OpenRP to tell you in console of the latest OpenRP version.
You can also join our Discord (https://discord.gg/sRdKSYR) to receive pings with the latest updates!


The messages file, found in plugins/OpenRP/messages.yml, is self-explanatory.
Simply change the messages as you want. Though, this is not needed, because most players will never see these.

You should note that if you want to use apostrophes (i.e. '), you will have to type it twice, or put the entire message in between quotations (").
This is due to YAML escaping characters. Check this page out: https://stackoverflow.com/questions/11301650/how-to-escape-indicator-characters-i-e-or-in-yaml

For example, take a look at the no-perm message:

no-perm: '&cYou don''t have permission to run this command.'

We can clearly see that don''t has two apostrophes, for the reasons mentioned above.