Skip to content

JavaScript plug-in that animates maps in Porymap.

Notifications You must be signed in to change notification settings

GriffinRichards/Porymap-Animation

Repository files navigation

Porymap Animation

An animation plug-in for Porymap, the Pokémon generation 3 decompilation map editor.

To start using this plug-in, see INSTALL.md.

For help using this plug-in, see GUIDE.md or the FAQ below.

Animation preview

FAQ

What does this do?

This plug-in animates the tiles on maps viewed in Porymap so that you can see what they would look like in-game.

How do I use this?

See INSTALL.md to install the plug-in.

After installation it will run automatically whenever you open your project with Porymap. You can change the plug-in's settings in settings.js. See GUIDE.md for how to create your own animations.

Will this modify my maps/tilesets/project in any way?

No. This does not write to any files and will not make any changes to your project. It will only read the images specified by your animations_<version>.js file and use them to create visual effects in Porymap. These effects can be toggled on or off at any time.

My animation isn't working, what's wrong?

See the troubleshooting list below.

Note: If the plug-in encounters an error it will be logged in Porymap's log file, located at %Appdata%\pret\porymap\porymap.log for Windows or ~/Library/Application Support/pret/porymap/porymap.log for macOS. Anything in the log related to this plug-in will have the prefix ANIM:

  1. Make sure you've followed the instructions in INSTALL.md.
  2. Open Options -> Project Settings, find your entry for animation.js, and make sure the check box next to it is checked. If you don't see an entry for animation.js, go back to INSTALL.md!
  3. Make sure Tools -> Toggle Map Animations is checked. If you don't see Tools -> Toggle Map Animations then the script hasn't loaded! Check Porymap's log file for errors and look over your changes to settings.js and animations_<version>.js for mistakes.
  4. In Porymap select both the Map tab on the top bar, and either the Metatiles or Prefabs tab in the right panel. Animations run in these tab views only.
  5. Have you added animation data? All tile animations must have data in your animations_<version>.js file to animate. The script comes pre-loaded with data for all the vanilla animations, but if you add or change any animations you must update this file accordingly. See GUIDE.md for more information.
  6. Remove the map's name from mapExceptions in settings.js if it has been added there.
  7. If you are still unable to get animations working you can join pret's Discord and ask for help in the #porymap channel.

Why isn't this animation I added working?

For any new tileset animations you've created you'll need to add animation data to tell the plug-in how to recreate it (the plug-in comes pre-loaded with data for all the animations in the original games). Check the GUIDE.md to see how to do this, and make sure your new animation data follows the correct format. If the original game's animations also aren't working see the troubleshooting list above. If you're still stuck you can join pret's Discord and ask for help in the #porymap channel.

Why aren't the border/map connections animating?

Porymap's API doesn't currently support reading tiles from the connecting maps, which is necessary to create animations there. The API does support reading tiles in the current map's border, but animating the border and not connecting maps would look strange. I may decide to add support for this in the future.

Are the animations supposed to slow down/stop when I move the mouse rapidly?

Sort of. This is an issue with Porymap, not the plug-in, and has to do with what happens when the mouse enters a new map square.

Why is this not built in to Porymap?

There'd be a lot of hassle to do it well. It's the kind of thing that can definitely be done much better as part of Porymap, but is probably best left to personal forks where people can implement it in a way that works for them. A plug-in offers some of this freedom without needing to fork Porymap.

Also a bit of author preference here; I wanted an excuse to test the limits of Porymap's API and expand what it has to offer.