Map Passage Modding

● ARCHIVED · READ-ONLY
Started by Shaz 20 posts View original ↗
  1. 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.
    Spoiler
    passmod1.png
    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).
    Spoiler
    passmod2.png

    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.
  2. 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.
  3. w8, so the passability is applied to the topmost tile on the specific coordinates right?
  4. 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.
  5. This..could definitely save a lot of time! Thanks for this Shaz~ ( ^ u ^ )=b
  6. Thanks very much for this.  It's going to be so useful!
  7. The things we pixel-movement users miss out on :< Maybe it'll work, still gotta try it...
  8. seita said:
    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.
  9. 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<)/
  10. 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
  11. 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!
  12. Already seen it. Thanks :)
  13. This is really great Shaz, and double useful for parallax mapping! Dammit, now you've made me want to do parallax mapping too...
  14. 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.
  15. 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.
  16. and it doesn't ask you for confirmation
    Consider putting a confirmation window before users blow something up.
  17. 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. >.<
  18. Updated to fix the issue where the passage settings would not be read after compressing the game.
  19. 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