Integrated mod updater
Nixxen
Join Date: 2004-02-11 Member: 26401Members
<div class="IPBDescription">Sort of like Six Updater but integrated with the game.</div>As we all know the spark editor is quite moddable by design.
Currently there is no hash checking for files on the server vs files on the client PC.
After seeing the Radiance mod and the plans he has for multiplayer support later on it got me thinking; why not make this something that is shipped with the game(the mod multiplayer support)?
If you have played arma2 you know the hassle it can be to get the correct mod for the various servers available, at least if you run it without an 3rd party apps.
If you also have played arma2 with SixUpdater you know how this nullifies the hassle.
(linky: <a href="http://www.six-updater.net/)" target="_blank">http://www.six-updater.net/)</a>
What SixUpdater does, in short(it can do more but let's leave it at this for now):
-Query the server for active mods.
-Download active mods to the client from a safe repository.
-Connect to server.
When you connect to a server the relevant mods are loaded. The unused ones are just stored on your PC(if you have connected to some server using different mods than the one you currently are connecting to).
In SixUpdater there is a GUI, but if this were to be implemented in the game/engine itself this could be done behind the scenes, sort of like automatic map downloads for the GoldSrc engine(I.e. halflife).
For this to work in NS2:
-We'll need the servers to have an active mods/plugins-query-reply, as well as what version of the mod(s) are running.
-We'll also need somewhere to stow accepted mods for the repository.
-Mods will need a version number - in case a server is running an older version of a mod, and a new(first time connecting) client downloads a newer version from the repository.
By doing this it would also be much easier to make community mods for checking the client scripts vs the server scripts to avoid the inevitable hackers that will stream in when NS2 is released to the general public.
The backside of that coin is of course that "friendly" custom mods won't be able to run if the server requires scripts to be unedited, and the server does not have that script enabled.
I figure this could also be used for custom maps if that is included in the repository.
Thoughts?
Currently there is no hash checking for files on the server vs files on the client PC.
After seeing the Radiance mod and the plans he has for multiplayer support later on it got me thinking; why not make this something that is shipped with the game(the mod multiplayer support)?
If you have played arma2 you know the hassle it can be to get the correct mod for the various servers available, at least if you run it without an 3rd party apps.
If you also have played arma2 with SixUpdater you know how this nullifies the hassle.
(linky: <a href="http://www.six-updater.net/)" target="_blank">http://www.six-updater.net/)</a>
What SixUpdater does, in short(it can do more but let's leave it at this for now):
-Query the server for active mods.
-Download active mods to the client from a safe repository.
-Connect to server.
When you connect to a server the relevant mods are loaded. The unused ones are just stored on your PC(if you have connected to some server using different mods than the one you currently are connecting to).
In SixUpdater there is a GUI, but if this were to be implemented in the game/engine itself this could be done behind the scenes, sort of like automatic map downloads for the GoldSrc engine(I.e. halflife).
For this to work in NS2:
-We'll need the servers to have an active mods/plugins-query-reply, as well as what version of the mod(s) are running.
-We'll also need somewhere to stow accepted mods for the repository.
-Mods will need a version number - in case a server is running an older version of a mod, and a new(first time connecting) client downloads a newer version from the repository.
By doing this it would also be much easier to make community mods for checking the client scripts vs the server scripts to avoid the inevitable hackers that will stream in when NS2 is released to the general public.
The backside of that coin is of course that "friendly" custom mods won't be able to run if the server requires scripts to be unedited, and the server does not have that script enabled.
I figure this could also be used for custom maps if that is included in the repository.
Thoughts?
Comments
What it came down to is this:
Firstly,
The client will do a hash-check for each Lua-file it attempts to load, and send this to the server BEFORE actually loading it, waiting for it's response
Secondly,
The server will evaluate whether this is an allowed checksum (we only need a reasonably strong checksum like SHA-512, not even the name\directory of the file).
It will compare it against the checksums of the ns2-base and any possible mod running, if it still doesn't find a match, it delivers it to the Lua-environment as a string, at which point is can be compared against known checksums of community-mods in any way the modders see fit (hardcoded in Lua, from a file on the disk, from a remote database). Still no match? It'll tell the client it can't load that file, and instead sends a 'correct' version of the file from it's own directory. If it does find a match anywhere in this chain, it'll give the client the o.k.
It's not all that unlike what you suggested, except that it is built into the engine and doesn't actually discriminate between the core-game and mods, it just blindly compares checksums.
The solution you have there would be the "anti hack" part of the mod updater.
The core updater itself will only let clients download the required mods for a server when connecting to it, regardless of what those mods do(as long as the mods are listed in the repository as safe).
This would primarily be to make it easier for people to get hands on experience with different community mods without having to go to the forums for the download.
It would also allow multiple mods to be installed at once, and only load the relevant ones, by name and version number, when connecting to a server.
And to see what mods there are, guess there will be a filter in the server browser.
server admins would be the only ones that have to care about mod updates.
so auto updates is the last thing missing.
In the mean time I think it's a good idea for modders to start untangling their mods from the NS2 base-files (eg. not copy-paste ANY scripting from NS2, but rather overload\hook). GmOvrmind has been doing this from day 1, which is why you can drop mods into it's Lua-directory, and have them work without issue. Right now you can only do that once (run 1 extra mod on top GmOvrmind), but if everyone untangles their stuff, essentially an infinite amount of mods could be running simultaneously (with the help of a single coordinating hub-mod, like what fsfod has been doing).