RPG Maker a guide to the PlayStation original

Event techniques#

RPG Maker's events have no variables, no sums, no way to read the controller and nothing that runs by itself. Makers built a piano, a battle system and a fighting game anyway, and this study added a puzzle and three self-running demos. Every one of them stands on a handful of tricks, and every trick comes from how the program picks pages and runs commands. This page takes nine systems apart so that you can reuse what's inside them. The commands themselves are explained on Events.

9systems taken apart
1,564pages in one scenario of Generic Quest VIII
14,726pages in THE EVENT OF TODAY
0commands that read the pad

Four rules carry everything on this page:

Reading the pad: the parked party#

No command reads the controller. What the player can do is walk, bump into things and press ×. So the oldest answer, already in THE EVENT OF TODAY around 2001 and used again by Arc Arath and Generic Quest VIII, is to stop the party from walking and put an event wherever it would go.

blocked ← Touch → Touch ↓ Touch party + Check event ← → ↓ invisible events that start on Touch: a press bumps one and runs it. ↑ a blocked tile with no event: the party only turns. × checks the party's own tile first: the Check event under the hidden party runs. The party never moves. Every press is one event run.
The parked party as Arc Arath's piano lays it out. THE EVENT OF TODAY and Generic Quest VIII put a fourth event above the party for ↑.

Three more tricks grow out of the same rig:

A piano from switches (Arc Arath)#

The church piano: the keyboard is drawn into the map, and the party stands off-screen.
The church piano: the keyboard is drawn into the map, and the party stands off-screen.
Free Play: key 1 lit by a half-transparent square.
Free Play: key 1 lit by a half-transparent square.

In Arc Arath's church a wall-sized keyboard of nine keys hangs over a grand piano. Linda offers How to play, Try out Free Play and Play for real. In Free Play ← and → move a highlight across the keys (it wraps at both ends), × plays the lit key and ↓ asks whether to stop. Playing for real, the piano plays each of three songs by itself, lighting each key as it sounds, and then you repeat it; a wrong key sounds a buzzer. All three songs earn 1,000 gold and a random Affinity Fragment, as often as you like.

It is 21 events, 18 Duplicates and 359 pages on one map. The party is parked off-screen, and the Intro Event moves the view 8 tiles to the left so that the keyboard shows and the party doesn't.

The cursor is nine switches#

key 1key 2key 3key 4key 5key 6key 7key 8key 9 switch 1switch 2switch 3switch 4switch 5switch 6switch 7switch 8switch 9 → bumps an event with nine pages: "if switch k is on: turn on switch k + 1, turn off switch k". ← bumps another with the nine pages the other way. Switch 9 wraps to 1, and 1 to 9. Each key event's page "switch k on" shows a cream square in Ghost on the key and its Duplicates.
A one-hot cursor: exactly one of nine switches is on, and the pages do the rest.

Exactly one of switches 1–9 is on, and that switch is the cursor. No page has to compare anything: page priority finds the one page whose switch is on, and when the event ends every key re-picks its own page and the highlight moves by itself. × lands on an event under the party whose nine pages each play one key.

Every other pitch step#

Every key plays sound 73 with Sound Effect + Pitch, on pitch steps 2, 4, … 18. The 19 steps aren't evenly spaced semitones, so the keys aren't the chromatic run they look like:

Key 1 2 3 4 5 6 7 8 9
Pitch step 2 4 6 8 10 12 14 16 18
Semitones −16 −12 −9 −5 −2 +2 +5 +8 +12

The gaps between neighbours are 4 3 4 3 4 3 3 4 semitones: a stack of thirds, which together give the notes of F♯ Lydian. Any run of keys sounds consonant. The buzzer is sound 3 .

The demo is a chain of pages#

The piano's own playing is a chain of pages with no conditions on the key events. Each one is: play the note, wait, blank the key with Change Event Graphic, Take Over the next key's page. The Take Over lights the next key for free: it shows the target page's graphic on the key and on all its Duplicates. A key that sounds several times in a song needs one page per time, because each page names its successor; key 6 has seven. The last note of each demo Takes Over the "play it again?" menu.

Checking the song: a table under your feet#

"I'll give it a shot" moves the note-playing event off the party's tile and moves the song's checker onto it, so that × now runs the checker. Setting this up takes about 70 frames.

