Creating a Quest using Splat Script

Build a four-world Adventure with a story scroll that learns the player's name, a hermit who drives a hard bargain, a spell that opens a castle gate from far away, and a friend to rescue.

Cooper holds up a glowing lantern beside a laughing old wizard holding a fish, while a dark spell breaks apart over the castle gate on the hill behind them

Last time, in Meet Splat Script, we made a baker who wanted their key back. This time we’re going bigger: a whole quest across four worlds, with a story, a trade, a spell to break and a friend to rescue.

You’ll build every part of it yourself, step by step, and you’ll write five short scripts to tie it all together. Never used Splat Labs before? That’s fine. We’ll show you every button.

Want to see where we’re going first? Play The Sun Lantern, the game this post builds.

The world map in Map Settings: four worlds in a two by two grid, Hollyhill and Whisperwood on top, Fishers Hollow and Grimstone underneath

The quest we’re making

Our game is called The Sun Lantern. Here’s the story the player hears when the game starts.

The story

Baron Grumble’s slimes crept into the village of Hollyhill and carried off Milo, the son of Mayor Rosa. Milo is locked away in Grimstone Castle, and a dark spell holds the castle gate shut.

Only the Sun Lantern can break the spell. Old Fen the hermit keeps it, deep in Whisperwood. But Fen is hungry, and he won’t hand it over for nothing.

The four worlds

The game has four worlds in a two by two grid, using three biomes. A biome is the kind of world: it changes the ground, the plants and the brushes you can use.

World Biome What happens there
Hollyhill Village The hero starts here. Mayor Rosa asks for help.
Whisperwood Forest Old Fen has the lantern. The Old Shrine is in the woods.
Fishers Hollow Village A fish is hidden on a little island in the lake.
Grimstone Castle Milo waits behind the castle gate, guarded by slimes.

How the player wins

The player talks to Fen, who wants a fish. They find the fish in Fishers Hollow and trade it to Fen for the Sun Lantern. Then they take the lantern to the Old Shrine, which wakes the shrine and breaks the spell on the castle gate far away. Last of all, they free Milo and lead him home to Hollyhill.

Step 1: Make the game

Sign in, open your Lab and press Create a Game. A wizard asks a few questions. Pick Adventure, then choose Rescue a friend for how the hero wins. In a rescue game, the hero wins by bringing a friend back to where they started.

The setup wizard asking how the hero wins, with Rescue a friend picked

Pick your hero and press Next. You can rename the game later in Game settings , the cog button under the map. Ours is called The Sun Lantern.

The wizard also makes a little story picture book. Open Game settings, press Story, and pick Milo as the one who needs rescuing, so the bag says “Find Milo.” Then turn Tell the story off, because our scroll will tell the story instead.

A quick tour of the builder

The builder has three parts:

Part What it’s for
Left side The brushes, in drawers: Terrain for the land, Objects for things and people, Inventory for things to find.
Middle The map of the world you’re building.
Under the map Buttons for Game settings , Map , Play , Select and Erase .

The buttons under the map. The Map button, with a picture of a folded map, is circled in red

How to paint with a brush

Everything in this post is built with brushes, so here’s how they work. Open a drawer on the left, like Terrain, and click a brush, like Water .

The Terrain drawer: Ground, Walkway, Water, Bush, Tree, Fence, Wall, Bridge and Gateway

The drawer turns into the Brush drawer. It shows the kinds of that brush you can pick. For Water, that’s the water itself, fish, lily pads and lotuses.

The Brush drawer for Water: Which water? with Water picked, then Salmon, Koi, Pink fish, five lily pads and two lotuses

Now move the pointer over the map. White squares show exactly where the brush will paint, before you click. Click to paint one spot, or drag to paint a line.

The Walkway brush with Dirt path picked. On the map, a three by three square of white boxes shows where the path will go

Press All brushes at the top of the drawer to go back to every brush. You can also type a brush’s name in Find a brush.

