Difference between revisions of "SourceMod 1.1.0 Release Notes"

From AlliedModders Wiki
Jump to: navigation, search
m
m
Line 69: Line 69:
 
*Added new gamedata auto-update functionality ({{bz|2602}}).  
 
*Added new gamedata auto-update functionality ({{bz|2602}}).  
 
*Revamped and greatly expanded map management plugins and their functionality ({{bz|2201}}).
 
*Revamped and greatly expanded map management plugins and their functionality ({{bz|2201}}).
 +
*Debug mode is now always on; as there is no longer a performance loss, there is no non-debug mode.
 +
*The timeleft trigger can now handle mp_winlimit, mp_fraglimit, and mp_maxrounds ({{bz|2344}}).
 +
*Added sm_revote command so clients can participate in a vote that fell off their screen ({{bz|2156}}).
 +
*Added Core API for creating stack structures (adt_stack.inc, {{bz|2441}}).
 +
*Added API for extending mapchooser (mapchooser.inc, {{bz|2201}}).
 +
*Added Core API for map transition control and history (nextmap.inc).
 +
*Added TF2 forward for overriding how critical hits are calculated.
 +
*Added SetClientInfo() native for modifying how a server sees a client's setinfo properties.
 +
*Added CreateDirectory() native ({{bz|3253}}).
 +
*Functions to control client versus client mic listening now work as described ({{bz|2498}}).
 +
*Fixed SDKTools not being reloadable, and fixed a related bug in Handle type removal ({{bz|2753}}).
 
*Rewrote internal translation handling.  Extensions now have access to an <tt>ITranslator</tt> API ({{bz|2535}}).
 
*Rewrote internal translation handling.  Extensions now have access to an <tt>ITranslator</tt> API ({{bz|2535}}).
 
*Rewrote internal handling of dependencies (especially relating to native providers) ({{bz|2466}}).
 
*Rewrote internal handling of dependencies (especially relating to native providers) ({{bz|2466}}).
 
*Added user config hooks to IGameConfigManager, for parsing user-defined sections.
 
*Added user config hooks to IGameConfigManager, for parsing user-defined sections.
 
*Revamped SourcePawn API.  Removed and deprecated many structures and functions accidentally exposed publicly.
 
*Revamped SourcePawn API.  Removed and deprecated many structures and functions accidentally exposed publicly.
*Debug mode is now always on; as there is no longer a performance loss, there is no non-debug mode.
+
*Revamped SourcePawn structure, it is now separable from SourceMod for other projects.
 
*Renamed basefuncommands.phrases.txt to funcommands.phrases.txt ({{bz|2485}}).
 
*Renamed basefuncommands.phrases.txt to funcommands.phrases.txt ({{bz|2485}}).
 
*Renamed basefunvotes.phrases.txt to funvotes.phrases.txt ({{bz|2485}}).
 
*Renamed basefunvotes.phrases.txt to funvotes.phrases.txt ({{bz|2485}}).
*The timeleft trigger can now handle mp_winlimit, mp_fraglimit, and mp_maxrounds ({{bz|2344}}).
+
*Added IDBDriver API call for extensions to handle IDBDriver dependencies properly.
*Added sm_revote command so clients can participate in a vote that fell off their screen ({{bz|2156}}).
 
*Added new natives for creating stack structures (adt_stack.inc, {{bz|2441}}).
 
*Added new API for extending mapchooser (mapchooser.inc, {{bz|2201}}).
 
*Added API to Core for map transition control and history (nextmap.inc).
 
*Added SetClientInfo() native for modifying how a server sees a client's setinfo properties.
 
*Functions to control client versus client mic listening now work as described ({{bz|2498}}).
 
*Added CreateDirectory() native ({{bz|3253}}).
 
*Added TF2 forward for overriding how critical hits are calculated.
 
 
*Usermessage natives now validate clients to prevent crashing.
 
*Usermessage natives now validate clients to prevent crashing.
*Fixed SDKTools not being reloadable, and fixed a related bug in Handle type removal ({{bz|2753}}).
 
*Added IDBDriver API call for extensions to handle IDBDriver dependencies properly.
 

Revision as of 03:16, 21 September 2008

TODO

  • Update structs.inc link on release.
  • Write client prefs api link.
  • Write gamedata updating link.


Plugin Changes

Map Management Changes

SourceMod's map management plugins have gone through huge overhauls to address many community requested features and bugs.

The new "mapchooser" plugin provides a central system for other map-related plugins. In addition:

  • nominations adds nominations into map votes.
  • rockthevote lets users start early map votes.
  • nextmap automatically selects the next map.
  • randomcycle randomly selects the next map.

To learn more about the new map management system, see Map Management.

Reserved Slot Changes

Reserved slots has a new reserve type to stop kicking players once a certain number of admins have been reached. There is also a new kick type cvar that selects which heuristic to kick a player by. Available heuristics are ping time, connection time, and randomly.

