Skip to content

Releases: ScriptedEvents/ScriptedEventsReloaded

Version 1.0.0 - Experimental 9

Pre-release

Choose a tag to compare

@Elektryk-Andrzej Elektryk-Andrzej released this 04 Sep 06:38

UncomplicatedCustomRoles 9.6 support

SER now supports UCR 9.6.0 and its renamed UncomplicatedCustomRoles.dll. Scripts can also react when UCR roles are registered, spawned, or removed.

New scripting support

  • Use !-- OnUCR with Registering, Registered, Unregistered, Spawning, Spawned, or Removed.
  • Use IsAllowed false in a Registering or Spawning script to stop that action.
  • Find roles by ID or name, list registered roles and active role instances, count spawned roles, check whether a role is still registered, and remove a role from a player.
  • Read UCR role fields through role and active-instance references.
  • Use serhelp ucrevents to see the events provided by the installed UCR version.
  • The visual editor and VS Code extension now recognize the new UCR events, methods, and references.

Important

If your server uses the UCR integration, update to UCR 9.6.0 or newer. Replace UncomplicatedCustomRoles-LabAPI.dll with UncomplicatedCustomRoles.dll, then restart the server. SER still works without UCR installed.

Full Changelog: v1-exp8...v1-exp9

Version 1.0.0 - Experimental 10

Pre-release

Choose a tag to compare

@Elektryk-Andrzej Elektryk-Andrzej released this 04 Sep 20:05

Event cancellation

IsAllowed false now records only explicit SER decisions. A later event script that does not call IsAllowed can no longer turn an earlier cancellation back on. SER also applies the choice when the IsAllowed method runs, which removes the stale default that could make repeated cancellation appear to work only once.

Important

IsAllowed still cannot cancel the current event while SafeScripts is on.
The safety pause lets the game continue first. Keep SafeScripts on for normal scripts; turn it off only when an event script must cancel an action and you have checked every active script for loops that could freeze the server.

Errors and runtime reliability

  • Internal error logs now show the script, source line, start reason, and caller chain next to the short report ID.
  • attempt catches script and game-state errors without swallowing stop or hiding internal SER failures.
  • Repeated on_error blocks receive the current error and always clean up their temporary variables.
  • Completed coroutines are removed from SER's active list correctly.
  • Early parser failures now include their physical source line.

Examples, docs, and contributor workflow

  • Added a friendly-fire guard and a Discord round-report example.
  • The documentation site now publishes nested EventPack examples as normal pages and downloadable files. All 37 bundled examples are build-validated.
  • Local builds no longer overwrite the reference DLL or install the VS Code extension unless requested. A quick compile switch skips generated tooling; the normal Release build still runs the full validation.
  • Added tooling CI, dependency update groups, issue forms, a security policy, and an OIDC-based VS Code Marketplace publishing workflow.
  • Updated compatible React and Blockly patch releases. The editor and VS Code extension dependency audits are clean.

Replace the existing plugin DLL with the LabAPI or EXILED build below, then
restart the server.

Full Changelog: v1-exp9...v1-exp10

Version 1.0.0 - Experimental 8

Pre-release

Choose a tag to compare

@Elektryk-Andrzej Elektryk-Andrzej released this 03 Sep 14:57

Inline Method Returns with SafeScripts

Inline methods like {AmountOf @all} in an if statement were unintentionally supressed by the SafeScripts config setting. This has now been fixed.

Map Queries

GetFromMap doors no longer includes elevator doors or non-interactable doors in its result. Elevator objects remain available through GetFromMap elevators.

Important

Servers using SafeScripts: true should upgrade to this build. No script rewrites or configuration changes are required for this fix.

Full Changelog: v1-exp7...v1-exp8

Version 1.0.0 - Experimental 7

Pre-release

Choose a tag to compare

@Elektryk-Andrzej Elektryk-Andrzej released this 22 Aug 14:39

🚀 SER 1.0 update (experimental 7)

This version fixes adds new features / fixes compared to version 6:

  • fixed argument parsing, Random, door, event cancillation, networking, database, integration, duration token, flag verificattion and other issues
  • multi-flag scripts
  • better diagnostics for scripts using serstatus, serreload and serrun
  • handling of disconnected players in user defined variables
  • -- requireSender flag argument
  • added SetPlayerIntercom and Intersect methods
  • merged GetIPInfo
  • expanded examples

This update represents a complete paradigm shift for the SER language. The flat, unstructured method architecture of v0.15.1 has been replaced with dot-notation namespacing, direct object manipulation, and dedicated syntax rules.

Caution

If you are upgrading from v0.15.1, your scripts will require rewriting.

🎉 Community Shoutout

Luke & Jraylor - major SER sponsors! The 1.0 update wouldn't be possible without their support!

@RetroReul - newest SER contributor! Retro is behind some of the new methods and properties, glad to have you on our team! :)


1. Syntax & Operators Overhaul

The Arrow Operator (->) & Native Properties

The language now automatically hooks into underlying game objects, exposing their properties natively. You can drill through multiple objects in a single line, entirely replacing the old Info wrapper methods (like DamageInfo, ItemInfo, DoorInfo).

  • Direct Access: $name = @plr -> name completely replaces $name = {@plr name}.
  • Native Property Modification: You can now directly alter the game state using assignment expressions! If a property is settable, just assign it: *generator -> isOpen = true.
  • Chaining: Drill down through data seamlessly: $nameLengthOdd = @sender -> name -> length -> isOdd.

Mathematical Expressions

The "bracket tax" on mathematical operations has been eliminated. Math no longer requires wrapping in parentheses to be evaluated.

  • Old: $five = (2 + 3)
  • New: $five = 2 + 3

2. Scope & Block Management

Inline Block Parameters (with)

Looping and function definitions now use the with keyword to attach parameters or iterators directly, cleaning up visual clutter.

over @all with @plr
    Print {@plr -> name}
end

Multiple Flags in One Script

You can now define scripts with multiple flags:

!-- OnEvent RoundStarted
Print "Round started"

!-- OnEvent Death
-- require @evPlayer
Print "Player {@evPlayer -> name} died"

!-- CustomCommand status
-- requireSender
Reply "hi {@sender -> name}! the server is online"

Ephemeral Variables (ephm)

Introduced the ephm keyword to define variables that automatically delete themselves the moment their current block (like a func or if statement) finishes executing, preventing memory leaks in complex scripts.

3. Native Keywords vs. Methods

Core logic and memory management have been moved out of the method parser and into the engine's low-level keywords for better performance.

  • Timing Flow: Wait 5s is now the native keyword wait 5s.
  • Conditional Flow: WaitUntil ... is now the native keyword wait_until ....
  • Memory Management: The old PopVariable $var method has been replaced by the native delete $var keyword.
  • Probability Flow: Added the native chance statement block to streamline random probability checks without needing math blocks.

4. The Great API Namespacing (Method Restructure)

Version 1.0 abandons the flat, cluttered global method list. Hundreds of methods were renamed and grouped into logical namespaces using dot-notation, while redundant methods were purged entirely.

  • Audio System (Audio.* & Speaker.*): LoadAudio is now Audio.Load. CreateGlobalSpeaker is now Speaker.CreateGlobal.
  • Admin Toys (Toy.*): CreateToy is now Toy.Create. TPToyPos is now Toy.TPPosition.
  • Collections (Coll.*): CollectionInsert is now Coll.Insert. EmptyCollection is now Coll.Create.
  • Discord (Discord.* & Embed.*): DiscordMessage is now Discord.CreateMessage. DiscordEmbed is now Embed.Create.
  • Web & Data (HTTP.*, JSON.*, DB.*): HTTPGet is now HTTP.Get. AppendDB is now DB.Add.
  • Text (Text.*): PadText is now Text.Pad. SubText is now Text.Slice.

