Skip to content

Commit

Permalink
Update documentation to explain FastDL behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
SamVanheer committed Jan 8, 2024
1 parent bc6a748 commit 39d3f70
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ The files in this directory and subdirectories contain documentation for the Uni

## Tutorials

* [Using FastDL with servers](tutorials/using-fastdl-with-servers.md)
* [Setting up Visual Studio Code to edit PowerShell scripts](tutorials/setting-up-vscode-for-powershell.md)
* [Setting up and using dotnet script](tutorials/setting-up-and-using-dotnet-script.md)
* [Extracting the Opposing Force relationship table](tutorials/extracting-relationship-table.md)
Expand Down
7 changes: 5 additions & 2 deletions docs/features/network-data-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ To ensure the correct operation of this system the following cvars are forcibly
* sv_allow_dlfile
* cl_allowdownload

Two limitations currently exist:
One limitation currently exists:
1. You cannot connect to a dedicated server running from the same game installation as the client. This should never be a problem because the dedicated server tool distributed with the client does not work anymore, and dedicated servers should always be installed separately through SteamCMD.
2. If multiple servers share a FastDL server and transfer the generated file to it they will conflict and use the wrong file. If this does become a problem then a possible solution is to store the file in a subdirectory named after the server IP and port: `1.2.3.4_port`. This would make the filename unique for each server. The client has the server's IP address so this should work, but whether this will actually work or not remains to be seen.

The network data system uses the logger named `net_data`.

Expand Down Expand Up @@ -101,3 +100,7 @@ void AmmoTypeSystem::HandleNetworkDataBlock(NetworkDataBlock& block)
Setting `block.ErrorMessage` to a non-empty string aborts serialization/deserialization.
Any kind of JSON data type is supported, but it is recommended to keep it as simple as possible to reduce the size of the generated file.
## See Also
* [Using FastDL with servers](../tutorials/using-fastdl-with-servers.md)
14 changes: 14 additions & 0 deletions docs/tutorials/using-fastdl-with-servers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Using FastDL with servers running Unified SDK mods

For the most part servers will work the same as any Half-Life game or mod. There is one caveat involving the [network data system](../features/network-data-system.md) when using a FastDL server.

The Unified SDK generates a new `networkdata/data.json` file when it loads a map. When not using FastDL the file is immediately downloaded from the server.

When using FastDL the file server should include a dummy file containing only this:
```cpp
{}
```

This is an empty JSON file that will be downloaded and subsequently deleted by the client before downloading the generated file from the game server directly.

If this file is not present on the file server the game will still download the file from the game server but it will print an error message in the console which may confuse players.

0 comments on commit 39d3f70

Please sign in to comment.