Missing actor images in menu for first open with Yanfly Grid-Free Doodads

Discussion in 'RPG Maker MV' started by Gabor, Aug 6, 2018.

  1. Gabor

    Gabor Villager Member

    Messages:
    10
    Likes Received:
    2
    First Language:
    Hun
    Primarily Uses:
    RMMV
    Hi!

    I use RPG Maker MV 1.5.0 with Yanfly Engine Plugins - Grid-Free Doodads.
    However it is one of the best plugin for the maker, I have strange bug because it.
    Maybe you know something about it.

    If the plugin is on then actor images always missing from the menu for first open:

    missing_images_in_menu_for_first.png

    After this first menu open, the actors appear fine:

    second_menu_open.png

    If actor(s) joined to the party later (after a menu open) then the first time when they should appear in the menu (first menu open with them) , they are missing too:

    later_joined_actors_first_open.png

    I guess image handling could be the problem, but maybe somebody solve this before me.

    Thank you for all help.
     
    #1
  2. Andar

    Andar Veteran Veteran

    Messages:
    28,317
    Likes Received:
    6,437
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    Check if your yanfly plugins are in the correct order, a wrong order often has strange effects .
     
    #2
  3. Gabor

    Gabor Villager Member

    Messages:
    10
    Likes Received:
    2
    First Language:
    Hun
    Primarily Uses:
    RMMV
    It happens even if Yanfly Grid-Free Doodads is the only plugin...
    Actually this plugin can work without Yanfly core engine, but the bug is still there.

    plugins.png
     
    #3
  4. Andar

    Andar Veteran Veteran

    Messages:
    28,317
    Likes Received:
    6,437
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    1) some of your yanfly plugins are in the wrong order, so please correct that.
    2) have you started a new game after switching off plugins, or did you continue a saved game?
    Part of the plugin configuration is saved together with the games savefiles, and that can reactivate plugins or cause errors if you load an older save after changes in the plugin manager (adding or removing or reordering or deactivating or activating - doesn't matter, any change might count).
     
    #4
  5. Gabor

    Gabor Villager Member

    Messages:
    10
    Likes Received:
    2
    First Language:
    Hun
    Primarily Uses:
    RMMV
    1) I guess you have right about plugins sort order, but everything is fine except this. Beside if there are no other plugin then order doesn't play.

    2) No it was a pure new game not a continued one.

    But after you mentioned it, I remembered the continue page have the same issue.

    If you start a new game and open the continue page then actors images are missing like in menu:

    load_first.png

    After the second open everything is fine just like at menu:

    load_second.png

    The point is actor's images are missing first, then they will be shown.
    It should be some image cache or handling stuff I guess.

    I just start a new project with only doodads plugin and it have the same problem:

    new_1.png

    new_2.png
    new_3.png
     
    #5
  6. Andar

    Andar Veteran Veteran

    Messages:
    28,317
    Likes Received:
    6,437
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    what is the entire filepath? from drive letter to index.html?
    This could be cause if that filepath does not follow networking rules, because then the stupid windows override would only partially make them available but the direct access would still fail.
     
    #6
  7. Gabor

    Gabor Villager Member

    Messages:
    10
    Likes Received:
    2
    First Language:
    Hun
    Primarily Uses:
    RMMV
    It is really simple: d:\rpgmaker\Mithrill\

    path.png
     
    #7
  8. Gabor

    Gabor Villager Member

    Messages:
    10
    Likes Received:
    2
    First Language:
    Hun
    Primarily Uses:
    RMMV
    Last edited: Aug 7, 2018
    #8
  9. Aloe Guvner

    Aloe Guvner Walrus Veteran

    Messages:
    1,559
    Likes Received:
    977
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    There is a function in the core scripts: "ImageManager.isReady" that checks whether any images are currently being loaded (images don't load instantly unless they have been cached). When the scene is changing, for example Scene_Title --> Scene_Load or Scene_Map --> Scene_Menu, it should not change scenes until the Image Manager is ready.

    In the transition from Map to Menu, for example, the images of your party member faces are requested before the scene changes.
    • If it is the first time opening the menu, the faces are not loaded into the cache yet. So the Image Manager works on that, and the scene should not change until the Image Manager is finished with that work (isReady == false while loading, then isReady == true after done loading)
    • If it is after the first time opening the menu, the faces are already in the cache, so the menu can open instantly (isReady == true)
    In the Grid-Free Doodads plugin, Yanfly overwrites "ImageManager.isReady" with a new function. It is possible that there is a bug in this overwrite, where it reports as being ready when in fact, it is not ready.

    I don't know enough about this part of the core scripts to suggest a solution, however, this could be the first place to investigate.
     
    #9
    Gabor likes this.
  10. Gabor

    Gabor Villager Member

    Messages:
    10
    Likes Received:
    2
    First Language:
    Hun
    Primarily Uses:
    RMMV
    Yep that is it!
    If I rem this part from the plugin then actor faces are fine.

    Is it essential for Yanfly doodads plugin? Everything seems fine without it...

    if (Utils.RPGMAKER_VERSION && Utils.RPGMAKER_VERSION >= '1.3.0') {

    ImageManager.isReady = function() {
    for (var key in this.cache._inner) {
    var bitmap = this.cache._inner[key].item;
    if (bitmap.isError()) {
    console.log('Failed to load: ' + decodeURIComponent(bitmap.url));
    this.cache._inner[key].item = this.loadEmptyBitmap();
    bitmap = this.cache._inner[key].item;
    }
    if (!bitmap.isReady()) {
    return false;
    }
    }
    return true;
    };

    } else { // Version 1.2.0 and Under

    ImageManager.isReady = function() {
    for (var key in this._cache) {
    var bitmap = this._cache[key];
    if (bitmap.isError()) {
    console.log('Failed to load: ' + decodeURIComponent(bitmap.url));
    this._cache[key] = this.loadEmptyBitmap();
    var bitmap = this._cache[key];
    }
    if (!bitmap.isReady()) {
    return false;
    }
    }
    return true;
    };

    }; // End Check
     
    Last edited: Aug 7, 2018
    #10
    Davidson_Audio_ likes this.
  11. padr81

    padr81 Guy whose game is taking too long. Veteran

    Messages:
    639
    Likes Received:
    638
    First Language:
    english
    Primarily Uses:
    N/A
    It's had this bug for ages.
     
    #11
  12. Gabor

    Gabor Villager Member

    Messages:
    10
    Likes Received:
    2
    First Language:
    Hun
    Primarily Uses:
    RMMV
    Ages?
    I didn't find info about it, but my mistake.
    Any link or code to fix it if cut it out isn't enough?
     
    Last edited: Aug 7, 2018
    #12
    Davidson_Audio_ likes this.
  13. padr81

    padr81 Guy whose game is taking too long. Veteran

    Messages:
    639
    Likes Received:
    638
    First Language:
    english
    Primarily Uses:
    N/A
    I'm waiting on my buddy (a good coder to fix it) as I only just updated my game to 1.6.1, I first noticed this on the change to 1.5.1 some maybe its a conflict with another plugin or it you update your game from one version to another. I fixed it on 1.5.1 by removing one of the SRD plugins, with 1.61 it happens alot. Almost every time you try to equip from a shop window.
     
    #13
  14. Gabor

    Gabor Villager Member

    Messages:
    10
    Likes Received:
    2
    First Language:
    Hun
    Primarily Uses:
    RMMV
    My project is a fresh start on 1.5

    But if I remove this part from plugin then all works fine. Maybe Yanfly will notice this because I can't reach the guy through email or even a post...
     
    #14
  15. padr81

    padr81 Guy whose game is taking too long. Veteran

    Messages:
    639
    Likes Received:
    638
    First Language:
    english
    Primarily Uses:
    N/A
    He's got a thread over in js plugins with a very specific way to send/report bugs to him.
     
    #15
  16. Davidson_Audio_

    Davidson_Audio_ Villager Member

    Messages:
    20
    Likes Received:
    2
    Location:
    Niwot CO
    First Language:
    English
    Primarily Uses:
    RMMV
    The same bug happened to me
    I used Gabor's edit to doodads and character faces load proper and picture gallery MOG, in the menu as well was having issues thanks for the solution you a life saver Gabor!!!!
     
    #16
  17. Archeia

    Archeia Level 99 Demi-fiend Staff Member Developer

    Messages:
    14,560
    Likes Received:
    14,240
    Location:
    Game Dev Salt Mines
    First Language:
    Filipino
    Primarily Uses:
    VNM
    I just want to bump this up and clear the misinformation about the "bug fix" because it's not really a bug fix.

    First, this issue with old doodads won't happen if you use Desktop Optimization.
    So Yanfly Grid Free Doodads has been updated to v1.10 to fix loading issues for people using version 1.5.0+ and not using the YEP_X_CoreUpdatesOpt and desktop optimization setting. https://t.co/XUcR41SPOX

    The reason this bug is happening is this:
    If for any reason you are experiencing problems with Desktop Optimization with another plugin that says a resource is missing when it isn't and want its other benefits, here's another fix:

    Code:
    ImageManager.loadNormalBitmap = function(path, hue) {
      var key = path + ':' + hue;
      var bitmap = this.cache.getItem(key);
      if (!bitmap) {
        bitmap = Bitmap.load(decodeURIComponent(path))
        bitmap.addLoadListener(function() {
            bitmap.rotateHue(hue);
        });
        this.cache.setItem(key, bitmap);
      }
      return bitmap;
    };
    Just put it in an empty js file and load it in plugin manager. I attached a premade one for those who are lazy/don't know how to do it.

    But overall, I hope this will help people and also educate on the backend of RM.
     

    Attached Files:

    #17

Share This Page