5. New Core Frameworks

Brand new structural features were added to extend what SER scripts are capable of building.

  • Dictionaries (Dict.*): A full C#-style key-value mapping system natively implemented (Dict.Add, Dict.Contains, Dict.Create, Dict.Get, Dict.Remove).
  • Custom Roles (CRole.*): Base-game custom role handling without multi-file setups. Includes CRole.Register, CRole.SetCallbacks, and native framework integrations like CRole.CreateBracketSpawnSystem.
  • Configurations (Config.*): Scripts can now generate and read personalized configuration options natively (Config.GetOption, Config.Read).
  • Unified Map Queries: Added a singular, high-performance GetFromMap method that queries any object layout or structural element in the active round instance.
  • ProjectMER: Added 28 methods and the !-- OnPMER flag for various map editing needs.

6. Player Control & Interactions

  • Native Base-Game Effects: Full status-effect bindings without requiring external EXILED plugin hooks (GiveEffect, ClearEffect).
  • Stamina & Actions: Added direct control over stamina (Stamina method) , jump height (Jump) , and combat visuals (ShowHitMarker).
  • Targeting & Rulesets: Added AddDamageRule / RemoveDamageRule and AddTeslaIgnoreRule / RemoveTeslaIgnoreRule.
  • Network / IP Data: Integrated GetIPInfo and GetIPInfoWithKey for proxy and connection validation directly inside scripts.

7. Compiler Safety & Tooling

Documentation website

  • An integrated construct search to look for SER methods, variables, events, etc.
  • A better tutorial series, made specifically for beginners
  • A new language reference to search for key language features
  • and more!

VS Code extension

  • Method, keyword, flag, event, variable, enum, and option completions
  • Hover documentation and signature help
  • Shared diagnostics for incomplete values, malformed function calls,
    unclosed statements, and unsafe forever loops
  • An SER: Open Blocks Editor option/command

SER Blocks Editor

Scratch-like visual editor for basic SER script creation.
Purposefully limited in scope to serve as a friendly introduction to SER.

Compile-time reliability

SER uses its example scripts as a first wall of defence against bugs.
When compiling SER.dll, the example scripts are then checked by the newly
created SER.dll to ensure their (compile time) correctness.

  • Invalid expressions inside text strings are caught at compile time.
  • Nested curly-brace expressions are parsed safely by the tokenizer.

🌟 Real-World Examples: v1.0 Syntax in Action

To give you a vague idea of how clean and readable SER scripting has become, here are a few snippets utilizing the new v1.0.0 syntax!

Example 1: Ephemeral Variables & Namespaces (Discord Webhooks)

Using the new ephm keyword to automatically clean up variables, and the new dot-notation namespaces for Discord embeds.

func *GetDiscordMessage
    # variables using 'ephm' are ephemeral and will be deleted after the function ends
    ephm $title = "{ServerInfo name} status"
    ephm $content = "There are {AmountOf @all} players on the server:{Show @all name "<br> -" true}"
    
    return Discord.CreateMessage _ $title _ {Embed.Create $title $content}
end

# ... later in the script ...
*msg = run *GetDiscordMessage
Discord.EditMessage $url $messageId *msg

Example 2: The chance block & Arrow Syntax (Chaos Coin)

A clean implementation of random probabilities using the new chance block, and direct object evaluation using the -> operator.

# 50% chance to lose the coin
chance 50%
    Hint @evPlayer 3s "<color=#ff5555>Your coin has turned into dust..."
    AdvDestroyItem {@evPlayer -> heldItemRef}
end

# Check if the player's role changed during a countdown
if {@evPlayer -> role} isnt $initRole
    ClearCountdown @evPlayer
    SetPlayerData @evPlayer "coin locked" false
    stop
end

Example 3: Native Custom Roles Framework

Registering custom roles natively in one file using the new CRole.* framework.

!-- OnEvent WaitingForPlayers

*spawnSystem = CRole.CreateChanceSpawnSystem ClassD 20%
CRole.Register janitor "LCZ Janitor" ClassD *spawnSystem

!-- OnCRole spawned
-- forRoles janitor

TPRoom @evPlayer LczToilets
GiveItem @evPlayer KeycardJanitor

Version 1.0.0 - Experimental 6

Pre-release

Choose a tag to compare

@Elektryk-Andrzej Elektryk-Andrzej released this 09 Jun 08:34

🚀 SER 1.0 update (experimental 6)

This version fixes issues from version 5:

  • fixed repeat caching values
  • fixed infinite references to variables in dynamic text values
  • fixed script system losing some flag features on round restart
  • fixed Countdown method stopping broadcasting on script end
  • fixed CustomCommand arguments not parsing to correct data types
  • fixed custom role implementation
  • improved errors for expressions

many thanks to miggas for finding so many issues!

This update represents a complete paradigm shift for the SER language. The flat, unstructured method architecture of v0.15.1 has been replaced with dot-notation namespacing, direct object manipulation, and dedicated syntax rules.

Caution

If you are upgrading from v0.15.1, your scripts will require rewriting.

🎉 Community Shoutout

Luke & Jraylor - major SER sponsors! The 1.0 update wouldn't be possible without their support!

@RetroReul - newest SER contributor! Retro is behind some of the new methods and properties, glad to have you on our team! :)


1. Syntax & Operators Overhaul

The Arrow Operator (->) & Native Properties

The language now automatically hooks into underlying game objects, exposing their properties natively. You can drill through multiple objects in a single line, entirely replacing the old Info wrapper methods (like DamageInfo, ItemInfo, DoorInfo).

  • Direct Access: $name = @plr -> name completely replaces $name = {@plr name}.
  • Native Property Modification: You can now directly alter the game state using assignment expressions! If a property is settable, just assign it: *generator -> isOpen = true.
  • Chaining: Drill down through data seamlessly: $nameLengthOdd = @sender -> name -> length -> isOdd.

Mathematical Expressions

The "bracket tax" on mathematical operations has been eliminated. Math no longer requires wrapping in parentheses to be evaluated.

  • Old: $five = (2 + 3)
  • New: $five = 2 + 3

2. Scope & Block Management

Inline Block Parameters (with)

Looping and function definitions now use the with keyword to attach parameters or iterators directly, cleaning up visual clutter.

over @all with @plr
    Print {@plr -> name}
end

Ephemeral Variables (ephm)

Introduced the ephm keyword to define variables that automatically delete themselves the moment their current block (like a func or if statement) finishes executing, preventing memory leaks in complex scripts.

3. Native Keywords vs. Methods

Core logic and memory management have been moved out of the method parser and into the engine's low-level keywords for better performance.

  • Timing Flow: Wait 5s is now the native keyword wait 5s.
  • Conditional Flow: WaitUntil ... is now the native keyword wait_until ....
  • Memory Management: The old PopVariable $var method has been replaced by the native delete $var keyword.
  • Probability Flow: Added the native chance statement block to streamline random probability checks without needing math blocks.

4. The Great API Namespacing (Method Restructure)

