Raised This Month: $78 Target: $400
 19% 

AngelScript Mod Loader


Post New Thread Reply   
 
Thread Tools Display Modes
Solokiller
Senior Member
Join Date: Sep 2015
Old 11-30-2016 , 14:50   Re: AngelScript Mod Loader
Reply With Quote #11

I've finished some of the plugin's features:
* All Metamod changes merged in, including partial Steamworks API support

* Rewrote the keyvalues parser, is now stricter and parses escape sequences more efficiently. Implementation is much simpler and easier to maintain.

* Added the ability to load plugins through ASMod. Plugins loaded by ASMod are much like plugins loaded by Sven Co-op, with a few exceptions:
- Defining cvars/commands fails due to no module pointer being present to validate the access.
- Globals set at build time are unavailable.
- Any code that relies on SC's active module pointer being set fails.
- Any code that relies on the module user data pointing to a CASModule* instance will crash (using same user data ID as utils codebase, needs changing). This includes script info, so any existing plugin you try to load will probably crash. On the upside, you don't need to set that info because validation is part of the build process.
- ASMod plugins have access to all API features due to having an access mask with 32 bits set. Map script only features are accessible as a result.

Unfortunately, even with complete access you cannot create custom entities with these plugins because they didn't actually add support for custom entities to plugins. I've reported the problem and pointed them in the right direction: https://github.com/SamVanheer/SC_Angelscript/issues/49
When i said it was in dire need of updates, i wasn't kidding

ASMod plugins will eventually be able to register cvars and commands through a separate API, as well as register native cvars and commands (no as_command needed, and they can be looked up using regular cvar accessors).

* The filesystem now uses SteamPipe, so you can read from downloaded files. I forgot to mention above that i added persistent write access. The "scripts/maps/store" and "scripts/plugins/store" directories can be used to write persistent files. I also added a persistent directory "addons/ASMod/scripts/store", but that will probably be changed.

To make things a little simpler i'll probably add symbolic paths so you can just enter %PLUGIN_STORE_DIR% instead.

Things are moving along, so a release should be possible soon.
Solokiller is offline
PartialCloning
Senior Member
Join Date: Dec 2015
Old 11-30-2016 , 15:40   Re: AngelScript Mod Loader
Reply With Quote #12

Can the persistent files be overwritten through a plugin?

Edit: Unless I got it wrong then my question wouldn't make sense. But you're talking about persistent files on the player's side correct?

Last edited by PartialCloning; 11-30-2016 at 15:42.
PartialCloning is offline
Solokiller
Senior Member
Join Date: Sep 2015
Old 11-30-2016 , 15:51   Re: AngelScript Mod Loader
Reply With Quote #13

No, just on the server side. You can't save files on the client side unless you precache the files as well.
You can overwrite files using the WRITE flag, APPEND will just add to what's already there.

Last edited by Solokiller; 11-30-2016 at 15:51.
Solokiller is offline
Solokiller
Senior Member
Join Date: Sep 2015
Old 12-02-2016 , 09:14   Re: AngelScript Mod Loader
Reply With Quote #14

The filesystem now loads its settings from a file, if present. Otherwise, default settings are applied.

I've also replaced the extension blacklist with a regular expression filter.

For example:
Code:
filter
{
        //Never allow access to cfgs in the main directory.
        expression "^([^/]|\\.\\/)*\\.cfg$"
        flag INVERT
}
This prevents scripts from opening cfg files in the main directory. They can't open anything in the main directory anyway by default, but if you allow it this will let you filter out specific extensions, filenames, paths, etc.

As an example, if a script tries to open "config.cfg":

Code:
[FILESYSTEM] File "config.cfg" failed filter 1/3
[FILESYSTEM] READ access denied for "config.cfg": Failed to pass filters
There are 3 filters defined right now, and it failed the first filter. It also tells you whether it tried to read or write. I might add flags to only use filters for read or write operations if that's necessary.

Expressions should take into account the possibility that a path starts with or without "./", hence why the expression checks both.

The INVERT flag tells the code to invert the result of the match. By default, files must match every filter, so inverting the result causes it to deny access if the filter matches.

Last edited by Solokiller; 12-02-2016 at 09:15.
Solokiller is offline
Mistrick
Senior Member
Join Date: Aug 2012
Location: Russia
Old 02-28-2017 , 13:01   Re: AngelScript Mod Loader
Reply With Quote #15

Any news?
Mistrick is offline
Enrory
Member
Join Date: Nov 2016
Location: Austria
Old 04-11-2017 , 04:50   Re: AngelScript Mod Loader
Reply With Quote #16

Yeah
__________________
Enrory is offline
Solokiller
Senior Member
Join Date: Sep 2015
Old 04-11-2017 , 05:19   Re: AngelScript Mod Loader
Reply With Quote #17

Sorry i didn't reply sooner. I haven't worked on this in a while, i'll probably get back to it after i've gotten some other stuff done. That won't be for some time though, since i just started reverse engineering the engine.

If you were hoping to use this with Sven Co-op, i wouldn't hold my breath if i were you.
Solokiller 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 01:51.


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