mykrme's Secret Passage Plugin Support

DragonVine

May or May Not be Batman
Veteran
Joined
Jun 17, 2014
Messages
344
Reaction score
385
First Language
English
Primarily Uses
Hi folks,

I recently downloaded mykrme's Secret Passage plugin in the hopes that it would make it easier to map buildings that you can walk behind. However, when testing the demo that was provided in the thread, I discovered that it simply did not function, as it didn't allow the hero's sprite to walk behind any walls.

A link to the plugin thread is here: https://forums.rpgmakerweb.com/index.php?threads/secret-passage-plugin.73296/

I've also provided screenshots from the demo that was provided by @mykrme :



As you can see in the second picture, as I walk into the wall, rather than going behind it as the plugin intends, the character simply walks on top of the wall.

I was wondering if someone would be able to look at the code provided in the thread and see what was causing the problem.

Thanks!

EDIT:

Here is the code provided from the plugin itself:

/*:
* @plugindesc The SecretPassage plugin allows you to make an otherwise impassable tile passable through the use of regions.
* @author mykrme
*
* @param Passable
* @desc The region number used for a secret passage - always passable.
* @Default 1
*
* @param Impassable
* @desc The region number used for the surroundings of a secret passage - always impassable.
* @Default 2
*
* @param Invisible
* @desc The region number used for a secret passage - always passable. Character is invisible.
* @Default 3
*
* @Help
*/
var settings = PluginManager.parameters("SecretPassage");
var passable_region = parseInt(settings["Passable"]) || 1;
var impassable_region = parseInt(settings["Impassable"]) || 2;
var invisible_region = parseInt(settings["Invisible"]) || 3;

var _Game_Map_checkPassage = Game_Map.prototype.checkPassage;
Game_Map.prototype.checkPassage = function(x, y, bit) {
var region = $gameMap.regionId(x, y);
switch (region) {
case passable_region:
case invisible_region: return true;
case impassable_region: return false;
default: return _Game_Map_checkPassage.call(this, x, y, bit);
}
};

var temp_mx = 0;
var temp_my = 0;
var tileId_below = 0;
var Tilemap__paintTiles = Tilemap.prototype._paintTiles;
Tilemap.prototype._paintTiles = function(startX, startY, x, y) {
temp_mx = startX + x;
temp_my = startY + y;
tileId_below = this._readMapData(temp_mx, temp_my + 1, 0); // only checks A type tiles
Tilemap__paintTiles.call(this, startX, startY, x, y);
}

var Tilemap__isHigherTile = Tilemap.prototype._isHigherTile;
Tilemap.prototype._isHigherTile = function(tileId) {
var currentTile_invisibleRegion = this._readMapData(temp_mx, temp_my, 5) == invisible_region;
var tileOneBelow_invisibleRegion = this._readMapData(temp_mx, temp_my + 1, 5) == invisible_region;
var playerStandsBelow = $gamePlayer._realY > temp_my;

if (!tileOneBelow_invisibleRegion && playerStandsBelow) { // to show the hat tops
return Tilemap__isHigherTile.call(this, tileId);
}
if (currentTile_invisibleRegion) {
return 0x10;
}
if (tileOneBelow_invisibleRegion && Tilemap.isSameKindTile(tileId, tileId_below)) { // to hide the hat tops
return 0x10;
}
return Tilemap__isHigherTile.call(this, tileId);
};

It can also be found here on his Github.
 
Last edited:

taarna23

Marshmallow Princess
Global Mod
Joined
Jul 20, 2012
Messages
2,402
Reaction score
4,966
First Language
English
Primarily Uses
RMMZ
Did you configure the regions as per the plugin instructions?
 

Pine Towers

Knight Hospitaller
Veteran
Joined
Nov 11, 2015
Messages
467
Reaction score
226
First Language
Portuguese
Primarily Uses
RMMV
You could post on the thread or call @mykrme here to help. Did you configured it correctly? Could you post a picture of your editor? You applied correctly the regions?
 

DragonVine

May or May Not be Batman
Veteran
Joined
Jun 17, 2014
Messages
344
Reaction score
385
First Language
English
Primarily Uses
I did post, but mykrme has not been on the site since January according to his profile. Plus, I was using the demo he provided, and it wasn't even working in that. The screenshots are directly from the demo that mykrme made, and the only plugin in his demo is the Secret Passage plugin. So unless he configured it wrong in his own demo, something is wrong with the plugin. I checked his setup, and everything is exactly as he said it should work.

Here's a screen of the editor:


Here's a screen of the plugin setup, exactly as the author of the plugin had it:

 

DragonVine

May or May Not be Batman
Veteran
Joined
Jun 17, 2014
Messages
344
Reaction score
385
First Language
English
Primarily Uses

DragonVine

May or May Not be Batman
Veteran
Joined
Jun 17, 2014
Messages
344
Reaction score
385
First Language
English
Primarily Uses
@taarna23 - I just realized you posted in the original thread awhile back. Did the plugin work for you at all? Were you able to test it?
 

taarna23

Marshmallow Princess
Global Mod
Joined
Jul 20, 2012
Messages
2,402
Reaction score
4,966
First Language
English
Primarily Uses
RMMZ
I did not test it at the time - I had other things on my plate. I did try it now, and I see the issue that you see. I've had a look, but I have no idea how this thing works, so I can't fix it.
 

DragonVine

May or May Not be Batman
Veteran
Joined
Jun 17, 2014
Messages
344
Reaction score
385
First Language
English
Primarily Uses
Ah, that's a shame. I hope someone else is able to take a look. Thanks for checking!
 

DragonVine

May or May Not be Batman
Veteran
Joined
Jun 17, 2014
Messages
344
Reaction score
385
First Language
English
Primarily Uses
Bump. I've decided to attach is js code in a spoiler tag if someone is able to take a look. I can't figure it out.
 
Last edited:

DragonVine

May or May Not be Batman
Veteran
Joined
Jun 17, 2014
Messages
344
Reaction score
385
First Language
English
Primarily Uses

DragonVine

May or May Not be Batman
Veteran
Joined
Jun 17, 2014
Messages
344
Reaction score
385
First Language
English
Primarily Uses

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

Latest Threads

Latest Posts

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,093
Members
137,587
Latest member
Usagiis
Top