levix2-TitleScreenMap error

Hey guys,

I have a small problem with a plugin im using from a person named levix2. Basically, when I hold right arrow or down arrow while i choose to start a new game using this plugin that allows you to use a map as a custom title screen, I get an error "TypeError Cannot read property 'filter' of undefined" with the this error in the console log:
Code:
rpg_managers.js:1618 TypeError: Cannot read property 'filter' of undefined
    at Game_Map.tileEventsXy (rpg_objects.js:5804)
    at Game_Map.allTiles (rpg_objects.js:5906)
    at Game_Map.checkPassage (rpg_objects.js:5878)
    at Game_Map.isPassable (rpg_objects.js:5918)
    at Game_Player.Game_CharacterBase.isMapPassable (rpg_objects.js:6390)
    at Game_Player.isMapPassable (rpg_objects.js:7460)
    at Game_Player.Game_CharacterBase.canPass (rpg_objects.js:6365)
    at Game_Player.moveStraight (rpg_objects.js:7938)
    at Game_Player.executeMove (rpg_objects.js:7627)
    at Game_Player.moveByInput (rpg_objects.js:7601)rpg_managers.js:1618 SceneManager.catchException

This is the content of the plugin:
Code:
/*:

@plugindesc Allow a map to take the place of a game's title screen!
Hopefully it will be easier to make unique title screens with this.
@author {Leviathan} {Leviathan}

@help
** * * * * * * * * * * * * * * * * * * * * *
**            Title Screen Map!            *
** * * * * * * * * * * * * * * * * * * * * *

1. Introduction [001I]
2. Example Project [002E]
3. Directions [003D]
4. Version History [004V]
5. License  [005L]

* ----------------------------
1. Introduction [001I]

This plugin is made for RPG Maker MV and it will take the player to a map
instead of the title screen when said title screen would otherwise be
shown. The goal of this plugin is to make it easier for developers to
create their own unique title screens using the map and event interface
they may be more familiar with than trying to write their own plugin
to create an equivalent title screen.

If you have any suggestions or bug reports please report them to the
script page for this plugin on rpgmaker.net :

http://rpgmaker.net/scripts/616/

* ----------------------------
2. Example Project [002E]

You can download an example project for this script here:
http://rpgmaker.net/media/content/users/947/locker/Title_Screen_Map.zip


* ----------------------------
3. Directions [003D]

Installation of the plugin is simple RMMV fare:

- Place in your RMMV's project's js/plugin folder named
  "levix2-TitleScreenMap.js" without quotes. The file name is important
  to correct functionality of the plugin!

- Next add the plugin to your project's plugins list from the Plugin
  Manager and turn it ON.

- Set the TitleMapID to be the ID of the map you want to be your title
  screen. If you aren't sure what the Map ID is you can right-click
  on your intended map in RMMV's map tree and select 'Edit'. The
  ID of the map will appear at the top of the Map Properties window
  that appears.

From there the developer is responsible for creating their title
screen using events and any other tools they may want to use. To
execute the New Game / Load Game / Settings / Quit operations that
would appear on the title screen the developer must use the
Plugin Command event command (third tab, bottom right).

A plugin command is a string made up of at least two parts:
An identifier for what plugin you're sending a command to and
the command itself separated by a space. The identifier for
this plugin is "TitleScreenMap" minus quotes. The accepted
commands and what they do are as follows:

Start a new game:
newgame
new
start

Open the load game menu:
continue
loadgame
load

Close the game:
quit
exit
terminate

Open the settings menu:
options
settings

Some examples of valid plugin commands are as follows:
TitleScreenMap start
TitleScreenMap loadgame
TitleScreenMap terminate


A demo project that demonstrates how to use this plugin is available
on the rpgmaker.net script page for this plugin.


* ----------------------------
4. Version History [004V]

** 1.0 - 2015/11/04
First release! Yay! :D


* ----------------------------
5. License [005L]

This plugin is distributed under the DWTFYWT Public License.
See full text below
(with a change so it's visible in RMMV's Plugin Help viewer):

        DO WHAT THE  YOU WANT TO PUBLIC LICENSE
                   Version 2, December 2004

Copyright (C) 2004 Sam Hocevar <sam (at) hocevar.net>

Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.

           DO WHAT THE  YOU WANT TO PUBLIC LICENSE
  TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

 0. You just DO WHAT THE  YOU WANT TO.

You can read up about the DWTFYWTPL here: http://www.wtfpl.net/


* ----------------------------
YOU DID IT! You read the help!


@param TitleMapID
@desc The Map ID the title screen exists on. Can be eval'd.
@default 1
*/

