Raised This Month: $202 Target: $400
 50% 

[SMA]AS Plugins Downloader 4 Sven Coop


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Scrooge2029
Junior Member
Join Date: Dec 2020
Old 12-28-2020 , 22:37   [SMA]AS Plugins Downloader 4 Sven Coop
Reply With Quote #1

https://github.com/AlucardNosferatu/...tree/AMX_Mod_X

Use by input commands below in console:
Code:
dick "install_auto PluginName"
//install via asp_urls.json
dick "install Author:Repo:Branch:File.as->LocalFile.as"
//install single as plugin (only available for Gitee for now)
Description:
This sma is my first attempt to write AMXX script, I use the json and the curl lib given by @Levenus Supremus (PolarHigh from GitHub?)
@Exolent[jNr]

https://forums.alliedmods.net/showth...highlight=curl

https://forums.alliedmods.net/showth...highlight=json

Tested on Sven Coop 5.23 both on Client and Dedicated Server

Mechanism:
Use curl to download AS plugin from website with Remote Git Repo Service via RAW url access

Issue:
Due to some network issue, single AS download (or should I call it manual download) only supports Gitee, as raw.githubusercontent is blocked by my ISP, which make it hard for me to test on GitHub. But if a plugin is on GitHub, it can still be downloaded via configure asp_urls.json.

some assets (spr/wav) cannot be loaded inside scripts/plugins will be install use key-value to represent repo path and install path respectively, which will be introduced in next version.
An example of ASP Info Json:
Code:
    "Sekiro":
    {
        "Website":"GitHub",
        "Author":"DrAbcrealone",
        "Repo":"AngelScripts",
        "Branch":"master",
        "File":
        {
            "Sekiro/cyberpunk2077.spr":"sprites/misc/cyberpunk2077.spr",
            "Sekiro/cyberpunk2077.wav":"sound/misc/cyberpunk2077.wav",
            "Sekiro/sekiro_death.spr":"sprites/misc/sekiro_death.spr",
            "Sekiro/sekiro_death.wav":"sound/misc/sekiro_death.wav",
            "Sekiro/sekiro.as":"Sekiro/sekiro.as"
        }
    }
Thx to those veterans who taught me a lot can I finish this little demo, I got ddl in my work recently, so I have to pause developing this unfinished plugin, hope to see some collaborators.
Attached Files
File Type: zip ASD.zip (805.1 KB, 22 views)

Last edited by Scrooge2029; 12-29-2020 at 00:02. Reason: Add Plan
Scrooge2029 is offline
Scrooge2029
Junior Member
Join Date: Dec 2020
Old 12-29-2020 , 05:11   Re: [SMA]AS Plugins Downloader 4 Sven Coop
Reply With Quote #2

Quote:
Originally Posted by Scrooge2029 View Post
some assets (spr/wav) cannot be loaded inside scripts/plugins will be install use key-value to represent repo path and install path respectively, which will be introduced in next version.
An example of ASP Info Json:
Code:
    "Sekiro":
    {
        "Website":"GitHub",
        "Author":"DrAbcrealone",
        "Repo":"AngelScripts",
        "Branch":"master",
        "File":
        {
            "Sekiro/cyberpunk2077.spr":"sprites/misc/cyberpunk2077.spr",
            "Sekiro/cyberpunk2077.wav":"sound/misc/cyberpunk2077.wav",
            "Sekiro/sekiro_death.spr":"sprites/misc/sekiro_death.spr",
            "Sekiro/sekiro_death.wav":"sound/misc/sekiro_death.wav",
            "Sekiro/sekiro.as":"Sekiro/sekiro.as"
        }
    }
This feature has been implemented, pending further test
Scrooge2029 is offline
Scrooge2029
Junior Member
Join Date: Dec 2020
Old 01-11-2021 , 03:56   Re: [SMA]AS Plugins Downloader 4 Sven Coop
Reply With Quote #3

Update:

New functions allow client players upload their local AS plugin file to the server.

1.Execute Python script to convert AS codes into CFG files.
2.exec CFG file in client console, receivers on servers will handle the rest.

Receiver [SMA]:
https://github.com/AlucardNosferatu/...ojects/asd.sma

Converter[PY]:
https://github.com/AlucardNosferatu/...ents/AS2CFG.py

Sample CFG:
https://github.com/AlucardNosferatu/...upload_asp.cfg
Scrooge2029 is offline
Reply


Thread Tools
Display Modes

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 17:23.


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