[CGMZ] Fallback (Patreon)
Downloads
Content
Instead of crashing if a file cannot be loaded, instead fall back to an error image / sound but allow the player to keep playing.
! SEE BOTTOM OF POST FOR UPDATES !
Hi all, introducing [CGMZ] Fallback! This is a small plugin that aims to prevent a common source of crashing in deployed RPG Maker games.
The Problem
RPG Maker typically tries to load an image and displays an error message with a retry button if the image is not found. This can happen for a number of reasons, such as deploying without including unused files or deleting a file that you thought was unused but was really used. While playtesting, this is typically a good thing as you can fix this issue as the developer. However, for a player of your game, this can stop their progress as they will not be able to get past this error message if the file does not exist.
The Solution
[CGMZ] Fallback solves this issue by allowing you to specify an error or fallback image which will be loaded any time the original image encounters a loading error. This prevents such an error from blocking your players from playing your game. Of course, this is still not ideal and you should still fix the original file loading issue, but at least it will not prevent your players from progressing through your game.
See below images where instead of getting a crash, I see the fallback image where the game could not load the original image:
This version adds fallbacks for the various sound types: BGM, BGS, ME, SE. You will need to specify a fallback file for each possible sound type. In a future update, I will work to create a similar method for images which fallback to different error images by image type.
This version adds fallbacks specifically for images in the faces, characters, enemies (or sv enemies) or sv actors image folders. These images have sizing requirements so a generic image usually looked odd and could be incredibly small and hard to notice. Now you can specify different fallback images for those image types which should make any error files of those types easier to notice.
See below gif for a face and character sprite with different sized images:
Welcome to the beta release for this plugin!
If you are new here, this plugin intercepts file loading errors and instead shows a fall back file. For example, if you set an actor face early on in development and forget to change it later in your events when you change the file name, normally your player would get an error and be unable to continue playing your game. With this plugin, a fallback image loads instead.
This update adds fallbacks for video files, so if a video file encounters an error it will instead show the fallback video file. If using video fallback, you still need to provide both a webm and mp4 video file if your game is going to be played on a platform that does not support webm.