// reimplement js1.0 functions! yay!
isNan = function(value) { return value !== value; }

// imported is a silly name
var Imported = Imported || {};
Imported.levix2_TitleScreenMap = "1.0";

// Extensions for scripts in general
var Levix2 = Levix2 || {};

// Execute this method when the title screen starts. Overwrite/decorate if you need to change this
Levix2.TitleScreenMap_startTitleScreen = function() {
  // Turn off the menu too so the player can't open it and  up the title screen
  $gameSystem.disableMenu();
  // Set the screen tone to black so an event can change it easily
  $gameScreen._tone = [-255, -255, -255, 0];
  // Make sure the party isn't dead which can trigger a game over on the title screen (which is silly!)
  $gameParty.members().forEach(function(actor) { actor.recoverAll(); });
}

// Execute this method when the player starts a new game. Overwrite/decorate if you need to change this
Levix2.TitleScreenMap_newGameCommand = function() {
  // Stop music and let the new game take over
  AudioManager.stopBgm();
  AudioManager.stopBgs();
  AudioManager.stopMe();
  AudioManager.stopSe();
}

// Get the map ID we're going to from the parameters
var parameters = PluginManager.parameters("levix2-TitleScreenMap");
var getTitleScreenMapID = function() {
  var titleScreenMapID = Number(parameters["TitleMapID"]);
  if(isNan(titleScreenMapID))
    titleScreenMapID = eval(parameters["TitleMapID"]);
  return titleScreenMapID;
}

// Execute plugin commands to execute title screen commands
var pluginCommand = Game_Interpreter.prototype.pluginCommand;
Game_Interpreter.prototype.pluginCommand = function(command, args) {
    pluginCommand.call(this, command, args);
    if (command.toLowerCase() === 'titlescreenmap') {
      switch (args[0].toLowerCase()) {
        case "newgame":
        case "new":
        case "start":
          Levix2.TitleScreenMap_newGameCommand();
          DataManager.setupNewGame();
          SceneManager.goto(Scene_Map);
          break;
        case "continue":
        case "loadgame":
        case "load":
          SceneManager.push(Scene_Load);
          break;
        case "exit":
        case "quit":
        case "terminate":
          SceneManager.terminate();
          break;
        case "settings":
        case "options":
          SceneManager.push(Scene_Options);
          break;
      }
    }
};

// Decorate the goto method on the SceneManager. If it's a GOTO TITLE then we want to intercept that and replace it with going to the title map
var sceneManager_goto = SceneManager.goto;
SceneManager.goto = function(sceneClass) {
  // If we're going to the title instead go to a map scene that has our title
  if(sceneClass == Scene_Title) {
    // Prepare the title screen for its appearance!
    Levix2.TitleScreenMap_startTitleScreen();
    // Move the player to the title screen map at -1,-1 so the player can't see the party (alt I could make it invisible but :effort: )
    $gamePlayer.reserveTransfer(getTitleScreenMapID(), -1, -1);
    // Now set the next scene the player is going to a map instead of the Scene_Title which we're trying to kill here
    sceneClass = Scene_Map;
  }
  sceneManager_goto.call(this, sceneClass);
};
And this is the content of the event you have to place inside the map you wish to use as your title screen:
Code:
◆Comment:----- INIT -----
◆If:Script:DataManager.isAnySavefileExists()
  ◆Control Variables:#0001 SelectedOption = 1
  ◆
:Else
  ◆Control Variables:#0001 SelectedOption = 0
  ◆
