Cutscenes and shows
Cutscenes
A cutscene is a camera flight: the camera passes smoothly through points you set, while the player watches. At each point it can stay for a while, start or stop presets, write a subtitle letter by letter, and play preset steps (sounds, titles, commands...).
Players watch in spectator mode. At the end they get back their place, game mode and flight. This also works after a quit, a reload or a crash: they are put back on their next join. Commands are blocked while watching, except safety.locked-commands of config.yml.
Make one in game
/sfx scene create <name>- Stand where the camera starts, look where it should look, and type
/sfx scene point <name> add. - Go to the next place and add another point:
/sfx scene point <name> add [time](time = the flight from the point before, 3s if you don't write it). - Try it:
/sfx scene play <name>.
Every point of a scene is in the same world (200 points at most).
Record it by flying (1.1.1+)
Instead of adding points one by one, fly the path like a drone and let ScreenFX save the points:
/sfx scene record <name>(the cutscene is made if it doesn't exist). A countdown 3, 2, 1 starts, then● REC.- Fly the path in creative (or spectator) and turn your view as the camera should. A point (place and view) is saved every half second. If you stand still, the camera waits there for the same time.
- Stop with your swap hands key (F) or
/sfx scene record stop. In spectator the F key doesn't reach the server: use the command./sfx scene record cancelstops without saving. /sfx scene play <name>gives back your flight at the same speed, smoothed.
On a cutscene that already has points it asks first: /sfx scene record <name> replace (the new flight takes their place) or /sfx scene record <name> add (it goes after them). The recording also stops and saves by itself when you leave the server, go to another world, a cutscene starts on you, or the scene reaches 200 points (about 100 seconds of flight). Afterwards every point can still be changed with /sfx scene point or /sfx scene info.
Sneaking doesn't stop a recording: it is how you fly down.
| Command | |
|---|---|
/sfx scene create <name> | a new cutscene |
/sfx scene point <name> add [time] | a point where you stand and look |
/sfx scene record <name> [replace|add] | record the path by flying (1.1.1+) |
/sfx scene record stop · cancel | end the recording and save it · without saving |
/sfx scene point <name> set <n> [time] | move point n where you are |
/sfx scene point <name> remove <n> | remove point n |
/sfx scene point <name> tp <n> | go to point n |
/sfx scene play <name> [players] | play it |
/sfx scene stop [players] | end it |
/sfx scene info <name> | its points, with buttons to go there, move or remove them |
/sfx scene list | every cutscene |
/sfx scene delete <name> | delete it |
All need screenfx.scene. Names: a-z, 0-9, _ and -, up to 32 characters.
scenes.yml
Points, holds, presets and subtitles are written in scenes.yml. After a change by hand: /sfx reload.
tour:
display-name: "<theme>Server tour</theme>"
skip: true
end: back
smooth: true
points:
- at: "world, 0.5, 90, 0.5, 0, 20" # world, x, y, z, yaw, pitch
time: 4s
preset: cinematic
subtitle: "&fWelcome, {player}!"
- at: "world, 40.5, 85, 30.5, 120, 15"
time: 4s
hold: 1s
subtitle: "&7This is the market"
- at: "world, 10.5, 100, 60.5, 200, 30"
steps:
- title: {title: "<theme>Have fun</theme>", fade-in: 10, stay: 40, fade-out: 10}
| Option | Default | |
|---|---|---|
display-name | the name | |
skip | true | sneaking ends the scene |
end | back | back = the player returns where he was · last = he stays at the last point |
smooth | true | the flight starts and ends slowly |
points | all in the same world |
| Point option | |
|---|---|
at | "world, x, y, z, yaw, pitch" |
time | flight from this point to the next one (3s) |
hold | the camera stays here before flying on |
preset | presets started here (or a list), stopped when the scene ends |
stop | presets of this scene stopped here |
subtitle | written letter by letter at the bottom of the screen |
steps | preset steps played here: sound, title, message, command... (Sequence steps) |
Start a cutscene from anything
The preset step scene: <name> starts a cutscene, so reactions, items, zones and shows can start one too:
intro:
sequence:
- scene: tour
Players who turned cutscenes off (/sfx toggle scenes), players with screenfx.exempt and players with effects off don't get them.
Teleports
A teleport from another plugin or a command ends the scene where the player goes. On Folia a player who looks through the camera can't be teleported, so /tp, /teleport, /tphere, /tpall and the like end his scene first and then run.
Shows
A show is a timeline played for many players at once, all starting on the same tick: presets, stops, cutscenes and preset steps at set times. Shows are in shows.yml.
| Command | |
|---|---|
/sfx show start <name> | start a show |
/sfx show stop <name> | stop it |
/sfx show list | every show, running or not |
All need screenfx.show. After a change: /sfx reload.
party_time:
display-name: "<theme>Party time</theme>"
players: all
countdown: 5
end: 30s
timeline:
- at: 0s
preset: party
steps:
- title: {title: "<theme><bold>PARTY TIME</bold></theme>", subtitle: "&7Have fun!", fade-in: 5, stay: 40, fade-out: 10}
sound: ui.toast.challenge_complete
- at: 10s
steps:
- sound: entity.firework_rocket.twinkle
- at: 20s
steps:
- sound: entity.firework_rocket.blast
| Option | |
|---|---|
display-name | name in lists |
players | all · world:<name> · radius:<world, x, y, z, radius> · zone:<ScreenFX zone> · permission:<node> |
countdown | seconds of countdown before it starts (title + sound), 0 = none |
countdown-sound | block.note_block.hat |
late-join | true = players who join during the show get the presets it still has on |
end | everything the show started stops here (without it, presets end by themselves) |
schedule.every | starts by itself every 2h (at least 1m), counted from the server start |
schedule.at | or at these times: ["20:00", "22:30"] |
timeline | the moments of the show (below) |
| Timeline option | |
|---|---|
at | when, from the start (after the countdown) |
preset | presets started (or a list) |
stop | presets of this show stopped |
scene | a cutscene of scenes.yml |
steps | preset steps: sound, title, message, command, lightning, explosion... |
The players are picked at each moment of the timeline: someone who walks into the radius later gets the next ones. settings.time-zone at the top of shows.yml sets the time zone of schedule.at (empty = the server's).
API
playScene(player, scene), stopScene(player), watchingScene(player), scenes(), startShow(show), stopShow(show), and the events ScreenFXSceneStartEvent (cancellable) and ScreenFXSceneEndEvent. See the Developer API.
Actualizat ultima data pe