MV - OC Ram Layers loading a save file issue.

● ARCHIVED · READ-ONLY
Started by Random Panda 8 posts View original ↗
  1. Hi All,
    Maybe someone else has run into an issue with this plugin as well. But when I try to load a save I get this error:

    Image 1
    Error 1.pngError 2.png

    I tried turning off all other plugins and installing in a fresh project, but no luck. I also get a similar error if I try to load a save in the OC Ram demo project too. It only seems to be on a map where OC Ram Layers is calling a map. Has anyone else had this error and if so, have they found a way to fix it?
    Any help would be greatly appreciated. Oh I am using the MV version. If there is any other information needed to help. Let me know.

    Thanks!
  2. I'm assuming the save is also created in that fresh project with the plugin, and not something from before?

    If so, my guess would be that maybe it's just not finding that file it's looking for? The error seems to imply it was trying to load something but failed, because there was nothing there. How does your config for the plugin look like, where are you keeping the files for it and how are they named (including extensions)?
  3. Mac15001900 said:
    I'm assuming the save is also created in that fresh project with the plugin, and not something from before?

    If so, my guess would be that maybe it's just not finding that file it's looking for? The error seems to imply it was trying to load something but failed, because there was nothing there. How does your config for the plugin look like, where are you keeping the files for it and how are they named (including extensions)?
    Hi, thanks for the reply. Yeah, everything was fresh. I would load a new game, save, then tried to load that save. And that would not load. One time it did load, but I didn't do anything differently and I couldn't get it to do it again. Like I said, this also happens on the Demo Package OC Ram made for this plugin.

    As for my set up, here is what I have in the plugin set:
    Plugin Config
    Untitled-1.png

    This is the folder location and file names:
    img/maps/DavidAptApartment201.png
    img/maps/DavidAptApartment201TOP.png

    And this is the event where the map is set up:
    Game Event
    Untitled-2.png

    It loads the room properly if I start a new game in it, or enter the room from another room. It only fails to load on loading a save.
  4. So, one of your problems is that you're using "Erase event" - this erasure will be saved alongside everything else happening on the current map, so this event won't run when you load the game. You'd probably want to use a plugin that allows you to run common events on map load or something like that.

    But either way, that advice probably won't help you if your game crashes on load. Now, I remember having some problems with OcRam Layers wrt game loading at the start of my project, and that I did something to fix it, but I'm not entirely sure what it was xD

    Looking at the code, there is one notable change: adding a conditional on line 1106 to only set the layer if the image name isn't empty. Try replacing

    setLayer(l._z, l_old_name, l._scrollX, l._scrollY, l._opacity, l._fixedToMap, 255, "loop:" + l._loopX + "," + l._loopY, "anim:" + l._animFrames + "," + l._animRate, "offset:" + l._offsetXY[0] + "," + l._offsetXY[1]);
    with
    if (l_old_name) setLayer(l._z, l_old_name, l._scrollX, l._scrollY, l._opacity, l._fixedToMap, 255, "loop:" + l._loopX + "," + l._loopY, "anim:" + l._animFrames + "," + l._animRate, "offset:" + l._offsetXY[0] + "," + l._offsetXY[1]);
  5. Mac15001900 said:
    So, one of your problems is that you're using "Erase event" - this erasure will be saved alongside everything else happening on the current map, so this event won't run when you load the game. You'd probably want to use a plugin that allows you to run common events on map load or something like that.

    But either way, that advice probably won't help you if your game crashes on load. Now, I remember having some problems with OcRam Layers wrt game loading at the start of my project, and that I did something to fix it, but I'm not entirely sure what it was xD

    Looking at the code, there is one notable change: adding a conditional on line 1106 to only set the layer if the image name isn't empty. Try replacing

    setLayer(l._z, l_old_name, l._scrollX, l._scrollY, l._opacity, l._fixedToMap, 255, "loop:" + l._loopX + "," + l._loopY, "anim:" + l._animFrames + "," + l._animRate, "offset:" + l._offsetXY[0] + "," + l._offsetXY[1]);
    with
    if (l_old_name) setLayer(l._z, l_old_name, l._scrollX, l._scrollY, l._opacity, l._fixedToMap, 255, "loop:" + l._loopX + "," + l._loopY, "anim:" + l._animFrames + "," + l._animRate, "offset:" + l._offsetXY[0] + "," + l._offsetXY[1]);
    That did it! You are a life saver!!!
  6. Nice, I'm glad it worked :)

    To think about it, you seems to be using this plugin for basically the same thing as I am: having a background and foreground layer permanently assigned to each map and loading it whenever the map is loaded. If you're interested I've also written some code for doing this automatically on map load (so there's no need to make events that handle it on every map, just naming the files in a specific way).
  7. Mac15001900 said:
    Nice, I'm glad it worked :)

    To think about it, you seems to be using this plugin for basically the same thing as I am: having a background and foreground layer permanently assigned to each map and loading it whenever the map is loaded. If you're interested I've also written some code for doing this automatically on map load (so there's no need to make events that handle it on every map, just naming the files in a specific way).
    Wow, yeah that would amazing, if you don't mind sharing it.