Updated Dedicated Server Guide (markdown)

MetalStormGhost 2023-07-18 08:20:03 +03:00
parent 777c8ffff0
commit a587b285bc

@ -33,15 +33,15 @@ If you have any questions, comments, or think this document is incomplete or wro
### Modding `MissionScripting.lua`
Any DCS instance running dcs-liberation, be it a standalone installation or a dedicated server, must have a modified `MissionScripting.lua` in order for the LUA script to have access to the `os`, `io` and `lfs` packages.
Any DCS instance running dcs-retribution, be it a standalone installation or a dedicated server, must have a modified `MissionScripting.lua` in order for the LUA script to have access to the `os`, `io` and `lfs` packages.
When running on a standalone installation, usually (that is, if everything works as planned) the dcs-liberation program itself will replace the original `MissionScripting.lua` file with an edited version.
When running on a standalone installation, usually (that is, if everything works as planned) the dcs-retribution program itself will replace the original `MissionScripting.lua` file with an edited version.
Of course, this is not possible when DCS run on a different machine, as a dedicated server.
In this case, you need to edit the file yourself.
The easiest way to do it is to replace the original file (`<dcs installation>\Scripts\MissionScripting.lua`) with the file in dcs-liberation distribution (`<dcs-liberation installation>\resources\scripts\MissionScripting.lua`).
The easiest way to do it is to replace the original file (`<dcs installation>\Scripts\MissionScripting.lua`) with the file in dcs-retribution distribution (`<dcs-retribution installation>\resources\scripts\MissionScripting.lua`).
Sometimes, you'll have an already modded file because you're using scripts that need access to specific packages.
@ -71,7 +71,7 @@ __Commented out:__
If you're using [slmod](https://github.com/mrSkortch/DCS-SLmod), you have to be extra careful.
It also has [a specific version](https://github.com/mrSkortch/DCS-SLmod/blob/master/Scripts/net/Slmodv7_5/SlmodMissionScripting.lua) of the `MissionScripting.lua` file which is used to replace DCS', and if you want the dcs-liberation script to work properly you have to edit it, too.
It also has [a specific version](https://github.com/mrSkortch/DCS-SLmod/blob/master/Scripts/net/Slmodv7_5/SlmodMissionScripting.lua) of the `MissionScripting.lua` file which is used to replace DCS', and if you want the dcs-retribution script to work properly you have to edit it, too.
Go and edit this file : `<saved games>\dcs\Scripts\net\Slmodv7_5\SlmodMissionScripting.lua`.
@ -82,26 +82,26 @@ You should also make the modification to the original file in DCS folder (see pr
### Environment variables
The dcs-liberation script will try and write the `state.json` file at the following locations :
The dcs-retribution script will try and write the `state.json` file at the following locations :
- `%LIBERATION_EXPORT_DIR%` (an environment variable)
- the dcs-liberation install folder, stored in the mission (probably not the same on the server and on the computer that generated the mission)
- `%RETRIBUTION_EXPORT_DIR%` (an environment variable)
- the dcs-retribution install folder, stored in the mission (probably not the same on the server and on the computer that generated the mission)
- the system's temporary folder (as defined in the `%TEMP%` environment variable)
- DCS' install directory
This will be stated in the DCS log file (accessible in `<saved games>\dcs\logs\dcs.log`) like this :
```
2020-10-20 20:44:52.652 INFO SCRIPTING: DCSLiberation|discoverDebriefingFilePath|75: Using DCS Liberation install folder for state.json
2020-10-20 20:44:52.652 INFO SCRIPTING: DCSLiberation|87: DCS Liberation state will be written as json to [[D:\dev\_VEAF\dcs_liberation\state.json]]
2022-10-20 20:44:52.652 INFO SCRIPTING: DCSRetribution|discoverDebriefingFilePath|75: Using DCS Retribution install folder for state.json
2022-10-20 20:44:52.652 INFO SCRIPTING: DCSRetribution|87: DCS Retribution state will be written as json to [[D:\dev\_VEAF\dcs_retribution\state.json]]
```
You can (and should) set the `%LIBERATION_EXPORT_DIR%` environment variable on your server. Please note that you'll have to restart DCS, and maybe even your server, depending on your configuration, before it's taken into account.
You can (and should) set the `%RETRIBUTION_EXPORT_DIR%` environment variable on your server. Please note that you'll have to restart DCS, and maybe even your server, depending on your configuration, before it's taken into account.
## Preparing the mission
After installing dcs-liberation on a computer (let's call it the mission computer), configure it the way you like (including plugins, if you want), and start a new campaign.
After installing dcs-retribution on a computer (let's call it the mission computer), configure it the way you like (including plugins, if you want), and start a new campaign.
At one point, you'll want to *fly* a mission. When you press the *Take off* button in dcs-liberation, it'll generate a mission : `<saved games>\dcs\missions\retribution_nextturn.miz`.
At one point, you'll want to *fly* a mission. When you press the *Take off* button in dcs-retribution, it'll generate a mission : `<saved games>\dcs\missions\retribution_nextturn.miz`.
Now, you can simply copy the mission file to your server and run it.
@ -117,7 +117,7 @@ When the mission is over, double-check that the `state.json` file is updated : c
If in doubt, end the mission on the server (running another mission is enough ; I keep one "empty" mission on each theater, it's very quick to run).
Then download the `state.json` file on the mission computer, and enter it in dcs-liberation, using the "Manually submit" button :
Then download the `state.json` file on the mission computer, and enter it in dcs-retribution, using the "Manually submit" button :
![](https://i.imgur.com/Izml39p.jpg)