Skip to content

Multiline+Dialog Effect Commands - #8757

Open
Absolutionism wants to merge 23 commits into
SkriptLang:dev/featurefrom
Absolutionism:dev/MultilineEffectCommands
Open

Multiline+Dialog Effect Commands#8757
Absolutionism wants to merge 23 commits into
SkriptLang:dev/featurefrom
Absolutionism:dev/MultilineEffectCommands

Conversation

@Absolutionism

@Absolutionism Absolutionism commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Problem

Skript's current effect command system has slowly become limited as more Section-typed syntax elements are created, causing the inability to test with effect commands as it only supports one line.

Solution

Multiline

Introduces multiline effect commands, allowing users to provide multiple lines before finalizing and parsing+executing

Adding 3 new options:

  • multiline effect command token : to set the token to indicate a multiline effect command is being used
  • multiline effect command tab token : to set the token to indicate a tab when needing to indent an effect command
  • multiline effect command timeout : the amount of time before a session resets after its last entry

Each entry must start with the token, and to finalize is to send the token by itself

Allows:

  • The ability to set and use local variables, but only within each multiline session. They do not transfer over to the next multiline session.
  • The ability to use sections

Note: If both 'effect command token' and 'multiline effect command token' are the same, effect commands will always be treated as multiline.

Dialog

Using the API for multiline effect commands, allows a Dialog to be opened for a player utilizing the Dialog's Text Input for easily inputting multiple lines of code.
Also adds the ability to save the code when executing/closing the dialog to continue where you left off

Testing Completed

Manual testing, ensuring:

  • Works for both console and player
  • Parse+Runtime errors and warnings are correctly outputted
  • Logs when 'log effect commands' is enabled
  • Sessions are reset when exceeding the timeout
  • Sessions are unique to each player and console

Supporting Information

N/A

Examples

!-set {_bar} to a boss bar:
!-\tset color of event-bossbar to red
!-send color of {_bar}
!-                              # This terminates your current session and executes what has been provided
!-send {_bar}		# This returns nothing as it is a new multiline session
!- spawn a zombie at me:
!- \t make event-entity not persist
!-                              # This terminates your current session and executes what has been provided

Completes: none
Related: none
AI assistance: none

@Absolutionism
Absolutionism requested review from a team and sovdeeth as code owners July 6, 2026 23:54
@Absolutionism
Absolutionism requested review from Burbulinis and removed request for a team July 6, 2026 23:54
@skriptlang-automation skriptlang-automation Bot added needs reviews A PR that needs additional reviews needs triage An issue that hasn't been classified or verified yet labels Jul 6, 2026
@skriptlang-automation

This comment has been minimized.

@skriptlang-automation skriptlang-automation Bot added the feature Pull request adding a new feature. label Jul 6, 2026
@skriptlang-automation skriptlang-automation Bot removed the needs triage An issue that hasn't been classified or verified yet label Jul 6, 2026
@skriptlang-automation skriptlang-automation Bot moved this to In Review in 2.17 Releases Jul 6, 2026
@erenkarakal

Copy link
Copy Markdown
Member

I was thinking about having a command that opens a dialog where you can type multi line code

@Absolutionism Absolutionism changed the title Multiline Effect Commands Multiline+Dialog Effect Commands Jul 7, 2026
@Absolutionism

Copy link
Copy Markdown
Contributor Author

Updated with Dialog

@sovdeeth

Copy link
Copy Markdown
Member

Do we actually need a tab character? can users not just use spaces?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Pull request adding a new feature. needs reviews A PR that needs additional reviews

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

3 participants