Transform Section · Issue #8771 · SkriptLang/Skript · GitHub
Skip to content

Transform Section #8771

Open
Open

Description

@dotGrim

Suggestion

Similar to filter sections, but for transforming a list.

transform {_list::*}:
    input * 2
    abs(input)

Why?

Even though this is achievable by stacking these transformations together in a regular transform effect ({_list::*} transformed using (abs(input * 2))), it provides more options for less standard syntax that doesn't have as easy-to-use expressions.

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this suggestion.

Activity

  1. sovdeeth commented on Jul 13, 2026

    @sovdeeth
    Member

    I think I would rather avoid just raw expressions hanging out on a line by themselves.

    Perhaps a better solution would be to make it a returnable section so it can execute as normal and the returned value is the mapped value.

  2. miberss commented on Aug 14, 2026

    @miberss
    Contributor

    Conditions basically are 2 raw expressions and there was no problem with putting them in the filter or if a(ny|ll).

    Would a returnable section be something like this?:

    transform {_list::*}:
      set {_x} to input * 2
      return abs({_x})

    There isn't really any good name you could give to the {_x} variable
    Possibly able to mutate input?, for it to look like this

    transform {_list::*}:
      multiply input by 2
      return abs(input)
  3. novystar commented on Aug 14, 2026

    @novystar
    Contributor

    There isn't really any good name you could give to the {_x} variable Possibly able to mutate input?, for it to look like this

    transform {_list::*}:
    multiply input by 2
    return abs(input)

    if input can be changed then return probably isn't necessary

    transform {_list::*}:
        multiply input by 2
        set input to abs(input)
  4. bluelhf commented on Aug 14, 2026

    @bluelhf
    Contributor

    Big fan of making input support changers, it requires some extra work though

  5. sovdeeth commented on Aug 14, 2026

    @sovdeeth
    Member

    Conditions basically are 2 raw expressions and there was no problem with putting them in the filter or if a(ny|ll).

    Conditions have verbs in them though, so they're valid statements on their own. Expressions do not.

    I like the changeable input idea.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions