Raised This Month: $32 Target: $400
 8% 

[ANY] EasyDownloader (V1.03, 09/12/2017)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Byte
Senior Member
Join Date: Jun 2010
Location: 📦 CCSPlayer
Plugin ID:
5473
Plugin Version:
1.03
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Download/Precache Files.
    Old 12-31-2016 , 18:47   [ANY] EasyDownloader (V1.03, 09/12/2017)
    Reply With Quote #1

    Easy Downloader (V1.03)
    Download and Precache files the easy way.

    By Byte

    🔹 Description 🔹
    This plugin is a simple downloader plugin which downloads/precaches files on any mod.


    🔹 Instructions 🔹
    1. Compile easydownloader.sp
    2. Copy easydownloader.smx to your server.
    3. Configure files to download/precache by editing text files in /config/easydownloader
    4. Change map on server.

    🔹 Configuration 🔹
    Use file/directory paths relative to gamedir root (so include "sound/", "materials/" etc).
    One file/directory path per line in the relevant config file.
    Directory paths should NOT end with a separator character ('/')
    Directories are downloaded recursively.
    Blank lines and comment lines (starting with //) are ignored.
    • decals.txt - Uses API function PrecacheDecal. For: .vtf,.vmt
    • generics.txt - Uses API function PrecacheGeneric. For: .pcf
    • models.txt - Uses API function PrecacheModel. For: .mdl
    • sentencefiles.txt - Uses API function PrecacheSentenceFile
    • sounds.txt - Uses API function PrecacheSound. For: .mp3, etc
    • downloadonly.txt - Downloads only. No precaching. For: .phy,.vvd,.vtx,.vtf,.vmt, etc

    🔹 Options 🔹
    Extension whitelisting
    You can whitelist certain extensions when using recursive directory downloading.
    When using this option, only files with the provided extensions will be downloaded/precached.

    Example in models.txt:
    Code:
    //Download all .mdl files from the folder below
    models/player/custom_player/some_folder|exts=.mdl
    Example in downloadsonly.txt:
    Code:
    //Download the other model files required
    models/player/custom_player/some_folder|exts=.dx90.vtx,.phy,.vvd
    materials/models/player/some_folder|exts=.vmt,.vtf
    🔹 Acknowledgements 🔹
    I decided to write this plugin after SM File/Folder Downloader and Precacher (https://forums.alliedmods.net/showthread.php?t=69005) stopped working for me.
    Huge props to SWAT_88 though, RIP buddy ❤️

    Powerlord: CSGO/DOTA Asterisk fake precache method (link)


    🔹 Changelog 🔹
    Code:
    1.03 Added extension filtering for recursive directory downloads. Naming convention cleanup. 
    1.02 Fixed sound precaching for CSGO/DOTA game engines.
    1.01 Added support for recursive directory downloading and download only mode.
    1.00 Initial release
    🔹 Downloads 🔹

    Github Repo:

    Source | Releases

    AlliedModders Mirror:
    Attached Files
    File Type: zip config.zip (1.5 KB, 2161 views)
    File Type: sp Get Plugin or Get Source (easydownloader.sp - 3097 views - 7.5 KB)
    __________________
    STEAM: /id/invexbyte | Github: Mo Beigi | Discord: Byte#0017
    Community: Invex Gaming | My Plugins: Click Me!


    Last edited by Byte; 12-10-2017 at 13:25. Reason: Update for V1.03
    Byte is offline
    wolvez04
    Senior Member
    Join Date: Feb 2016
    Location: Andora
    Old 01-01-2017 , 04:01   Re: [ANY] EasyDownloader (v1.00)
    Reply With Quote #2

    Thanks for the release! Silly question but should all materials be put into the decals.txt?
    wolvez04 is offline
    skinheadxtreme
    AlliedModders Donor
    Join Date: Jul 2013
    Old 01-01-2017 , 09:52   Re: [ANY] EasyDownloader (v1.00)
    Reply With Quote #3

    sdownloader does all of this and its easier
    skinheadxtreme is offline
    wolvez04
    Senior Member
    Join Date: Feb 2016
    Location: Andora
    Old 01-01-2017 , 18:54   Re: [ANY] EasyDownloader (v1.00)
    Reply With Quote #4

    Quote:
    Originally Posted by skinheadxtreme View Post
    sdownloader does all of this and its easier
    No because s downloader does everything in your server files and not everyone wants that due to have unused things.
    wolvez04 is offline
    donrevan
    AlliedModders Donor
    Join Date: Jul 2010
    Old 01-01-2017 , 19:40   Re: [ANY] EasyDownloader (v1.00)
    Reply With Quote #5

    You should close the file handle via CloseHandle or File.Close
    donrevan is offline
    Byte
    Senior Member
    Join Date: Jun 2010
    Location: 📦 CCSPlayer
    Old 01-02-2017 , 14:45   Re: [ANY] EasyDownloader (v1.00)
    Reply With Quote #6

    Quote:
    Originally Posted by wolvez04 View Post
    Thanks for the release! Silly question but should all materials be put into the decals.txt?
    Yeah you can put vmt/vtfs there.

    Quote:
    Originally Posted by skinheadxtreme View Post
    sdownloader does all of this and its easier
    Actually didn't know about that one, its pretty cool! However, as mentioned inactive materials/etc are also added to d-table so I guess list based downloaders are still useful for some.

    Quote:
    Originally Posted by donrevan View Post
    You should close the file handle via CloseHandle or File.Close
    Good call, added.
    __________________
    STEAM: /id/invexbyte | Github: Mo Beigi | Discord: Byte#0017
    Community: Invex Gaming | My Plugins: Click Me!


    Last edited by Byte; 01-02-2017 at 14:46.
    Byte is offline
    wolvez04
    Senior Member
    Join Date: Feb 2016
    Location: Andora
    Old 01-03-2017 , 03:30   Re: [ANY] EasyDownloader (v1.00)
    Reply With Quote #7

    L 01/03/2017 - 19:25:11: [SM] Exception reported: Script execution timed out
    L 01/03/2017 - 19:25:11: [SM] Blaming: easydownloader.smx
    L 01/03/2017 - 19:25:11: [SM] Call stack trace:
    L 01/03/2017 - 19:25:11: [SM] [1] Line 95, /home/forums/content/files/2/6/1/6/1/3/159758.attach::processFile
    L 01/03/2017 - 19:25:11: [SM] [2] Line 44, /home/forums/content/files/2/6/1/6/1/3/159758.attach::OnMapStart
    wolvez04 is offline
    Byte
    Senior Member
    Join Date: Jun 2010
    Location: 📦 CCSPlayer
    Old 01-03-2017 , 04:57   Re: [ANY] EasyDownloader (v1.00)
    Reply With Quote #8

    Quote:
    Originally Posted by wolvez04 View Post
    L 01/03/2017 - 19:25:11: [SM] Exception reported: Script execution timed out
    L 01/03/2017 - 19:25:11: [SM] Blaming: easydownloader.smx
    L 01/03/2017 - 19:25:11: [SM] Call stack trace:
    L 01/03/2017 - 19:25:11: [SM] [1] Line 95, /home/forums/content/files/2/6/1/6/1/3/159758.attach::processFile
    L 01/03/2017 - 19:25:11: [SM] [2] Line 44, /home/forums/content/files/2/6/1/6/1/3/159758.attach::OnMapStart
    Hmm.
    What do your lists look like? How many files in your list?

    Also experiment with this:
    https://forums.alliedmods.net/showth...44#post2013444

    Increase 'SlowScriptTimeout' in core.cfg to a higher amount to see if it solves it.
    __________________
    STEAM: /id/invexbyte | Github: Mo Beigi | Discord: Byte#0017
    Community: Invex Gaming | My Plugins: Click Me!


    Last edited by Byte; 01-03-2017 at 05:00.
    Byte is offline
    headline
    SourceMod Moderator
    Join Date: Mar 2015
    Old 01-03-2017 , 17:24   Re: [ANY] EasyDownloader (v1.00)
    Reply With Quote #9

    Quote:
    Originally Posted by wolvez04 View Post
    ~snip~
    Try this
    Attached Files
    File Type: sp Get Plugin or Get Source (easydownloader.sp - 1329 views - 2.7 KB)
    headline is offline
    Byte
    Senior Member
    Join Date: Jun 2010
    Location: 📦 CCSPlayer
    Old 01-04-2017 , 02:14   Re: [ANY] EasyDownloader (v1.00)
    Reply With Quote #10

    Quote:
    Originally Posted by Headline View Post
    Try this
    Would the EndOfFile check change anything?
    ReadFileLine should return false if it hits end of the file or if its an empty file anyway.
    __________________
    STEAM: /id/invexbyte | Github: Mo Beigi | Discord: Byte#0017
    Community: Invex Gaming | My Plugins: Click Me!

    Byte is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 23:07.


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