mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Updated Dedicated Server Guide (markdown)
parent
e00b48bdcf
commit
bd71842f7d
65
Dedicated-Server-Guide-[WIP].md
Normal file
65
Dedicated-Server-Guide-[WIP].md
Normal file
@ -0,0 +1,65 @@
|
||||
There are a few additional steps and caveat to running a dcs-liberation mission on a dedicated DCS server.
|
||||
I'll try and explain them, as the server manager of my squadron, and dcs-liberation contributor.
|
||||
If you have any questions, comments, or think this document is incomplete or wrong, please contact me on dcs-liberation's Discord.
|
||||
|
||||
[VEAF]Zip.
|
||||
|
||||
## Preparing the server
|
||||
|
||||
### 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.
|
||||
|
||||
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.
|
||||
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`).
|
||||
|
||||
Sometimes, you'll have an already modded file because you're using scripts that need access to specific packages.
|
||||
That's alright, as long as the `os`, `io` and `lfs` packages are accessible.
|
||||
|
||||
To ensure this, simply be certain that these particular lines are commented out :
|
||||
__Original:__
|
||||
```lua
|
||||
sanitizeModule('os')
|
||||
sanitizeModule('io')
|
||||
sanitizeModule('lfs')
|
||||
```
|
||||
__Commented out:__
|
||||
```lua
|
||||
--sanitizeModule('os')
|
||||
--sanitizeModule('io')
|
||||
--sanitizeModule('lfs')
|
||||
```
|
||||
|
||||
*Be advised, as soon as you use the dcs-updater to install a new version of DCS, this file will be restored and you'll have to mod it again !*
|
||||
|
||||
### The specific case of *slmod*
|
||||
|
||||
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.
|
||||
Go and edit this file : `<saved games>\dcs\Scripts\net\Slmodv7_5\SlmodMissionScripting.lua`.
|
||||
Make sure to comment the lines mentionned in the previous section.
|
||||
|
||||
You should also make the modification to the original file in DCS folder (see previous section), and the caveat about updating applies to *slmod* too.
|
||||
|
||||
### Environment variables
|
||||
|
||||
The dcs-liberation 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)
|
||||
- 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]]
|
||||
```
|
||||
|
||||
## Preparing the mission
|
||||
|
||||
## Getting the result of the mission
|
||||
|
||||
@ -1,10 +0,0 @@
|
||||
[WIP]
|
||||
|
||||
The state file should be written in <dcs_liberation_directory>/state.json.
|
||||
|
||||
If you are running the mission on a server, so not on the same PC as DCS Liberation, make sure to recreate the same directory structure on the server, so there is a fake DCS Liberation directory somewhere. (It is not very well supported yet)
|
||||
|
||||
To allow the DCS process on the server to write the state file, you also have to replace the file <DCS_installation_directory/Scripts/MissionScripting.lua> by the one here : <DCS Liberation Directory>/resources/scripts/MissionScripting.lua>
|
||||
|
||||
You can close the mission whenever you feel it is over. Then retrieve the state.json file from FTP and submit it in DCS Liberation on your PC;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user