# Formats

In ChatChat there are 2 types of formats: **BasicFormat** and **PriorityFormat.**

## **Basic Format**

In ChatChat, every format is a BasicFormat. Basic formats have 2 components: Name and Parts.\
These formats are usually used for: private messaging, social spy, mentions, etc.

### Format Name

The format name is also the format identifier. This is what you use to find formats, it's also the name you use when giving people permission to formats. Multiple formats should not have the same name.

### Format Parts

The format parts are made out of a key (the name) and a list of strings (the part).\
\
\- the **key** is the part's name and is going to be completely ignored by the plugin. It was added at the requested of the users as it makes the config look a lot more cleaner.\
\- the **part** is the actual format that will be used. ChatChat will just take the list of strings and append them together into one big string and then parse it to a message.

## Priority Format

Priority formats have everything that Basic Formats have but they also have a priority. These formats are the ones used in `formats.yml` for example.

### Priority

If a player has access to multiple formats, the priority will decide what format will be used when they sends a message in chat.

{% hint style="info" %}
The `addons.deluxechat.inverse_priorities` setting in `extensions.yml` dictates if the lowest or the highest number has priority. If this setting is true, lower numbers have higher priority. If this setting is false, it is the other way around.
{% endhint %}

## Permissions

Formats are given away to players using permissions. Every format has a similar permission and that is: `chatchat.format.<format-name>`

## Default Format

In your `formats.yml` file, you can specify the name of the default format. You must also create a format in there with that name. The default format will be used when a user has no permission for any other format.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.helpch.at/helpchat-plugins/chatchat/formats.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