Want to… Do this
Change something you put down Press Select and click it. Its Object settings open on the left.
Take something away Press Erase and click it.
Undo a mistake Press Undo at the top of the map.

Step 2: Lay out the worlds

Press Map under the map to open Map Settings. Your first world is already there, in the middle of the World map grid.

Around it are squares with a + . Press one to add a new world on that side. Add three more worlds, so you have four in a square.

Map Settings with four worlds in a square: Hollyhill, Whisperwood, Fishers Hollow and Grimstone. Empty squares with a plus sign surround them. Under the grid, Level settings shows the Level name box

Click a world in the grid to pick it. It gets a yellow border, and Level settings underneath are for that world. Set two things for each one:

Setting What to choose
Level name Hollyhill, Whisperwood, Fishers Hollow or Grimstone.
Biome Village for Hollyhill and Fishers Hollow, Forest and Castle for the others.

Level settings for Whisperwood: the Level name box, Music, and the Biome tiles with Forest picked

The level name matters. It’s what the world is called on the map, and scripts can use it as an ID too.

The hero walks off one edge of a world and comes in on the next one, so the grid is the shape of your adventure.

Opening a world to build it

The builder shows one world at a time. To build a different world, press Map , click the world in the grid, then press × at the top right of Map Settings. The map now shows that world, and the brushes are the ones for its biome.

Step 3: Build Hollyhill

Open Hollyhill: press Map , click Hollyhill in the grid, and press ×. Hollyhill is where the hero starts, so make it feel like home.

Hollyhill from above: a brick lane through the middle, houses with orange roofs, a stone house with a red roof, two market stalls, a fenced garden with chickens, a sheep and a pig, a pond with koi, a well and lots of trees and flowers

Lay the land first

Open the Terrain drawer and pick Walkway . In the Brush drawer, pick Brick walkway, then drag across the map to draw a road through the world, with a branch going south. Roads show the player where to go, and they lead to the next world.

Pick Water and paint a pond in a corner. Then, still in the Water brush, pick Lily pad and Koi and click them onto the pond.

Line the edges of the world with Tree and Bush , so it feels closed in and cosy. The Tree brush has several shapes to pick from, so mix them up.

Then fill it with life

Open the Objects drawer. Put a few House brushes along the road, and a Shop market stall or two.

The Village decoration brush has wells, barrels, crates and flowers, so sprinkle them about. Draw a Fence in a square and put a few Animal chickens inside to make a farm.

Add some villagers with the Villager brush. When you put one down, its Object settings open on the left: type something for it to say in What they say. A slime or two from the Enemy brush near the edges keeps the hero on their toes.

Little things make a world feel real. A villager who says “Have you seen my pig? Oh, there she is.” next to a pig makes players smile.

Mayor Rosa

One villager is special: Mayor Rosa. Put her by the big house. In her Object settings, type Rosa in the ID box at the top. We’ll give her a script in Step 8.

Step 4: Build Whisperwood

Open Whisperwood: press Map , click Whisperwood in the grid, and press ×. It’s a Forest, so the brushes now draw forest things. Pack it with trees, and leave paths through it.

Whisperwood from above: a dirt path winds through thick forest, a stream runs down from the top with a plank bridge over it, Old Fen stands by his crates on the right, and the candlelit Old Shrine sits among dead trees at the bottom right

The stream and bridge

Pick Water and drag down from the top edge to paint a stream, then widen it into a pond. Draw a Walkway dirt path up to the stream on both sides.

Pick Bridge , choose Plank, and set it to run West to east. Then drag it across the stream where the path meets it, so the hero can cross.

Old Fen

At the end of the path, put a Villager . We picked a wizard with a white beard from Which villager?. Type Fen in his ID box.

A villager's ID box with Fen typed in it

Fen needs the lantern in his bag before he can trade it. Scroll down his Object settings to Talk and trade, and in Gives the hero, choose Lamp. The Lamp is our Sun Lantern. In any game, a Lamp in the hero’s bag lights up dark places by itself. In ours, it’s also the key to the shrine’s magic.

