Trees and Cliffs collision issue :)

why is it that something that a character normally can walk under let him walk over something that you can not.

i know about bridges but how do i keep my character from walking up clif side with a tree over it .

if i set the top of the tree to X how do i walk pass under the branches Oo? do i use events on places where trees are against something o.o
Yeah, that's a problem.

I wrote a script that fixed this in Ace. I can give you an MV port, but I'd really like to expand it and make it more useful. But this is the version as-is:

Spoiler
//=============================================================================// Terrain Tags// by Shaz// Last Updated: 2015.10.03//=============================================================================/*: * @plugindesc Uses terrain tags to change map behaviour * @author Shaz * * @param Passability Number * @desc Terrain tag to indicate "use passability from tile below" * @default -1 * * @param Counter Number * @desc Terrain tag to indicate "behave like counter (allow interaction)" * @default -1 * * @help This plugin does not provide plugin commands. * * * * */(function() { var parameters = PluginManager.parameters('TerrainTags'); var passageTerrain = Number(parameters['Passability Number'] || -1); var passageCounter = Number(parameters['Counter Number'] || -1); var _Game_Map_checkPassage = Game_Map.prototype.checkPassage; Game_Map.prototype.checkPassage = function(x, y, bit) { if (passageTerrain === -1) { return _Game_Map_checkPassage.call(this, x, y, bit); } else { var flags = this.tilesetFlags(); var tiles = this.allTiles(x, y); for (var i = 0; i < tiles.length; i++) { var flag = flags[tiles]; if ((flag & 0x10) !== 0) // [*]No effect on passage continue; if (this.terrainTag(x, y) === passageTerrain) // Take terrain from tile below continue; if ((flag & bit) === 0) // [o] Passable return true; if ((flag & bit) === bit) // [x] Impassable return false; } return false; } }; var _Game_Map_isCounter = Game_Map.prototype.isCounter; Game_Map.prototype.isCounter = function(x, y) { if (passageCounter === -1) { return _Game_Map_isCounter.call(this, x, y); } else { return _Game_Map_isCounter.call(this, x, y) || this.terrainTag(x, y) === passageCounter; } };})();
Save this as TerrainTags.js in your plugins folder. Then specify the terrain tag to use for any tile where you want its passage setting to be ignored and to look at what's underneath it instead. Then go through your tileset and mark all of those tiles with that terrain tag. Most of them will be the star tiles, but there will also be some that you can walk over, but don't want to use THAT tile's passage settings (like if you were doing a cliff and put a little flower or tuft of grass right on the edge - normally it'd let you walk on/off the cliff at that point).
Yeah, that's a problem.

I wrote a script that fixed this in Ace. I can give you an MV port, but I'd really like to expand it and make it more useful. But this is the version as-is:

Spoiler
//=============================================================================// Terrain Tags// by Shaz// Last Updated: 2015.10.03//=============================================================================/*: * @plugindesc Uses terrain tags to change map behaviour * @author Shaz * * @param Passability Number * @desc Terrain tag to indicate "use passability from tile below" * @default -1 * * @param Counter Number * @desc Terrain tag to indicate "behave like counter (allow interaction)" * @default -1 * * @help This plugin does not provide plugin commands. * * * * */(function() { var parameters = PluginManager.parameters('TerrainTags'); var passageTerrain = Number(parameters['Passability Number'] || -1); var passageCounter = Number(parameters['Counter Number'] || -1); var _Game_Map_checkPassage = Game_Map.prototype.checkPassage; Game_Map.prototype.checkPassage = function(x, y, bit) { if (passageTerrain === -1) { return _Game_Map_checkPassage.call(this, x, y, bit); } else { var flags = this.tilesetFlags(); var tiles = this.allTiles(x, y); for (var i = 0; i < tiles.length; i++) { var flag = flags[tiles]; if ((flag & 0x10) !== 0) // [*]No effect on passage continue; if (this.terrainTag(x, y) === passageTerrain) // Take terrain from tile below continue; if ((flag & bit) === 0) // [o] Passable return true; if ((flag & bit) === bit) // [x] Impassable return false; } return false; } }; var _Game_Map_isCounter = Game_Map.prototype.isCounter; Game_Map.prototype.isCounter = function(x, y) { if (passageCounter === -1) { return _Game_Map_isCounter.call(this, x, y); } else { return _Game_Map_isCounter.call(this, x, y) || this.terrainTag(x, y) === passageCounter; } };})();
Spoiler


Save this as TerrainTags.js in your plugins folder. Then specify the terrain tag to use for any tile where you want its passage setting to be ignored and to look at what's underneath it instead. Then go through your tileset and mark all of those tiles with that terrain tag. Most of them will be the star tiles, but there will also be some that you can walk over, but don't want to use THAT tile's passage settings (like if you were doing a cliff and put a little flower or tuft of grass right on the edge - normally it'd let you walk on/off the cliff at that point).


this is severely nice Shaz i'll use this tell you improve on this one : O

Original thread: https://forums.rpgmakerweb.com/threads/trees-and-cliffs-collision-issue.51419/