Skip to content

Commit

Permalink
docs: Improve documentation on mods/plugins (#47)
Browse files Browse the repository at this point in the history
#patch 

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: JamesIves <[email protected]>
  • Loading branch information
3 people authored Oct 2, 2024
1 parent 5007e0d commit 9a1ef05
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 24 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Before starting, ensure you have the [Docker daemon](https://www.docker.com/) a
You can run the following in your terminal to get started as quickly as possible. Adjust the image name (`jives/hlds`) so the tag corresponds with the game you want to use. Additionally, you can adjust the server startup arguments by modifying the `command` property; [for a list of available arguments, visit the Valve Developer Wiki](https://developer.valvesoftware.com/wiki/Half-Life_Dedicated_Server).

```bash
docker run -d \
docker run -d -ti \
--name hlds \
-v "$(pwd)/config:/temp/config" \
-v "$(pwd)/mods:/temp/mods" \
Expand Down
29 changes: 21 additions & 8 deletions config/README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,36 @@
# Configs and Plugins

If you wish to add server configurations, such as add-ons, plugins, map rotations, etc, you can add them to the `config` directory. The `config` directory is volume-mapped within the directory for the game for which you're starting the container. For example, if you're starting a container for `cstrike`, you can add things like `mapcycle.txt` or `motd.txt` here, and it would appear within the corresponding `cstrike` directory on the server.
If you wish to add server configurations, such as add-ons, plugins, map rotations, etc, you can add them to the `config` directory. Your directory setup should look something like the following where you're running either `docker run` or `docker compose` next to where the `config` directory is located.

```
├── 📂 server
│ ├── 📜 docker-compose.yml
│ ├── 📂 config
│ │ ├── 📜 mapcycle.txt
│ │ ├── 📜 motd.txt
│ │ ├── 📂 maps
| │ | ├── 📜 crazytank.bsp
```


The `config` directory is volume-mapped within the directory for the game for which you're starting the container. For example, if you're starting a container for `cstrike`, you can add things like `mapcycle.txt` or `motd.txt` here, and it would appear within the corresponding `cstrike` directory within the container.

> [!NOTE]
> The startup examples posted in the project README already have this directory volume mapped accordingly. If you've strayed from the suggested setup, [please refer back to it to get started](../../README.md).
```
├── hlds
│ ├── cstrike
│ │ ├── models
│ ├── maps
│ │ ├── mapcycle.txt
│ │ ├── motd.txt
├── 📦 hlds
│ ├── 📂 cstrike
│ │ ├── 📂 maps
|| ├── 📜 crazytank.bsp
│ │ ├── 📜 mapcycle.txt
│ │ ├── 📜 motd.txt
```

> [!TIP]
> You can use this method to install server plugins such as AMX Mod, Meta Mod, etc., as the directory can handle nested folders too; for example, these can be placed in `config/addons/amxmodx` etc.
1. Create a folder called `config` alongside where you would typically start the server process. If you've cloned this project locally, you'd place it alongside this README file.
1. Create a folder called `config` alongside where you would typically start the server process. If you've cloned this project locally, you'd place your files alongside this README file.
2. Add your config files to the directory.
3. Start the image as you usually would, either with `docker run` or `docker compose up`.

Expand Down
47 changes: 32 additions & 15 deletions mods/README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,44 @@
# Custom Mods

If you want to run a custom mod, you can do so with the `mods` directory. The `mods` directory is volume mapped within the root directory of the Half-Life Dedicated Server client on startup. For example, if you wanted to add a mod named `decay`, you'd place it as a subfolder here, i.e., `mods/decay`. Once the container starts, it would be placed in the following directory.
If you want to run a custom mod, you can do so with the `mods` directory. Your directory setup should look something like the following where you're running either `docker run` or `docker compose` next to where the `mods` directory is located.

```
├── hlds
│ ├── cstrike
│ │ ├── models
│ │ ├── maps
│ │ ├── autoexec.cfg
│ ├── valve
│ │ ├── models
│ │ ├── maps
│ │ ├── autoexec.cfg
│ ├── decay
│ │ ├── models
│ │ ├── maps
│ │ ├── autoexec.cfg
├── 📂 server
│ ├── 📜 docker-compose.yml
│ ├── 📂 mods
│ | ├── 📂 decay
│ │ | ├── 📜 autoexec.cfg
│ │ | ├── 📂 models
│ │ | ├── 📂 maps
│ | ├── 📂 svencoop
```

The `mods` directory is volume mapped within the root directory of the Half-Life Dedicated Server client on startup. For example, if you wanted to add a mod named `decay`, you'd place it as a subfolder here, i.e., `mods/decay`. Once the container starts, it would be placed in the following directory within the container.

```
├── 📦 hlds
│ ├── 📂 cstrike
│ │ ├── 📂 models
│ │ ├── 📂 maps
│ │ ├── 📜 autoexec.cfg
│ ├── 📂 valve
│ │ ├── 📂 models
│ │ ├── 📂 maps
│ │ ├── 📜 autoexec.cfg
│ ├── 📂 decay
│ │ ├── 📂 models
│ │ ├── 📂 maps
│ │ ├── 📜 autoexec.cfg
│ ├── 📂 svencoop
│ │ ├── 📂 models
│ │ ├── 📂 maps
│ │ ├── 📜 autoexec.cfg
```

> [!NOTE]
> The startup examples posted in the project README already have this directory volume mapped accordingly. If you've strayed from the suggested setup, [please refer back to it to get started](../README.md).
1. Create a folder called `mods` alongside where you would normally start the server process. If you've cloned this project locally, you'd place it alongside this README file.
1. Create a folder called `mods` alongside where you would normally start the server process. If you've cloned this project locally, you'd place your files longside this README file.
2. Add your mod files as a sub-directory of `mods`. For example if the mod name is `decay`, you'd place it in `mods/decay`.
3. Define the `GAME` environment variable for your mod name. The dedicated server client will use this to ensure that it starts a server for the correct mod, which corresponds with the directory name that was just created.

Expand Down

0 comments on commit 9a1ef05

Please sign in to comment.