AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] Late Downloads Manager (1.1.1 alpha, 2018.03.02) (https://forums.alliedmods.net/showthread.php?t=305655)

GHartmann 02-27-2018 17:53

[ANY] Late Downloads Manager (1.1.1 alpha, 2018.03.02)
 
1 Attachment(s)
Late Downloads Manager
Download files to players while in-game.

This is mostly a proof of concept release to see how well it works and if there's large interest in such a thing.

Late downloads download in the background while players are in-game, at about 128Kbps. This means a 1MB file will take about 1 minute to download. For comparison, sprays and jingles are each limited to 512KB, for a total of 1MB.

Features:
Associate files with servers, maps, and players to be downloaded to players while in-game. Remembers which players have which files to avoid resending.

CVARS:
sm_latedlman_servername "default"
The name to use for this server. Files owned by the named server will be late downloaded to clients.

Player commands:
ClearDownloadCache
Clears the player's download cache and begins resending files. On a 5 second cooldown.

Admin commands:
RefreshLateDownloads
Re-reads the downloads list and starts sending files out to players. Does not reload the database. If this command actually does anything, it means my code is bugged.

Server commands:
ShowLateDownloadCounts
Debug information showing the counts of various objects.
Example output:
Code:

g_DownloadListServer = 1
g_DownloadListMap = 1
g_DownloadListPlayers[1] = 2
g_DownloadCache[1] = 3

Requirements:
Late Downloads extension
MySQL Database

Optional dependencies:
PHP for using LateDownloadsManagerApi.php

Plugin design note:
This plugin will immediately unload itself if it encounters any detected errors, typically database errors.

Planned features:
Blacklists
Arbitrary comma-delimited modes cvar?
Integration for other plugins to determine if a player has a file

Installation:
Install the Late Downloads extension
Import latedlman.sql into your database
Add an entry for "latedlman" to databases.cfg
Load the plugin
Add late downloads using LateDownloadManagerApi.php or manually

LateDownloadManagerApi.php usage example:
PHP Code:

$api = new LateDownloadManagerApi('/home/tf2/.steam/steamcmd/game/tf''latedlman''127.0.0.1''user''password');
$api->SetValidatePath(false); // Do this if this script is not running on the game sever with access to the game directory

// Won't be replaced/duplicated if they already exist
$api->AddServer('neatplace');
$api->AddPlayer('STEAM_0:1:37936200');
$api->AddMap('cp_process_final');

$api->AddFileOwnedByServer('test/test.txt''neatplace');
$api->AddFileOwnedByPlayer('test/hartmann.txt''STEAM_0:1:37936200');
$api->AddFileOwnedByMap('test/process.txt''cp_process_final');

// The same file can be owned by multiple things
$api->AddFileOwnedByPlayer('test/test.txt''STEAM_0:1:37936200'); 

Changelog:
1.1.1:
Player command added: ClearDownloadCache, on a 5 second cooldown.

1.1.0:
All queries are now threaded.

1.0.55:
Race condition between OnClientAuthorized and OnClientPutInServer preventing files from being sent fixed
Small performance improvement in SQL row fetch loops
Code rearrangement

Robin955 11-29-2018 23:47

Re: [ANY] Late Downloads Manager (1.1.1 alpha, 2018.03.02)
 
players are using the "materials and models that is still being downloaded in the background".

first time you join the server = every model is error and missing materials meanwhile slowly being ran in the background.

you first, have to wait long enough in the server to "make sure everything has downloaded" which you have no way of knowing.
Then, you have to restart CSS
and then rejoin thje server, just for this to work.

so, people will join in and get the worst impression of the server. dont see the point to this. it would only count for less used things like sounds

GHartmann 11-30-2018 15:46

Re: [ANY] Late Downloads Manager (1.1.1 alpha, 2018.03.02)
 
Quote:

Originally Posted by Robin955 (Post 2626134)
dont see the point to this. it would only count for less used things like sounds

That's correct, and so it shouldn't be used for non-optional content.

One solution is to determine if a client has downloaded the required custom content or not, and use a fallback instead until they have finished.

MarcoCSGO 05-14-2020 10:24

Re: [ANY] Late Downloads Manager (1.1.1 alpha, 2018.03.02)
 
Could this be used with fast download? I was thinking that it would be nice if we could starting downloading the next map, if the player is dead and it is the last round.


All times are GMT -4. The time now is 09:50.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.