Version 1.0 abandons the flat, cluttered global method list. Hundreds of methods were renamed and grouped into logical namespaces using dot-notation, while redundant methods were purged entirely.

  • Audio System (Audio.* & Speaker.*): LoadAudio is now Audio.Load. CreateGlobalSpeaker is now Speaker.CreateGlobal.
  • Admin Toys (Toy.*): CreateToy is now Toy.Create. TPToyPos is now Toy.TPPosition.
  • Collections (Coll.*): CollectionInsert is now Coll.Insert. EmptyCollection is now Coll.Create.
  • Discord (Discord.* & Embed.*): DiscordMessage is now Discord.CreateMessage. DiscordEmbed is now Embed.Create.
  • Web & Data (HTTP.*, JSON.*, DB.*): HTTPGet is now HTTP.Get. AppendDB is now DB.Add.
  • Text (Text.*): PadText is now Text.Pad. SubText is now Text.Slice.

5. New Core Frameworks

Brand new structural features were added to extend what SER scripts are capable of building.

  • Dictionaries (Dict.*): A full C#-style key-value mapping system natively implemented (Dict.Add, Dict.Contains, Dict.Create, Dict.Get, Dict.Remove).
  • Custom Roles (CRole.*): Base-game custom role handling without multi-file setups. Includes CRole.Register, CRole.SetCallbacks, and native framework integrations like CRole.CreateBracketSpawnSystem.
  • Configurations (Config.*): Scripts can now generate and read personalized configuration options natively (Config.GetOption, Config.Read).
  • Unified Map Queries: Added a singular, high-performance GetFromMap method that queries any object layout or structural element in the active round instance.

6. Player Control & Interactions

  • Native Base-Game Effects: Full status-effect bindings without requiring external EXILED plugin hooks (GiveEffect, ClearEffect).
  • Stamina & Actions: Added direct control over stamina (Stamina method) , jump height (Jump) , and combat visuals (ShowHitMarker).
  • Targeting & Rulesets: Added AddDamageRule / RemoveDamageRule and AddTeslaIgnoreRule / RemoveTeslaIgnoreRule.
  • Network / IP Data: Integrated GetIPInfo and GetIPInfoWithKey for proxy and connection validation directly inside scripts.

7. Compiler Safety & Tooling

  • Strict Compile-Time Linting: Invalid expressions inside text strings are now caught immediately at compile time. For example, if you write "my name is {get @x name}", the compiler will throw an error immediately, enforcing the correct v1.0 syntax: "my name is {@x -> name}".
  • Nested Bracket Engine Fix: The underlying text tokenizer now utilizes balancing groups, safely compiling deeply nested curly brackets (e.g., "{Round {*evDamageHandler -> damage}}") without breaking string parsing.
  • SER Visual Editor: Launched a standalone web application (available on GitHub) providing a visual node-based workspace to construct scripts without layout/syntax text editing issues.

🌟 Real-World Examples: v1.0 Syntax in Action

To give you a vague idea of how clean and readable SER scripting has become, here are a few snippets utilizing the new v1.0.0 syntax!

Example 1: Ephemeral Variables & Namespaces (Discord Webhooks)

Using the new ephm keyword to automatically clean up variables, and the new dot-notation namespaces for Discord embeds.

func *GetDiscordMessage
    # variables using 'ephm' are ephemeral and will be deleted after the function ends
    ephm $title = "{ServerInfo name} status"
    ephm $content = "There are {AmountOf @all} players on the server:{Show @all name "<br> -" true}"
    
    return Discord.CreateMessage _ $title _ {Embed.Create $title $content}
end

# ... later in the script ...
*msg = run *GetDiscordMessage
Discord.EditMessage $url $messageId *msg

Example 2: The chance block & Arrow Syntax (Chaos Coin)

A clean implementation of random probabilities using the new chance block, and direct object evaluation using the -> operator.

# 50% chance to lose the coin
chance 50%
    Hint @evPlayer 3s "<color=#ff5555>Your coin has turned into dust..."
    AdvDestroyItem {@evPlayer -> heldItemRef}
end

# Check if the player's role changed during a countdown
if {@evPlayer -> role} isnt $initRole
    ClearCountdown @evPlayer
    SetPlayerData @evPlayer "coin locked" false
    stop
end

Example 3: Native Custom Roles Framework

Registering custom roles natively in one file using the new CRole.* framework.

!-- OnEvent WaitingForPlayers

*spawnSystem = CRole.CreateChanceSpawnSystem ClassD 20%
CRole.Register janitor "LCZ Janitor" ClassD *spawnSystem
!-- OnCRole spawned
-- forRoles janitor

TPRoom @evPlayer LczToilets
GiveItem @evPlayer KeycardJanitor

Version 1.0.0 - Experimental 5

Pre-release

Choose a tag to compare

@Elektryk-Andrzej Elektryk-Andrzej released this 06 Jun 10:22

🚀 SER 1.0 update (experimental 5)

This is probably the last experimental update before version 1.0 is released.
Below, you will find the changelog that will most likely be used for the official 1.0 update.

This update represents a complete paradigm shift for the SER language. The flat, unstructured method architecture of v0.15.1 has been replaced with dot-notation namespacing, direct object manipulation, and dedicated syntax rules.

Caution

If you are upgrading from v0.15.1, your scripts will require rewriting.

🎉 Community Shoutout

Luke & Jraylor - major SER sponsors! The 1.0 update wouldn't be possible without their support!

@RetroReul - newest SER contributor! Retro is behind some of the new methods and properties, glad to have you on our team! :)


1. Syntax & Operators Overhaul

The Arrow Operator (->) & Native Properties

The language now automatically hooks into underlying game objects, exposing their properties natively. You can drill through multiple objects in a single line, entirely replacing the old Info wrapper methods (like DamageInfo, ItemInfo, DoorInfo).

  • Direct Access: $name = @plr -> name completely replaces $name = {@plr name}.
  • Native Property Modification: You can now directly alter the game state using assignment expressions! If a property is settable, just assign it: *generator -> isOpen = true.
  • Chaining: Drill down through data seamlessly: $nameLengthOdd = @sender -> name -> length -> isOdd.

Mathematical Expressions

The "bracket tax" on mathematical operations has been eliminated. Math no longer requires wrapping in parentheses to be evaluated.

  • Old: $five = (2 + 3)
  • New: $five = 2 + 3

2. Scope & Block Management

Inline Block Parameters (with)

Looping and function definitions now use the with keyword to attach parameters or iterators directly, cleaning up visual clutter.

over @all with @plr
    Print {@plr -> name}
end

Ephemeral Variables (ephm)

Introduced the ephm keyword to define variables that automatically delete themselves the moment their current block (like a func or if statement) finishes executing, preventing memory leaks in complex scripts.

3. Native Keywords vs. Methods

Core logic and memory management have been moved out of the method parser and into the engine's low-level keywords for better performance.

  • Timing Flow: Wait 5s is now the native keyword wait 5s.
  • Conditional Flow: WaitUntil ... is now the native keyword wait_until ....
  • Memory Management: The old PopVariable $var method has been replaced by the native delete $var keyword.
  • Probability Flow: Added the native chance statement block to streamline random probability checks without needing math blocks.

4. The Great API Namespacing (Method Restructure)

Version 1.0 abandons the flat, cluttered global method list. Hundreds of methods were renamed and grouped into logical namespaces using dot-notation, while redundant methods were purged entirely.

  • Audio System (Audio.* & Speaker.*): LoadAudio is now Audio.Load. CreateGlobalSpeaker is now Speaker.CreateGlobal.
  • Admin Toys (Toy.*): CreateToy is now Toy.Create. TPToyPos is now Toy.TPPosition.
  • Collections (Coll.*): CollectionInsert is now Coll.Insert. EmptyCollection is now Coll.Create.
  • Discord (Discord.* & Embed.*): DiscordMessage is now Discord.CreateMessage. DiscordEmbed is now Embed.Create.
  • Web & Data (HTTP.*, JSON.*, DB.*): HTTPGet is now HTTP.Get. AppendDB is now DB.Add.
  • Text (Text.*): PadText is now Text.Pad. SubText is now Text.Slice.

