jcruise

Villager
Member
Joined
May 4, 2020
Messages
28
Reaction score
8
First Language
English
Primarily Uses
RMMV
I'd like to do just that, but I don't know how to call setObjFloorLevel from outside the code.

Using the comments doesn't work. My guess is that the comments are processed when the map is loaded. OcRam's plugin doesn't parse an event page if it's spawned from another map.

But yeah, finding a way to call setObjFloorLevel from my common event would be great

I had a similar issue, and I fixed it with this script call:

$gameMap._events[$gameMap.LastSpawnedEventID()]._higherLevel = false;
 

Kirby44

Veteran
Veteran
Joined
Mar 6, 2017
Messages
159
Reaction score
24
First Language
french
Primarily Uses
RMMV
I had a similar issue, and I fixed it with this script call:

$gameMap._events[$gameMap.LastSpawnedEventID()]._higherLevel = false;
I noticed this var too, but for an obscure reason it doesn't work (it only works when I use the plugin command)

When I try to change the _higherLevel variable like you did, it doesn't work, but mysteriously when I add $gameMap.LastSpawnedEventID() as a possible parameter for the floor_level like if I specify 1000 as event ID, it will take the last spawned event (implying I edited the code) it works :LZSskeptic:
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
7,214
Reaction score
2,850
First Language
Dutch
Primarily Uses
RMMV
@Kirby44 the one I give is used in a scriptcall.
but if that doesn't work either as it isn't parsed, only @OcRam might
know the answer, if its a bug or need a compability patch, he should
knows it.

he might be busy as well for other plugins, creating, fixing, extending.
so I hope he can answer you.

depending on the plugin (YEP, Galv, or another one) which can help
dig to the problem.
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
7,214
Reaction score
2,850
First Language
Dutch
Primarily Uses
RMMV
@AnnoyingDog please press F8 or F12 and screenshot the console log.
maybe your event as well where it crashed.

as "undefined" is something you didn't add or removed while still reading it.
so the object don't exist.
 

Kirby44

Veteran
Veteran
Joined
Mar 6, 2017
Messages
159
Reaction score
24
First Language
french
Primarily Uses
RMMV
Hi, I was coding a quick "Interaction balloon" for my game, and Passages plugin seems to interferate somehow with balloon animations.

When I finally tested it, I noticed that the balloon restarts a few frames after being started for the first time. I made sure the "wait" instruction was checked, and even added a few "wait" commands in my common event. After alot of investigation. It looks like disabling the Passages plugin solves the problem.

The code is simple, walking next to an event triggers a switch, leaving it will disable it. I also made sure that the actual function that enables/disables the switch also only occurs once.

My code is attached to this post. To reproduce the glitch you can create a fresh project with Passages plugin and my file, then put an event with an "Action Button" Trigger, like a chest, for example.

Then create a parallel common event like this :

1673623303606.png

You should notice that the balloon is staggering during the first loop like this :



Then, disabling Passages plugin solves the problem.


EDIT : I made several tests to understand what is exactly causing this behavior. It happens ONLY when the ballon is called by event command, when Game_Interpreter.prototype.command213 is the caller. Any other means of summoning a balloon will work.
 

Attachments

  • InteractionBubble.js
    3.4 KB · Views: 2
Last edited:

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
6,011
Reaction score
5,977
First Language
English
Primarily Uses
RMMZ
Hi OcRam, I was considering using your MZ passability plugin in a commercial title I'm developing for, but the Core plugin causes a crash if you try loading a save game after installing it. Is there any way it can be modified to create missing objects at runtime to prevent save issues?
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
949
Reaction score
1,105
First Language
Finnish
Primarily Uses
RMMZ
Hi OcRam, I was considering using your MZ passability plugin in a commercial title I'm developing for, but the Core plugin causes a crash if you try loading a save game after installing it. Is there any way it can be modified to create missing objects at runtime to prevent save issues?
Thank you for the message,

Sure Core can be modified. I just need more info about which objects we are talking about.

@Kirby44 I'll check issue you mentioned when I get some dev time.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
6,011
Reaction score
5,977
First Language
English
Primarily Uses
RMMZ
Thank you for the message,

Sure Core can be modified. I just need more info about which objects we are talking about.

@Kirby44 I'll check issue you mentioned when I get some dev time.
Basically anything that's created upon starting a new game and referenced by the plugin during runtime. The main dev needs plugins that can be inserted at any point in development without affecting any existing saves so that the playerbase isn't forced to start again when we update.
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
949
Reaction score
1,105
First Language
Finnish
Primarily Uses
RMMZ
Basically anything that's created upon starting a new game and referenced by the plugin during runtime. The main dev needs plugins that can be inserted at any point in development without affecting any existing saves so that the playerbase isn't forced to start again when we update.
Thank you so much for this feedback!

