Skip to content
News
CS22 min read

Counter-Strike 2 Update Boosts Workshop Map Scripting with Save Data & New Events

Guildfy·
Counter-Strike 2 Update Boosts Workshop Map Scripting with Save Data & New Events

Valve has rolled out a new update for Counter-Strike 2, primarily focusing on expanding workshop map scripting capabilities and making minor quality-of-life adjustments.

Map Scripting Enhancements

The most significant changes revolve around giving map creators more tools for dynamic and persistent experiences. Workshop maps can now utilize save data, allowing for more complex and evolving custom game modes:

  • Added Instance.SetSaveData and Instance.GetSaveData for managing persistent data.
  • Workshop maps can write up to 1MB of save data, leveraging Steam Cloud for persistence across installs.
  • The save data size limit can be configured with sv_workshop_map_save_data_max_filesize_mb.

Damage modification has also seen an overhaul, providing more granular control for script authors:

  • Added Instance.OnModifyPlayerDamage, which is called after all damage properties are calculated but before armor and health are modified. This replaces Instance.OnBeforePlayerDamage and includes hitgroup in event data.
  • Added hitgroup to OnPlayerDamage event data.
  • Introduced CSDamageFlags.IGNORE_ARMOR.

Player input detection has been enhanced with new functions:

  • Added CSPlayerPawn.IsInputPressed.
  • Added CSPlayerPawn.WasInputJustPressed.
  • Added CSPlayerPawn.WasInputJustReleased.
  • Added enum CSInputs.
  • Fixed a bug where CSDamageTypes was exported under the name CSDamageType.

Miscellaneous Fixes

Beyond scripting, a small but useful change was implemented for map guides:

  • Map guides for de_ancient can now be used on de_ancient_night and vice versa.

We use cookies to improve your experience and show relevant ads. By continuing to use this site, you consent to our use of cookies. Read our privacy policy