5. New Core Frameworks

Brand new structural features were added to extend what SER scripts are capable of building.

  • Dictionaries (Dict.*): A full C#-style key-value mapping system natively implemented (Dict.Add, Dict.Contains, Dict.Create, Dict.Get, Dict.Remove).
  • Custom Roles (CRole.*): Base-game custom role handling without multi-file setups. Includes CRole.Register, CRole.SetCallbacks, and native framework integrations like CRole.CreateBracketSpawnSystem.
  • Configurations (Config.*): Scripts can now generate and read personalized configuration options natively (Config.GetOption, Config.Read).
  • Unified Map Queries: Added a singular, high-performance GetFromMap method that queries any object layout or structural element in the active round instance.

6. Player Control & Interactions

  • Native Base-Game Effects: Full status-effect bindings without requiring external EXILED plugin hooks (GiveEffect, ClearEffect).
  • Stamina & Actions: Added direct control over stamina (Stamina method) , jump height (Jump) , and combat visuals (ShowHitMarker).
  • Targeting & Rulesets: Added AddDamageRule / RemoveDamageRule and AddTeslaIgnoreRule / RemoveTeslaIgnoreRule.
  • Network / IP Data: Integrated GetIPInfo and GetIPInfoWithKey for proxy and connection validation directly inside scripts.

7. Compiler Safety & Tooling

  • Strict Compile-Time Linting: Invalid expressions inside text strings are now caught immediately at compile time. For example, if you write "my name is {get @x name}", the compiler will throw an error immediately, enforcing the correct v1.0 syntax: "my name is {@x -> name}".
  • Nested Bracket Engine Fix: The underlying text tokenizer now utilizes balancing groups, safely compiling deeply nested curly brackets (e.g., "{Round {*evDamageHandler -> damage}}") without breaking string parsing.
  • SER Visual Editor: Launched a standalone web application (available on GitHub) providing a visual node-based workspace to construct scripts without layout/syntax text editing issues.

🌟 Real-World Examples: v1.0 Syntax in Action

To give you a vague idea of how clean and readable SER scripting has become, here are a few snippets utilizing the new v1.0.0 syntax!

Example 1: Ephemeral Variables & Namespaces (Discord Webhooks)

Using the new ephm keyword to automatically clean up variables, and the new dot-notation namespaces for Discord embeds.

func *GetDiscordMessage
    # variables using 'ephm' are ephemeral and will be deleted after the function ends
    ephm $title = "{ServerInfo name} status"
    ephm $content = "There are {AmountOf @all} players on the server:{Show @all name "<br> -" true}"
    
    return Discord.CreateMessage _ $title _ {Embed.Create $title $content}
end

# ... later in the script ...
*msg = run *GetDiscordMessage
Discord.EditMessage $url $messageId *msg

Example 2: The chance block & Arrow Syntax (Chaos Coin)

A clean implementation of random probabilities using the new chance block, and direct object evaluation using the -> operator.

# 50% chance to lose the coin
chance 50%
    Hint @evPlayer 3s "<color=#ff5555>Your coin has turned into dust..."
    AdvDestroyItem {@evPlayer -> heldItemRef}
end

# Check if the player's role changed during a countdown
if {@evPlayer -> role} isnt $initRole
    ClearCountdown @evPlayer
    SetPlayerData @evPlayer "coin locked" false
    stop
end

Example 3: Native Custom Roles Framework

Registering custom roles natively in one file using the new CRole.* framework.

!-- OnEvent WaitingForPlayers

*spawnSystem = CRole.CreateChanceSpawnSystem ClassD 20%
CRole.Register janitor "LCZ Janitor" ClassD *spawnSystem
!-- OnCRole spawned
-- forRoles janitor

TPRoom @evPlayer LczToilets
GiveItem @evPlayer KeycardJanitor

Version 1.0.0 - Experimental 4

Pre-release

Choose a tag to compare

@Elektryk-Andrzej Elektryk-Andrzej released this 25 May 22:14

Renamed:

  • Godmode -> SetGodMode
  • LockLobby -> SetLobbyLock
  • LockRound -> SetRoundLock
  • various rotation and position options to rot and pos
  • SetInfoArea -> SetShownPlayerInfo
  • -- requiredVars -> -- require for !-- OnEvent flag
  • LightsOut -> DisableLights
  • all audio methods (like Audio.Method)
  • all toy methods (like Toy.Method)
  • all Callvote methods (like Vote.Method)
  • all custom role methods (like CRole.Method)
  • all database methods (like DB.Method)
  • all discord methods (like Discord.Method / Embed.Method)
  • all HTTP methods (like HTTP.Method)
  • .Empty suffix -> .Create suffix

Removed:

  • ParsePlayers method
  • keyword examples from example scripts
  • RemoveCRole method

Added:

  • AddDamageRule method
  • RemoveDamageRule method
  • ToPlayerVar method
  • CreateSpeakerOnPosition method
  • StopAudio method
  • EXILED version of SER
  • isTransmitting player property
  • CRole.CreateChanceSpawn method
  • hasRemoteAdminAccess player property

Fixed:

  • elevator arguments not supporting elevator references
  • normal statements like if not wiping ephm variables

Changes:

  • Shortened duration value properties (e.g. from totalMilliseconds to totalMs)
  • Made players arguments accept parsing by RoleTypeId and Team enums, while removing * joker
  • Reworked "rule" methods to allow for constant checking of provided players (allowing for hands free updating when e.g. someone changes roles)
  • Changed waiting syntax for AnimatedBroadcast method

Improved:

  • assembly handling for references and properties
  • enum resolving in method arguments
  • "Did you mean ?" messages when invalid input is provided
  • default value system, where some arguments can now force user to explicitly skip for readability
  • example scripts

Changes added in v1.0.0 - Experimental 3

⚠️ Important ⚠️

This update changed a lot of method names and removed ones that were not needed due to the new arrow syntax.
Example:

  • Noclip to SetNoclip
  • RoundLock to LockRound
  • EmptyCollection to Coll.Empty
  • Subtext to Text.Slice
  • LimitPlayers to Take
  • removed ValidRef for *ref -> isValid / *ref -> isInvalid
  • removed TextLength for $text -> length

and much, much more...

Added

Custom Roles

Added an entire system for base SER custom role handling, e.g.:

  • SetCRole
  • RegisterCRole
  • ProceduralSpawnSystem
  • BracketSpawnSystem
  • !-- OnCustomRole flag
    and more.

SER Visual Editor

You can now write SER scripts using a simple web app!
Just download it from the GitHub release and write your script.
This is very much a work-in-progress kind of app, but should work for basic script writing.

Functions as callbacks

The event handling and custom role systems can now be used without flags.
This allows for defining key event-related behaviors in a single file.

func OnSpawned with @plr *role
    TPRoom @plr LczToilets
    Broadcast @plr 5s "You are a {*role -> displayName}"
end

RegisterCRole janitor "Janitor" ClassD
SetCRoleCallbacks janitor OnSpawned 

Wave management methods

  • WaveInfluence
  • WaveRespawnTime
  • WaveRespawnTokens

Variable related keywords

Added delete keyword to replace PopVariable method:

PopVariable local $someVariable  # before
delete $someVariable  # now

Added ephm keyword for defining variables that are to be removed after a statement ends.