:End
◆Play BGM:Title (90, 100, 0)
◆Tint Screen:(0,0,0,0), 20 frames (Wait)
◆Comment:----- SHOW LOGO -----
◆Wait:10 frames
◆Show Picture:#1, TitleLogo, Center (408,208), (200%,200%), 0, Normal
◆Play SE:Heal5 (100, 80, 0)
◆Move Picture:#1, Center (408,208), (100%,100%), 255, Normal, 60 frames (Wait)
◆Wait:6 frames
◆Comment:----- TY LOGO FLASH -----
◆Play SE:Flash2 (90, 110, 0)
◆Tint Picture:#1, (64,64,-84,0), 3 frames (Wait)
◆Wait:6 frames
◆Tint Picture:#1, (0,0,0,0), 3 frames (Wait)
◆Wait:6 frames
◆Comment:----- SHOW OPTIONS -----
◆Show Picture:#2, TitleNewGame, Center (136,340), (200%,200%), 0, Normal
◆Show Picture:#3, TitleContinue, Center (272,400), (200%,200%), 0, Normal
◆Show Picture:#4, TitleSettings, Center (408,460), (200%,200%), 0, Normal
◆Show Picture:#5, TitleQuit, Center (544,520), (200%,200%), 0, Normal
◆Wait:1 frame
◆Move Picture:#2, Upper Left (136,340), (100%,100%), 255, Normal, 60 frames
◆Wait:20 frames
◆Move Picture:#3, Upper Left (272,400), (100%,100%), 255, Normal, 60 frames
◆Wait:20 frames
◆Move Picture:#4, Upper Left (408,460), (100%,100%), 255, Normal, 60 frames
◆Wait:20 frames
◆Move Picture:#5, Upper Left (544,520), (100%,100%), 255, Normal, 60 frames
◆Wait:20 frames
◆Comment:----- UI LOOP -----
◆Loop
  ◆Comment:UPDATE PICTURES
  :       :(also show common events working)
  ◆Common Event:Title Screen Update Pictures
  ◆Comment:LEFT/RIGHT INPUT
  ◆If:Script:Input.isTriggered("left") || Input.isTriggered("up")
    ◆Play SE:Cursor2 (90, 100, 0)
    ◆Control Variables:#0001 SelectedOption -= 1
    ◆If:SelectedOption < 0
      ◆Control Variables:#0001 SelectedOption = 3
      ◆
    :End
    ◆
  :End
  ◆If:Script:Input.isTriggered("right") || Input.isTriggered("down")
    ◆Play SE:Cursor2 (90, 100, 0)
    ◆Control Variables:#0001 SelectedOption += 1
    ◆If:SelectedOption > 3
      ◆Control Variables:#0001 SelectedOption = 0
      ◆
    :End
    ◆
  :End
  ◆Comment:DECISION INPUT
  ◆If:Script:Input.isTriggered("ok")
    ◆Play SE:Decision1 (90, 100, 0)
    ◆Comment:NEW GAME
    ◆If:SelectedOption = 0
      ◆Fadeout BGM:2 seconds
      ◆Tint Screen:(64,64,-86,0), 10 frames (Wait)
      ◆Tint Picture:#1, (64,64,-86,0), 3 frames (Wait)
      ◆Tint Screen:(0,0,0,0), 50 frames (Wait)
      ◆Fadeout Screen
      ◆Plugin Command:TitleScreenMap start
      ◆Break Loop
      ◆
    :End
    ◆Comment:CONTINUE
    ◆If:SelectedOption = 1
      ◆Plugin Command:TitleScreenMap continue
      ◆
    :End
    ◆Comment:SETTINGS
    ◆If:SelectedOption = 2
      ◆Plugin Command:TitleScreenMap options
      ◆
    :End
    ◆Comment:QUIT
    ◆If:SelectedOption = 3
      ◆Plugin Command:TitleScreenMap terminate
      ◆Break Loop
      ◆
    :End
    ◆
  :End
  ◆Wait:1 frame
  ◆
:Repeat Above
◆Exit Event Processing
I don't know about your plugin, but there is another one called "Hime Pre Title Events" plugin that can allow a map to be used as a Title screen. I had not problems with that one and I also use a lot of Yanfly stuff ( No conflicts) Hope you can find the error here but if not, this may be an alternative solution for a title plugin.
I don't know about your plugin, but there is another one called "Hime Pre Title Events" plugin that can allow a map to be used as a Title screen. I had not problems with that one and I also use a lot of Yanfly stuff ( No conflicts) Hope you can find the error here but if not, this may be an alternative solution for a title plugin.
oh this might be a great replacement actually, thanks alot dude!

Original thread: https://forums.rpgmakerweb.com/threads/levix2-titlescreenmap-error.94641/