Restart by moving into the same room#

Move Location to the room you're in is the piano's "restart with a new state". It puts every event back on its home tile and first page, keeps the switches, and runs the Intro Event again. The Intro's pages are a dispatch table: a page for switch 39 (the reward), 30 (song 3's demo), 21 (song 2's), 11 (song 1's), and page 1 for a fresh start. "Play it one more time", every new song and leaving Free Play all go through it. The view's shift survives the move.

A battle system from items (Generic Quest VIII)#

A battle against the Defense Robot. Every bar, portrait and icon is an event.
A battle against the Defense Robot. Every bar, portrait and icon is an event.
The title: one event and 119 Duplicates, scrolled by a single Move Event.
The title: one event and 119 Duplicates, scrolled by a single Move Event.

Generic Quest VIII is a short joke RPG from 2011 whose point is its custom battle system: HP bars, MP, spells and elements, items, defending, fleeing, ambushes and an enemy that thinks, all in event commands. The stock battle system is never used. Its first scenario holds 23 maps, 283 events, 1,564 pages and 22,399 commands, of them 5,869 Remove Item and 3,141 Take Over. Each of the five enemy types has a battle map of its own with a whole copy of the system (about 44 events and 415 pages), and these maps are three quarters of the scenario's event data.

Every number is an item#

The game keeps its state in items with plain names, so the field menu's item list doubles as a debugger.

State How it's kept
A hero's HP Three items, P1 HP 2, 3 and 4: HP is 1 + the number held. A page tests one boundary: "holds P1 HP 3, doesn't hold P1 HP 4" is exactly HP 3.
The foe's HP Foe HP 7 down to Foe HP 2, the same way
MP a count, 0–6 copies of one item
Whose turn one token item each: P1 Turn, P2 Turn, Foe Turn
Defending P1 Defend, P2 Defend
The menus switches 1–4 the command cursor, 5–12 the item targets

Turns: the actors walk onto your tile#

The party is parked as above: ← and → move the command cursor, ↑ and ↓ the item target. The menus aren't opened by the player. Each actor is an event that walks onto the party's tile when its turn begins, so × runs the page that matches the state: Tony's menu (52 pages), Lucia's (38) or the enemy's (81). An action changes the items, sends the actor home and Takes Over an animation, and the animation ends by Taking Over the next actor's first page. Skipping a dead hero is just a choice of animation page.

Staircases, Gold and release detection (THE EVENT OF TODAY)#

Four ways to keep a number in items#

Kind Example What it costs
A count a timer of 26 copies of one item, −1 a tick; "holds none" means time's up one condition tests only zero or not
One item per level Generic Quest VIII's HP one page per value for every change
A staircase battle HP in ten items: item j holds max(0, HP + j − 10) damage is one fixed list of ten Remove Items, whatever the HP
Reset to N remove 16, then add 16: exactly 16 whatever was left relies on Remove Item stopping at 0
12345678910 item j (ten items with no names) HP 6 → 5 with one damage round bars: the counts at HP 6 (item 10 holds 6) red: what one round of ten Remove Items takes items 1–4 hold nothing: their Remove does nothing Item j is held exactly while HP ≥ 11 − j so every threshold is one condition: "holds item 10": still alive "holds item 5": HP 6 or more Damage: the same ten commands. Healing: one page per current HP. A battle starts with +10, +9, … +1.
An item staircase. One hit is the same list of ten Remove Items at any HP, and each HP threshold is a single page condition.

The staircase is the heart of THE EVENT OF TODAY's battles. Generic Quest VIII needs one page per HP value for every hit; here a hit is one fixed list, and because Remove Item at 0 does nothing, the shape stays exact as the items run out. The same layout gives each HP-bar tile its condition. Healing is the expensive direction: one page per current HP. A boss's three-item power gauge (counts 2, 4 and 6) uses the same idea and stops at 6 by itself.

Gold as a register#

Gold is the only number a condition can compare (Gold more than / less than), so the game uses it as a register:

Take Over as the instruction set#

Use What it does
Goto the last command of a page jumps on: every mini-game's tick ends this way
Subroutine a page that nothing can start, called from several places
Sprite setter the battle hero has pages 5–80, one per pose and facing; Taking Over a page shows that pose
Animation frame an HP bar drains as a chain of hops, each re-arming one tile to its dark page
Parameter the same chain three times, one per "who acts next": the page number carries the value