func *GetDiscordMessage
    # variables using 'ephm' are ephemeral and will be deleted after the function ends
    ephm $title = "{ServerInfo name} status"
    ephm $content = "There are {AmountOf @all} players on the server:{Show @all name "<br> -" true}"
    
    return DiscordMessage _ $title _ {DiscordEmbed $title $content}
end

Here, $title and $content will be removed as soon as the *GetDiscordMessage function ends executing.

Dictionaries

Added methods for dictionary handling. This allows you to create, modify and use dictionaries as you would in a higher level language like C#:

  • Dict.Add
  • Dict.Contains
  • Dict.Empty
  • Dict.Get
  • Dict.Remove

Smaller additions

  • -- requiredVars argument for !-- OnEvent flag
  • RoundNumber method
  • RestartRound method
  • some other methods i forgot about

Improved

  • text handling in arguments, removing unintended behaviors
  • AnimatedBroadcast system
  • inefficient code for method arguments
  • SER value comparison system
  • enum flags fetching from references

Removed

  • EXILED effect handling methods

Changes added in v1.0.0 - Experimental 2

SetProperty no more!

Instead of using a method to set a property of a reference value, you can use custom syntax instead:

# before
SetProperty *generator isOpen true

# now
*generator -> isOpen = true

valType property for all values

Allows you to verify what kind of value a variable has, especially important for $literal values!

!-- CustomCommand timer
-- description "sets a timer"
-- arguments duration

if {$duration -> valType} isnt "Duration"
    Error ...
end

Verification of text experssions

If you use an invalid expression in text, like "my name is {get @x name}", you will immediatelly get a compile error!
This is a very welcome verification procedure that helped to catch some errors within example scripts!

New CustomCommand flag arguments

  • -- maxUses: The maximum number of times a player can use this command
  • -- onMaxUsesMessage: Defines a message for when the player tries to run a command but has reached their maximum usage limit
  • -- globalMaxUses: The maximum number of times this command can be used globally
  • -- onGlobalMaxUsesMessage: Defines a message for when the command has reached its global usage limit

New methods

  • HasPermission: Checks if a player has a specific permission
  • AnimatedBroadcast: Sends an animated broadcast to all players
  • PlayerAnimatedBroadcast: Sends an animated broadcast to specified players [EXILED ONLY]

Changes added in v1.0.0 - Experimental 1

Main addition - SetProperty method

This version adds a way for you to not only access all properties a reference has, but also MODIFY them!

Using a script like this, you can open all generators, even when SER developers haven't made a dedicated method for that:

over {GetGenerators} with *generator
    SetProperty *generator isOpen true
end

With this, the properties option for serhelp tells you whether a property can be modified. Search for [settable] tag:

>>> serhelp properties generator

--- Base properties ---
...
> isOpen (bool value) [settable]
> isUnlocked (bool value) [settable]
> position (reference to Vector3) [settable]
> remainingTime (number value) [settable]
> requiredPermissions (enum value of DoorPermissionFlags) [settable]
> room (reference to Room)
...

Tesla Rule Methods

Additionally, new methods were added to allow for easier tinkering with teslas ignoring players:

  • Ignored___ByTesla methods featuring Players, Roles and Teams
  • ResetIgnored___ByTesla methods featuring Players, Roles and Teams

Other Additions:

  • Mute & ResetMute methods
  • SetRadioRange method
  • GetGenerators, GetCameras, GetDoors, GetPickups, GetRagdolls, GetRoomLights, GetRooms & GetTeslas methods

Changes added in v0.16.0 - Experimental 3

Version 0.16 is a landmark release that fundamentally transforms how you write SER scripts. We've overhauled the syntax to make your code cleaner, more intuitive, and more powerful than ever before. Say goodbye to excessive brackets and hello to modern, readable scripting.

Warmly welcome @RetroReul - newest SER contributor!

Retro is behind most of the new methods and properties in version 0.16! Glad to have you on our team :)

The Arrow Operator (->)

The most significant change in v0.16 replaces clunky method calls with the elegant arrow operator. This single character revolutionizes how you access data throughout your scripts.

Cleaner Variable Definitions

No more wrapping properties in curly braces just to assign them to variables:

  • Old Syntax: $name = {@plr name}
  • New Syntax: $name = @plr -> name

Goodbye Redundant Info Methods

Specialized methods like ItemInfo, DamageInfo, and PickupInfo are now history:

  • Old (Item): $type = ItemInfo *item type
  • New (Item): $type = *item -> type
  • Old (Pickup): @owner = PickupInfo *pickup lastOwner
  • New (Pickup): @owner = *pickup -> lastOwner

Direct Property Access Revolution

SER now automatically scans game objects and exposes all their properties directly. No more waiting for developers to add specific properties-if it exists in the game's source code, you can access it:

# Access any property of any game object
$customProp = *reference -> somePropertyFromGameCode

All available properties are also searchable via serhelp properties command - use e.g. serhelp properties room and see for yourself!

SER Values Get Superpowers

Methods like DurationInfo and TextLength are now built-in properties:

  • Old: $seconds = DurationInfo $duration totalSeconds
  • New: $seconds = $duration -> totalSeconds
  • Old: $length = TextLength $text
  • New: $length = $text -> length

Property Chaining Mastery

Drill through multiple objects in a single, readable line:

  • New: $nameLengthOdd = @sender -> name -> length -> isOdd
  • New: $roomName = @plr -> roomRef -> name

Enhanced Player Control

Stamina System

Full control over player stamina with regeneration delay options:

Stamina set @plr 50% true  # Set to 50%, d...
Read more

Version 1.0.0 - Experimental 3

Pre-release

Choose a tag to compare

@Elektryk-Andrzej Elektryk-Andrzej released this 28 Apr 16:22

⚠️ Important ⚠️

This update changed a lot of method names and removed ones that were not needed due to the new arrow syntax.
Example:

  • Noclip to SetNoclip
  • RoundLock to LockRound
  • EmptyCollection to Coll.Empty
  • Subtext to Text.Slice
  • LimitPlayers to Take
  • removed ValidRef for *ref -> isValid / *ref -> isInvalid
  • removed TextLength for $text -> length

and much, much more...

Added

Custom Roles

Added an entire system for base SER custom role handling, e.g.:

  • SetCRole
  • RegisterCRole
  • ProceduralSpawnSystem
  • BracketSpawnSystem
  • !-- OnCustomRole flag
    and more.

SER Visual Editor

You can now write SER scripts using a simple web app!
Just download it from the GitHub release and write your script.
This is very much a work-in-progress kind of app, but should work for basic script writing.

Functions as callbacks

The event handling and custom role systems can now be used without flags.
This allows for defining key event-related behaviors in a single file.

func OnSpawned with @plr *role
    TPRoom @plr LczToilets
    Broadcast @plr 5s "You are a {*role -> displayName}"
end

RegisterCRole janitor "Janitor" ClassD
SetCRoleCallbacks janitor OnSpawned 

Wave management methods

  • WaveInfluence
  • WaveRespawnTime
  • WaveRespawnTokens

Variable related keywords

Added delete keyword to replace PopVariable method:

PopVariable local $someVariable  # before
delete $someVariable  # now

Added ephm keyword for defining variables that are to be removed after a statement ends.

func *GetDiscordMessage
    # variables using 'ephm' are ephemeral and will be deleted after the function ends
    ephm $title = "{ServerInfo name} status"
    ephm $content = "There are {AmountOf @all} players on the server:{Show @all name "<br> -" true}"
    
    return DiscordMessage _ $title _ {DiscordEmbed $title $content}
