# Default Settings

{% hint style="warning" %}
It's best to do this **before** you launch JG HUD within your server; as if you have allowed users to edit their own settings in the past, this will take precedent over your new default settings profile.
{% endhint %}

JG HUD allows you to set default settings for **all users.** These default settings can include anything that users are able to adjust usually, including colours, visibility of components, size, position and more.

### 1. Creating & exporting a default settings profile

To create a default settings profile, simply go into `/settings` in game as you usually would to adjust your own HUD.

Once you're happy with the settings you've adjusted, you need to **export them to JSON.** You can do this by clicking the "Import & Export" tab on the left hand side.

<figure><img src="https://2634326805-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5JvyqF9ko9gRINJoIFwY%2Fuploads%2FNBvwLtgR5SwGZh7ahkB0%2Fimage.png?alt=media&#x26;token=fb748445-3565-416a-8537-00bc9eb0e210" alt=""><figcaption></figcaption></figure>

Once in this tab, you need to click "Copy to Clipboard" to copy the configuration JSON to your clipboard.

<figure><img src="https://2634326805-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5JvyqF9ko9gRINJoIFwY%2Fuploads%2FP9qPhNXsEDdN3WfTIW1z%2Fimage.png?alt=media&#x26;token=5118cedb-c120-4b8f-ba20-232a879d500e" alt=""><figcaption></figcaption></figure>

### 2. Making the settings profile your server default

Now that you've got the JSON copied to your clipboard, we are going to need to add this to a file within the resource's code. We've created one by default for you, inside of the `data` folder, called `default-settings.json`  (full path: `jg-hud/data/default-settings.json`).

You can also make your own file wherever you'd like (within the jg-hud resource folder), and point to it's location using the config option `Config.DefaultSettingsData`.

Once you've got the correct file, open it in a text editor and paste the JSON in your clipboard. Like this:

<figure><img src="https://2634326805-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5JvyqF9ko9gRINJoIFwY%2Fuploads%2F1IoLUzmd5dzoAYc691Pq%2Fimage.png?alt=media&#x26;token=b32a0db2-878d-410d-84c7-c68f87a4b2d4" alt=""><figcaption></figcaption></figure>

### 3. Important additional info and settings

This will now be the default profile for all **new users** of JG HUD in your server. For existing users, their current settings/layout will take precedence.

It's therefore best to set this up before players join your server and use JG HUD for the first time.

If you want players to always use the exact configuration you've made for them, simply set both the following config options to false, which will mean players will always see whatever is in the default settings JSON file. Please note that preventing users from changing their settings, especially the layout of the HUD, is **not recommended.** This is because some people are on a larger screen and may want to make certain components larger and easier to see.

```lua
Config.AllowPlayersToEditSettings = false
Config.AllowUsersToEditLayout = false
```

If you are allowing users to change their settings/layout, and they want to set their HUD to the new default settings you've created, they can go to the "Reset to Default" tab on the left of the settings panel, and reset their settings/layout to default. The defaults will come from the file you've set up.

You're good to go! Have fun configuring! :orange\_heart:


---

# 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://docs.jgscripts.com/hud/default-settings.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.
