# Introduction

This documentation serves the purpose of helping server owners install, setup, and use your new copy of this script.

![YL-lang\]](https://img.shields.io/badge/language-lua-2A61CE.svg?logo=lua)![YL-Type\]](https://img.shields.io/github/manifest-json/description/im-richard/rlib.svg?color=D84B4B\&filename=manifest%2Fepistle%2Fmanifest.json\&label=type)![YL-Ver\]](https://img.shields.io/github/manifest-json/v/im-richard/rlib.svg?filename=manifest%2Fepistle%2Fmanifest.json)![YL-Req\]](https://img.shields.io/github/manifest-json/libreq/im-richard/rlib.svg?color=288A51\&filename=manifest%2Fepistle%2Fmanifest.json\&label=rlib)![YL-Updated\]](https://img.shields.io/github/manifest-json/updated/im-richard/rlib.svg?color=D84B75\&filename=manifest%2Fepistle%2Fmanifest.json\&label=last)![YL-ID\]](https://img.shields.io/github/manifest-json/script/im-richard/rlib.svg?color=D8714B\&filename=manifest%2Fepistle%2Fmanifest.json\&label=id)![YL-hits\]](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fim-richard%2Frlib\&count_bg=%235A3DC8\&title_bg=%23555555\&title=hits\&edge_flat=false)

![](https://1742197099-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MFN0d2Ri6RfiE0DEuoG%2F-MFN9i0XgHaoDaCTNHvX%2F-MFNBpBnG4ZjCRl-Rf_j%2Fezgif.com-webp-to-png.png?alt=media\&token=c37cea0a-00c8-49e7-9baa-64feacfc3637)

## ❱  Compatibility ◾ Addons

![ULX](https://g.rlib.io/gms/badges/addons/86/u.png) ![XAdmin](https://g.rlib.io/gms/badges/addons/86/x.png) ![SAM](https://g.rlib.io/gms/badges/addons/86/s.png) ![ServerGuard](https://g.rlib.io/gms/badges/addons/86/sg.png)

## ❱ Compatibility ◾ Gamemodes

![All Gamemodes](https://g.rlib.io/gms/badges/gm/86/gm_all.png)


# Showcase

Preview screenshots of this addon

## ▸ Static Images

## ▸ Animated Images

Please note that animated gifs may show sluggish animations due to FPS limits of the image itself. In-game animations are smooth.


# Changelog

Displays the most important changes of a release.

### Which version do you want to see changes for?

The most recent update is listed at the top, and the oldest at the bottom

| Version                           | Build                                                                       |        |
| --------------------------------- | --------------------------------------------------------------------------- | ------ |
| [**2.2.1.0**](/changelog/2.2.1.0) | ![NL-build-stable\]](https://img.shields.io/badge/stable-4DA954.svg?label=) | latest |


# 2.2.1.0

This is a detailed changelog for the specified release above.

## ◾ Overiew

* `[ + ]` [**added support for materials as wallpapers**](/changelog/2.2.1.0#added-support-for-materials-as-wallpapers)
* `[ + ]` [**added additional chat / console commands**](/changelog/2.2.1.0#added-additional-chat-console-commands)
* `[ + ]` [**added new hook when addon initialized to help support plugins**](/changelog/2.2.1.0#added-new-hook-when-addon-initialized-to-support-plugins)
* `[ ^ ]` [**updated fonts library**](/changelog/2.2.1.0#updated-font-library)
* `[ ^ ]` [**dialog panels renamed / moved**](/changelog/2.2.1.0#dialog-panels-renamed-moved)
* `[ ^ ]` [**implemented numerous optimizations**](/changelog/2.2.1.0#implemented-numerous-optimizations)
* `[ ^ ]` [**updated documentation**](/changelog/2.2.1.0#updated-documentation) \[ [**https://epistle.rlib.io/**](https://epistle.rlib.io/) ]
* `[ ^ ]` [**updated permission names for ServerGuard admin mod**](/changelog/2.2.1.0#updated-serverguard-permissions)
* `[ % ]` [**fixed eprotect compatibility** ](/changelog/2.2.1.0#fixed-eprotect-compatibility)

## ◾ File Changelog

### &#x20;   ◾ **CONFIGS**

* epistle\cfg\sh\_cfg.lua
* epistle\cfg\sh\_cfg\_bg.lua
* epistle\cfg\sh\_cfg\_binds.lua
* epistle\cfg\sh\_cfg\_nav.lua

### &#x20;   ◾ **GENERAL**

* epistle\core\cl\_fonts.lua
* epistle\core\cl\_init.lua
* epistle\core\cl\_rcc.lua
* epistle\core\cl\_usrdef.lua
* epistle\core\sh\_init.lua
* epistle\core\sh\_rnet.lua
* epistle\core\sv\_init.lua
* epistle\core\sv\_psay.lua
* epistle\diag\cl\_diag\_cwserv.lua
* epistle\diag\cl\_diag\_dc.lua   [**🇷​​​​​🇪​​​​​🇲​​​​​**](/doc-references/status#rem)
* epistle\diag\cl\_diag\_dcserv.lua   [**🇳​​​​​🇪​​​​​🇼​​​​​**](/doc-references/status#new)
* epistle\diag\cl\_diag\_ibws\_notice.lua
* epistle\diag\cl\_diag\_restrict.lua
* epistle\lang\en.lua
* epistle\pnl\cl\_pnl\_bg.lua
* epistle\pnl\cl\_pnl\_ibws.lua
* epistle\pnl\cl\_pnl\_rules.lua
* epistle\pnl\cl\_pnl\_rules\_web.lua
* epistle\pnl\cl\_pnl\_servers\_popup.lua
* epistle\sh\_env.lua

## ◾ Changes

####

### ◾ Added support for materials as wallpapers

Server owners can now specify materials for their interface background. By default, this script uses a DHTML panel to load wallpapers from external websites. The issue with this is that it can sometimes make the interface take a second or two longer to actually load.

By using materials; it can make load times significantly less; however, this requires the server owner to upload the desired materials to a Steam Workshop collection and call the image within the config:

{% tabs %}
{% tab title="linx\lua\modules\epistle\cfg\sh\_cfg\_bg.lua" %}

```lua
cfg.bg.material.enabled     = true
cfg.bg.material.list        =
{
    'path/to/material_1.png',
    'path/to/material_2.png',
}
cfg.bg.material.clr         = Color( 255, 255, 255, 255 )
cfg.bg.height               = 'auto'
```

{% endtab %}
{% endtabs %}

If you decide to enable material wallpapers; it is HIGHLY recommended that you disable the other wallpaper settings for loading external images; otherwise load-times will be equally as bad:

{% tabs %}
{% tab title="linx\lua\modules\epistle\cfg\sh\_cfg\_bg.lua" %}

```lua
cfg.bg.static.enabled     = false
cfg.bg.live.enabled       = false
```

{% endtab %}
{% endtabs %}

In order to create a Steam Workshop collection; you must utilize a tool such as GMPU (**Garry's Mod Publishing Utility**) which can be [**downloaded here**](https://github.com/alatnet/gmpu):

####

### ◾ Added additional chat / console commands

Players can now activate the motd and rules interfaces with a number of console commands listed on the [**binds page.**](/first-use/binds)

####

### ◾ Added new hook when addon initialized to support plugins

Can now use **`epistle_cl_init`** to activate a hook when addon loads the interface.

####

### ◾ Updated Font Library

Migrated font library to new system. Nothing should be changed on the server owner's end.

####

### ◾ Dialog panels renamed / moved

| Old                   |   | New                       |
| --------------------- | - | ------------------------- |
| `diag/cl_diag_dc.lua` | ➜ | `diag/cl_diag_dcserv.lua` |

####

### ◾ Implemented numerous optimizations

Several aspects have been updated for better load times.

####

### ◾ Updated Documentation

Several pages have been updated with better structuring so that steps are easier to follow. Also added more information related to certain steps.

####

### ◾ Updated ServerGuard permissions

ServerGuard permissions are now more easily identifiable with new names.

####

### ◾ Fixed eprotect compatibility

Resolved an issue which caused a random error with customers also using eProtect related to SetTitle()


# 2.2.0.0

This is a detailed changelog for the specified release above.

## ◾ Overiew

* `[ + ]` docs/web folder which provides customer with template for hosting wallpapers locally
* `[ + ]` docs/install.pdf
* `[ + ]` epistle.env
* `[ + ]` integrated browser tip dialog for helping with blank pages
* `[ + ]` console, gmod menu, settings buttons for escape mode
* `[ ^ ]` updated code for compatibility with rlib 3.2.0
* `[ ^ ]` server feature now has validation setting to allow for DNS addresses instead of IP
* `[ ^ ]` updated workshop \[ <https://steamcommunity.com/sharedfiles/filedetails/?id=2329433981> ]
* `[ ^ ]` revised permissions system to include dedicated ULX id
* `[ ^ ]` localized pnls; using uclass pnl system
* `[ ^ ]` updated dialog interface
* `[ % ]` fixed SAM addon permissions
* `[ - ]` fonts; now provided by rlib
* `[ - ]` sounds; now provided by rlib


# FAQ

Answers to common questions and troubleshooting steps.

### ▸[Addon Won't Show](/faq/addon-wont-show)

&#x20;   Instructions for handling situations where the addon will not \
&#x20;   display at all on the server.

####

### ▸[Incompatible Addons](/faq/incompatible-addons)

&#x20;    View a list of Workshop Addons that are deemed incompatible \
&#x20;    with this addon.

####

### ▸[Modified Script](/faq/modified-script)

&#x20;   The answer you will receive if you wrote your own customizations\
&#x20;   which are not working.

####

### ▸[Refunds](/faq/refunds)

&#x20;   Policy regarding refunds

####

### ▸[Script Errors](/faq/script-errors)

&#x20;   Instructions for handling situations where the addon throws\
&#x20;   errors in the server console.

####

### ▸[When Are Updates?](/faq/when-are-updates)

&#x20;   The main question I always get asked.


# Addon Won't Show

Steps to take if your addon will not display in-game.

## ▸Verify Install

Verify that you've followed the instructions on the [**Install**](/setup/install) page. Ensure that this includes both a good installation of rlib AND the addon itself. You can also follow the steps on the [**Verify**](/setup/verify) page to ensure that both of these are functioning properly.

## ▸Revert Config Changes

If you have made changes to the configuration and cannot get the addon to show; revert those changes. Try installing a fresh copy of the addon without any changes to determine if the changes to the config are to blame or if you are having issues elsewhere.

## ▸Use Latest Versions

Ensure that you are using the latest version of both rlib AND the addon you are trying to install. [**Gmodstore**](https://gmodstore.com) allows developers to post multiple versions of an addon, and sometimes customers can accidentally click if downloading the addon from the Versions tab. Double-check your installed version.

## ▸Check For Incompatible Addons

If you are experiencing issues with this addon; ensure first that it is not conflicting with other addons. Any addons that have been installed from the Steam Workshop **MUST** be checked first. This developer cannot control the quality of code for addons distributed via the Steam Workshop and most reported situations involve a Workshop addon that is not coded properly and has not been updated in years.

For more detailed instructions; view the [**Incompatible Addons**](/faq/incompatible-addons) page.


# Incompatible Addons

Addons in this list have been deemed "incompatible" and require extra work.

## ▸Official List

The following workshop addons have been known to cause issues with this script after being reported to the developer.  In order to get this addon functioning properly; please review the chart below to see what is causing the incompatibility.

Certain workshop addons are coded poorly, and the Steam Workshop does not have "Coding Standards". In order to correct the addons below; it would be required to modify the Workshop addon itself which is not good practice for us. We do not want to modify other scripts to behave differently than what you expect them to behave.

|                      |   |
| -------------------- | - |
| *No addons reported* |   |

## ▸Check Addons

From time to time; certain addons from the Steam Workshop may conflict with purchased addons from Gmodstore.

{% hint style="warning" %}
**Ensure you follow these instructions**. If you submit a ticket about the addon not showing up and it properly being installed; this will be the first process the developer makes you go through.
{% endhint %}

To eliminate the possibility of a Steam Workshop addon breaking this addon; please complete the following:

* **Open** your server's Hosting Control Panel (gmc, crident, etc).
* Locate the **Startup Parameters** section.
* **REMOVE** the steam workshop collection id associated to the server

![](https://1742197099-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MFN0d2Ri6RfiE0DEuoG%2F-MTk2Phui1af-SKfearl%2F-MTk2SA43_TyS5Pb26xd%2Fws_removegif.gif?alt=media\&token=5ad6ad84-ae79-410c-9729-2261a24bcf2e)

* **Save** your server settings with **workshop id removed**
* **Restart** the server and then join
* **Check** to see if the addon now works

If you removed the workshop collection and your addon **does NOT work**; Submit a Ticket to the developer.

If you removed the workshop collection and your addon **now works**; you will need to use [**Process of Elimination**](/faq/incompatible-addons#process-of-elimination) to figure out which addon is causing a conflict.

## ▸Process of Elimination

If you have verified that this addon does not function unless you remove your Steam Workshop Collection; then you will need to figure out which addon is causing conflicts. Again, this is usually not a developer issue related to addons on Gmodstore, but improperly coded addons that are provided on the workshop that have no quality control in place.

You will need create an additional Steam Workshop Collection titled something such as **Test**; and apply that new workshop id to your server; replacing your official collection.

Add a small group of addons to begin with (roughly five (5) at a time) to your new test collection, and then restart your server.&#x20;

When the server is back online, join the server and test this addon to see if it starts to function. If it does, you will need to narrow down which of the five newest addons may be causing the conflict by removing one of the five; one by one and doing a restart.

If the issue persists after five are added; then add an additional five and continue this process.

It is tedious, and takes time especially on servers which a large list of subscribed workshop items, but it is the only way to determine which addon is conflicting.

Once you find the conflicting addon; contact the developer of *this gmodstore addon* to see if some type of work-around can be developed.

{% hint style="info" %}
When adding workshop items to a test collection, start with workshop items that add major functionality. These are usually the ones that cause issues. Leave workshop items that simply add player or prop models and maps for last as these are less likely to be the issue.
{% endhint %}


# Modified Script

The answer you will receive if you wrote your own customizations which are not working.

If you modified this script and are now having issues getting your changes to function properly; this is an issue you will have to troubleshoot yourself.

I do not provide support for modifications to the base script.

This policy does **NOT** include changing settings that come out-of-box; which you will still receive support for.


# Refunds

Policy regarding refunds

It is common for customers to have basic issues with a script; immediately assume it is the script's fault, and request a refund before any type of communication or ticket has been created. Then after initial troubleshooting; it ends up being a bad installation, or a user-error.

For this reason is why refunds are not granted simply upon request if you report an issue with the script. The developer will request that you submit a ticket with the following information:

* Any errors in your server-side console
* Verifying your installation path
* Confirming the script works without any initial settings being modified

If the above points appear to be fine; then the developer is going to request additional information related to your server itself so that the developer can take a look personally.

Should bugs with the script be present; the developer will release updates addressing the issue.

Because you are dealing with digital items; a developer cannot remove your downloaded copy of an addon. *Therefore, a refund is approved in instances where no other possible solution can be provided to address your issue in a proper amount of time; as long as the issue is with the addon itself, and NOT because of user-errors.* Which will be determined by the developer after you create your initial support ticket.


# Script Errors

If your server console is throwing errors.

## ▸**Errors occur after you edited the config files?**

If yes; go back to the edited config file and remove the edits you have made and attempt to restart the server and check for errors.

## ▸**Errors occur with no edits?**

Make sure you followed the [**Install**](/setup/install) procedures properly.

## ▸**Errors occur with good install and no edits?**

Write down the error and contact the developer on [**gmodstore.com**](https://gmodstore.com)


# When Are Updates?

The number one question...

I cannot give ETAs on when updates are released. I am constantly working on adding new features, as well as bug fixes. On top of that, I have a large list of scripts that also still receive regular updates. If I give an ETA on an update release; I cannot stick to that schedule because something can arise that causes the update to be delayed; therefore, I'll never give a time / date of a release.


# Install

This section explains the installation process. Follow the instructions step-by-step.

## ◾ Install rlib

* Go to [**https://get.rlib.io/**](https://get.rlib.io/) and download the latest version of **rlib**.&#x20;
* **Extract** the downloaded zip to your computer
* **Create** a new folder on your gmod server called **rlib**
  * *Example: garrysmod/addons/**rlib**/*
* **Upload** the extracted rlib zip files to the newly created folder.&#x20;
  * Ensure you are uploading the files to match the following file structure:

&#x20;                   📁 garrysmod\
&#x20;                       📁 addons\
&#x20;                           📁 **rlib**\
&#x20;                                📁 lua\
&#x20;                                📁 materials\
&#x20;                                📁 resource

* **Restart** the server
* As the server restarts, **view** the console **for errors**.&#x20;
  * If you see errors, contact the developer with a list of them.
  * If you do not see errors, proceed forward
* **Connect** to your gmod server and spawn in.&#x20;
* Make sure you have **superadmin** access on the server. If you are using an admin mod; do one of the following sub-points below:
  * **ULX:** In server console; type `ulx adduser yourname superadmin`
  * **SAM:** In server console; type `sam giverank yourname superadmin`
  * **SGUARD:** In server console; type `serverguard_setrank yourname superadmin`
* Once you have superadmin; type **`?setup`** in chat.
* You have completed the setup. Proceed to the [**Install Addon**](broken://pages/-M9Hv3FapC9wxVP_I0LE#install-addon) section below.

###

## ◾ Install addon

* Go to [**https://gmodstore.com/**](https://gmodstore.com/) and download a fresh copy of your purchased script.
* **Extract** the download zip to your computer
* **Create** a new folder on your gmod server called the name of the addon
  * Make sure the folder name contains **NO SPACES**, **NO SPECIAL CHARACTERS**, and **NO CAPS**
  * *Example:  garrysmod/addons/**epistle***
* **Upload** the extracted addon files to the newly created folder
  * Ensure you are uploading the files to match the following file structure:

&#x20;                   📁 garrysmod\
&#x20;                       📁 addons\
&#x20;                           📁 **epistle**\
&#x20;                                📁 lua\
&#x20;                                📁 materials\
&#x20;                                📁 resource

* **Restart** the server
* As the server restarts, **view** the console **for errors**.&#x20;
  * If you see errors, view [**Script Throwing Errors**](/faq/script-errors)
  * If you do not see errors, proceed forward
* Try to activate your addon.
  * View [**Binds**](/first-use/binds) page for list of methods available for this script.
* If you see the script actively working, then you are finished with the setup.

###

### ◾ What's Next?

Want to subscribe to this addon's **steam workshop collection**? Visit the [**Workshop**](/setup/workshop) page.

Curious about the ***/docs/web*** folder provided in your zip? Visit the [**Web**](/setup/docs-web) part of this guide.


# Verify

Validating the installation of rlib and your addon

If you want to double check and confirm the installation of rlib and your addon; you may do the following.

## ◾ Verify rlib

* Once installation is complete; connect to your Garry's Mod server.
* Open the console ( \~ )
* Execute the command:

{% tabs %}
{% tab title="Console" %}

```
rlib.version
```

{% endtab %}
{% endtabs %}

The following should output:

{% tabs %}
{% tab title="Console" %}

```
rlib Manifest: 
       Ver :  v3.2.0-stable  ( 12.06.2020 )
       Dev :  Richard
       Doc :  https://docs.rlib.io/ 
```

{% endtab %}
{% endtabs %}

##

## ◾ Verify addon

### ▸Method 1 (Console)

To verify if your addon is installed properly:

* Connect to your Garry's Mod server
* Open the console ( \~ )
* Execute the command:

{% tabs %}
{% tab title="Console" %}

```
rlib.running
```

{% endtab %}
{% endtabs %}

The following should output:

{% tabs %}
{% tab title="Console" %}

```
[CONSOLE] [rlib] nodules » epistle, workshop
```

{% endtab %}
{% endtabs %}

You can also execute the following command in the server-side console:

{% tabs %}
{% tab title="Console" %}

```
rlib.modules
```

{% endtab %}
{% endtabs %}

This command should show something such as the following:

![](broken://files/-MO0XVxkctCRIdpGaA9-)

##

### ▸Method 2 (In-game activation)

Any addon that includes an interface will come with multiple ways to make it appear on-screen. Obviously, by making the interface appear, you will know that it is successfully installed.

For a list of activation methods, view the [**Binds**](/first-use/binds) page.


# Workshop

Workshop collection info related to this addon

Each addon has a workshop collection associated to it. The workshop content delivers materials, fonts, and sounds to your users so that they'll be able to see everything within the addon.

These scripts include a workshop auto-mounting system which will force each connecting player to mount the required workshop for this addon; however, if you need the workshop for other purposes or to add to your server's workshop collection; you can get it below:

&#x20;[![](https://img.shields.io/badge/download-here-red.svg)](https://steamcommunity.com/sharedfiles/filedetails/?id=1188440380) ![](https://img.shields.io/steam/downloads/1188440380.svg?color=blue\&logo=steam) ![](https://img.shields.io/steam/subscriptions/1188440380.svg?color=%23DF54AF) ![](https://img.shields.io/steam/size/1188440380.svg)


# Docs/Web

This information explains the 'web' folder provided in your downloaded zip.

{% hint style="warning" %}
Wallpapers provided by the developer are meant to be for **demonstration purposes**. It is advised that you locate your own set of wallpapers to use with the examples provided in the download. Ensure the image file sizes are not large; otherwise they may take a few seconds to load for players who view the interface.
{% endhint %}

## ◾ Summary <a href="#summary" id="summary"></a>

This script includes wallpapers / live backgrounds which can be displayed on your interface. These wallpapers are hosted via **rlib's cloud**, which should only be temporary.

Your downloaded zip from [**gmodstore.com**](https://gmodstore.com/) includes a **`docs/web`** folder which contains a series of static images and a live wallpaper .webm file that you can use as wallpaper to display on your in-game interface.

It is recommended that you utilize your own hosting server and upload the files provided in the **`docs/web`**&#x66;older. If the rlib cloud goes down; your wallpapers will not work.

You may also upload the images to a website such as [**https://imgur.com/**](https://imgur.com/) and use the link they provide after upload within your config to change wallpaper URLs.

## ◾ Static Wallpapers <a href="#static-wallpapers" id="static-wallpapers"></a>

Static wallpapers are still images located in the **`docs/web/static`** folder. This folder includes a few demo wallpapers to get you started, however, you can use any images you'd like.

Creating your own? We recommend you use an image size of **1920x1080** **minimum**.

## ◾ Live Wallpapers <a href="#live-wallpapers" id="live-wallpapers"></a>

Live wallpapers are animated videos that are in **.webm** format. One is provided for you as an example, as well as a .php script which allows you to implement them in your script.

## ◾ Upload / Webserver <a href="#upload-webserver" id="upload-webserver"></a>

* Upload the contents of the docs/web folder to your own hosting server.
* Open your script's background config file.
  * **`lua\modules\epistle\cfg\sh_cfg_bg.lua`**
* Locate the two tables associated with static and live wallpaper URLs.
  * **`cfg.bg.static.list`** and **`cfg.bg.live.list`**
* Edit the URLs to match your own webserver URL.
  * For static images; it is simply the path to your image:
    * *<https://yourdomain.com/web/static/1.jpg>*
  * For live wallpapers; use the .php file provided and add the video name:
    * *<http://yourdomain.com/web/live/index.php?id=default\\_1>*
* If you change the names of the files; then edit the paths accordingly.
* Once edited; save the config, and restart the server.

## ◾ Upload / Imgur <a href="#upload-imgur" id="upload-imgur"></a>

​[**https://imgur.com/**](https://imgur.com/) can be used for static wallpapers only. You will need to use your own personal webserver to host live wallpapers.

* Create an account on imgur.com
* Select **Add Images** and use the upload interface to select your static wallpapers and upload them.
* Once uploaded; select the photo and a popup will appear with a series of links on the right.
* Copy the **Direct Link** url
* Open your script's background config file.
  * **`lua\modules\epistle\cfg\sh_cfg_bg.lua`**
* Locate the static table URLs:
  * **`cfg.bg.static.list`**
* Edit the URLs to match your imgur direct URL.
  * *<https://i.imgur.com/yourimage.png>*
* Once edited; save the config, and restart the server.

![](https://gblobscdn.gitbook.com/assets%2F-M1JhiILStiA7jDKglRZ%2F-MOBhAPjamhzvSawNWcg%2F-MOBhD4zxUTVzrh82pcM%2Fwebdocs_imgur_setup.png?alt=media\&token=a92a30f0-ec0f-4ff6-b55d-489927b52660)


# Env

Library environment file.

The environment (env) file tells the library (rlib) how it should be loaded, and what needs to be done in order for the addon to work properly. Settings in this file should *only* be modified if the person knows exactly what they are doing; or by the developer.

You will not be given support if you modify this file. The only changes a server owner should make are the options described below.

## ▸Location

&#x20;   **`lua\modules\epistle\sh_env.lua`**

## ▸Settings

| Setting                | Desc                                                                                                                                                |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| **MODULE.enabled**     | Allows you to disable the addon without the need to move the addon's parent folder out of the server's addon folder.                                |
| **MODULE.ws\_enabled** | If false; workshop collection for the addon will not be forced to the player when they connect.                                                     |
| **MODULE.ws\_lst**     | Workshop collection to force on players if **MODULE.ws\_enabled** is true.                                                                          |
| **MODULE.mats**        | List of materials used with the addon. You may add your own, however, the server must be restarted after adding new entries before they are usable. |


# Fonts

Information related to modifying fonts.

## ▸ Location

&#x20;     **`lua\modules\epistle\core\cl_fonts.lua`**

## ▸ Parameters

&#x20;     ***`str`**`    ``prefix`*\
&#x20;                         prefix added to front of **id\_name** string

&#x20;     ***`str`**`    ``id_name`*\
&#x20;                         name used to call font entry

&#x20;     ***`str`**`    ``font`*\
&#x20;                         name of font used

&#x20;    ***`int`**`     ``size`*\
&#x20;                          size for font

&#x20;    ***`int`**`     ``weight`*\
&#x20;                          font weight ( *`100, 200, 300, 400, 500, 600, 700, 800`* )

&#x20;    ***`bool`**`    ``shadow`*\
&#x20;                          add shadow casting to the font

&#x20;    ***`bool`**`    ``extended`*\
&#x20;                          allow font to display glyphs outside Latin-1 range. \
&#x20;                          unicode code points above 0xFFFF are not supported.

&#x20;    ***`bool`**`    ``symbol`*\
&#x20;                          enables the use of symbolic fonts such as Webdings

## ▸ Structure

Each font has the following structure:

{% tabs %}
{% tab title="Structure Example" %}

```lua
_f( prefix, 'id_name', 'Font Name', size, weight, shadow, extended, sym )
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="lua\modules\epistle\core\cl\_fonts.lua" %}

```lua
_f( pf, 'g_welcome', 'Segoe UI Light', 40, 100 )
```

{% endtab %}
{% endtabs %}

## ▸ Saving Changes

After changing a font; you must execute the console command\
&#x20;     **`epistle.fonts.reload`**

## ▸ Notes

The only values you should modify are the **font name**, **size**, **weight**, and **shadow**.

If you wish to use a **custom font** that is not included with Garry's Mod; you must provide that font in a Steam Workshop collection for your server; or sync it to players using FastDL. This documentation does not include instructions on doing that; as it's outside the scope of what the purpose of this documentation is for.


# Languages

Information related to how this addon can be translated.

## ▸Location

All languages included with script are located in **`lua\modules\epistle\lang`**

## ▸Add Language

* Copy the **lua\modules\epistle\lang\en.lua** file
* Rename copied en.lua file to your own language
  * Example: **lua\modules\epistle\lang\ru.lua** ( russian )
* Open the new language file in a text editor.
* Locate the line:&#x20;
  * `mod.language[ 'en' ]`
* Change the line to your new language:&#x20;
  * `mod.language[ 'ru' ]`
* Translate all of the strings to your own language.

## ▸Set Default Language

* Open the folder **lua\modules\epistle\lang\\**
* Find the filename for the language you want to make as your default
* Open **lua\modules\epistle\cfg\sh\_cfg.lua**
* Locate the setting **cfg.lang**
* Change **'en'** to your own language's filename (without the .lua at the end)

```lua
cfg.lang = 'ru' -- russian
cfg.lang = 'es' -- spanish
cfg.lang = 'fr' -- french
```

* Restart your server if changes do not get applied immediately.

## ▸Switching Languages

You can switch languages in-game on-the-fly by typing **`!lang`** in chat.

![](https://1742197099-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MFN0d2Ri6RfiE0DEuoG%2F-MTIuZSdhs6B8yhcnbh3%2F-MTIugyhkiQJMWxVnLGx%2Flang.gif?alt=media\&token=63988a4e-cc22-40e1-8b19-a2e50b42503e)

{% hint style="warning" %}
The languages in the list are a compiled set from all the addons you own running rlib. If you own multiple scripts, but only have French translations for one; then the one addon will be translated to French and the others will default to English.
{% endhint %}


# Settings

Explains configuration options, paths, and general settings information

Settings files contain a wide variety of values that can be changed and deal with how the overall addon will look and perform. These files are typically where you will turn certain addon features on/off, change feature settings, modify the colors for any user-interface provided, etc.

## ❱ Location

**`lua\modules\epistle\cfg\*`**

## ❱ Files

| File              | Description                                             |
| ----------------- | ------------------------------------------------------- |
| sh\_cfg           | General settings                                        |
| sh\_cfg\_activity | Adjust user activity statuses (online, away)            |
| sh\_cfg\_bg       | Static & live backgrounds                               |
| sh\_cfg\_binds    | Key binds for activation                                |
| sh\_cfg\_dev      | Developer only settings                                 |
| sh\_cfg\_nav      | Navigation menu (steam workshop, rules, etc)            |
| sh\_cfg\_rules    | Rules that display in rules interface                   |
| sh\_cfg\_servers  | Server listing for server connection interface          |
| sh\_cfg\_staff    | Define groups considered staff for 'staff players' list |
| sh\_cfg\_ticker   | News ticker that displays on top of F4 menu             |


# Binds

Information related to displaying the script interface

| **Bind**  | **Desc**      | **Type**                                  |
| --------- | ------------- | ----------------------------------------- |
| *Chat*    | **`!motd`**   | Activate interface (if motd mode enabled) |
| *Chat*    | **`!rules`**  | Activates stand-alone rules dialog        |
| *Key*     | **`F9`**      | Activate interface                        |
| *Console* | **`epistle`** | Activate interface                        |
| *Console* | **`motd`**    | Activates interface                       |
| *Console* | **`rules`**   | Activates stand-alone rules dialog        |


# Rules

## ◾ About

The **url value** for your **rules** in the addon config file has not been set.

**Open your addon's config file** and set the url to a website which contains your network's rules; OR set your config to use text-based rules instead.

## ◾ Modifying

You may edit your **text-based rules** by opening:

&#x20;      **`lua\modules\epistle\cfg\sh_cfg_rules.lua`**

You may edit your **external rules url** by opening:

&#x20;      **`lua\modules\epistle\cfg\sh_cfg_nav.lua`**


# Web Demo

Information for your addon's web-browser

## ◾ About

This is a **demo page** for your addon's web-browser.

To edit this and your other URLs; open **`lua\modules\epistle\cfg\sh_cfg_nav.lua`**

## ◾ Integrated Browser Mode

The integrated browser mode displays your configured websites internally within the interface.&#x20;

## ◾ Steam Browser Mode

This option will display your configured websites within the Steam overlay.

## ◾ Changing Modes

To change between Integrated Browser and the Steam Browser; open the file specified in the **About** section.

Locate the setting for each button like the following:

{% tabs %}
{% tab title="lua\modules\lunera\cfg\sh\_3\_nav.lua" %}

```lua
cfg.nav.btn.group_int       = true
cfg.nav.btn.forums_int      = true
cfg.nav.btn.donate_int      = true
cfg.nav.btn.website_int     = true
cfg.nav.btn.workshop_int    = true
cfg.nav.btn.discord_int     = true
cfg.nav.btn.rules_int       = true
```

{% endtab %}
{% endtabs %}

| value     | description             |
| --------- | ----------------------- |
| **true**  | Integrated Browser Mode |
| **false** | Steam Overlay Mode      |

## ◾ Important Note (blank pages)

Currently; the integrated browser mode works by utilizing a library developed by Facepunch for Garry's Mod. Developers do not have access to actually change / update code in that library.

If you enable the Integrated Browser; and notice that certain websites are appearing blank; then you will need to either change the URL; or disable the integrated browser.

This is due to the fact that the provided library by Facepunch is extremely outdated and is based on Chromium v22 which is extremely outdated and does not recognize code used on websites. As of writing this; the current version of Chromium is v89.

Until Facepunch actually updates Chromium for Garry's Mod; this is the only solution.


# Status

## ◾ NEW

Files marked as **NEW** are files added to the specified version of the addon released. No further actions are needed.

####

## ◾ REM

Files marked as **REM** have been removed from the specified version of the addon release. If updating your script / overwriting existing files; ensure that you delete files marked this.