end

Here, $title and $content will be removed as soon as the *GetDiscordMessage function ends executing.

Dictionaries

Added methods for dictionary handling. This allows you to create, modify and use dictionaries as you would in a higher level language like C#:

  • Dict.Add
  • Dict.Contains
  • Dict.Empty
  • Dict.Get
  • Dict.Remove

Smaller additions

  • -- requiredVars argument for !-- OnEvent flag
  • RoundNumber method
  • RestartRound method
  • some other methods i forgot about

Improved

  • text handling in arguments, removing unintended behaviors
  • AnimatedBroadcast system
  • inefficient code for method arguments
  • SER value comparison system
  • enum flags fetching from references

Removed

  • EXILED effect handling methods

Changes added in v1.0.0 - Experimental 2

SetProperty no more!

Instead of using a method to set a property of a reference value, you can use custom syntax instead:

# before
SetProperty *generator isOpen true

# now
*generator -> isOpen = true

valType property for all values

Allows you to verify what kind of value a variable has, especially important for $literal values!

!-- CustomCommand timer
-- description "sets a timer"
-- arguments duration

if {$duration -> valType} isnt "Duration"
    Error ...
end

Verification of text experssions

If you use an invalid expression in text, like "my name is {get @x name}", you will immediatelly get a compile error!
This is a very welcome verification procedure that helped to catch some errors within example scripts!

New CustomCommand flag arguments

  • -- maxUses: The maximum number of times a player can use this command
  • -- onMaxUsesMessage: Defines a message for when the player tries to run a command but has reached their maximum usage limit
  • -- globalMaxUses: The maximum number of times this command can be used globally
  • -- onGlobalMaxUsesMessage: Defines a message for when the command has reached its global usage limit

New methods

  • HasPermission: Checks if a player has a specific permission
  • AnimatedBroadcast: Sends an animated broadcast to all players
  • PlayerAnimatedBroadcast: Sends an animated broadcast to specified players [EXILED ONLY]

Changes added in v1.0.0 - Experimental 1

Main addition - SetProperty method

This version adds a way for you to not only access all properties a reference has, but also MODIFY them!

Using a script like this, you can open all generators, even when SER developers haven't made a dedicated method for that:

over {GetGenerators} with *generator
    SetProperty *generator isOpen true
end

With this, the properties option for serhelp tells you whether a property can be modified. Search for [settable] tag:

>>> serhelp properties generator

--- Base properties ---
...
> isOpen (bool value) [settable]
> isUnlocked (bool value) [settable]
> position (reference to Vector3) [settable]
> remainingTime (number value) [settable]
> requiredPermissions (enum value of DoorPermissionFlags) [settable]
> room (reference to Room)
...

Tesla Rule Methods

Additionally, new methods were added to allow for easier tinkering with teslas ignoring players:

  • Ignored___ByTesla methods featuring Players, Roles and Teams
  • ResetIgnored___ByTesla methods featuring Players, Roles and Teams

Other Additions:

  • Mute & ResetMute methods
  • SetRadioRange method
  • GetGenerators, GetCameras, GetDoors, GetPickups, GetRagdolls, GetRoomLights, GetRooms & GetTeslas methods

Changes added in v0.16.0 - Experimental 3

Version 0.16 is a landmark release that fundamentally transforms how you write SER scripts. We've overhauled the syntax to make your code cleaner, more intuitive, and more powerful than ever before. Say goodbye to excessive brackets and hello to modern, readable scripting.

Warmly welcome @RetroReul - newest SER contributor!

Retro is behind most of the new methods and properties in version 0.16! Glad to have you on our team :)

The Arrow Operator (->)

The most significant change in v0.16 replaces clunky method calls with the elegant arrow operator. This single character revolutionizes how you access data throughout your scripts.

Cleaner Variable Definitions

No more wrapping properties in curly braces just to assign them to variables:

  • Old Syntax: $name = {@plr name}
  • New Syntax: $name = @plr -> name

Goodbye Redundant Info Methods

Specialized methods like ItemInfo, DamageInfo, and PickupInfo are now history:

  • Old (Item): $type = ItemInfo *item type
  • New (Item): $type = *item -> type
  • Old (Pickup): @owner = PickupInfo *pickup lastOwner
  • New (Pickup): @owner = *pickup -> lastOwner

Direct Property Access Revolution

SER now automatically scans game objects and exposes all their properties directly. No more waiting for developers to add specific properties-if it exists in the game's source code, you can access it:

# Access any property of any game object
$customProp = *reference -> somePropertyFromGameCode

All available properties are also searchable via serhelp properties command - use e.g. serhelp properties room and see for yourself!

SER Values Get Superpowers

Methods like DurationInfo and TextLength are now built-in properties:

  • Old: $seconds = DurationInfo $duration totalSeconds
  • New: $seconds = $duration -> totalSeconds
  • Old: $length = TextLength $text
  • New: $length = $text -> length

Property Chaining Mastery

Drill through multiple objects in a single, readable line:

  • New: $nameLengthOdd = @sender -> name -> length -> isOdd
  • New: $roomName = @plr -> roomRef -> name

Enhanced Player Control

Stamina System

Full control over player stamina with regeneration delay options:

Stamina set @plr 50% true  # Set to 50%, delay regeneration
Stamina add @plr 30%  # Add 30% stamina
Stamina remove @plr 20%  # Remove 20% stamina

Enhanced Movement

Jump @plr 2.5  # Make player jump with 2.5x strength

Visual Feedback

ShowHitMarker @plr 3.5 false  # Critical hit marker, no audio

New Player Properties

Access comprehensive player state information:

if {@plr -> isSpeaking} is true
    Print "Player is talking"
end

$unit = @plr -> unit  # Returns e.g. "FOXTROT-03" for NTF
$color = @plr -> roleColor  # Hex value of role color

New Properties Added:

  • isSpeaking - Whether player is using voice chat
  • isSpectatable - Whether player can be spectated
  • isJumping - Whether player is currently jumping
  • isGrounded - Whether player is on the ground
  • movementState - Current movement state
  • lifeId - Unique life identifier
  • unitId - Unit identifier (e.g., 03)
  • unit - Full unit name (e.g., "FOXTROT-03")

New Methods & Game Integration

Environmental Interactions

SetElevatorText "EMERGENCY ONLY"  # Custom elevator panel text
PryGate GateA true  # Pry gate with button effects

Player Management

ForceEquip @plr KeycardO5  # Force equip item like RA command

World Objects

CreateRagdoll ClassD "Victim" 10 5 2  # Spawn ragdoll at coordinates

Utility Methods

if {ContainsText $text "secret"} is true
    Print "Found secret!"
end

if {SpeakerExists "AnnouncementSystem"} is true
    PlayAudio "AnnouncementSystem" "alarm"
end

if {ScriptExists "myScript"} is false
    Print "Script not found!"
end

Streamlined Syntax & Flow Control

Math Without Parentheses

The bracket tax on math expressions is gone:

  • Old: $five = (2 + 3)
  • New: $five = 2 + 3

Inline with Statements

Keep your l...

Read more

Version 1.0.0 - Experimental 2

Pre-release

Choose a tag to compare

@Elektryk-Andrzej Elektryk-Andrzej released this 11 Apr 20:47

SetProperty no more!

Instead of using a method to set a property of a reference value, you can use custom syntax instead:

# before
SetProperty *generator isOpen true

# now
*generator -> isOpen = true

valType property for all values

Allows you to verify what kind of value a variable has, especially important for $literal values!

