diff options
| author | Ritabrata Das <[email protected]> | 2025-02-16 11:14:35 +0530 |
|---|---|---|
| committer | Ritabrata Das <[email protected]> | 2025-02-16 11:14:35 +0530 |
| commit | 2402122cf7ed25bb61d6872bbc007ed7419dc742 (patch) | |
| tree | d6b6a43896b0876fc767e6dd215151057f60d079 /docs/user | |
| parent | 6aa3b56c276ee285ed2f0657f32586102ac7cd2f (diff) | |
Add hooks and user documentation
Diffstat (limited to 'docs/user')
| -rw-r--r-- | docs/user/README.md | 66 | ||||
| -rw-r--r-- | docs/user/_sidebar.md | 3 | ||||
| -rw-r--r-- | docs/user/advanced.md | 90 | ||||
| -rw-r--r-- | docs/user/discord.md | 20 | ||||
| -rw-r--r-- | docs/user/img/step1.png | bin | 0 -> 46232 bytes | |||
| -rw-r--r-- | docs/user/img/step2.png | bin | 0 -> 38854 bytes | |||
| -rw-r--r-- | docs/user/img/step3.png | bin | 0 -> 25723 bytes | |||
| -rw-r--r-- | docs/user/img/step4.png | bin | 0 -> 40307 bytes | |||
| -rw-r--r-- | docs/user/img/step5.png | bin | 0 -> 225097 bytes | |||
| -rw-r--r-- | docs/user/img/step6.png | bin | 0 -> 47259 bytes |
10 files changed, 179 insertions, 0 deletions
diff --git a/docs/user/README.md b/docs/user/README.md new file mode 100644 index 0000000..8626ae1 --- /dev/null +++ b/docs/user/README.md @@ -0,0 +1,66 @@ +## Introduction + +Sakuya AC has the following features: +1. Discord Chat sync +2. G Limiter +3. Plugin Support +etc. + +This guide will help you to install Sakuya AC on your server + +## Quick Start Guide + +1. Clone the git repository +```bash +git clone [email protected]:the-indian-dev/sakuya-ac +``` + +2. You will need Python 3.9 or above to run Sakuya AC +Please make sure you have correct version of Python + +3. Install the dependencies + +- For Windows +```bash +py -m pip install -r requirements.txt +``` +- For Debian, Ubuntu etc. +```bash +sudo apt install python3-aiohttp +``` +- For Arch Linux +```bash +sudo pacman -S python-aiohttp +``` + +4. Setup Configuration +- Open `config.py` in a text editor +- Start YSF Server and put its IP in `SERVER_HOST` and Port in `SERVER_PORT`. + The Proxy will run at the port given at `PROXY_PORT` + +5. Run the Proxy +```bash +python proxy.py +``` +You can now connect to the Proxy server at the port you specified in `PROXY_PORT` + +- Advanced Configuration is documented [here](/user/advanced.md) + +## Installing Plugins + +!> Plugins can be harmful to your computer, please install from trusted sources. + We are NOT responsible for installing plugins from untrusted sources. + +1. Download plugin from a trusted source +2. Put the plugin in the `plugins` directory + - If the plugin is a `.py` file, put it in the `plugins` directory + - If the plugin is a `.zip` file, extract it and put it in the `plugins` directory +3. Set the `ENABLED` variable in the plugin file to `True` +4. Run the proxy + +## Reporting Issues + +1. Please set logging level to `DEBUG` in `config.py` +2. Please provide the replay .yfs file for the issue +3. Provide steps to reproduce the bug +4. Start a new issue on our Github repository. diff --git a/docs/user/_sidebar.md b/docs/user/_sidebar.md new file mode 100644 index 0000000..fe12b7f --- /dev/null +++ b/docs/user/_sidebar.md @@ -0,0 +1,3 @@ +* [Getting Started](/user/README.md) +* [Advanced Configuration](/user/advanced.md) +* [Setting up Discord Chat Sync](/user/discord.md) diff --git a/docs/user/advanced.md b/docs/user/advanced.md new file mode 100644 index 0000000..aed5019 --- /dev/null +++ b/docs/user/advanced.md @@ -0,0 +1,90 @@ +# `config.py` Configuration + +The `config.py` file is the main configuration file for Sakuya AC. It contains the following configuration options: + +### `LOGGING_LEVEL` + +The logging level for the proxy. The logging level can be one of the following: +1. `DEBUG` : Logs all messages (Recomedded for debugging and reporting issues) +2. `INFO` : Logs only informational messages (Default, Recomended for normal use) +3. `WARNING` : Logs only warning messages +4. `CRTITICAL` : Logs only critical messages + +### `SERVER_HOST` + +The IP address of the YSF Server. The proxy will connect to this IP address. +For local server, use `"127.0.0.1"`, It takes string values, so make sure to +put quotaion marks around the IP address. + +### `SERVER_PORT` + +The port of the YSF Server. The proxy will connect to this port. The default is +`7915`, which is the default port for YSF Server. It takes integer values. Do not +put quotation marks around the port number. + +### `PROXY_PORT` + +The port on which the proxy will run. The default is `9000`. It takes integer values. + +### `WELCOME_MESSAGE` + +The welcome message that will be displayed when a client logs in to the YSFlight server. +It takes string values. You can use the following placeholders in the message: +- `{username}` : The username of the client +> eg. `Welcome {username} to the server!` +> This will display `Welcome Sakuya to the server!` when a client with username +> `Sakuya` logs in. + +### `PREFIX` + +This is the prefix for the chat commands in your server. The default is `/`. +It takes string values. Make sure to put quotation marks around the prefix. +> eg. If you set the prefix to `!`, then the command to change fog color would be `!fog` + +!> Messages starting with prefix will be treated as commands. Make sure to set a + prefix that is not used in normal chat messages. + +### `YSF_VERSION` + +The version for your YSFlight server. The default is `20150425`. It takes integer values. + +### `G_LIM` + +The G-Limiter value for your server. The default is `4`. It takes integer values. +The client will take damage if absolute value of their G force exceeds this value. + +- To change the interval at which the client takes G Force Damage, change the value of +`INTERVAL` in `plugins/over_g_damage.py`. The default is `0.2`, which means the client +takes damage every 0.2 seconds. + +### `HEALTH_HACK_MESSAGE` + +The message that will be displayed when a client tries to hack their health. It takes +string values. The username of the client is automatically appended to the end of the +message + +>eg. `HEALTH_HACK_MESSAGE = "Detected for Health Hack"` +> This will display `Detected for Health Hack by Sakuya` when a client tries to cheat. + +### `SMOKE_PLANE` + +If the plane should smoke when it has a life lower than `SMOKE_LIFE`. The default is `True`. + +### `SMOKE_LIFE` + +The life value below which the plane should start smoking. The default is `5`. It takes integer values. + +### `DISCORD_ENABLED` + +If the Discord Chat Sync should be enabled. The default is `False`. It takes boolean values. +You must `aiohttp` installed to use this feature. + +Setting up Discord Chat Sync is documented [here](/user/discord.md) + +### `DISCORD_TOKEN` + +The Discord Bot Token for the Discord Chat Sync. It takes string values. + +### `CHANNEL_ID` + +The Channel ID of the channel where the chat messages will be sent. It takes integer values. diff --git a/docs/user/discord.md b/docs/user/discord.md new file mode 100644 index 0000000..b6ea279 --- /dev/null +++ b/docs/user/discord.md @@ -0,0 +1,20 @@ +# Creating a Discord Bot account + +1. Go to [Discord Developer Portal](https://discord.com/developers/applications), + and login with your Discord account. +2. Click on `New Application` and give your bot a name. +  +3. Go to the left sidebar and click on `Bot`. +  +4. Click on `Reset Token` and copy the token. This your bot token for `DISCORD_TOKEN` in `config.py`. +  +5. Scroll down to `Privileged Gateway Intents`. +6. Enable **Message Content** Intent. This is important! +  + +# Getting Channel ID + +1. Go to your Discord server and right click on the channel where you want to sync the chat. +2. Click on `Copy ID` to copy the channel ID. +  +3. Paste the channel ID in `CHANNEL_ID` in `config.py`. diff --git a/docs/user/img/step1.png b/docs/user/img/step1.png Binary files differnew file mode 100644 index 0000000..e7b2447 --- /dev/null +++ b/docs/user/img/step1.png diff --git a/docs/user/img/step2.png b/docs/user/img/step2.png Binary files differnew file mode 100644 index 0000000..3eee04e --- /dev/null +++ b/docs/user/img/step2.png diff --git a/docs/user/img/step3.png b/docs/user/img/step3.png Binary files differnew file mode 100644 index 0000000..165f711 --- /dev/null +++ b/docs/user/img/step3.png diff --git a/docs/user/img/step4.png b/docs/user/img/step4.png Binary files differnew file mode 100644 index 0000000..0fd4edd --- /dev/null +++ b/docs/user/img/step4.png diff --git a/docs/user/img/step5.png b/docs/user/img/step5.png Binary files differnew file mode 100644 index 0000000..69fdf8a --- /dev/null +++ b/docs/user/img/step5.png diff --git a/docs/user/img/step6.png b/docs/user/img/step6.png Binary files differnew file mode 100644 index 0000000..f7f847f --- /dev/null +++ b/docs/user/img/step6.png |
