@lavra: I could, but I feel like that would be even messier. I am looking at some alternatives to the current structure, but I feel like preloading specific files on boot is sufficiently advanced enough to warrant a somewhat less user-friendly approach.
@blubberblubb: You're right, that's actually an oversight. I'm adding it to the list of stuff I'm working on for this now. Hopefully I can have these changes implemented very soon :)
Preload Manager
● ARCHIVED · READ-ONLY
-
-
At the risk of appearing pushy, could you please take a look at the "skip title" script I posted? Considering you made this plugin it might be fairly easy for you to spot why it's incompatible.@lavra: I could, but I feel like that would be even messier. I am looking at some alternatives to the current structure, but I feel like preloading specific files on boot is sufficiently advanced enough to warrant a somewhat less user-friendly approach.
@blubberblubb: You're right, that's actually an oversight. I'm adding it to the list of stuff I'm working on for this now. Hopefully I can have these changes implemented very soon :)
And also I hope to receive a tip on how to turn off map preloading completely and just use the "on the boot" loading for some selected files. :) Like maybe I can throw a simple "return;" somewhere. Or remove a few functions. I don't know. -
Version updated to 1.1.0
Changes:
- 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
This is a minor update, more of the promised functionality is in the works and coming. But I wanted to get this minor update out there now for @Cinnamon and @blubberblubb :)
@Cinnamon: I could not reproduce your error with the skip title plugin from Yami that you linked. If you use the latest version of the PreloadManager plugin, does it still occur? -
Thank you so much for the update! It'll prove extremely helpful once I can get the bug problem solved.
Regarding that, my apologies, I was completely misdirected.
The issue is with this line:
if(!DataManager.isDatabaseLoaded()) return setTimeout(this._performPreload.bind(this), 5);line 435 from PreloadManager
It causes the following "snowball effect":
Uncaught TypeError: Cannot read property 'note' of nullrpg_managers.js:1606 file:///E:/Aaron/RPG%20Maker/OH!%20RPG!/js/plugins/YEP_CoreEngine.js 547/E:/Aaron/RPG%20Maker/OH!%20RPG!/js/plugins/YEP_CoreEngine.js:547 Uncaught TypeError: Cannot read property 'note' of nullYEP_CoreEngine line 547 is this:
DataManager.processCORENotetags1 = function(group) { for (var n = 1; n < group.length; n++) { var obj = group[n]; var notedata = obj.note.split(/[\r\n]+/); obj.maxItem = Yanfly.Param.MaxItem;"var notedata = obj.note.split(/[\r\n]+/);"
If I comment out your line of code then it works, but I'm sure that's not the right way to "fix" it.
DataManager.isDatabaseLoaded calls DataManager.processCORENotetags1 which produces the error.
Yanfly.Core.DataManager_isDatabaseLoaded = DataManager.isDatabaseLoaded;DataManager.isDatabaseLoaded = function() { if (!Yanfly.Core.DataManager_isDatabaseLoaded.call(this)) return false; this.processCORENotetags1($dataItems); this.processCORENotetags1($dataWeapons); this.processCORENotetags1($dataArmors); this.processCORENotetags2($dataEnemies); this.processCORENotetags3($dataActors); this.processCORENotetags4($dataClasses); return true;};Not really sure why, though...
Edit: I can "fix" it by adding a catch:
DataManager.processCORENotetags1 = function(group) { for (var n = 1; n < group.length; n++) { var obj = group[n]; if (obj == null) { return; } var notedata = obj.note.split(/[\r\n]+/); obj.maxItem = Yanfly.Param.MaxItem;But I figured you might know more before I start messing with Yanfly's script and yours. xD -
@Galenmereth
Well, I was using your script, but I was trying to use it in a ported project. (VXA to MV)
The problem is that I use some maps a lot, with a lot of scenes and files, and the game just takes to much time to load everything. I was thinking, some files do not have to be preloadead, and I think it would be nice to be able to "tag" what files I want to preload, and what files I do not want. And when I want to load what, maybe with a varible condition. (after number X, "these" files will be loaded) That way only the most important ones are loaded. Is that possible? Is that viable? haha... Cause now I'm doubting that I said any smart thing. :p -
@ArkDG I think that'd get really messy to keep track off honestly. But an option you have is to use the advanced configuration for preloading files on startup, then preload the important ones then, and disable automatic map preloading. Still, I'll see if there's any feasible way to do something like this.
-
Do you want me to upload a tiny size version of an empty project with the 2 scripts so you can check it out?
Whenever you reply but ignore my post it kinda throws me off. Not sure if I should wait until you post another reply or if you just skipped it. x) -
@Cinnamon: Usually when I reply to something else first it's because I need more time for the other question(s), as in this case. But I may also have overlooked it, so don't worry about poking me again on it, or PM'ing me as a reminder :)
I've been looking into it a bit and I'm searching for the best approach. Personally I feel like it's not a good idea to put the notetag parsing logic in the isDatabaseLoaded() function as is the case in YEP_CoreEngine, because this function shouldn't do data alteration. It's used to check whether all database items are loaded and should be safe to call continuously, but with the notetag parsing in place it seems to me it repeats said parsing every time you call it and the database is loaded.
I haven't been able to reproduce the error you're getting on my end, so if you could send a tiny project file over it'd be helpful. I see what the problem is, but it puzzles me why it's happening since the notetags shouldn't be read when the database is not fully loaded. Most likely I'll have to call it a bug in YEP_CoreEngine, but I'll take a closer look at your project file first :) -
I'm not sure, if it's the right way to do it, but if i need to parse notetags at startup, i usually alias Scene_Boot.prototype.terminate, since it's guaranteed to only execute once per game, after everything has been loaded.I've been looking into it a bit and I'm searching for the best approach. Personally I feel like it's not a good idea to put the notetag parsing logic in the isDatabaseLoaded() function as is the case in YEP_CoreEngine, because this function shouldn't do data alteration. It's used to check whether all database items are loaded and should be safe to call continuously, but with the notetag parsing in place it seems to me it repeats said parsing every time you call it and the database is loaded.
-
Hey guys!
Sorry for my absence, I thought I "fixed" it by placing this at the top of each of Yanfly's notetag functions:
if (obj == null) { // checks for the error OH RPG PreloadManager return; }BUT then my weapons, items and armor started changing. For example, weapon ID 7 would become weapon ID 2 (nooooo idea why). This only happens 66% of the time! The Yanfly x Preload bug doesn't ALWAYS happen, for whatever reason.
I don't think this is a bug with either script specifically, more an incompatibility error? Either way I really hope one of you can help out. Let me cut down the project as much as I can and send it over. Give me 30-60 mins.
Edit: Sent! -
None of those objects should be empty though. Does these errors only occur when you have both our scripts enabled? As in, if you turn off Preload Manager from me, do the errors disappear? Please do send it over however, and I'll take a closer look :)I don't think this is a bug with either script specifically, more an incompatibility error? Either way I really hope one of you can help out. Let me cut down the project as much as I can and send it over. Give me 30-60 mins.
-
True! I'm sorry, normally I can debug myself, but I really don't understand what is happening.None of those objects should be empty though. Does these errors only occur when you have both our scripts enabled? As in, if you turn off Preload Manager from me, do the errors disappear? Please do send it over however, and I'll take a closer look :)
If I turn Preload off, the error goes away.
If Preload is on, I get an error 50% of the time.
I've PMed it to you.
Thanks again for checking it out. :) -
Version updated to 1.1.1
- Patch to fix compatibility with Yanfly plugins that use notetag reading functions that extend DataManager.isDatabaseLoaded()
-
Just a tiny poke, if PreloadManager was also preloading the BGM from battle trigger events in a map, any sort of delay for all usual BGM situations would be gone (if combined with the WebAudioCache). So as soon as you add this detail, there will no longer be a need to tell people "the sound delays are fixed with those plugins ... except for battle music".
Also I would recommend always preloading the title music piece in the initial loading screen (even when "Preload System Music" is set to false and the other BGM pieces set in the "System" tab wouldn't be loaded). Multiple of my testers thought there was no music on the title menu of my demo game and skipped ahead because of the usual delay of non-preloaded music starting, so I see no good reason not to have it ready once the title screen shows. People are usually quick to skip past the title if there isn't anything exciting going on, so the music should definitely play instantly to draw them in with some awe and amazingness to have them admire the title screen for a few more moments before they hurry into the game. -
I am having an issue where the loading screen is infinite on mobile devices with my game. I made sure all the resources are there. Also when disabling the preload the system music it seems to finally run. However right when the game starts I get unable to load image face/person1.png. I have the file in the location and I have no issue on the pc version. I tried to remedy this by going into the advance config and adding in that file specifically but now the loading time is back to infinite. Disabling the script resolves the issue. I can try and get whatever debug information is needed however there is 0 issues on loading the game on windows 10 with the console enabled.
-
I have the same infinite loading screen as above on PC. But it only seems to happen about 5-10% of the time. Other times the maps load fine.
However it's still often enough that I cannot use the plugin as over the course of playing the game for an hour you're guaranteed to eventually get a hang. -
I'll take a look at these bugs. I think what @clitvin is experiencing on PC is the fact that occasionally the webkit wrapper just fails to load a resource, and I haven't made a failsafe for this yet because I was sort of hoping it would be solved by official patches sooner rather than later. Since it hasn't, I'll have to figure out a way to deal with this more cleverly. So in other words I'm aware of it :)
When it comes to mobile devices, I really have no clue what might be the problem there. Is it possible to get access to the debug console on mobile when testing the game to see if it spits out any error messages of relevance? -
EDIT: Ok as it turned out, my previous gripe was with MV itself, which just isn't playing my ME sound during local testing, works fine on live.
-
Does this plugin have any effect on Animations? I'm using the Show Animation command during an Event on a particular map, and the first time it plays, it stalls for a second, but every other time after that it runs smoothly. It would be nice if I could somehow force the Animation to preload along with everything else.
-