!-- CustomCommand timer
-- description "sets a timer"
-- arguments duration

if {$duration -> valType} isnt "Duration"
    Error ...
end

Verification of text experssions

If you use an invalid expression in text, like "my name is {get @x name}", you will immediatelly get a compile error!
This is a very welcome verification procedure that helped to catch some errors within example scripts!

New CustomCommand flag arguments

  • -- maxUses: The maximum number of times a player can use this command
  • -- onMaxUsesMessage: Defines a message for when the player tries to run a command but has reached their maximum usage limit
  • -- globalMaxUses: The maximum number of times this command can be used globally
  • -- onGlobalMaxUsesMessage: Defines a message for when the command has reached its global usage limit

New methods

  • HasPermission: Checks if a player has a specific permission
  • AnimatedBroadcast: Sends an animated broadcast to all players
  • PlayerAnimatedBroadcast: Sends an animated broadcast to specified players [EXILED ONLY]

Changes added in v1.0.0 - Experimental 1

Main addition - SetProperty method

This version adds a way for you to not only access all properties a reference has, but also MODIFY them!

Using a script like this, you can open all generators, even when SER developers haven't made a dedicated method for that:

over {GetGenerators} with *generator
    SetProperty *generator isOpen true
end

With this, the properties option for serhelp tells you whether a property can be modified. Search for [settable] tag:

>>> serhelp properties generator

--- Base properties ---
...
> isOpen (bool value) [settable]
> isUnlocked (bool value) [settable]
> position (reference to Vector3) [settable]
> remainingTime (number value) [settable]
> requiredPermissions (enum value of DoorPermissionFlags) [settable]
> room (reference to Room)
...

Tesla Rule Methods

Additionally, new methods were added to allow for easier tinkering with teslas ignoring players:

  • Ignored___ByTesla methods featuring Players, Roles and Teams
  • ResetIgnored___ByTesla methods featuring Players, Roles and Teams

Other Additions:

  • Mute & ResetMute methods
  • SetRadioRange method
  • GetGenerators, GetCameras, GetDoors, GetPickups, GetRagdolls, GetRoomLights, GetRooms & GetTeslas methods

Changes added in v0.16.0 - Experimental 3

Version 0.16 is a landmark release that fundamentally transforms how you write SER scripts. We've overhauled the syntax to make your code cleaner, more intuitive, and more powerful than ever before. Say goodbye to excessive brackets and hello to modern, readable scripting.

Warmly welcome @RetroReul - newest SER contributor!

Retro is behind most of the new methods and properties in version 0.16! Glad to have you on our team :)

The Arrow Operator (->)

The most significant change in v0.16 replaces clunky method calls with the elegant arrow operator. This single character revolutionizes how you access data throughout your scripts.

Cleaner Variable Definitions

No more wrapping properties in curly braces just to assign them to variables:

  • Old Syntax: $name = {@plr name}
  • New Syntax: $name = @plr -> name

Goodbye Redundant Info Methods

Specialized methods like ItemInfo, DamageInfo, and PickupInfo are now history:

  • Old (Item): $type = ItemInfo *item type
  • New (Item): $type = *item -> type
  • Old (Pickup): @owner = PickupInfo *pickup lastOwner
  • New (Pickup): @owner = *pickup -> lastOwner

Direct Property Access Revolution

SER now automatically scans game objects and exposes all their properties directly. No more waiting for developers to add specific properties-if it exists in the game's source code, you can access it:

# Access any property of any game object
$customProp = *reference -> somePropertyFromGameCode

All available properties are also searchable via serhelp properties command - use e.g. serhelp properties room and see for yourself!

SER Values Get Superpowers

Methods like DurationInfo and TextLength are now built-in properties:

  • Old: $seconds = DurationInfo $duration totalSeconds
  • New: $seconds = $duration -> totalSeconds
  • Old: $length = TextLength $text
  • New: $length = $text -> length

Property Chaining Mastery

Drill through multiple objects in a single, readable line:

  • New: $nameLengthOdd = @sender -> name -> length -> isOdd
  • New: $roomName = @plr -> roomRef -> name

Enhanced Player Control

Stamina System

Full control over player stamina with regeneration delay options:

Stamina set @plr 50% true  # Set to 50%, delay regeneration
Stamina add @plr 30%  # Add 30% stamina
Stamina remove @plr 20%  # Remove 20% stamina

Enhanced Movement

Jump @plr 2.5  # Make player jump with 2.5x strength

Visual Feedback

ShowHitMarker @plr 3.5 false  # Critical hit marker, no audio

New Player Properties

Access comprehensive player state information:

if {@plr -> isSpeaking} is true
    Print "Player is talking"
end

$unit = @plr -> unit  # Returns e.g. "FOXTROT-03" for NTF
$color = @plr -> roleColor  # Hex value of role color

New Properties Added:

  • isSpeaking - Whether player is using voice chat
  • isSpectatable - Whether player can be spectated
  • isJumping - Whether player is currently jumping
  • isGrounded - Whether player is on the ground
  • movementState - Current movement state
  • lifeId - Unique life identifier
  • unitId - Unit identifier (e.g., 03)
  • unit - Full unit name (e.g., "FOXTROT-03")

New Methods & Game Integration

Environmental Interactions

SetElevatorText "EMERGENCY ONLY"  # Custom elevator panel text
PryGate GateA true  # Pry gate with button effects

Player Management

ForceEquip @plr KeycardO5  # Force equip item like RA command

World Objects

CreateRagdoll ClassD "Victim" 10 5 2  # Spawn ragdoll at coordinates

Utility Methods

if {ContainsText $text "secret"} is true
    Print "Found secret!"
end

if {SpeakerExists "AnnouncementSystem"} is true
    PlayAudio "AnnouncementSystem" "alarm"
end

if {ScriptExists "myScript"} is false
    Print "Script not found!"
end

Streamlined Syntax & Flow Control

Math Without Parentheses

The bracket tax on math expressions is gone:

  • Old: $five = (2 + 3)
  • New: $five = 2 + 3

Inline with Statements

Keep your loops and functions clean and compact:

# Loop with player iteration
over @all with @plr
    Print {@plr -> name}
end

# Function with parameters
func $Add with $a $b
    return $a + $b
end

# Repeat with iteration counter
repeat 5 with $i
    Print "Iteration {$i}"
end

Keywords Replace Methods

Yield commands are now proper keywords for better flow control:

  • Old: Wait 5s
  • New: wait 5s
  • Old: WaitUntil ({AmountOf @all} is 0)
  • New: wait_until {AmountOf @all} is 0

Inline Comments

Document your code as you write it:

Print "Hello"  # Greet the player
if $hp < 20  # Critical health check
    Heal @sender 100  # Heal player
end

Built-in Effect System

Base-game status effects are now natively supported! No more EXILED dependency for basic effect management:

# Apply base-game effects
GiveEffect @plr Bleeding 5s  # Apply bleeding for 5 seconds
RemoveEffect @plr Bleeding  # Remove bleeding effect

Effect Properties

&effects = @plr -> effects  # Collection of active effect names
&effectRefs = @plr -> effectReferences  # Collection of effect references

Enhanced Door Properties

if {*door -> isGate} is true
    Print "This is a gate!"
end

if {*door -> isBreakable} is true
    Print "This door can be broken!"
end

if {*door -> isCheckpoint} is true
    Print "This is a part of a checkpoint!"
end

Other Notable Changes

Spawn Wave Control

SpawnWave ntfSpawnWave  # Spawn NTF wave

Interactable Toy Management

