Transition History Plugin

Transition History 1.04
Author: Michael Morris @Blue Booth Studios
Engine: RPGMaker MV
Language: JavaScript
Links: RPGMakerWeb Plugin Release Post
MV Plugins Entry

A number of my scripts require knowledge of the previous (or “calling”) player position. For example, a player walks onto a save point, and the game loads a new map with a campsite. At some point, the player opts to leave the campsite, and needs to appear at the position he/she occupied before entering the campsite. On the World Map, this information is tracked so that if a player decides not to use the World Map (cancels out of it), the player will appear at their position prior to entering said map. This same information can easily be used for mini-games, etc. By itself, it isn’t hard to do (assign 3 or 4 variables). But I ran into a more complicated use case when considering daisy-chaining world maps.

For example, let’s say the player enters your world map. You might have one world map for the Dark Forest zone. The player chooses the first node in that world map, which leads out of the Dark Forest zone, and into the Open Plains zone (if this still is not clear, consider how world maps are handled in games like Super Mario World or Mario RPG). If the player selects cancel while in the Open Plains zone (the second world map called), the player will transition back to the Dark Forest zone world map, at the first node. But the original player position (that is, the player position before the Dark Forest zone) has been lost! In order to get around this, this plugin allows you to track a variable size array of previous locations. And while this has been created with a specific use in mind, the coding allows for any use of it you can think of. I know you guys will come up with some other incredible ways to use it, and I look forward to seeing them!

  • Can ‘save’ and ‘load’ a position from $gameVariables specified in parameter settings (nothing that can’t be done by eventing alone, these two functions are for convenience).
  • Factors out the ‘save’ and ‘load’ from the World Map script to keep responsibilities separate.
  • Can set the total size of the transition history array in parameters.
  • Array uses push and pop so the most recent transition is always at the end of the array (use getHead to access). If no elements in array, uses the saved position variables.
  • If the array grows beyond it’s specified maximum size, it uses shift to replace the oldest element.
  • Added storeCurrent to make storing current player position less cumbersome.

No screenshots provided – this script doesn’t produce visible effects by itself.

How to Use
  1. Download or copy script into your game js/plugins directory.
  2. Import script into your project.
  3. Call script plugin commands within your own events or plugins.

This script has no external requirements.

Script: BBS_TransitionHistory.js

Credit and Thanks
  • Micheal Morris @Blue Booth Studios
  • Credit to Tsukihime and all of those who have been supportive of my scripts.

Change Log
  • Plugin finished.

Known Bugs
  • None known.

Terms of Use
Free for non-commercial and commercial use.

Please contact us for details.

Leave a comment