OcRam - Passages plugin (MZ/MV)

● ARCHIVED · READ-ONLY
Started by OcRam 528 posts Page 19 of 27 View original ↗
  1. OcRam said:
    Thank you all for your messages I have been busy with my RMMZ demo -project, but now that I got it done I'll take a some time to MV again.

    To take a look at compatibility issues I'll need download link to plugin which needs to be fixed. Usually fixes ain't that hard to do, but if it's too much work (more than 4 - 6 hours) I prefer to focus on MZ.

    @CloudzChow try to put <lower> comment on event (make sure it's on active page)

    Ok! I'll try it out! And what do you mean by active page?
  2. CloudzChow said:
    Ok! I'll try it out! And what do you mean by active page?
    By active page I mean the event page that fills all conditions with greatest index. And if event needs to be forced to lower floor level in all pages then <lower> comment must be in all pages.
  3. While it's a been a while, I need to update the plugin to the latest, but also
    have a minor question.

    if the plugin is updates, it is also in the demo updated?
  4. ShadowDragon said:
    While it's a been a while, I need to update the plugin to the latest, but also
    have a minor question.

    if the plugin is updates, it is also in the demo updated?
    Thank you for reminding me to update demo also ;p

    So answer for your question is nope. Demo -project might have older version of some plugins than in plugin list.
  5. OcRam said:
    By active page I mean the event page that fills all conditions with greatest index. And if event needs to be forced to lower floor level in all pages then <lower> comment must be in all pages.
    Thanks! It's now working like a charm ^w^/
  6. @OcRam Hi! I guess I found an interesting bug.

    Engine version — MV 1.6.2, plugin version — 4.10.

    Setup:
    1) Two maps, connected with transfer event.
    2) Player starts on first map.
    3) Second map contains event with "same as character" priority, so it would block passage through it.
    4) This event also have <higher> comment so the player will pass under it.

    Expected behavior:
    1) Start game, go to the menu and save (important), transfer to the second map.
    2) The player's character can go under the event with a comment.

    Actual behavior:
    The event blocks the passage, as if it were on the same level as player.

    Everything works as it should, if you don't save the game first!

    I attach an archive with an example where the bug is reproduced (there are no /img/ and /audio/ folders in the archive).
  7. I did a bit of debugging.

    I'm sure this happening because we are writing the variables _passageHigh and _passageLow to $gameSystem before saving:

    JavaScript:
    // Save passages data
    this.extend(Game_System, "onBeforeSave", function () {
        this.savePassageData(); _this["Game_System_onBeforeSave"].apply(this, arguments);
    });

    …but not clearing them after saving (as we do when starting the map / loading game):

    JavaScript:
    // Refresh tiles on scene changes
    this.extend(Scene_Map, "start", function () {
        _this["Scene_Map_start"].apply(this, arguments);
        if (SceneManager._scene) {
            if (SceneManager._scene._mapFusion) {
                if (!SceneManager._scene._spriteset) {
                    SceneManager._scene._spriteset = SceneManager._scene._mapFusion._spriteset;
                }
            }
        } initSprites(); // <--- Here we call loadPassageData inside initSprites!
    });
    
    …
    
    this.extend(Game_System, "onAfterLoad", function () {
        this.loadPassageData(); _this["Game_System_onAfterLoad"].apply(this, arguments);
    });

    Therefore, the wrong parameters is loaded on map transition.

    It can be fixed, for example, like this:

    JavaScript:
        this.extend(Scene_Save, "onSaveSuccess", function () {
            $gameSystem.clearPassageData(); _this["Scene_Save_onSaveSuccess"].apply(this, arguments);
        });
    
        this.extend(Scene_Save, "onSaveFailure", function () {
            $gameSystem.clearPassageData(); _this["Scene_Save_onSaveFailure"].apply(this, arguments);
        });
    
        Game_System.prototype.clearPassageData = function() {
            this._passageHigh = []; this._passageLow = [];
        }
  8. Warpholomey said:
    I did a bit of debugging.

    I'm sure this happening because we are writing the variables _passageHigh and _passageLow to $gameSystem before saving:

    JavaScript:
    // Save passages data
    this.extend(Game_System, "onBeforeSave", function () {
        this.savePassageData(); _this["Game_System_onBeforeSave"].apply(this, arguments);
    });

    …but not clearing them after saving (as we do when starting the map / loading game):

    JavaScript:
    // Refresh tiles on scene changes
    this.extend(Scene_Map, "start", function () {
        _this["Scene_Map_start"].apply(this, arguments);
        if (SceneManager._scene) {
            if (SceneManager._scene._mapFusion) {
                if (!SceneManager._scene._spriteset) {
                    SceneManager._scene._spriteset = SceneManager._scene._mapFusion._spriteset;
                }
            }
        } initSprites(); // <--- Here we call loadPassageData inside initSprites!
    });
    
    …
    
    this.extend(Game_System, "onAfterLoad", function () {
        this.loadPassageData(); _this["Game_System_onAfterLoad"].apply(this, arguments);
    });

    Therefore, the wrong parameters is loaded on map transition.

    It can be fixed, for example, like this:

    JavaScript:
        this.extend(Scene_Save, "onSaveSuccess", function () {
            $gameSystem.clearPassageData(); _this["Scene_Save_onSaveSuccess"].apply(this, arguments);
        });
    
        this.extend(Scene_Save, "onSaveFailure", function () {
            $gameSystem.clearPassageData(); _this["Scene_Save_onSaveFailure"].apply(this, arguments);
        });
    
        Game_System.prototype.clearPassageData = function() {
            this._passageHigh = []; this._passageLow = [];
        }
    Thank you for the report and fix for it @Warpholomey !

    I can confirm the bug AND fix for it GJ!

    I have now uploaded v4.11 where the bug fix is and credited you in it.
  9. Anyone know how to solve this issue: When placing new events with spawn event the events draw overtop of the character (but pathing and interacting with them is normal). If I leave the map and come back the events are normal, Is there a way to force event refresh or map refresh when placing new events? It seems as tho the plugin is unaware that a new event spawned and doesn't know to refresh.

    1613065031576.png
  10. clitvin said:
    Anyone know how to solve this issue: When placing new events with spawn event the events draw overtop of the character (but pathing and interacting with them is normal). If I leave the map and come back the events are normal, Is there a way to force event refresh or map refresh when placing new events? It seems as tho the plugin is unaware that a new event spawned and doesn't know to refresh.

    View attachment 179164
    Thank you for the message,

    I can recall few cases same as this one and solution was to force spawned event to lower floor level. Example: event._higherLevel = false;

    One solution was to put <lower> event comment to each page in spawned event to force it to lower floor level.

    But above methods doesn't consider if event is spawned to higher floor level...

    On map start plugin iterates through all events and calls autoAssign() method for each event. This can be also called after spawning event.
  11. Doesn't seem to work even tho you can see its set to lower:
    1613069847622.png
  12. clitvin said:
    Doesn't seem to work even tho you can see its set to lower:
    View attachment 179172
    Ok then try:
    $gameMap._events[$gameMap.LastSpawnedEventID()]._higherLevel = true;
    After spawning an event.

    EDIT: _higherLevel = false;
  13. OcRam said:
    Ok then try:
    $gameMap._events[$gameMap.LastSpawnedEventID()]._higherLevel = true;
    After spawning an event.

    EDIT: _higherLevel = false;
    Doesn't seem to work. Even if this bool is set it is still drawing above the player unless I leave the map and come back.
  14. clitvin said:
    Doesn't seem to work. Even if this bool is set it is still drawing above the player unless I leave the map and come back.
    What about?
    $gameMap._events[$gameMap.LastSpawnedEventID()].autoAssign();

    Edit: Sorry remembered wrong.... put this at the end of passages -plugin.
    // Some code here... Game_CharacterBase.prototype.autoAssign = function () { this._higherLevel = autoAssignFloorLevel(this); updateEvent(this); }; }.bind(OcRam.Passages)()); // End of file

    I will add this to next version to call autoAssign method from any character.
  15. OcRam said:
    What about?
    $gameMap._events[$gameMap.LastSpawnedEventID()].autoAssign();

    Edit: Sorry remembered wrong.... put this at the end of passages -plugin.
    // Some code here... Game_CharacterBase.prototype.autoAssign = function () { this._higherLevel = autoAssignFloorLevel(this); updateEvent(this); }; }.bind(OcRam.Passages)()); // End of file

    I will add this to next version to call autoAssign method from any character.
    Yep, This works.
  16. Hey @OcRam - I love the passages plugin, but I'm having issues with one small thing, and I was wondering if there was a fix for it. When I set it up for the character to be able to walk near the walls as seen in the screenshots, it seems to shift a pixel from the wall downward. It is entirely possible I have something setup incorrectly, but I'm wondering if there is a way to fix this? Thank you for the continued support on this plugin and all the work you do. I'll likely be buying a commercial license at some point, even if I don't sell the game because I like the work you are doing so much.

    1615066399453.png1615066406349.png
  17. DragonVine said:
    Hey @OcRam - I love the passages plugin, but I'm having issues with one small thing, and I was wondering if there was a fix for it. When I set it up for the character to be able to walk near the walls as seen in the screenshots, it seems to shift a pixel from the wall downward. It is entirely possible I have something setup incorrectly, but I'm wondering if there is a way to fix this? Thank you for the continued support on this plugin and all the work you do. I'll likely be buying a commercial license at some point, even if I don't sell the game because I like the work you are doing so much.

    View attachment 182060View attachment 182061
    Thank you for the message,

    Which version you are using? As far as I remember this was fixed in some version for MV and never even existed in MZ?

    If you are using latest version can you replicate that in new project?
  18. OcRam said:
    Thank you for the message,

    Which version you are using? As far as I remember this was fixed in some version for MV and never even existed in MZ?

    If you are using latest version can you replicate that in new project?
    Hi! I am using MV, and it's the latest version. I am also using the latest version of the plugin. 1.62 of MV, and 4.11 of the plugin for MV, which is the version in the first post on this thread.

    I haven't been able to recreate it in a new project, so I'm thinking it's a plugin in mine. I am going to test further to see which plugin is causing the problem and I'll let you know a bit later today.

    Thank you for the help!

    EDIT: Well, that was quick to figure out. The plugin causing the issue is Galv's Camera Control.
    MV Cam Control
  19. DragonVine said:
    Hi! I am using MV, and it's the latest version. I am also using the latest version of the plugin. 1.62 of MV, and 4.11 of the plugin for MV, which is the version in the first post on this thread.

    I haven't been able to recreate it in a new project, so I'm thinking it's a plugin in mine. I am going to test further to see which plugin is causing the problem and I'll let you know a bit later today.

    Thank you for the help!

    EDIT: Well, that was quick to figure out. The plugin causing the issue is Galv's Camera Control.
    MV Cam Control
    Thank you for the message,

    If I recall it correctly... Galv Cam control should be supported... Just try to place Passages after Galv CC (or other way around not sure how it was :)).
  20. OcRam said:
    Thank you for the message,

    If I recall it correctly... Galv Cam control should be supported... Just try to place Passages after Galv CC (or other way around not sure how it was :)).
    I've moved it around a bit, putting it under and above the Passages plugins, but this is what happens in either case:

    [embedded media]