SetInteractableProperties *toy Box 5s true  # Modify interactable toy behavior

Improved Audio System

Improved LoadAudio method with better file handling and clearer documentation.

Enhanced Event Information

serhelp now shows whether events are cancellable for better event handling.

Updated Examples

All example scripts updated to use new syntax and moved to a custom folder for easy GitHub access.

Complete Documentation

Added llms-full.md with the entire SER language specification for AI-assisted development.

Version 1.0.0 - Experimental

Pre-release

Choose a tag to compare

@Elektryk-Andrzej Elektryk-Andrzej released this 10 Apr 19:03

Main addition - SetProperty method

This version adds a way for you to not only access all properties a reference has, but also MODIFY them!

Using a script like this, you can open all generators, even when SER developers haven't made a dedicated method for that:

over {GetGenerators} with *generator
    SetProperty *generator isOpen true
end

With this, the properties option for serhelp tells you whether a property can be modified. Search for [settable] tag:

>>> serhelp properties generator

--- Base properties ---
...
> isOpen (bool value) [settable]
> isUnlocked (bool value) [settable]
> position (reference to Vector3) [settable]
> remainingTime (number value) [settable]
> requiredPermissions (enum value of DoorPermissionFlags) [settable]
> room (reference to Room)
...

Tesla Rule Methods

Additionally, new methods were added to allow for easier tinkering with teslas ignoring players:

  • Ignored___ByTesla methods featuring Players, Roles and Teams
  • ResetIgnored___ByTesla methods featuring Players, Roles and Teams

Other Additions:

  • Mute & ResetMute methods
  • SetRadioRange method
  • GetGenerators, GetCameras, GetDoors, GetPickups, GetRagdolls, GetRoomLights, GetRooms & GetTeslas methods

Changes added in V0.16.0 - Experimental 3

Version 0.16 is a landmark release that fundamentally transforms how you write SER scripts. We've overhauled the syntax to make your code cleaner, more intuitive, and more powerful than ever before. Say goodbye to excessive brackets and hello to modern, readable scripting.

Warmly welcome @RetroReul - newest SER contributor!

Retro is behind most of the new methods and properties in version 0.16! Glad to have you on our team :)

The Arrow Operator (->)

The most significant change in v0.16 replaces clunky method calls with the elegant arrow operator. This single character revolutionizes how you access data throughout your scripts.

Cleaner Variable Definitions

No more wrapping properties in curly braces just to assign them to variables:

  • Old Syntax: $name = {@plr name}
  • New Syntax: $name = @plr -> name

Goodbye Redundant Info Methods

Specialized methods like ItemInfo, DamageInfo, and PickupInfo are now history:

  • Old (Item): $type = ItemInfo *item type
  • New (Item): $type = *item -> type
  • Old (Pickup): @owner = PickupInfo *pickup lastOwner
  • New (Pickup): @owner = *pickup -> lastOwner

Direct Property Access Revolution

SER now automatically scans game objects and exposes all their properties directly. No more waiting for developers to add specific properties-if it exists in the game's source code, you can access it:

# Access any property of any game object
$customProp = *reference -> somePropertyFromGameCode

All available properties are also searchable via serhelp properties command - use e.g. serhelp properties room and see for yourself!

SER Values Get Superpowers

Methods like DurationInfo and TextLength are now built-in properties:

  • Old: $seconds = DurationInfo $duration totalSeconds
  • New: $seconds = $duration -> totalSeconds
  • Old: $length = TextLength $text
  • New: $length = $text -> length

Property Chaining Mastery

Drill through multiple objects in a single, readable line:

  • New: $nameLengthOdd = @sender -> name -> length -> isOdd
  • New: $roomName = @plr -> roomRef -> name

Enhanced Player Control

Stamina System

Full control over player stamina with regeneration delay options:

Stamina set @plr 50% true  # Set to 50%, delay regeneration
Stamina add @plr 30%  # Add 30% stamina
Stamina remove @plr 20%  # Remove 20% stamina

Enhanced Movement

Jump @plr 2.5  # Make player jump with 2.5x strength

Visual Feedback

ShowHitMarker @plr 3.5 false  # Critical hit marker, no audio

New Player Properties

Access comprehensive player state information:

if {@plr -> isSpeaking} is true
    Print "Player is talking"
end

$unit = @plr -> unit  # Returns e.g. "FOXTROT-03" for NTF
$color = @plr -> roleColor  # Hex value of role color

New Properties Added:

  • isSpeaking - Whether player is using voice chat
  • isSpectatable - Whether player can be spectated
  • isJumping - Whether player is currently jumping
  • isGrounded - Whether player is on the ground
  • movementState - Current movement state
  • lifeId - Unique life identifier
  • unitId - Unit identifier (e.g., 03)
  • unit - Full unit name (e.g., "FOXTROT-03")

New Methods & Game Integration

Environmental Interactions

SetElevatorText "EMERGENCY ONLY"  # Custom elevator panel text
PryGate GateA true  # Pry gate with button effects

Player Management

ForceEquip @plr KeycardO5  # Force equip item like RA command

World Objects

CreateRagdoll ClassD "Victim" 10 5 2  # Spawn ragdoll at coordinates

Utility Methods

if {ContainsText $text "secret"} is true
    Print "Found secret!"
end

if {SpeakerExists "AnnouncementSystem"} is true
    PlayAudio "AnnouncementSystem" "alarm"
end

if {ScriptExists "myScript"} is false
    Print "Script not found!"
end

Streamlined Syntax & Flow Control

Math Without Parentheses

The bracket tax on math expressions is gone:

  • Old: $five = (2 + 3)
  • New: $five = 2 + 3

Inline with Statements

Keep your loops and functions clean and compact:

# Loop with player iteration
over @all with @plr
    Print {@plr -> name}
end

# Function with parameters
func $Add with $a $b
    return $a + $b
end

# Repeat with iteration counter
repeat 5 with $i
    Print "Iteration {$i}"
end

Keywords Replace Methods

Yield commands are now proper keywords for better flow control:

  • Old: Wait 5s
  • New: wait 5s
  • Old: WaitUntil ({AmountOf @all} is 0)
  • New: wait_until {AmountOf @all} is 0

Inline Comments

Document your code as you write it:

Print "Hello"  # Greet the player
if $hp < 20  # Critical health check
    Heal @sender 100  # Heal player
end

Built-in Effect System

Base-game status effects are now natively supported! No more EXILED dependency for basic effect management:

# Apply base-game effects
GiveEffect @plr Bleeding 5s  # Apply bleeding for 5 seconds
RemoveEffect @plr Bleeding  # Remove bleeding effect

Effect Properties

&effects = @plr -> effects  # Collection of active effect names
&effectRefs = @plr -> effectReferences  # Collection of effect references

Enhanced Door Properties

if {*door -> isGate} is true
    Print "This is a gate!"
end

if {*door -> isBreakable} is true
    Print "This door can be broken!"
end

if {*door -> isCheckpoint} is true
    Print "This is a part of a checkpoint!"
end

Other Notable Changes

Spawn Wave Control

SpawnWave ntfSpawnWave  # Spawn NTF wave

Interactable Toy Management

SetInteractableProperties *toy Box 5s true  # Modify interactable toy behavior

Improved Audio System

Improved LoadAudio method with better file handling and clearer documentation.

Enhanced Event Information

serhelp now shows whether events are cancellable for better event handling.

Updated Examples

All example scripts updated to use new syntax and moved to a custom folder for easy GitHub access.

Complete Documentation

Added llms-full.md with the entire SER language specification for AI-assisted development.