Map Passage Modding

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Map Passage Modding v1.0
Shaz
Introduction
This script allows you to override the default passage settings on a map for individual tiles, without affecting other areas that use the same tiles.

Features
- Modify passages while testing your game - override from default, save, and test without having to restart your game
- Works with scrolling maps
- Override passages on individual maps while allowing others to use default settings
- Set 4-dir passability on star tiles (tiles that show above the player)

Screenshots

This map shows default passability (though I've changed the tree skirts to star in the tileset to avoid the chopping head issue).
Note how you can walk right through the tree trunk from side to side, and you cannot walk on or off the bridges from the sides or below, because of the hill passabilities. The water is also impassable.
This map shows passability changes. You can no longer walk over the tree trunks, though the star passability from the tileset still causes it to be shown above the player, and you can go between the hills and the bridges. You can also walk along the edge of the water (though you'd really need another script to make water tiles observe bush tags for that to be really useful - this is just for illustration purposes).

How to Use
This script comes in two parts - a setup script, which is used only for game development and removed prior to release, and a runtime script, which will ship with the game.
Copy both scripts into the Materials section, below other custom scripts.

Play your game, preferably with the console turned on (the script will give you messages when it does important stuff).
Use P to go into Passage Modding mode.
Use the arrow keys to move the player around (they'll be able to walk anywhere, and standard map keyboard functions and event processing will be paused).
Use the X and O keys to change passability on a whole tile (the tile under the mouse cursor).
Click on a passability icon with the mouse to toggle it.
Use S to save your work, then P to exit Passage Mode and test the new settings.

While in Passage Modding mode, the following keys can be used:
- P - toggle Passage Modding mode
- X - make the tile under the mouse cursor impassable
- O - make the tile under the mouse cursor passable
- click on icon - toggle the 4-dir passability of that tile
- C - toggle icon color for dark/light maps
- R - reset passages to last-saved (current map only)
- M - reset passages to map defaults (current map only)
- S - save passage settings (all maps)
- H - print help instructions to the console

Script
Here's the setup script
and here's the runtime script

Compatibility
This script may have issues with other scripts that:
- modify the Game_Map.check_passage method
- modify player movement and collision
- modify the map during runtime (such as tile swapping scripts)

FAQ


Credit and Thanks
- Shaz

Author's Notes
Free for use in commercial games. Give credit.
Remember to remove the setup script prior to release.
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Now people have full control over their passage settings on the map without having to resort to odd hacks to get it done. Makes parallax mapping a lot easier as well.
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
w8, so the passability is applied to the topmost tile on the specific coordinates right?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
To the whole tile. Layers are not used.


Huh ... there's an improvement to be made. Won't change what it does though.


Edit: and fixed. I just made the runtime method grab the flags straight from the table, instead of looping through the layers, since the layer and tile no longer make a difference.


So thanks for asking that, as your question is what made me pick it up.
 
Last edited by a moderator:

Soma

Princess' Guard
Veteran
Joined
Sep 20, 2012
Messages
195
Reaction score
37
First Language
Chopnese
Primarily Uses
This..could definitely save a lot of time! Thanks for this Shaz~ ( ^ u ^ )=b
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
Thanks very much for this.  It's going to be so useful!
 

seita

Donn_M
Veteran
Joined
Feb 6, 2013
Messages
2,254
Reaction score
611
First Language
English
Primarily Uses
The things we pixel-movement users miss out on :< Maybe it'll work, still gotta try it...
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
The things we pixel-movement users miss out on :< Maybe it'll work, still gotta try it...
This script is most effective for large tiles, but becomes less effective once the size goes down.


The only reason 4-dir passage settings are necessary is because the tiles are relatively large (32x32).


If you use something like 4x4 or even 1x1 then you just need to say whether it's passable or not and the player probably wouldn't even notice a difference.
 
Last edited by a moderator:

Archeia

Level 99 Demi-fiend
Developer
Joined
Mar 1, 2012
Messages
15,141
Reaction score
15,473
First Language
Filipino
Primarily Uses
RMMZ
This is really cool! I'd like to try this out sometime :D

Great job Shaz and Hime, I saw the original topic for this earlier >w<)/
 

djDarkX

Retro & Remastered Music Guru
Veteran
Joined
Jan 17, 2013
Messages
2,700
Reaction score
1,901
First Language
Music
Primarily Uses
RMMV
Just tried this out for my Fall event game and it works beautifully!  I needed to change the passability for invisible tiles for parallax maps and this was an easy and quick solution rather than creating a full, empty tileset just for certain passability that I would later not know what they are due to all being the same empty tiles.

Thank you for this!  Love it. 8D
 

shutterbones

Villager
Member
Joined
Oct 19, 2013
Messages
8
Reaction score
2
First Language
English
Primarily Uses
I have been endlessly searching for a script that would do this. I plan on trying to actually paint portions or full maps for my game, which would mean I needed a more organic way to setup passage on my tiles. This is exactly what I needed, so thank you. It works beautifully with my parallax mapping. Very much appreciated!
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Already seen it. Thanks :)
 

Galenmereth

Retired
Veteran
Joined
May 15, 2013
Messages
2,248
Reaction score
2,158
First Language
English
Primarily Uses
N/A
This is really great Shaz, and double useful for parallax mapping! Dammit, now you've made me want to do parallax mapping too...
 

djDarkX

Retro & Remastered Music Guru
Veteran
Joined
Jan 17, 2013
Messages
2,700
Reaction score
1,901
First Language
Music
Primarily Uses
RMMV
Been using it for parallax mapping and it's really key for it.  I did, however, find another bug.  I don't know what happened, but during a play test, the entire map I was testing on and editing the passability on got reset completely and everything before passable all of a sudden, so I had to change everything back to impassable.  It was weird, but so far it was only a one-time thing.  Not sure.  Only other scripts I can think of that would possibly interfere are Yanfly's Region Restrict or OZ OverTiles.  Again, this was a one-time thing so far, but figured I'd bring it up.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Having them reset IS a function of a keystroke, and it doesn't ask you for confirmation. So it's possible you accidentally hit the reset key. Actually there are 2 "reset" keys - one sets back to map settings, and the other resets to last saved (so if you hadn't saved, it'd go back to the map settings as well). It DOES make a note in the console to say it's done that though.


When you save, it saves passages for ALL maps, so you don't have to save one at a time before moving onto another.


The other possibility is that you could have copied the map and deleted the original, in which case there wouldn't be passages for the new/copied map.


If you can ever figure out a sequence of steps to reproduce it reliably (other than the above), I'll certainly take a look at it.
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
and it doesn't ask you for confirmation
Consider putting a confirmation window before users blow something up.
 

djDarkX

Retro & Remastered Music Guru
Veteran
Joined
Jan 17, 2013
Messages
2,700
Reaction score
1,901
First Language
Music
Primarily Uses
RMMV
Nah, didn't copy.  It was an already established map before the addition of your script.  I'm thinking that it reset because I accidentally pressed "M" (I just looked at that.  Never noticed those key mappings before). lol

Okay, so, that was my fault.  Not a bug, you can forget about that then.  Sorry about that. >.<
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Updated to fix the issue where the passage settings would not be read after compressing the game.
 

LeoHalliwell

Villager
Member
Joined
Jan 12, 2014
Messages
27
Reaction score
2
First Language
English
Primarily Uses
One thing I can't seem to do, is put bush passibility with the 4 directions - even with the script. So basically I have this like Japanese screen set up in the middle of the room. I can make the character walk behind it, but I want it so he can't walk under the bottom of the screen. is there any way that works, or not? If not, that's cool. I can live with it. 

tent.png
 

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

Latest Threads

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,990
Members
137,562
Latest member
tamedeathman
Top