Fen's Talk and trade settings: Gives the hero is set to Lamp

The Old Shrine

The shrine is a decoration with an ID. Pick the Forest decoration brush, choose Tombstone with candles, and put it deep in the woods with lamp posts and mushrooms around it.

Then press Select , click the tombstone, and type Old shrine in its ID box. Anything with an ID can be pointed at by a script. That’s how the shrine will know when the hero brings it the lantern.

Add a few sprouts and slimes with Enemy , and Whisperwood is ready.

Step 5: Build Fishers Hollow

Open Fishers Hollow: press Map , click Fishers Hollow in the grid, and press ×. It’s a lakeside village, and the fish is the treasure here, so make the player work a little to get it.

Fishers Hollow from above: a big lake on the left with a small island in the middle and a pier leading to it, houses and a fish stall on the right, and a dirt road going north and east

Paint a big lake with Water , row by row, and leave one block of land in the middle for an island. Pick Bridge , choose Narrow plank, and lay it from the shore to the island, like a pier.

Pick the Shop brush, choose Fish, and click it onto the island. The hero picks it up and carries it in their bag.

Add a fish stall with the Shop brush, a couple of House brushes, and villagers who drop hints, like “The best fish swim round the little island. Try the old pier!”

Step 6: Build Grimstone Castle

Open Grimstone: press Map , click Grimstone in the grid, and press ×. Grimstone has the Castle biome, so the Objects drawer has the Castle brush. It puts down whole castle sections.

Grimstone from above: grey castle walls and towers make a courtyard, the keep stands at the back with a crowned gate, two slime guards and Milo wait inside, and the locked iron gate is in the front wall

Build the walls

Pick Castle . The Brush drawer asks Which castle?:

The Brush drawer for Castle: Which castle? with Tower, Keep, Wall, Long wall and Hall

Pick Tower and click to put one at each corner. Then pick Long wall and join the towers, so they make a courtyard. Put the Keep at the back. Sections side by side join up by themselves.

Hang banners and torches on the walls with the Castle decoration brush, and put braziers in the courtyard.

The two gates

The castle needs a way in. Pick Castle gate and choose Iron gate. Put it on the ground right in front of the front wall, not on top of the wall: the hero has to be able to stand in front of it. Then put a Stone gate with a crown in front of the keep.

Press Select , click the iron gate, and set it up like this:

Setting What to choose
Door id Castle gate
Opens with No key yet (it can’t be opened)
The lock’s sign A dark spell holds this gate shut. Only the Sun Lantern can break it.
Leads to The keep’s gate. Give that one the Door id Keep door first.

The iron gate's settings: Door id is Castle gate, Opens with is No key yet, and the lock's sign says a dark spell holds the gate shut

No key yet means no key in the game can open the gate. Only a script can. Leads to means the hero goes through the iron gate and comes out at the keep, inside the courtyard.

Leads to is set to Keep door, a castle door in Grimstone

Milo

Open the Inventory drawer and pick Friend to rescue . It only shows in rescue games. Click it into the courtyard, then type Milo in his ID box, and give him something to say, like “You came! Quick, get me out before Baron Grumble wakes up!”

Add some tough guards around him with Enemy , like a crowned slime and a horned slime.

Step 7: Tell the story on a scroll

Now for the scripts. The first one is the game script, which runs for the whole game. Open Game settings and press Game script.

A scroll is an old sheet of paper that opens over the game for a story. While it’s open, every say line is written on it, and the player presses A, Enter or Space to read on.

Here is the story script. Press play to try it.

What each part does

Line What it does
when the game starts Runs once, when the game starts.
if not @story_told Skips the story if the player has already read it.
show a scroll with typing effect Opens the scroll, and types each line out.
@name is the typed answer to "..." Asks a question, and the player types the answer.
with @default is "Hero" The name to use if the player doesn’t type one.
say "Welcome, @name." Writes the line, with the player’s name put in place of @name.
hide the scroll Puts the scroll away, so the hero can move.

