Skip to content

Commit 4d9f215

Browse files
Update documentation
1 parent eda84a3 commit 4d9f215

File tree

12 files changed

+145
-37
lines changed

12 files changed

+145
-37
lines changed

docs/README.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@ title: README
1212
You've found a comprehensive solution that helps you administrate your DCS World servers. It has a Discord integration
1313
([now optional](#dcsserverbot-installation-non-discord)!) with slash-commands, built in per-server and per-user
1414
statistics, optional cloud-based statistics, [Coalitions](./COALITIONS.md)-support, a whole
15-
[Tournament-System](./plugins/tournament/README.md) and much more!<br>
15+
[Tournament-System](./plugins/tournament/README.md), a third-party [web-frontend](https://github.com/Penfold-88/DCS-Statistics-Dashboard) for
16+
statistics and much more!
17+
<p>
1618
With its plugin system and reporting framework, DCSServerBot can be enhanced very easily to support whatever might come
1719
into your mind. DCSServerBot is a solution for DCS server admins built by a DCS server admin.
18-
20+
<p>
1921
This documentation shows you the main features, how to install and configure the bot and some more sophisticated
2022
stuff at the bottom, if you for instance run multiple servers maybe even over multiple locations.
21-
23+
<p>
2224
Now let's see what DCSServerBot can do for you (installation-instructions [below](#installation))!
2325

2426
---
@@ -345,7 +347,7 @@ NODENAME: # this will usually be your hostname
345347
listen_address: 0.0.0.0 # Optional: On which interface should the bot listen? Default is 127.0.0.1.
346348
public_ip: 88.77.66.55 # Optional: Your public IP. ONLY if you have a static IP (!), put this in here to speedup the startup-process of the bot.
347349
slow_system: false # Optional: if you are using a slower PC to run your servers, you should set this to true (default: false)
348-
use_upnp: true # The bot will auto-detect, if there is an UPnP IGD available and configure this setting initially for you! If you do NOT want to use UPnP, even IF it is abailable, put this to false.
350+
use_upnp: true # The bot will auto-detect, if there is an UPnP IGD available and configure this setting initially for you! If you do NOT want to use UPnP, even IF it is available, put this to false.
349351
preferred_master: true # cluster only: this node should be the preferred master node (default: false)
350352
heartbeat: 30 # cluster only: time for the heartbeat between the master and agent nodes to run (default: 30)
351353
cloud_drive: false # cluster only: set this to false, if you do not have the bot installed on a cloud drive (default and recommended: true)
@@ -370,6 +372,17 @@ NODENAME: # this will usually be your hostname
370372
cloud: true # If you have installed DCS on a NAS or cloud drive, autoupdate and desanitization will only take place once on all your nodes.
371373
desanitize: true # Desanitize your MissionScripting.lua after each update. Default is true.
372374
minimized: true # Start DCS minimized (default: true)
375+
allow_unsafe_api: # as of DCS 2.9.18: allow dostring_in only in these environments
376+
- scripting
377+
- gui
378+
- userhooks
379+
allow_dostring_in: # as of DCS 2.9.18: allow dostring_in only targeting these contexts
380+
- scripting
381+
- config
382+
- server
383+
- mission
384+
- gui
385+
- export
373386
user: xxxx # Your DCS username (only needed for specific use-cases)
374387
password: xxxx # Your DCS password (will be auto-moved by the bot to a secret place)
375388
instances:

docs/extensions/olympus/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ DCS_MERCS:
1717
- name: DCSOlympus
1818
version: latest
1919
source: SavedGames
20+
# uncomment for auto-update:
21+
# repo: https://github.com/Pax1601/DCSOlympus
2022
```
2123
To use the DCS Olympus client, you need [Node.js](https://nodejs.org/download/release/latest-v20.x/) installed.
2224
Click on the link, download and install it. Remember the installation location, as you need to provide it in the

docs/extensions/srs/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,14 @@ MyNode:
3838
config: '{instance.home}\Config\SRS.cfg'
3939
host: 127.0.0.1
4040
port: 5002
41-
minimized: true # start SRS minimized (default: true)
41+
gui_server: true # Optional: use the SRS-Server.exe (GUI server) instead of the command line one
42+
minimized: true # Old SR-Server.exe: start SRS minimized (default: true)
4243
autoconnect: true # install the appropriate DCS-SRS-AutoConnectGameGUI.lua, default: true
4344
awacs: true # if you use LotAtc
4445
lotatc_export_port: 10712
4546
blue_password: blue
4647
red_password: red
48+
show_passwords: false # Optional: do not show red/blue passwords in the status embed (default: true)
4749
radio_effect_override: false # optional: disable radio effects (LOS, etc)
4850
global_lobby_frequencies: 248.22,30.0,127.0 # optional: set your music channels in here
4951
autostart: true # optional: if you manage your SRS servers outside of DCSSB, set that to false

docs/plugins/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ function myplugin.onPlayerConnect(id)
278278
dcsbot.sendBotTable(msg)
279279
end
280280

281-
DCS.setUserCallbacks(myplugin)
281+
Sim.setUserCallbacks(myplugin)
282282
```
283283

284284
### lua/commands.lua
@@ -292,7 +292,7 @@ local dcsbot = base.dcsbot
292292

293293
function dcsbot.pauseMission(json)
294294
log.write('DCSServerBot', log.DEBUG, 'Mission: pauseMission()')
295-
DCS.setPause(true)
295+
Sim.setPause(true)
296296
end
297297
```
298298

docs/plugins/creditsystem/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ away due to punishment points a player gets due to team-kills or the like.
1414
## Configuration
1515
The CreditSystem is configured with a file named config\plugins\creditsystem.yaml. You'll find a sample file in that directory:
1616
```yaml
17-
DEFAULT: # valid for all servers
18-
initial_points: 10 # The initial points a player gets (default = 0).
19-
max_points: 100 # The maximum points a player can get (default = unlimited).
20-
multiplier: 1 # multiplier for credit points on proper landings (if payback is enabled in slotblocking.yaml)
17+
DEFAULT: # valid for all servers
18+
initial_points: 10 # The initial points a player gets (default = 0).
19+
max_points: 100 # The maximum points a player can get (default = unlimited).
20+
multiplier: 1.0 # multiplier for credit points on proper landings if payback is enabled in slotblocking.yaml (default: 1.0)
21+
points_on_rtb: false # only give credit points on RTB (default: false)
2122
squadron_credits: true # enable squadron credits (see below).
2223
squadron:
2324
initial_points: 100 # default: 0

docs/plugins/mission/README.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,25 @@ DEFAULT:
7373
You can configure the behaviour of the mission plugin with an optional config/plugins/mission.yaml:
7474
```yaml
7575
DEFAULT:
76-
uploads: # Configure how mission uploads are handled
77-
enabled: true # Here you can disable the feature at all (default: true = enabled)
76+
event_filter: # do NOT report these events (default: [])
77+
- connect
78+
- disconnect
79+
- change_slot
80+
- friendly_fire
81+
- self_kill
82+
- kill
83+
- takeoff
84+
- landing
85+
- crash
86+
- eject
87+
- pilot_death
88+
- shot
89+
- hit
90+
uploads: # Configure how mission uploads are handled
91+
enabled: true # Here you can disable the feature at all (default: true = enabled)
92+
channel: 112233445566778899 # Optional: mission upload channel (default: admin channel)
7893
discord:
79-
- DCS Admin # Define which roles are allowed to upload missions (default: DCS Admin)
94+
- DCS Admin # Define which roles are allowed to upload missions (default: DCS Admin)
8095
```
8196
8297
## Auto-Scanning

docs/plugins/motd/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ If you want to play sounds, make sure that you loaded them into the mission firs
6767
display_type: chat # the message will be displayed in the in-game chat
6868
- delay: 120 # this message will be displayed every 2 mins
6969
message: "To see your stats, you can link your user by using /linkme in your discord!"
70-
receipients: '!@everyone' # and will be sent to anybody that is not linked yet (has not the discord role @everyone)
70+
recipients: '!@everyone' # and will be sent to anybody that is not linked yet (has not the discord role @everyone)
7171
display_type: popup # Message will be a popup
7272
```
7373

docs/plugins/punishment/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,13 @@ DEFAULT:
3333
human: 12
3434
AI: 8
3535
reason: Friendly fire on a team member
36-
- event: collision_hit # if you hit another team member, you get 5 points, 1 if it was an AI.
36+
- event: collision_hit # If you hit another team member, you get 5 points, 1 if it was an AI.
3737
human: 5
3838
AI: 1
3939
reason: Colliding with a team member
40+
- event: reslot # If you re-slotted when being shot at, you get 30 points (you stole a kill)
41+
default: 30
42+
reason: Respawning when being shot at
4043
forgive: 30 # People can forgive others in-between of 30 seconds (default) with the .forgive in-game chat command.
4144
punishments: # list of punishments, based on the users penalty points
4245
- points: 100 # we temp-ban the player when they reached 100 points.

docs/plugins/restapi/README.md

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ nav_section: plugins/restapi
55
---
66

77
# Plugin RestAPI
8-
This API provides a very simple RestAPI that you can call from your webserver to receive data from DCSServerBot.
9-
It is WIP, and it will be enhanced in the future.
8+
This API provides a very simple RestAPI that you can user together with the [WebService](../../services/webservice/README.md).
9+
You can use it to power the [DCS Statistics Dasboard](https://github.com/Penfold-88/DCS-Statistics-Dashboard).
1010

1111
## Configuration
1212
As RestAPI is an optional plugin, you need to activate it in main.yaml first like so:
@@ -15,26 +15,42 @@ opt_plugins:
1515
- restapi
1616
```
1717
18-
There is some very basic endpoint configuration available as of now, which you can add in your
19-
config/plugins/restapi.yaml like so:
18+
You can configure the RestAPI endpoints in your config\plugins\restapi.yaml like so:
2019
```yaml
2120
DEFAULT:
22-
listen: 0.0.0.0 # the interface to bind the internal webserver to
23-
port: 9876 # the port the internal webserver is listening on
24-
prefix: /stats # use this prefix (optional)
21+
prefix: /stats # Optional: use this prefix
22+
api_key: aaabbbcccc # Optional: API key to be used to secure the API
23+
endpoints: # endpoint configuration
24+
servers: # /servers
25+
filter: # config parameter (in this case, the server filter list)
26+
- 'MyPrivateServer' # Do not show a server named "MyPrivateServer"
27+
- '(.*)Private(.*)' # Do not show any server that has "Private" in its name
2528
```
2629
30+
> [!WARNING]
31+
> Do NOT use a prefix if you work with the DCS Statistics Dasboard!
32+
2733
## RestAPI
2834
The following commands are available through the API
2935
30-
| API | GET / POST | Parameters | Return | Description |
31-
|------------|------------|---------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------|
32-
| /getuser | POST | nick: string | {"name": string, "last_seen": date} | Return a list of players ordered by last seen that match this nick. |
33-
| /stats | POST | nick: string, date: date | {<br>"deaths": int,<br>"aakills": int,<br>"aakdr": float,<br>"lastSessionKills": int,<br>"lastSessionDeaths": int,<br>"killsbymodule": [<br>{"module": string, "kills": int}<br>],<br>"kdrByModule": [<br>{"module": string, "kdr": float}<br>]<br>} | Statistics of this player |
34-
| /topkills | GET | | {"fullNickname": string, "AAkills": int, "deaths": int, "AAKDR": float} | Top 10 of players ordered by kills descending. |
35-
| /topkdr | GET | | {"fullNickname": string, "AAkills": int, "deaths": int, "AAKDR": float} | Same as /topkills but ordered by AAKDR descending. |
36-
| /missilepk | POST | nick: string, date: date | {"weapon": {"weapon-name": string, "pk": float}} | Probability of kill for each weapon per given user. |
37-
| /linkme | POST | discord_id: string, force: bool | {"token": 1234, "timestamp": "2025-02-03 xx:xx:xx...", "rc": 0} | Same as /linkme in discord. Returns a new token that can be used in the in-game chat. |
36+
| API | GET / POST | Parameters | Description |
37+
|-------------------|------------|-------------------------------------------------------|---------------------------------------------------------------------------------------|
38+
| /serverstats | GET | | A comprehensive statistic for your whole setup. |
39+
| /servers | GET | | Status for each server. |
40+
| /getuser | POST | nick: string | Return a list of players ordered by last seen that match this nick. |
41+
| /stats | POST | nick: string, date: date | Statistics of this player |
42+
| /highscore | GET | [server_name: string], [period: string], [limit: int] | Highscore output |
43+
| /topkills | GET | [limit: int] | Top x of players ordered by kills descending. |
44+
| /topkdr | GET | [limit: int] | Same as /topkills but ordered by AAKDR descending. |
45+
| /trueskill | GET | [limit: int] | Top x trueskill ratings. |
46+
| /weaponpk | POST | nick: string, date: date | Probability of kill for each weapon per given user. |
47+
| /credits | POST | nick: string, date: date, [campaign] | Credits of a specific player. |
48+
| /traps | POST | nick: string, date: string, [limit: int] | Lists the traps of that user. |
49+
| /squadrons | GET | | Lists all squadrons. |
50+
| /squadron_members | POST | name: string | Lists the members of the squadron with that name. |
51+
| /squadron_credits | POST | name: string, [campaign] | Lists the members of the squadron with that name. |
52+
| /linkme | POST | discord_id: string, force: bool | Same as /linkme in discord. Returns a new token that can be used in the in-game chat. |
3853
39-
> [!IMPORTANT]
40-
> It is advisable to use a reverse proxy like nginx and maybe an SSL encryption between your webserver and this endpoint.
54+
> [!NOTE]
55+
> To get a more detailled API-documentation, please enable debug in your WebService config and
56+
> access https://localhost:9876/docs.

docs/services/cron/README.md

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ DEFAULT:
108108
```
109109
110110
e) popup
111-
Send a popup
111+
Send a popup to a running server.
112112
```yaml
113-
DEFAULT:
113+
DCS.server_release:
114114
actions:
115115
- cron: '55 3 * * 1' # Send a message to everyone at Mo, 03:55h
116116
action:
@@ -120,7 +120,20 @@ DEFAULT:
120120
timeout: 20
121121
```
122122
123-
f) purge_channel
123+
f) broadcast
124+
Send a popup to all running servers.
125+
```yaml
126+
DEFAULT:
127+
actions:
128+
- cron: '55 3 * * 1' # Send a message to everyone at Mo, 03:55h
129+
action:
130+
type: broadcast
131+
params:
132+
message: Server will shut down in 5 mins!
133+
timeout: 20
134+
```
135+
136+
g) purge_channel
124137
Delete messages from a Discord channel.
125138
```yaml
126139
DEFAULT:
@@ -136,7 +149,7 @@ DEFAULT:
136149
ignore: 119922883377446655 # ignore this user id AND message id (either the bot's or persistent messages in the channel); can be either an ID or a list of IDs
137150
```
138151
139-
g) dcs_update
152+
h) dcs_update
140153
Run a DCS update at a specific time.
141154
```yaml
142155
DEFAULT:
@@ -149,3 +162,15 @@ DEFAULT:
149162
- 120
150163
- 60
151164
```
165+
166+
i) node_shutdown
167+
Shutdown / restart the bot.
168+
```yaml
169+
DEFAULT:
170+
actions:
171+
- cron: '0 3 * * *' # run every night at 03:00
172+
action:
173+
type: node_shutdown # restart the bot
174+
params:
175+
restart: true
176+
```

0 commit comments

Comments
 (0)