Gameinfo Deprecation

From AlliedModders Wiki
Revision as of 23:42, 19 February 2008 by BAILOPAN (talk | contribs) (New page: __FORCETOC__ Metamod:Source versions 1.4.3 and 1.6.0 officially deprecated the <tt>gameinfo.txt</tt> installation mechanism in support for loading as a Valve Server Plugin. This has a fe...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Metamod:Source versions 1.4.3 and 1.6.0 officially deprecated the gameinfo.txt installation mechanism in support for loading as a Valve Server Plugin. This has a few implications for both users and developers, which are explained in this article.

Users

By not using gameinfo.txt, Metamod:Source will no longer break on minor updates, and will not require any intervention on behalf of server administrators.

We formed a beta testing group for this release, and the new Metamod:Source loading mechanism seemed to work across the most popular plugins. However, it is possible that a plugin was written such that it will no longer be compatible with the new mechanism. If you switch to the new loading mechanism and a plugin stops working, post on the forums explaining the problem. Most likely you will have to switch to the old gameinfo.txt method until the plugin's author can correct the issue.

Developers

Your plugin's ISmmPlugin::Load callback now occurs later in the server startup process. This means you can't hook functions like ICvar::RegisterConCommandBase and expect to see calls from the game pass through. It also means you can't intercept the game's factory calls (which would be a silly idea anyway). We could not find any public plugins that did this.

The "late load" parameter is still false. Your plugin won't be able to tell when it is loaded in Valve Server Plugin mode, so you should code assuming that the gameinfo.txt pre-emption is not available (unless you explicitly tell your users that modifying gameinfo.txt is a requirement).

Unfortunately, we could not add VSP mode detection because it would bump the 1.4 branch's API version, which is frozen. We may consider adding it in the future though -- if it's something that you need, please file a feature request.