The scroll asking "Traveller, what is your name?", with Sam typed in the box and a keyboard of letters underneath

@name is a @variable. It remembers the answer for the whole game, in every world. So any script can say the player’s name later on.

The scroll telling the story: Welcome, Hero. Hollyhill needs your help! Then lines about Baron Grumble's slimes, Milo, the castle gate and the Sun Lantern

when the game starts runs again after Try again. The @story_told check means the player only has to read the story once.

Step 8: Mayor Rosa’s advice

Pick Rosa, then press Character scripting at the bottom of her Object settings. Her script checks how far the hero has got, and says something different each time.

if, else if and else pick one thing to say. The first one that’s true wins:

If… Rosa says
The spell is broken “The gate is open! Bring my Milo home.”
The hero carries the lantern “The Sun Lantern! Take it to the Old Shrine.”
Neither yet Where to find Old Fen.

Step 9: Old Fen’s bargain

This is the heart of the quest. Fen has the lantern, but he won’t give it away. He wants a fish first.

Open Fen’s Character scripting. His whole talk happens on a scroll, so it reads like a chat. His face is beside his lines, and the hero’s face is beside the player’s answers.

Fen's scroll: a big picture of Fen at the top, then "The Sun Lantern? Yes, I keep it safe." The question "Do you need it?" is answered Yes, and Fen says "Then do something for me first."

Here is his script. Try talking to him, then give the hero a fish and try again.

How the trade works

the {Hero} has "Fish" is true when the hero carries a fish. Until then, Fen asks for one, and tells the hero where the fishers live.

Once the hero has the fish, Fen makes an offer:

@deal is offer "Lamp" to the {Hero} for "Fish"

A deal box opens with Deal and No thanks. If the player picks Deal, the fish goes into Fen’s bag and the lamp goes into the hero’s, both at once. @deal becomes yes, and Fen sets @lantern_given is yes so every script knows the hero has the lantern.

The deal box: Fen says "Let's trade!" You give a Fish, you get a Lamp, with Deal and No thanks buttons

Fen’s script puts the scroll away with hide the scroll just before the offer, so the deal box has the screen to itself. Then it opens a new scroll straight after to say thank you.

Fen's scroll after the trade: "Thank you! The Sun Lantern is yours. Take it to the Old Shrine, south of the pond."

Prefer blocks? Press Blocks at the top right of the script window to see the same script snapped together.

Fen's script as blocks: a purple when the hero talks to me block, holding show a scroll with typing effect, show my picture, and an orange if block

Step 10: Wake the shrine

Bringing the lantern to the shrine is the action that breaks the spell. It happens in Whisperwood, so it goes in Whisperwood’s level script. A level script runs while the hero is in that world.

Pick Whisperwood on the map, open Map settings, and press Level script at the bottom.

when the {Hero} is near the {Old shrine} runs when the hero walks up to the decoration we gave that ID. If they carry the lamp, and the spell isn’t broken yet, the script sets @spell_broken is yes, plays a fanfare and shows a banner.

The hero stands beside the candlelit shrine, and a banner says "The Old Shrine wakes up! Far away, a gate creaks open."

Step 11: Open the gate from far away

Here’s the clever part. The shrine is in Whisperwood, but the gate is in Grimstone. How does one world open a gate in another?

The answer is the @variable. Every script in the game shares the same @variables, in every world. So Whisperwood writes @spell_broken, and Grimstone reads it.

Open Grimstone’s Level script:

Two rules

The first rule, when any {Heroes} enters, runs each time a hero comes into Grimstone. If the spell still holds, it shows a warning.

The hero stands below the castle's iron gate, and a banner says "A dark spell holds the castle gate shut."

The second rule, when @spell_broken is yes, runs when the check becomes true. It also runs when the hero walks in and it’s already true. Then unlock the {Castle gate} takes the lock off, and the hero can open the gate with Open.

unlock only reaches things in the world the hero is in. That’s why the gate’s own world unlocks it, instead of Whisperwood’s script.

Into the courtyard

