Blog
CS2 Update: Major Workshop and Scripting Changes
Valve has released a new update for CS2, which aims to expand map scripting tools and improve Workshop functionality, as well as provide minor quality of life improvements.
New Workshop data storage system
Workshop map creators can now save persistent data using the newly added Instance.SetSaveDataand Instance.GetSaveData. Maps can store up to 1 MB of data, which is synced via Steam Cloud and remains accessible even after reinstalling the game. Server operators can control this limit via sv_workshop_map_save_data_max_filesize_mb.
Improved damage and input events
The update introduces Instance.OnModifyPlayerDamage, replacing OnBeforePlayerDamage. The new event fires after damage calculations and now includes hit group data, which was also added to OnPlayerDamage. New damage and input tools have been added, including:
CSDamageFlags.IGNORE_ARMOR- Player input checks such as
IsInputPressedandWasInputJustPressed - New
CSInputsenum Also, a naming error inCSDamageTypes.
Miscellaneous fix
Map guides for de_ancient are now fully compatible with de_ancient_night, improving the experience for players exploring both versions.