> Stable Builds
> Dev Builds
> Writing Plugins
> Script Functions
> C++ Reference
Monthly Target: $400
Raised This Month: $4
Amount Needed: $396
Hall of Fame
|SourceMod 1.10 Now Stable!
||Oct 19, 2019 06:38
|The new stable branch of SourceMod is now 1.10. As always, there will be gamedata updates for the old-stable 1.9 branch for a while.
The new version includes community contributions by the following awesome people: headline, SlidyBat, PerfectLaugh, quasemago, Technoblazed, InvexByte, TiBarification, Pelipoika, Peace-Maker, thewavelength, rumblefrog, jason-e, Kailo, CrazyHackGUT, rsKliPPy, fakuivan, maximsmol, Silenci0, hydrogen-mvm, Hexer10, ddhoward, Bara, PowerLord, TheByKotik, komashchenko, BotoX, b3none, DJPlaya, PerfectLaugh, 404UNFca, JoinedSenses, TheDS1337, Batfoxkid, MartLegion, FortyTwoFortyTwo, PlayBoy31, and Einyux.
The highlights of this release include:
- Transitional syntax for enum-structs. Read more about them in the wiki.
- Support for running on 64-bit dedicated servers.
- New trace ray natives to query for more infos along the ray.
- Updated MySQL client library for utf8mb4 charset support.
- A new command to reload the databases.cfg without restarting the server: [FONT="Courier New"]sm_reload_databases[/FONT]
- Faster compile times due to numerous fixes and tweaks.
- Adjusted plugin binary format to pave the way for more advanced language features.
- Lots of stability and code quality improvements.
- Improved methodmap API and documentation.
Here are all the changes that were made since 1.9 was set as the stable branch:
Note, entries marked by an * were backported to 1.9 as well.
- Workaround CS:GO Stringtable bug #1046
- Simplify Logger internals to fix SourceMod from stopping to log #691
- Handle NULLs in SDKCall string return #906 *
- Allow changing to -1/null for attacker and inflictor in OnTakeDamage SDK hook
- Fix CompileRegex not actually setting a valid error code #775
- Fix compilation with Visual Studio 2017+
- SDKHooks: Reset global hookid when unhooking in SourceHook #916
- Prevent FrameIterator OOB Errors #949 *
- Improve error message for EmitSound #787
- Fix BfRead.BytesLeft not being able to be optional #945 *
- IBinTools: Block loading incompatible interface versions #979
- Fix wrong matchmaking_ds bin path being used in some instances #1006
- Remove `MAPLIST_FLAG_NO_DEFAULT` misuses #870
- Fix typo in fallback to "default" maplists section #923
- Fix wrong timeleft calculation after mp_restartgame in CS:S and CS:GO #1072
- Mark new methodmap natives as optional #867
- Don't double-format in ReplyToCommand #932 *
- PassType typo fixup #1018
- Fix description of nominations convars #758
- Fix description for CharToLower and CharToUpper (again) #750
- Fix param order in CancelClientMenu documentation #982
- Documentation fixes of methodmap implementation #788
- Fix FormatUserLogText to use GetClientAuthId #805
- Add missing MarkNativeAsOptional for SetAuthIdCookie native #879
- Send ShowActivity messages to TV clients #813
- Fix sm_help erroring out if invoked during the connection process #723
- basevotes: Fix buffer size for workshop obtained levels #956
- Fix wrong formatting to "Vote Delay Minutes" when delay above 60s #1009
- 64-bit support for CSGO on Linux and macOS #705
- Add more traceray natives (TR_EnumerateEntities, TR_EnumerateEntitiesHull, TR_ClipRayToEntity[Ex], TR_ClipRayHullToEntity[Ex], TR_ClipCurrentRayToEntity[ex]) #754
- Add TR_GetHitBoxIndex native#1085
- Add RemoveEntity native #745
- Add sm_reload_databases command #773
- Add int64 support to Protobuf methodmap #943
- Allow different values per platform in "Keys" gamedata section #765
- Open menu with matching maps on ambiguous !nominate map_name command #983
- Add Regex.MatchAll native and fix MatchRegex behaviour to match documentation #767
- MySQL: Support multiple result sets in prepared queries #825
- Add LogStackTrace native #685
- Add Protobuf.HasField native
- Add CommandIterator methodmap including CommandIterator.Plugin to access registering plugin #819
- Add missing return value documentation for CreateDirectory
- Fix Miscellaneous Regressions and undefined behaviours #1022
- Update game support for CS:GO, BMS, Empires, NMRiH, Insurgency, PVKII, IOSoccer, ZPS *
- Move semantics for StringHashMap #589
- Remove DB configuration locking #791
- Add TFCond Descriptions #1005
- Add Profiler methodmap #814
- Add GameData methodmap #766
- Add GlobalForward & PrivateForward methodmaps #1004
- Add Cookie methodmap #1012
- Add getter for Event.BroadcastDisabled #946
- Add Sort and SortCustom to ArrayList methodmap #1003
- Add File.Flush methodmap function #1056
- Update TF2_IgnitePlayer to support setting duration of fire #1038
- Add templated helper class to promote type-safety for wrapped function calls #965
- Add more TF2 specific DMG_ definitions #756
- Add new custom kill identifier for TF2 #972
- Add Shield and Bumpmine to cstrike.inc #991
- Allow any returns in native callbacks #857
- Add RequestFrameCallback with optional data parameter #1068
- Update sm_ban, sm_kick, & sm_map to display menu when issued without arguments #838
- Pad plugin ID based on the total plugin count in sm plugins list output #1027
- Improve CreateNative failure message #903
- Use natural sorting for map lists #907
- Add internationalization to basechat and fix CS:GO colours #674
- Switch CS:GO Clantag set/get to use netprops + offset over sig + offset #922
- Unify map lookup logic across tf2esque engines #931
- Change MultiTargetFilter to a typeset that allows ArrayList #955
- Remove goto from ExtensionSys.cpp #729
- SQL-Admin-Manager: style clean-up #974
- Rewrite DataPack implementation #688
- Prevent use of primitive float operation functions #763
- Update MySQL to version 5.5 (support utf8mb4 charset) #786
- Update SQLite to version 3.26.0 #783 #935
- Increase MAX_NAME_LENGTH to match CS:GO MAX_PLAYER_NAME_LENGTH
- Use safe strcpy where applicable #784 #785
- Remove IDataPack interface #864
- Update sample extension params to be sourcehook-friendly #886
- Deprecate GetMaxClients #818
- Deprecate FormatUserLogText #856
- Cleanup first party plugins #777
- Fix GCC 9 builds #1024
- Make SQL_QuoteString deprecated #792
- Add a note about FormatTime platform dependence #908
- Fix initializing of dynamic char #176
- Fix a HEA memory leak when using break in nested scopes #207
- Fix switch statements' default case not being registered as guaranteed return #236
- Fix crash when indexing an array with a literal array #286
- Fix crash on malformed if statement #297
- Fix assert when returning an indeterminate array #290
- Fix crash when enabling profiler #316
- Annihilate codepage support and fix compiler startup segfault #238
- Relax name shadowing checks for implicitly prototyped functions #371
- Fix -D active directory compiler option #259
- Look in include paths for the default include file
- Increment error count on fatal error #171
- Fixed segmentation fault in DocGen #185
- Fix wrong debug codestart of struct variables #309
- Fix register increment/decrement visit in interpreter #190
- Fix anonymous methodmap instantiations #206
- Disallow references on indeterminate array arguments #315
- Remove pow10 usage and shim for libc 2.27+ support #208
- Fix incorrect reported file in error message when missing a required semicolon #331
- Don't allow redefining typedefs or typesets #351
- Fix unused stocks getting compiled into the binary #366
- Fix warning when non-stock functions are used by stock functions #352
- Add transitional syntax for enum structs #287
- Add #warning directive #170
- Added __LINE__ constant #180
- Add RTTI metadata and replace debug symbols sections #210
- Copy function debug name onto stack for crash dumps #159
- Add basic debug API for breakpoints #216
- Fully support basic floating point operations in spshell #195
- Replace codeversion with feature flags #198
- Add "not" optimization #165
- C++ify compiler code
- Improve compilation speed
- Improve compile time by optimizing stgwrite #183
- Optimize compilation for large global arrays #184
- Rewrite the lexer #264
- Compiler performance enhancements around symbol handling
- Rewrite symbol pruning #269
- Always parse as UTF-8 #270
- Remove the MEMFILE abstraction #274
- Remove the three-pass codegen step #277
- Fix memory leaks #280
- Replace the macro list with a hash table #282
- Remove cmptag #260
- Simplify inline exit frames #345
- Expand the semantics of the RETN instruction (opt-in) #192
- Introduce a new method of encoding arrays #199
- Introduce control flow verification #213 #215
- JIT off the control-flow graph, rather than instruction stream #217
- Compute static memory requirements of methods #218
- Require a balanced heap state at join points #219
- Move stack checks to the function prologue #223
- Align JIT HALT implementation with Interpreter and Verifier #175
- Remove then/begin/end tokens #161
- Remove #pragma rational #193
- Remove unused constants like cellbits, charmin #360
- Add a -v/--version command to spshell that displays JIT availability #203
- Add a -z compression level argument to the compiler #272
- Improve testing harness #204
- Fix compliation on XCode 10 and above #326
- Use clang-format for code style checks #340
The Stable Builds download page now points to 1.10 builds, although 1.9 ones are still available and linked there. The Dev Builds page now points to the new 1.11 branch.
Many thanks to Peace-Maker for writing up this news post for us!
|.: by asherkin
||May 25, 2019 07:55
|Come one, come all - join us on the official SourceMod Discord!
If IRC is more your thing, we're still there too!
|.: by asherkin
|SourceMod 1.9 Now Stable!
||Jul 07, 2018 23:01
|Hello everyone, as you can see SourceMod 1.9 has been declared stable. Gamedata updates will still be supplied to the 1.8 branch for a limited time. The following changes listed below are what's new since the 1.8 branch was declared stable.
Once again, thank you to the following community members who have assisted the SourceMod development team since the 1.8 stable release. These individuals include (but are not limited to): peace-maker, Headline, ErikMinekus, Powerlord, GoD-Tony, FlaminSarge, Benoist3012, iNilo, luki1412, klstriker, kossolax, Duk0, WildCard65, InvexByte, VoiDeD, The Creeper, Pelipoika, akowald, thewavelength, and Kailo.
- Fixed certain sendprops being treated improperly in CS:GO*
- Fixed mass renaming (sm_rename @all "Something") behavior
- Fixed bug where optional natives would no longer be optional after plugin reloading
- Fixed nominations plugins from returning Plugin_Continue in a command callback
- Fixed occasions where UTF8 names would be truncated mid-character*
- Fixed crash in SQLite extension where SqDatabase tried to access a dead instance of SqDriver
- Fixed wrong return type in UserMessageToBfRead*
- Fixed issue where OnMapTimeLeftChanged would not get called in CS:GO*
- Fixed crash when plugins closed SQL query results handles*
- Fixed crash when CloneArray is called on large arrays
- Fixed native not bound error with Panel.Style*
- Fixed issue where sourcemod would trigger an assert if game isn't bult with RELEASE
- Fixed memory leak in Regex extension
- Fixed crash when database transaction fails
- Fixed issue menus weren't drawing
- Fixed incorrect bit size given for vectors with FindDataMapInfo
- Fixed AllowClLanguageVar setting being ignored in CS:GO*
- Fixed crash when accessing gamerules during mapchange*
- Fixed where GetCommandLineParam would always retrieve default value*
- Fixed ICommandLine lookup on Linux for Insurgency and DOI*
- Fixed KeyValues.SetUInt64 truncating values*
- Fixed issue where OnEntityCreated wasn't always called
- Fixed CS_GetWeaponPrice returning incorrect weapon prices*
- Fixed issue where core config values were not being cached
- Fixed OnPlayerRunCmd crashing with invalid CUserCmd ptr
- Fixed duplicate plugin loading issue on Windows and MacOS
- Added Database.Format, an auto-escaping format native for SQL query creation
- Added the ability to configure multiple chat trigger characters
- Added config file for basevotes & funvotes
- Added support for more SQLite database options like :memory:
- Added ArrayList.BlockSize and ArrayStack.BlockSize
- Added FireEntityOutput native
- Added IsNativeParamNullVector and IsNativeParamNullString natives
- Added PrintToConsoleAll native
- Added OnPlayerRunCmdPost forward
- Added GetGameFrameTime native
- Added IsNullVector and IsNullString natives
- Added Call_PushNullVector and Call_PushNullString natives
- Added support for CreateItemEntityByName for CS:GO*
- Added CS_ItemDefIndexToID and CS_WeaponIDToItemDefIndex natives
- Added KeyValues.ExportToString and KeyValues.ExportLength natives
- Added a new Handle type FrameIterator for stack frame iteration
- Added TranslationPhraseExists & IsTranslatedForLanguage
- Enabled radio menus for Black Mesa
- Increase TopMenu display buffer size
- Removed TFHoliday_SpyVsEngyWar, as it no longer exists
- Improved documentation for sm_reserve_type, CharToLower, CharToUpper, RadToDeg*, ArrayList.Resize/ResizeArray* and GetSteamAccountID
- Corrected various typos in OnRemoveBan*
- Added ICellArray interface
- Removed reduant () in DebugReport:: outputs*
- Changed sm_msay to use MaxPageItems instead of a hardcoded value of 10*
- Adjusted rockthevote to use RoundToCeil instead of RoundToFloor to match behavior definition
- Added 2 CSGO gamerules netprops to CSGO blocklist
- Changed CHalfLife2::GetMapDisplayName to always check for string substitutions*
- Ignore fake clients in @spec targeting
- Updated sm_map behavior to better reflect FindMap/GetMapDisplayName results
- Allow Event.FireToClient regardless if broadcasting is enabled
- Added missing parameter to DataPack.IsReadable*
- Bots no longer bypass kick queue
- Removed gender from nomination changed translation phrase
- Function names are now included in cstrike ext signature failures*
- Vote actions are ignored if the target is no longer available in basevotes
- Allowed seeking to the end of datapacks
- Updated TF2_IsPlayerInCondition to support new conditions*
- Extensions that failed to load are only shown if the extension is required
- Various sourcemod include `const` corrections
- Add convenience logic for "offset" to Address definitions in GameConf
*New since last round up, but may have existed in later 1.8 builds.
The Stable Builds download page now points to 1.9 builds, although 1.8 ones are still available and linked there. The Dev Builds page now points to the new 1.10 branch.
|.: by headline
|CS:GO and moving forward (Plugin developer input)
||Aug 26, 2017 09:48
So as you may have noticed in the last CS:GO update it took us much longer to fix SourceMod than normal so I'll give a brief view of what happened. CS:GO code on launch had much of the same code as CS:S making it really easy to port the cstrike extension over to CS:GO and make plugins for one work for both for the most part but this has changed heavily over the years as they strip old code out. What happened in the last update is they moved away from weaponids and removed item script files and merged everything into items.games. In doing so they removed functions SM used or are no longer used in the same way (or inlined on windows). This caused our update time to take much longer due to having to find ways to replicate the previous functions/forwards.
When the extension was finally finished we considered it a temporary fix since it isn't very maintainable. Looking forward we want to phase out/remove WeaponID's for CS:GO and switch to item definition indexes. However, doing this will cause some minor breakage/change in behavior for old plugins.
So here is the approach currently being discussed. The id's for the weapons that are currently in the enum will be mapped to itemdefs so internally we will use itemdefs but plugins will see it as the old id's. Anything currently not in the weapon ids enum will use the itemdef index. This will require us to update the include with new itemdef indexes when they are added thus plugin recompiling if they want to use the new values.
This change will break certain weapons as well, currently the extension does some assumptions for weapons that aren't default (cz75a, usp-s, m4a1-s, revolver). Currently it passes the weaponid for the item that it replaces. However, in the case of the cz75a this has been broken forever due to them having different default items on CT/T. So those weapons will be added to the enum separately.
So this thread is for plugin developers to provide input on the solution (perhaps a better one) and also suggestion for new natives that they may want WITHIN REASON. The natives for the most part should be ones that interact with the new CCSWeaponData class or CEconItem(View/Definition). I have final say if they are added or not.
|.: by Dr!fter
|Development Roundup and More!
||Apr 29, 2017 19:31
|It's been quite a bit of time since our last news post, so not only do you get a development roundup, but some other related news spliced in as well!
Metamod:Source stable branch (1.10)
Not much exciting is going on with development of the stable branch of MM:S. However, like SM about 1.5 years ago, MM:S is now officially on a rolling release cycle as of two days ago.
There will be no more "final" releases of MM:S. As with SM, people looking to update their servers after a breaking game update would often grab the latest release rather than a snapshot build, not realizing that they might need something a bit more fresh. In addition to now avoiding that confusion with MM:S, we've also revamped its builds download page, adding similar revision information and source links to what you see on the SM builds download page, and adding support for HTTPS to all downloads.
SourceMod stable branch (1.8)
Similar to the stable branch of MM:S, there's nothing too exciting going on with this. We're continuing to provide many, many game compatibility updates as needed, including updated gamedata files. Additionally, multiple bugfixes have made their way in since this was tagged as the new stable branch a bit over a year ago.
On the note of bug fixes, after weighing the pros and cons, we've decided to switch to GitHub Issues moving forward for future bug reports and feature requests for SourceMod. While this requires users to have a GitHub account to report an issue, many didn't know that the previous bug tracker existed, let alone that they could log in with their forum credentials. (It also unintuitively took forum email address, rather than username). There are numerous stagnant issues there, many that are no longer relevant or that have just been requiring more information for years. This will give us a fresh start. The old tracker is still available, but set to no longer accept new SM bug reports. As before, it will not be for general support or help. The forums are better suited for that.
Metamod:Source development branch (1.11)
- Added support for compiling on newer toolchains, such as Visual Studio 2015 and 2017 on Windows.
- Removed the old v1.4 plugin API.
- Added v1.6 API support for "ep1" games (The Ship and Source SDK 2006 mods).
- Re-added support for Dota 2. (This includes initial support for Source2 and x64 dedicated servers!).
On the note of Source2, there has been some stir lately due to rumors that CS:GO will be ported to it in the future. That obviously solicited many questions from people, wondering if SourceMod would continue to work with it.
While we don't foresee CS:GO moving to it anytime soon, having MM:S work on the newer engine was the first step and had been in the works for over a year. There are now four Source2 releases, but Dota 2 is the only multiplayer one, and is more lobby-based than relying on dedicated servers. That's part of the reason that it's a bit too early to say what SourceMod's fate will be on Source2. On the server side, the differences are somewhere between jumping from an older Source variant to a newer one, and the jump from GoldSrc to Source. And similarly to when Source debuted, there is no SDK; we're flying blind.
We've not settled on anything yet, but one of the following three approaches is likely.
- Add Source2 support to SourceMod. Some whole sets of API just won't work on Source2 or may act a bit differently. Some new Source2-exclusive ones would be added. Our code would become (more of) a mess, but scripts that don't rely on engine functionality would continue to work as-is. Many scripts would still need to be updated.
- Create one or more new MM:S plugins that just extend the VScript scripting API that already exists in the engine, exposing an admin API and whatever other functionality is missing. No existing scripts would work, but the base of the scripting API is a first-class citizen and would have a much smaller chance of breaking with a game update, as Valve would be maintaining the bulk of it.
- Create "Source2Mod", porting SourceMod to Source2, dropping support for Source(1) in that copy. Clean up APIs and make Source2 a first-class citizen. The majority of scripts would break, but the familiar SourcePawn language and non-engine APIs would stay the same.
We're not necessarily asking for input yet, just sharing some ideas we're tossing around. They involve differing amounts of work required, and we still have plenty of reverse-engineering left to do to figure out the full extent of what we can do.
SourceMod development branch (1.9)
- Added support for Counter-Strike: Classic Offensive and Alien Swarm: Reactive Drop.
- Added the ability to trigger an entity output directly.
- Added the ability to get and set entity output variables.
- Added a native and extended the Database methodmap to allow safe, escaped SQL query value string formatting.
- Added support for having multiple public and multiple private chat triggers, (such as having both ! and / as private, with no public triggers).
- Changed the "ep1" builds (used by The Ship and Source SDK 2006 mods) to use the newer MM:S v1.6 plugin API (requiring MM:S v1.11 or later).
- Added support for compiling on newer toolchains, such as Visual Studio 2015 and 2017 on Windows.
And unrelated to any of that...
Some users have recently expressed interest in having an AM or SM Discord, Slack, or other chat provider set up. While we have no plans to split the community across multiple chat services, I'd like to remind everyone that there is still an active community for SourceMod on IRC (irc.gamesurge.net). The #sourcemod channel exists for anything related to SourceMod - installation help, plugin development questions, and more. There is also an #am-announce channel for those that want to follow development live. All git pushes, issue and pull request openings/closings, and most game updates get announced there as they occur.
For those that don't have an IRC client installed, there are also multiple web chat clients available.
|.: by psychonic