The hero opens the iron gate, walks through, and comes out at the keep, right in the courtyard with Milo and his guards.

Inside the courtyard: the hero has just come out of the keep's gate, with a crowned slime guard, Milo with his teal hair, banners and braziers around them

Beat the guards, talk to Milo, and he follows the hero. Lead him all the way back to the start in Hollyhill to win.

Step 12: Play it all the way through

Press Play under the map, or Open game to play it the way players will. Try the whole quest from the start:

Where What to do
Hollyhill Read the story, type a name, talk to Rosa.
Whisperwood Talk to Fen, who asks for a fish.
Fishers Hollow Cross the pier and pick up the fish.
Whisperwood Trade the fish for the lantern.
Whisperwood Take the lantern to the Old Shrine.
Grimstone Open the gate, beat the guards, free Milo.
Hollyhill Lead Milo home.

Testing one part? Use the Hero’s bag for testing button above the map, pick Fish for Slot 1, and the hero starts every Try game with a fish. Then you can go straight to Fen. Set it back to None when you’re done.

Going the extra mile: a title Screen

Real games start with a title. Yours can too! A Screen is a short animation you make in the Addon Lab, up to 30 seconds long. Set it as your game’s Opening Screen, and it plays when someone starts a new game.

Here’s the one we made. Press Play to watch it.

Make a new Screen

In the Addon Lab, press New, then Screen, and give it a short name. Ours is called Lantern.

The stage is 16 blocks wide and 9 blocks tall. On the left are drawers of things to add. From them, add:

Drawer Pick
Backgrounds Sunflower hills
Music Adventure
Built-in The hero

The hero is whichever hero your game starts with, so the Screen always matches your game.

Add the title

Pick a yellow paint colour, then the Text tool, and click near the top of the stage. Type The Sun Lantern and press Done. Add a second line in white, like A Splat Script quest.

The Screen editor: The Sun Lantern in big yellow letters over the sunflower hills, A Splat Script quest under it, and the hero standing in the flowers. The Layers timeline below shows Title, Subtitle and The hero

Make it move

Each thing is a layer in the Layers timeline. You set where a thing is in a frame, and the Screen glides it to the next one.

Frame Time What to set
1 1.5 seconds Drag the title above the top of the stage, out of sight.
2 2.5 seconds Drag the title down into place, and give it Sparkles. Put the hero off the left edge.
3 0.75 seconds Drag the hero to the middle, set Picture to Looking at the camera, and give them Sparkles too. Hide the subtitle with See-through.
4 2 seconds Make the subtitle solid again, so it fades in.
5 1 second Change nothing. This holds everything still.
6 0.5 seconds Make everything see-through, so it all fades away.

To make the title bounce when it lands, press the caret beside its layer and set Ease out to Bouncy.

The Title layer's glide settings: Glide On, Path Straight, Ease in Steady, Ease out Bouncy, taking 1.5 seconds

Press Play under the stage to watch it, and change anything you like.

Save it and use it

Games use a Screen as it was the last time you pressed Save, so press Save at the top of the editor.

Then go back to your game, open Game settings, and pick your Screen under Opening Screen.

Opening Screen in Game settings, set to Lantern

Now press Start new game. Your title plays first, then the story scroll opens. Players can press Start or Enter to skip it.

The title Screen playing in the game: The Sun Lantern and A Splat Script quest over the sunflower hills, with Cooper looking out and sparkles around him

Make it your own

Here are some ideas to take your quest further:

  • Make Fen ask for something else, like three apples.
  • Give Rosa a reward when Milo comes home, with {Game} give 10 coins to the {Hero}.
  • Hide the fish in a chest, and lock the chest with a key from another villager.
  • Add a boss in the courtyard, and open the keep’s gate when it’s beaten.
  • Give your title Screen weather, like Wind or Embers.

Where to learn more

The Game and level scripts help has more about scrolls and @variables. The Adventure builder help covers every brush, and the Screens help has more Screens to make. Want to try a script first? Open the Script Playground.

We can’t wait to play the quests you make.