I've added "Save without plugins installed then load that file after plugins are installed" to my test protocols! :)
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
6,011
Reaction score
5,977
First Language
English
Primarily Uses
RMMZ
Thank you so much for this feedback!

I've added "Save without plugins installed then load that file after plugins are installed" to my test protocols! :)
Excellent. If you can provide me with a version of the passability plugin for MZ that supports existing saves it'll be pretty much an instabuy for our solution to creating bridges.
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
949
Reaction score
1,105
First Language
Finnish
Primarily Uses
RMMZ
Excellent. If you can provide me with a version of the passability plugin for MZ that supports existing saves it'll be pretty much an instabuy for our solution to creating bridges.
Hi,

Ok now I have tested save before ANY OcRam was installed. Then installed all OcRam -plugins and loaded said save file without any issues.

As hot fix: In OcRam core replace "Game_System.onAfterLoad" function with code below (I will include this in next update):
JavaScript:
    this.extend(Game_System, "onAfterLoad", function () {
        OcRam._justLoaded = true;
        _this["Game_System_onAfterLoad"].apply(this, arguments);
        if (Imported.OcRam_Audio && !this._bgsBuffers_OC) this._bgsBuffers_OC = [];
        AudioManager.playBgs2(this._bgsOnSave2);
        AudioManager.playBgs3(this._bgsOnSave3);
        if (Imported.OcRam_Followers) {
            if (!this._currentMembers) this._currentMembers = $gameParty._actors;
            if (this._followersFollow === undefined) this._followersFollow = true;
        } if (Imported.OcRam_Events) {
            if (!this._liftPullPushEvents) this._liftPullPushEvents = [];
            if (!this._spawnedEvents) this._spawnedEvents = [];
        } if (Imported.OcRam_NPC_Scheduler) {
            if (!this._scheduledEvents) this._scheduledEvents = [];
            if (!this._linkedSchedules) this._linkedSchedules = [];
        } OcRam.plugins.forEach(p => { OcRam[p].loadPluginData(this); });
    });

Please let me know if this solved issues you had. Didn't notice any direct issues with Passages though...


EDIT: Sorry forgot these also...
JavaScript:
    this.playBgs2 = (bgs, pos) => {
        if (!bgs) { this.stopBgs2(); return; }
        if (this.isCurrentBgs2(bgs)) {
            this.updateBgsParameters2(bgs);
        } else {
            this.stopBgs2();
            if (bgs.name) {
                this._bgsBuffer2 = this.createBuffer("bgs/", bgs.name);
                this.updateBgsParameters2(bgs);
                this._bgsBuffer2.play(true, pos || 0);
            }
        }
        this.updateCurrentBgs2(bgs, pos);
    };

    this.playBgs3 = (bgs, pos) => {
        if (!bgs) { this.stopBgs3(); return; }
        if (this.isCurrentBgs3(bgs)) {
            this.updateBgsParameters3(bgs);
        } else {
            this.stopBgs3();
            if (bgs.name) {
                this._bgsBuffer3 = this.createBuffer("bgs/", bgs.name);
                this.updateBgsParameters3(bgs);
                this._bgsBuffer3.play(true, pos || 0);
            }
        }
        this.updateCurrentBgs3(bgs, pos);
    };
 
Last edited:

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
6,011
Reaction score
5,977
First Language
English
Primarily Uses
RMMZ
Hi,

Ok now I have tested save before ANY OcRam was installed. Then installed all OcRam -plugins and loaded said save file without any issues.

As hot fix: In OcRam core replace "Game_System.onAfterLoad" function with code below (I will include this in next update):
JavaScript:
    this.extend(Game_System, "onAfterLoad", function () {
        OcRam._justLoaded = true;
        _this["Game_System_onAfterLoad"].apply(this, arguments);
        if (Imported.OcRam_Audio && !this._bgsBuffers_OC) this._bgsBuffers_OC = [];
        AudioManager.playBgs2(this._bgsOnSave2);
        AudioManager.playBgs3(this._bgsOnSave3);
        if (Imported.OcRam_Followers) {
            if (!this._currentMembers) this._currentMembers = $gameParty._actors;
            if (this._followersFollow === undefined) this._followersFollow = true;
        } if (Imported.OcRam_Events) {
            if (!this._liftPullPushEvents) this._liftPullPushEvents = [];
            if (!this._spawnedEvents) this._spawnedEvents = [];
        } if (Imported.OcRam_NPC_Scheduler) {
            if (!this._scheduledEvents) this._scheduledEvents = [];
            if (!this._linkedSchedules) this._linkedSchedules = [];
        } OcRam.plugins.forEach(p => { OcRam[p].loadPluginData(this); });
    });

