Preload Manager

TDDP – PreloadManager lets you preload resources on boot (before the game title screen displays) and on map load (in between map transfers) to ensure resources such as pictures, music and sound effects are preloaded and guaranteed ready to go for player interaction.

By default MV will stream the resources as they are requested. This plugin serves as an alternative for a smoother gameplay experience at the cost of using a bit more bandwidth and load time at the first load of new maps.

This plugin will load all resources in all event pages on the map regardless of if they will be triggered by the player at any time or not. Since page conditions cannot be predicted as they are dependent on player interaction, this is a necessity to ensure the right files are preloaded and ready to go.

Commercial use

Free. See Terms of use page for details.
A big thank you to Degica for making this plugin free for commercial use for everyone!

Preload On Map Load

This parameter toggles whether the plugin should preload all assets found on a map when loading it.

Parameter: Preload On Map Load

OPTION

DESCRIPTION

true (default)

Preloads all assets found on a map when entering/loading the map.

false

Disables the functionality.

Preload System Sound Effects

This parameter toggles preloading all the sound effects specified in the Database System tab (under Sounds) on startup. This will alleviate having to wait for them to start playing, especially when played from a remote server.

Parameter: Preload System SFX

OPTION

DESCRIPTION

true

Preloads all SE files defined in the Database System tab (under Sounds) when starting the game.

false (default)

Disables the functionality.

Preload System Music

This parameter toggles preloading all BGM and ME files specified in the Database System tab (under Music) on startup.

Parameter: Preload System Music

OPTION

DESCRIPTION

true

Preloads all BGM and ME files defined in the Database System tab (under Music) when starting the game.

false (default)

Disables the functionality.

Print Debug to Console

When this parameter is set to true, the plugin will print debug information to the development console (shown by hitting F8) to let you know when and what it’s loading.

Parameter: Print Debug to Console

OPTION

DESCRIPTION

true

Enables printing debug info to the console. Hit F8 to show the console while testing your game.

false (default)

Disables the debug console printing.

Advanced: Preload files on startup

While this plugin will work in a plug-and-play manner without needing any configuration for the majority of users, there is an advanced configuration section available if you open the plugin .js file in a text editor. Look for BOOT PRELOAD CONFIG — ADVANCED USERS line. Below these are configuration settings that let you manually define resources to preload on boot before the game starts.

This may be useful to ensure that things like menu graphics and sound effects are loaded before the menu is called, so that players don’t have to wait through loading screens when navigating different sub menus. Editing this requires a little more finesse than editing parameters, which is why it’s for advanced users. But don’t be afraid to try it out; this documentation should help you along just fine.

Below is an overview of the different fields and how to edit them.

Image Files

Image files come in many different folders, so I decided to make loading these a bit more modular. There are 14 types of images you can preload:

animation

battleback1

battleback2

character

enemy

face

parallax

picture

svActor

svEnemy

system

tileset

title1

title2

These correspond to the type of image you want to preload. Let’s say you wanted to ensure the face graphic of “Actor3.png” got loaded when the game starts up, to ensure it’s ready. You also want to ensure two other images are loaded: “myFile.png” found in the img/system folder and “myOtherFile.png” found within a subfolder of the system folder, namely img/system/subfolder. This is how this configuration would have to look:

This is the start of the section in which you can define images to be preloaded on boot. Do not edit this line.

8

9

10

face:[

"Actor3"

],

Line 8’s “face: [” is the start of the section for loading face images. You can add any section name in this manner from the list of 14 listed above.

Line9, indented for readability, has the value “Actor3”, which makes the plugin load that .png file from the img/faces subfolder. You don’t have to type out the file extension (.png); the plugin automatically fills that in for you.

Line 10 has a closing ( ] ) bracket to match the opening ( [ ) bracket on line 8. Directly after it is a comma, which is required if you are to add more sections below like in the example here.

11

12

13

14

system:[

"myFile",

"subfolder/myOtherFile"

],

Like line 8, line 11 here has “system: [” in it to signify the start of the section for loading system images from the img/system folder.

Line 12 isn’t anything new, we just say we want to load “myFile”.

Line 13 however has “subfolder/myOtherFile” in it. This means that you want to load a file from a subfolder in the img/system folder. This means that the full path actually looks like this: img/system/subfolder/myOtherFile.

Line 14 has that closing bracket and comma again, too.

15

}

This is the closing bracket for the entire section where you can define images to be preloaded on boot. Do not edit this line. You can of course push it downwards by adding more lines above it. Just don’t remove it.

Navigate to the above lines in the source file to add BGM tracks to preload on boot. To add more to the list, simply write the filename (do not specify the file extension) within quotation marks ( “ ) and end the line with a comma ( , ) below the opening bracket ( [ ) and above the closing bracket ( ] ).

Changelog

Patch to fix compatibility with Yanfly plugins that use notetag reading functions that extend DataManager.isDatabaseLoaded()

1.1.0

Added two new options:

Preload On Map Load: Lets you turn off the automatic map preloading

Preload System Music: Lets you preload the Music (BGM and ME) set in the System tab on startup

1.0.3

Bugfix: Crash when in event test mode has been fixed by the plugin disabling itself, as event testing is always performed in the local filesystem mode.

1.0.2

Fixes Html5Audio problems in MV’s defaults so that it actually loads the data and thus fires off events properly too.

1.0.1

Bugfixes for Android publishing and general improvements. Local testplay check of file existence instead of extending audio objects to check for errors (not reliable for Html5Audio). Better load speed by keeping track of already requested images so an image isn’t checked against cache multiple times per map load. Better debugging print of map name and loaded resources.