← All projects

ShowScript

A programming language for putting a theme-park show on a timecode.

ticks(0) {
  cmd {
    "broadcast Hello World!"
  }
}

ShowScript is a Spigot plugin that defines a programming language (v2 is backed by YAML and v3 is a Groovy DSL) that allows console commands and other actions to be scheduled to run at specified timecodes. A file that defines a series of timecodes and actions is called a “Show.”

The technicians on MCParks use ShowScript to make our fireworks shows, theatre attractions, ambient effects, and to schedule effects to run on our rides.

Features#

Example#

A file that defines a series of timecodes and actions is called a “Show.” Your shows live in plugins/ShowScript/Shows. You may nest your shows in directories; it’s considered good practice to do this to organize different projects. You can write your shows in Groovy (ShowScript 3), or YAML (ShowScript 2). The YAML syntax of ShowScript 2 might be easier for those unfamiliar with programming to understand, but ShowScript 3 unlocks more capabilities and advanced usage.

ShowScript 3 (file ending in .groovy)#

GROOVY
ticks(0) {
  cmd {
    "broadcast Hello World!"
  }
}

seconds(2) {
  cmd {
    "broadcast This will run 2 seconds after the show starts"
  }
  cmd {
    "broadcast you can run as many commands as you want in a timecode"
  }
}

def blueFairyPrefix = "&1[&9Blue Fairy&1] &9"

ticks(967) {
  text {
    world = "world"
    x = -247
    y = 53
    z = 759
    range = 300
    text = "${blueFairyPrefix}When stars are born,"
  }
}

ticks(1010) {
  text {
    world = "world"
    x = -247
    y = 53
    z = 759
    range = 300
    text = "${blueFairyPrefix}they possess a gift or two."
  }
}

ticks(1163) {
  cmd {
    "summon fireworks_rocket -221 70 689 {Motion:[-1.0,10.0,0.0],FireworksItem:{id:fireworks,Count:1,tag:{Fireworks:{Explosions:[{Type:4,Trail:1,Colors:[16776688],FadeColors:[16775387]}]}}}}"
  }
}

ShowScript 2 (file ending in .yml)#

YAML
time0:
  - item: 'cmd'
    cmd: "broadcast Hello World!"
time40:
  - item: 'cmd'
    cmd: "broadcast This will run 2 seconds after the show starts"
  - item: 'cmd'
    cmd: "broadcast you can run as many commands as you want in a timecode"

macros:
  blueFairyPrefix: "&1[&9Blue Fairy&1] &9"

time967:
  - item: 'text'
    text: '^blueFairyPrefix^When stars are born,'
    x: -247.0
    y: 53.0
    z: 759.0
    range: 300.0
    world: world
time1010:
  - item: 'text'
    text: '^blueFairyPrefix^they possess a gift or two.'
    x: -247.0
    y: 53.0
    z: 759.0
    range: 300.0
    world: world
time1163:
  - item: 'cmd'
    cmd: summon fireworks_rocket -221 70 689 {Motion:[-1.0,10.0,0.0],FireworksItem:{id:fireworks,Count:1,tag:{Fireworks:{Explosions:[{Type:4,Trail:1,Colors:[16776688],FadeColors:[16775387]}]}}}}

Comments

Comments load as you scroll here.

No email needed. Only your name, website and comment are kept, and you can delete it later from this browser. Comments with links, or from a website that has not commented before, wait for a quick look. Privacy