Please let me know if this solved issues you had. Didn't notice any direct issues with Passages though...


EDIT: Sorry forgot these also...
JavaScript:
    this.playBgs2 = (bgs, pos) => {
        if (!bgs) { this.stopBgs2(); return; }
        if (this.isCurrentBgs2(bgs)) {
            this.updateBgsParameters2(bgs);
        } else {
            this.stopBgs2();
            if (bgs.name) {
                this._bgsBuffer2 = this.createBuffer("bgs/", bgs.name);
                this.updateBgsParameters2(bgs);
                this._bgsBuffer2.play(true, pos || 0);
            }
        }
        this.updateCurrentBgs2(bgs, pos);
    };

    this.playBgs3 = (bgs, pos) => {
        if (!bgs) { this.stopBgs3(); return; }
        if (this.isCurrentBgs3(bgs)) {
            this.updateBgsParameters3(bgs);
        } else {
            this.stopBgs3();
            if (bgs.name) {
                this._bgsBuffer3 = this.createBuffer("bgs/", bgs.name);
                this.updateBgsParameters3(bgs);
                this._bgsBuffer3.play(true, pos || 0);
            }
        }
        this.updateCurrentBgs3(bgs, pos);
    };
I'll give that a shot and report back.
 

Gianma

Veteran
Veteran
Joined
Jul 7, 2017
Messages
55
Reaction score
35
First Language
Italian
Primarily Uses
RMMV
Hi Ocram, I think we have a problem on MV. I can reach an event set on "player touch" trigger by pressing action button from near tiles, even if the event is "below the player". I made a new project with only Ocram Passage plugin at last version. If plugin is disable the problem is gone.
If plugin is active the problem came back. Strange thing: the first map auto created with new project it's not affected from this problem.
 

Aafyre

Warper
Member
Joined
Apr 21, 2020
Messages
1
Reaction score
0
First Language
English
Primarily Uses
RMMV
Hi, complete newbie here, so I'm sorry if this is a dumb question. I'm trying to implement a ledge-hopping mechanic which requires events to be placed over cliff edges. This means that some of the events end up on a lower region tile (16) while the player is still on a higher floor.

I believe the <higher> comment tag should allow me to interact such events, but it doesn't seem to do anything. The <trigger_always> tag does allow me to interact with them, but then they can also trigger once I'm on the lower floor, which is a bit awkward.

Am I doing something wrong? Or, perhaps, is there a comment tag that does the reverse of <trigger_always>, only triggering the event from a different floor? Thanks.

UPDATE:
Nevermind. I played around with the event priorities and triggers a bit and found out that I can place the events on the player's tile, rather than next to him. Everything seems to be working now. Like I said, newbie here :wink:.

UNRELATED UPDATE:
I actually encountered a slight glitch with this plugin. Not sure if it's been mentioned yet, or if there's any way to fix it. On looping maps, once you pass the point where the looped portion is no longer visible, every B-E tile marked with region 18 flickers, revealing only the A tiles beneath them. In some instances, you can even stand still at such a point, then those tiles stay hidden until you take another step.

I suppose I could adjust my map so that there are no passages within viewing distance of the loop point, but that's a bit less than ideal. Anyways, thanks again for this otherwise very useful plugin.
 
Last edited:

Latest Threads

Latest Profile Posts

Been hard at work trying to make more tactical aspects of the game a reality, if all goes well the Player, depending on the faction they choose, will;
Suffer little to no penalty for escaping battle.
Be able to manually speed up resource gathering.
Steal Special projects from rival Factions.
Slowly but surely the game dev streams accomplish the goal.... actually finishing the game. :LZSexcite:



Going to start in about 15 minutes or so for anybody interested. And of course you know you are, well at least you know now because it's been stated that you are, and obviously anything randomly stated on the Internet must be true right? :LZSwink:
Rag-Tag Team Unite!!!
Fantast4.png

The questionable end result of a fun shared desing challenge together with @spillycat xD
9 days left for Harold Jam... hope it's not too late to start gam mak

Forum statistics

Threads
129,751
Messages
1,204,833
Members
170,840
Latest member
PeachyNCream
Top