For more information, see Reserved Slots. Sections specific to SourceMod 1.1 or higher are marked as such.


Gamedata Updater

One major support problem with SourceMod is that when a mod updates, it is quite easy to break SourceMod's SDKTools. SDKTools provides "hacky" scripting functionality for internal game features, like slaying players or creating entities.

To fix this we now have a gamedata auto-updating feature in SourceMod (for gamedata files only). When your server starts, SourceMod will contact AlliedModders to check for gamedata file updates. AlliedModders will send back new files if they are available.

As part of this effort, if your server crashes on load, gamedata files will become locked, and no "hacky" functionality will be available. The motivation behind this is to give your server time to update safely in case plugins are trying to run functions that are doomed to crash.

Only official gamedata files are updated. All gamedata updating functionality can be disabled if you deem it a security risk. For more information, see Gamedata Updating.


Client Prefs

SourceMod 1.1 comes with a new "client preferences" extension. This extension lets plugins configure properties on clients which are preserved across connections, server restarts, and even across multiple servers. Properties are created and maintained by plugins in an API similar to ConVars (cvars).

The Client Prefs extension can be configured to use SQLite (default) or MySQL. All operations are threaded in order to not interrupt gameplay performance.

To read more, see Client Preferences API.


Structs Extension

A new extension called "Structs" is now available. This extension is designed to abstract native data structures for plugins to easily modify. For example, it is now possible to modify weapon information structures that were previously internal to the HL2SDK.

For more information, see structs.inc.


JIT Changes

User Changes

The concept of "debug mode" has been removed. Debug mode is now always on. The runtime has been reworked so this is no longer a performance loss. This decision was made partially to clean up some very inefficient code, but it's also for support. Users no longer have to manually toggle or reconfigure plugins before reporting errors.

The JIT (just-in-time compiler) is responsible for converting plugins to machine code for speed. Previously, plugins were translated to machine code all at once on load. In SourceMod 1.1 this has changed. Plugins are now incrementally compiled as functions get called for the first time. This might help load time, but was actually done to improve internal logic.

Developer Changes

Dependence on private or internal structures has been eliminated. Plugins are now represented by IPluginRuntime structures, and contexts are now solely represented by an IPluginContext. The sp_plugin_t and sp_context_t structures have been removed.

A huge number of functions in IPluginContext have been deprecated and moved to IPluginRuntime as part of this effort. Contexts are now intended only to represent a thread of execution. Similarly, function invocation is now defined as being invocation of a particular IPluginFunction combined with an IPluginContext (a default contexts exists for compatibility).

The ISourcePawnEngine API has been deprecated in favor of ISourcePawnEngine2. The new API reflects the restructuring. For example, it provides a single entry point for creating an IPluginRuntime from a file.

Lastly, the SourcePawn runtime (sourcepawn.jit.x86) is now entirely separated from SourceMod. It can be embedded into other GPL3 applications, for better or worse. The API is separate and stable enough such that you can take the JIT library from SourceMod 1.1 and use it right in your own app. Documentation on doing this can be written upon request.


Changelog

  • Added new client preferences extension (API in clientprefs.inc, bug 1925).
  • Added new struct abstraction extension (API in structs.inc, bug 2666).
  • Added new gamedata auto-update functionality (bug 2602).
  • Revamped and greatly expanded map management plugins and their functionality (bug 2201).
  • Debug mode is now always on; as there is no longer a performance loss, there is no non-debug mode.
  • The timeleft trigger can now handle mp_winlimit, mp_fraglimit, and mp_maxrounds (bug 2344).
  • Added sm_revote command so clients can participate in a vote that fell off their screen (bug 2156).
  • Added Core API for creating stack structures (adt_stack.inc, bug 2441).
  • Added API for extending mapchooser (mapchooser.inc, bug 2201).
  • Added Core API for map transition control and history (nextmap.inc).
  • Added TF2 forward for overriding how critical hits are calculated.
  • Added SetClientInfo() native for modifying how a server sees a client's setinfo properties.
  • Added CreateDirectory() native (bug 3253).
  • Functions to control client versus client mic listening now work as described (bug 2498).
  • Fixed SDKTools not being reloadable, and fixed a related bug in Handle type removal (bug 2753).
  • Rewrote internal translation handling. Extensions now have access to an ITranslator API (bug 2535).
  • Rewrote internal handling of dependencies (especially relating to native providers) (bug 2466).
  • Added user config hooks to IGameConfigManager, for parsing user-defined sections.
  • Revamped SourcePawn API. Removed and deprecated many structures and functions accidentally exposed publicly.
  • Revamped SourcePawn structure, it is now separable from SourceMod for other projects.
  • Renamed basefuncommands.phrases.txt to funcommands.phrases.txt (bug 2485).
  • Renamed basefunvotes.phrases.txt to funvotes.phrases.txt (bug 2485).
  • Added IDBDriver API call for extensions to handle IDBDriver dependencies properly.
  • Usermessage natives now validate clients to prevent crashing.