Overlapping events: hearing the button let go#

The game's readme speaks of "overlapping events". They turn out to be a way to tell whether a direction is held or released, which the program can't otherwise know.

chargescold chargescold chargescold partypartyparty 1. ← held the top event is bumped every frame and never moves 2. ← let go on its turn (1 to 40 frames) it walks off (Move Type: Away) 3. ← pressed again the bump finds the event underneath: "you let go"
Two events on one tile. The punch game: hold ← to charge, then twist to → at once. Pause, and the next press meets the scolding event.
The punch game, run in the US program: let go of ← and the charge event has stepped off its tile.
The punch game, run in the US program: let go of ← and the charge event has stepped off its tile.

The punch game, the knock-down game, the race, the spinning game and the slot machine all use it.

A combo parser (Be Instructive)#

Be Instructive is an RPG Tsukuru 3 fighting game by the maker of THE EVENT OF TODAY: a one-on-one ring of seven cells, ring-outs, a super gauge and fighting-game command inputs. Every fight map has the parked party in the middle of four d-pad events with 66–88 pages each. The fighters' positions are one-hot switches, and each fighter's HP is an item staircase.

turn opens after → after → ↓ after → ← Omega Attack Hyper Crash →↓←↑ then ×↓ then × Each box is a switch. A Touch page on the d-pad event moves the match on; a Check page fires the move.
Two of the attack specials as the switches see them.
Special Input (the US program's ×) Gauge
Omega Attack → ↓ ↑ + × level 2
Hyper Crash → ← ↓ + × level 1
ULT Cyclone (↑) + × × ← + × level 3
Goodbye Guard (defence) ← → + × none
Head Bomber (defence) ↑ ↓ + × level 1

Mashing is forgiving. Once a finishing page is chosen on a d-pad event, pressing that direction again only turns the party, and most presses that don't continue a match land on Check pages and change nothing. So → ↓ ↓ ↑ × still gives Omega Attack. The (↑) in ULT Cyclone is in brackets because every turn already starts with the party facing up.

Lights Out from its rule (Brazier Hall)#

Brazier Hall was built for this study to see whether a system designed from the decoded rules works the first time. It is the Lights Out puzzle: touch a brazier (× while facing it) and it flips, lit to cold or cold to lit, along with its four neighbours. Light all 25 and the door opens onto a chest. A Keeper explains the rule and lays out a new pattern on request.

Pattern 1 as the game starts, and the hall solved with the door open. Map renders of dungeon 200.
Pattern 1 as the game starts, and the hall solved with the door open. Map renders of dungeon 200.
12345 678910 1112131415 1617181920 2122232425 Brazier 13 flips switches 8, 12, 13, 14 and 18. It has one page for each lit / cold combination of the five: 2 × 2 × 2 × 2 × 2 = 32 pages, each naming all five switches. corner brazier: flips 3, needs 8 pages edge brazier: flips 4, needs 16 pages inner brazier: flips 5, needs 32 pages 504 pages in all, none written by hand.
One page per state. A page's conditions spell out the whole combination, so exactly one page passes; its commands flip each of the braziers.
In Test Play: a pattern half solved.
In Test Play: a pattern half solved.
Event Edit opens brazier 13 at Page 32/32, with its five conditions.
Event Edit opens brazier 13 at Page 32/32, with its five conditions.

The hall is one map: 30 events, 522 pages, a block of 21,057 bytes of the map's 40,666. It was checked three ways: every brazier in every local state; the whole state space of a 3 × 3 version (276,548 states), which also caught six deliberate slips of the kind Generic Quest VIII has; and 193 inputs played in an emulator with no difference from the model.

A demo that runs by itself (Take Over)#

Nothing in RPG Maker runs on its own. An event starts when the player touches or checks it, or when a map's Intro Event runs on arrival; while one runs, nothing else on the map moves; and no event can branch on the game's state. Take Over is a two-minute demo built for this study that needs all three anyway: a scroller, a spiral, a tunnel, 48 dancers, a plasma, fireworks and an end scroller, every change on the beat of the music, with nobody pressing anything.

The title scrolls over a still starburst: the hidden party walks, the wallpaper stays.
The title scrolls over a still starburst: the hidden party walks, the wallpaper stays.
The spiral: 15 layers of square tiles over the galaxy wallpaper.
The spiral: 15 layers of square tiles over the galaxy wallpaper.
48 dancers: two events with 23 Duplicates each.
48 dancers: two events with 23 Duplicates each.
The plasma, recoloured one layer at a time.
The plasma, recoloured one layer at a time.
TitleSpiralTunnelDanceFinale Move Location back to the title: the song starts again pagepagepageMove Location Take OverTake Over… → next map's Intro Takes Over
One thread that never ends. Every page ends by Taking Over the next one; a map ends with a Move Location whose Intro Event Takes Over the next part's first page.

The whole demo is a single event thread that never stops. Every page ends with a Take Over of the next page, or with a Move Location whose map's Intro Event Takes Over the next part. The last part goes back to the title. A loop is 1,619 commands, 695 of them Take Overs, and lasts 7,320 frames (2 minutes 2 seconds).

Every command on a known frame#

Because the thread is the only thing running, every change happens on a frame that can be worked out in advance. These are the costs measured in an emulator and used by the demos:

CommandFrames it takesMeasured in
Any commandat least 1Take Over, Key On
Take Over2Take Over
Wait t (tenths of a second)6 × tTake Over
Wait 01 (does nothing else: the padding for an exact frame)Take Over
Sound Effect (+ Pitch)2Key On
Move Party, n tiles12 × n + 1 (13 for one tile)Take Over, Key On
Turn (one spin)22Key On
Effectthe animation's own frames + 6Take Over
Message 1, n lines95 × (n − 1) + 772Take Over
Move Location171, from its first frame to the new map's first commandTake Over, Page Flip
The refresh command (not in Event Edit)1Page Flip

A beat of the music (BATTLE 1, 126 beats a minute) is about 28.6 frames. Waits and Wait 0 pad the thread so that each command starts on exactly the frame it should. In the emulator, 1,066 of 1,066 traced commands ended on the frame the timing predicted.

Event Edit opens a layer event: Page 21/21, Do Not Start, no conditions. Only a Take Over reaches it.
Event Edit opens a layer event: Page 21/21, Do Not Start, no conditions. Only a Take Over reaches it.

Music from sound effects (Key On)#

Key On has no background music. Its two-minute soundtrack is an original song in which every note is a Sound Effect command in the thread, and the pictures are what the thread does between the notes. It ends in the game's own Ending, whose credits run over snapshots the demo took of itself.

Of the 78 sounds, these hold a pitch well enough to play, and they are in tune with each other:

Part Sound At step 10
Bass 44 A2
Lead 28 D
Keys 73 E3 (the church piano's tone)
Ping 4 C5
Chime 77 C
Kick, snare, hat 68, 47, 62 drums

Each sound's scale sits on its own root, which decides the key: the bass has all of A minor, so the song is in A minor, on Am, F, C and G.

slot 0: kickslot 1: bassslot 2: lead / keysslot 3: hat / snare 01234567 frame A 16th note is a row of 8 frames: four 2-frame slots, each part always in its own slot. A slot the music leaves free goes to the pictures: a Take Over also takes 2 frames.
The grid at 112.5 beats a minute (shown slowed down). Every instrument sounds a fixed number of frames after the row starts, so nothing jitters.

The three scenes each find a different use for the free slots:

Key On in an emulator, a frame every 160: the sign over the sea, the rings, the orbs, the crowd, then RPG Maker's own staff credits begin.
Key On in an emulator, a frame every 160: the sign over the sea, the rings, the orbs, the crowd, then RPG Maker's own staff credits begin.
Dusk: the ship sails under the orbs, each sounding as it passes; the bass notes are the blue orbs below the waterline.
Dusk: the ship sails under the orbs, each sounding as it passes; the bass notes are the blue orbs below the waterline.
Dusk: the sign over the sea.
Dusk: the sign over the sea.
Night: the rings of a ripple.
Night: the rings of a ripple.
City: the band of light crosses the shadow crowd, and each layer it reaches hops into costume.
City: the band of light crosses the shadow crowd, and each layer it reaches hops into costume.
City: the whole crowd lit.
City: the whole crowd lit.

Key On is 302 events and Duplicates, 1,006 pages and 2,522 commands, 802 of them notes and 963 Take Overs: 6,715 frames from the first command to the Ending.

Two gaps past the editor#

Event Edit only offers switches 1 to 500, and a few commands the program understands are never offered at all. Neither limit is checked when the game runs, so a Scenario written by a tool (not typed in Event Edit) plays them on an ordinary console. No fan game in the archive uses either.

The details are on Limits and How it works.

A frame buffer of event pages (Page Flip)#

The film leader counts down in big digits.
The film leader counts down in big digits.
Reel one: the fire, and the ball over it.
Reel one: the fire, and the ball over it.

Take Over and Key On change one layer of Duplicates per Take Over. Page Flip gives every "pixel" of the screen a timeline of its own, so it can show any picture: a letter scroller, fire, a bouncing ball, a plasma, Conway's Life, a crowd holding up pictures.

04812162024 Gold page 1resting look: dark page 2white, 3 ≤ Gold < 10 page 3gold, 5 ≤ Gold < 8 page 4dim gold, 14 ≤ Gold < 21 thread: Gold +1, refresh, Gold +1, refresh … (green line = the counter)
One pixel's pages. At every refresh the program walks them from the top down and stops at the first whose interval holds the counter.

What a picture costs. The refresh walks each event's pages from the highest down and stops at the first that passes, so what counts is the pages visited. In the emulator a frame held while the visits plus 6.5 for every object whose look changes stayed under about 2,000; the demo keeps every refresh under 1,500. Three consequences shaped the demo:

The thread is a projectionist. The film isn't played once from end to end; the thread moves the counter the way a DJ moves a record:

Move Commands
Play Gold +1, refresh
Fast, slow Gold +2; a Wait before the refresh
Reverse Gold −1, refresh
Loop Gold −N at the clip's end
Jump cut Gold ± k to another clip
Scratch +1 +1 −2 +1 +1 −2 on the 16th notes

The music is Key On's method, and a picture takes a 2-frame slot just like a note, so each row of the song is shared between the band and the projector.

"PAGE FLIP" scrolls by, each letter bobbing.
"PAGE FLIP" scrolls by, each letter bobbing.
The mirrored plasma over the galaxy: black pixels are transparent.
The mirrored plasma over the galaxy: black pixels are transparent.
Conway's Life, 64 generations, worked out ahead and stored as film.
Conway's Life, 64 generations, worked out ahead and stored as film.
The card stunt: 110 mannequins (character 34), a heart of kings.
The card stunt: 110 mannequins (character 34), a heart of kings.

Page Flip is four maps and a 56-bar song, 119.5 seconds a loop: 5,748 commands, 670 notes and 1,262 pictures. In Test Play in an emulator, all 1,272 refreshes of the run landed in their frame, and after each one every event showed the look the film asked for. A transition between maps is a Move Location of 171 frames, written into the song as a two-bar break.

The toolkit#

The engine has no…The answerWhere it's used
way to read the padthe parked party: Touch events round it, a Check event under itthe piano, Generic Quest VIII, THE EVENT OF TODAY, Be Instructive
variablesswitches (one on at a time), items (a count, one item per level, a staircase), Goldeverywhere
if on a valuepage conditions: the highest page that passes is the one that runseverywhere
arithmeticone page per value; on a staircase, one fixed list of Remove ItemsGeneric Quest VIII, THE EVENT OF TODAY
subroutines, jumpsTake Over to a page with no conditions, which nothing else can starteverywhere
branch on the state inside an eventMove Location to the same map: its Intro Event's pages pick what comes nextthe piano, Generic Quest VIII
choice of what × doesmove a different event onto the party's tilethe piano, Generic Quest VIII
button releasetwo events on one tile, the top one with an Away Move TypeTHE EVENT OF TODAY
combo inputa set of switches, each a partial match, moved on by Touch pagesBe Instructive
anything that runs by itselfone endless Take Over thread, handed from map to map by Intro EventsTake Over, Key On, Page Flip
timerthe frame cost of every command, padded with Wait and Wait 0Take Over, Key On, Page Flip
music editorSound Effect + Pitch, one note per 2-frame slotKey On, Page Flip
frame bufferDuplicates recoloured by Take Over; or Gold intervals and the refresh commandTake Over; Page Flip