- Joined
- Oct 17, 2015
- Messages
- 20
- Reaction score
- 16
- First Language
- English
Project Goal
This is a little plugin I'm working on to help aid development of cutscenes. Personally I find "Move Route" to be tedious at best and a darn right hinderance at worst. Sometimes I get my paths and my actions set up perfectly only to find that moving one of my characters breaks the whole thing. I also wanted a solution that resulted in highly readable cutscene events.
As an example, I took a simple cutscene I was creating where one character began to move to an area of town and my player character followed her. It looked something like this:
The goal is to replace it with a very readable interpretation:
direct lilly to move to aris_village_crossing while player follows lilly until lilly is done then lilly faces the player
Or a slightly more complex scene:
Project Outline
The whole system is powered by an API I call the "Director" API. It's a pseudo-natural language engine that will try to break a plugin command into subjects, verbs, adverbs, direct objects, prepositions, conditionals, etc.
The next layer down is the SceneDirector, a system built on the Director that hooks into RPG Maker and is capable of rudimentary control of characters in a scene. I have built a few out-of-the-box verbs already.
MOVE [SLOWLY,QUICKLY]
[TO [preposition] <target>]
[UNTIL <condition>]
[FOR <duration>]
[WITH <additional people>]
WALK <same as move>
RUN <same as move>
FACE <direction or target>
TURN <direction or target>
FOLLOW [SLOWLY,QUICKLY] <target>
[UNTIL <condition>]
WAIT [ON <target>]
HALT
A simple verb like MOVE has a lot of hidden complexity. I have a lot of options for how to use it (all of these are functional and this isn't even a comprehensive list):
DIRECT player TO MOVE TO lilly
DIRECT player TO MOVE TO [3,12]
DIRECT player TO MOVE SLOWLY TO lilly
DIRECT player TO MOVE LEFT
DIRECT player TO MOVE LEFT FOR 3 SECONDS
DIRECT player TO MOVE LEFT FOR 30 FRAMES
DIRECT player TO MOVE TO THE LEFT 1 TILE
DIRECT player TO MOVE LEFT OF lilly
DIRECT THE player TO MOVE 1 FOOT TO THE LEFT OF lilly
DIRECT PLAYER MOVE 1 LEFT LILLY
// LOOK MA!
DIRECT PLAYER AND LILLY TO MOVE TO VILLAGE_CENTER
// MOVEMENT RELATIVE TO EACH ACTOR
DIRECT PLAYER AND LILLY TO MOVE LEFT 3 TILES
You can also chain commands together to play them out concurrently:
// This will have the player finish moving and then turn to face lilly
DIRECT player TO MOVE 1 TILE LEFT OF lilly THEN player TO FACE lilly
// This will have the player move while lilly also moves at the same time
// This will have the two characters "meet up"
DIRECT player TO MOVE TO lilly WHILE lilly MOVES TO player
// Context carries from one chained command to the next
// Here I don't have to re-specify the PLAYER subject or the MOVE verb
// I then omit player but use a FACE verb at the end
DIRECT player TO MOVE left 3 tiles THEN RIGHT 3 tiles THEN FACE left
// Sometimes you want to affect multiple actors but don't want to carry
// all of them over to the chained command. You can do this with the WITH
// directive.
// In this case only the player will turn to face east and move left while
// the NPC will stay in the map center
DIRECT player TO MOVE TO MOVE TO map_center WITH NPC_001 THEN FACE EAST AND THEN WALK 3 SPACES TO THE LEFT
So DIRECT is for gearing commands towards specific actors. You're literally saying, "I direct you to...!" There's another side to this plugin for issuing commands to the scene itself that I call DIRECTOR. Currently there are two DIRECTOR commands:
// Wait on any actors that are acting to finish what they're doing.
// This will prevent your event from proceeding.
WAIT
// This will tell any actors to stop what they're doing, whether it
// be walking to a location or following someone
HALT
For example:
DIRECT lilly TO WALK TO THE village_center
DIRECT player TO FOLLOW lilly
// player would now follow lilly indefinitely
// let's hold the event until lilly has finished moving
DIRECTOR WAIT
// and make the player stop following her
DIRECTOR HALT <rest of your cutscene>
// ALTERNATIVE
// We don't really need that HALT there.
DIRECT lilly TO WALK TO village_center
DIRECT player TO FOLLOW lilly UNTIL lilly IS DONE
DIRECTOR WAIT
// ALTERNATIVE #2
// an "!" at the end of a verb means it is targeted // toward the director. This means we can do this:
DIRECT lilly TO WALK TO village_center WHILE player FOLLOWS lilly UNTIL lilly IS DONE THEN WAIT!
As an added bonus developers can work on their cutscenes easily during runtime by using the developer console:
KCL.Director.$.fromString("DIRECT player TO RUN 1 TILE NORTH OF LILLY")
What's left?
Source Code
Dependencies: To ease developmental burden I have made use of the LoDash (underscore) API. It's a functional-language API for JavaScript. I've wrapped it into an MV.
LoDash
Director API
Scene Director
License
This was developed for my own use for my own fun and labor of love. As such, anybody and everybody is free to use it and abuse it for whatever purposes they wish including but not limited to: powering nuclear reactors, making a ton of money and blowing it on senseless things, or angering one's pets. Credits/thanks are not required but are appreciated.
Thanks To
This is a little plugin I'm working on to help aid development of cutscenes. Personally I find "Move Route" to be tedious at best and a darn right hinderance at worst. Sometimes I get my paths and my actions set up perfectly only to find that moving one of my characters breaks the whole thing. I also wanted a solution that resulted in highly readable cutscene events.
As an example, I took a simple cutscene I was creating where one character began to move to an area of town and my player character followed her. It looked something like this:
Spoiler
The goal is to replace it with a very readable interpretation:
direct lilly to move to aris_village_crossing while player follows lilly until lilly is done then lilly faces the player
Or a slightly more complex scene:
Spoiler
Project Outline
The whole system is powered by an API I call the "Director" API. It's a pseudo-natural language engine that will try to break a plugin command into subjects, verbs, adverbs, direct objects, prepositions, conditionals, etc.
The next layer down is the SceneDirector, a system built on the Director that hooks into RPG Maker and is capable of rudimentary control of characters in a scene. I have built a few out-of-the-box verbs already.
MOVE [SLOWLY,QUICKLY]
[TO [preposition] <target>]
[UNTIL <condition>]
[FOR <duration>]
[WITH <additional people>]
WALK <same as move>
RUN <same as move>
FACE <direction or target>
TURN <direction or target>
FOLLOW [SLOWLY,QUICKLY] <target>
[UNTIL <condition>]
WAIT [ON <target>]
HALT
A simple verb like MOVE has a lot of hidden complexity. I have a lot of options for how to use it (all of these are functional and this isn't even a comprehensive list):
DIRECT player TO MOVE TO lilly
DIRECT player TO MOVE TO [3,12]
DIRECT player TO MOVE SLOWLY TO lilly
DIRECT player TO MOVE LEFT
DIRECT player TO MOVE LEFT FOR 3 SECONDS
DIRECT player TO MOVE LEFT FOR 30 FRAMES
DIRECT player TO MOVE TO THE LEFT 1 TILE
DIRECT player TO MOVE LEFT OF lilly
DIRECT THE player TO MOVE 1 FOOT TO THE LEFT OF lilly
DIRECT PLAYER MOVE 1 LEFT LILLY
// LOOK MA!
DIRECT PLAYER AND LILLY TO MOVE TO VILLAGE_CENTER
// MOVEMENT RELATIVE TO EACH ACTOR
DIRECT PLAYER AND LILLY TO MOVE LEFT 3 TILES
You can also chain commands together to play them out concurrently:
// This will have the player finish moving and then turn to face lilly
DIRECT player TO MOVE 1 TILE LEFT OF lilly THEN player TO FACE lilly
// This will have the player move while lilly also moves at the same time
// This will have the two characters "meet up"
DIRECT player TO MOVE TO lilly WHILE lilly MOVES TO player
// Context carries from one chained command to the next
// Here I don't have to re-specify the PLAYER subject or the MOVE verb
// I then omit player but use a FACE verb at the end
DIRECT player TO MOVE left 3 tiles THEN RIGHT 3 tiles THEN FACE left
// Sometimes you want to affect multiple actors but don't want to carry
// all of them over to the chained command. You can do this with the WITH
// directive.
// In this case only the player will turn to face east and move left while
// the NPC will stay in the map center
DIRECT player TO MOVE TO MOVE TO map_center WITH NPC_001 THEN FACE EAST AND THEN WALK 3 SPACES TO THE LEFT
So DIRECT is for gearing commands towards specific actors. You're literally saying, "I direct you to...!" There's another side to this plugin for issuing commands to the scene itself that I call DIRECTOR. Currently there are two DIRECTOR commands:
// Wait on any actors that are acting to finish what they're doing.
// This will prevent your event from proceeding.
WAIT
// This will tell any actors to stop what they're doing, whether it
// be walking to a location or following someone
HALT
For example:
DIRECT lilly TO WALK TO THE village_center
DIRECT player TO FOLLOW lilly
// player would now follow lilly indefinitely
// let's hold the event until lilly has finished moving
DIRECTOR WAIT
// and make the player stop following her
DIRECTOR HALT <rest of your cutscene>
// ALTERNATIVE
// We don't really need that HALT there.
DIRECT lilly TO WALK TO village_center
DIRECT player TO FOLLOW lilly UNTIL lilly IS DONE
DIRECTOR WAIT
// ALTERNATIVE #2
// an "!" at the end of a verb means it is targeted // toward the director. This means we can do this:
DIRECT lilly TO WALK TO village_center WHILE player FOLLOWS lilly UNTIL lilly IS DONE THEN WAIT!
As an added bonus developers can work on their cutscenes easily during runtime by using the developer console:
KCL.Director.$.fromString("DIRECT player TO RUN 1 TILE NORTH OF LILLY")
What's left?
Spoiler
Okay, so I have a few small areas where I'd like to improve.
Okay, so I have a few small areas where I'd like to improve.
- Moar verbs and adverbs! (JUMP, DANCE, etc.)
Dance would be totally sweet if you programmed dances as separate adverbs (e.g: DANCE TANGO WITH LILLY vs DANCE SWING WITH LILLY)
- Expand to general purpose scene and camera controls through the "DIRECTOR" plugin command.
E.g.: (DIRECTOR PAN SLOWLY LEFT TO LILLY)
(DIRECTOR ZOOM IN ON LILLY 3 LEVELS)
(DIRECTOR RESET CAMERA)
(DIRECTOR PAN LEFT 10 TILES OVER 3 SECONDS)
- More advanced conditionals (e.g.: "MOVE PLAYER LEFT UNTIL PLAYER IS LEFT OF LILLY")
- Repeaters (e.g.: "MOVE LEFT 3 TILES THEN RIGHT 3 TILES THEN REPEAT 3 TIMES")
- Define Groups (e.g.: "DEFINE GROUP MOB AS NPC_001 AND NPC_002 AND NPC_003")
then you can "DIRECT THE MOB TO MOVE TOWARDS THE PLAYER"
- Define Animations (e.g.: "DEFINE ANIMATION PACE AS MOVE LEFT 3 SPACES AND THEN RIGHT 3 SPACES")
then you can "DIRECT PLAYER TO PACE THEN REPEAT 3 TIMES"
Source Code
Dependencies: To ease developmental burden I have made use of the LoDash (underscore) API. It's a functional-language API for JavaScript. I've wrapped it into an MV.
LoDash
Director API
Scene Director
License
This was developed for my own use for my own fun and labor of love. As such, anybody and everybody is free to use it and abuse it for whatever purposes they wish including but not limited to: powering nuclear reactors, making a ton of money and blowing it on senseless things, or angering one's pets. Credits/thanks are not required but are appreciated.
Thanks To
- Shaz for giving me the idea with the SmartPath plugin.
- Huddell for finding a novel way to figure out when a player has reached an impasse and stop trying to move them ad infinitum.
Last edited by a moderator:

