OcRam - Passages plugin (for MV)

Beachsidey0

Villager
Member
Joined
Jun 3, 2020
Messages
15
Reaction score
2
First Language
English
Primarily Uses
RMMV
Tried that on my demo project and worked like a charm. What is the version of RMMV core?

And what about plugin versions? And since both plugins reads event comments both comments should be individual comments (didn't crash though even if it was in same comment just didn't show icon for me).
ps. I placed Galv's plugin below all of my plugins.
Maybe I'll try moving it below your plugins, I think it might just also a leveling set issue I have a region id of 16 when you first enter the place I have my event because its a downstairs location so it could be that. Placing the plugin below all of yours made it work thanks.
 
Last edited:

CloudzChow

Villager
Member
Joined
Oct 8, 2015
Messages
20
Reaction score
7
First Language
Indonesia
Primarily Uses
RMMV
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?
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
623
Reaction score
757
First Language
Finnish
Primarily Uses
RMMZ
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.
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
3,125
Reaction score
1,155
First Language
Dutch
Primarily Uses
RMMV
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?
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
623
Reaction score
757
First Language
Finnish
Primarily Uses
RMMZ
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.
 

CloudzChow

Villager
Member
Joined
Oct 8, 2015
Messages
20
Reaction score
7
First Language
Indonesia
Primarily Uses
RMMV
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^/
 

Warpholomey

Villager
Member
Joined
Aug 19, 2020
Messages
8
Reaction score
5
First Language
Russian
Primarily Uses
RMMV
@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).
 

Attachments

Warpholomey

Villager
Member
Joined
Aug 19, 2020
Messages
8
Reaction score
5
First Language
Russian
Primarily Uses
RMMV
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 = [];
    }
 
Last edited:

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
623
Reaction score
757
First Language
Finnish
Primarily Uses
RMMZ
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.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 3)

Latest Threads

Latest Posts

Latest Profile Posts

trying to make my first public game... stuck trying to make a tileset... oh man.....
Woo! Getting another xray today. Much fun, very irradiated.
If the universe is so big then why won't it fight me?
Does anyone know the name of the game where you play as someone called the batter? I can't remember the name of the game...
Got my R-Tree working /o/


Also here's what it looks like in memory (kind of):


The label on the nodes is the bounding box for all the objects it contains (in this case, the rectangles that make up the walls on the room).

Forum statistics

Threads
107,351
Messages
1,029,031
Members
139,435
Latest member
dazzlingdazed
Top