[CGMZ][Alpha] Swimming for RPG Maker MZ
A downloadable plugin
Hi all, this plugin will allow your actor to swim through shallow water. You can use this to open up a ton of additional exploration opportunities in your maps.
For the swimming itself, you can have a custom bush depth, movement speed while swimming, and a swim sprite that differs from the actor's walk sprite. You can also have a splash animation when the player first enters the water, and there are sound effect options for splash in and splash out.
Swimming uses boat passability by default, but there are also region and terrain tag passage options available for swimming to give you more control over where the player can swim. Regions can also be used to control where the player can enter/exit the water from, in case you don't want them to be able to start/stop swimming anywhere there is water.
This plugin also comes with a few different plugin commands. These are:
- Change Swim Access - allow the player to swim (or disable their ability to swim)
- Change Swim Dash - enable/disable the player's ability to dash (swim faster) while swimming
- Change Swim Image - change the actor's swim sprite
- Attempt Swim - Attempt to start or stop swimming for the player
- Force Swim - Force the player to start or stop swimming
Here is a gif preview of how swimming looks:
As this is still Alpha, there are a few areas I want to improve before this enters Beta stage of development. These areas are:
- Diving
- Touch UI support
- Options to display a shadow under the player while swimming
- Sound effect while moving in water (swimming footsteps)
Do you have any other ideas for how this plugin could be improved? Leave a comment below or in the suggestions channel of my Discord!
PLEASE READ BEFORE PURCHASING:
Please be aware that you can access this as well as all of my other Alpha plugins for $5 on my Patreon: https://www.patreon.com/CasperGamingRPGM
This is posted to Itch.io since some people only use Itch and are not aware my Patreon and all of my beta/alpha plugins exist, or want to have everything in one convenient location (itch.io), or do not want to do a monthly subscription.
Casper Gaming's Beta/Alpha plugins are treated as an "early access" and will eventually be free for everyone once they are fully released, though this process can take months/years. By purchasing in beta/alpha, you are able to provide early feedback/suggestions which are more likely to make it into the final fully released plugin.
Please see terms of use here: Terms of Use
Requires CGMZ Core plugin: CGMZ Core
Happy RPG Making!
Status | Released |
Category | Tool |
Author | Casper Gaming |
Made with | RPG Maker |
Tags | RPG Maker |
Average session | A few minutes |
Languages | English |
Inputs | Keyboard, Mouse, Gamepad (any), Touchscreen |
Links | Homepage, Community, Patreon, YouTube |
Purchase
In order to download this plugin you must purchase it at or above the minimum price of $5 USD. You will get access to the following files:
Development log
- Version Alpha R2 Release NotesApr 24, 2024
Comments
Log in with itch.io to leave a comment.
Hi,
does this plugin also work with rpg maker mv?
Hi, my CGMZ plugins are only for MZ
hey, I bought this plugin but I’m running into a bit of a problem. I’m trying to get the player to swim under a bridge by having the bridge set above the player, but the bridge is blocking the way. However, it works when walking underneath rather than swimming. What should I do?
EDIT: I understood that the reason he can't swim under is because the tile isn't considered water. Is there any way I can change that? Or that I can make him go straight through it?
Hi, yes, use the Swim Passable Regions or Swim Passable Terrain Tags parameter.
Brilliant! That worked, thanks for your quick answer!
How do I add swimming images for the character?
I tried to use this image that I made:
but for some reason, the result when trying to use it is this:
Hi, did you add a $ at the start of the filename?
Hello. I bought the plugin but i'm unable to get the splash animation to work. The character just disappears for 30 frames. Is there some kind of prefix I need to add to the name of the image file? Is there a functional demo that I can refer to because I can't seem to get it to work.
Hi, my alpha/beta plugins don't have demos made for them in most cases as they are subject to change quite a lot. There is no prefix you need to add to the file.
Could you try using this image for your splash animation with the settings: Animation frame width/height = 48, Animation speed = 10, Animation Time = 30
And let me know if it works for you?
Hi. Thanks for the response. So I tried with that image and I'm still not able to get the animation to work. Here's an image of how I have it set up.
Should I try with an older version of the plugin?
Just to make sure it's not some kind of plugin conflict, could you try turning off all non-CGMZ plugins or if that's not feasible trying to reproduce this in a blank project with just CGMZ plugins?
Also, could you open up the dev tools console and let me know if it has any warnings or errors in there?
These are the error messages I was getting when opening the game with dev tools.
Hi, sorry for taking so long to get back to you. Those warnings are normal in the console, and can be ignored.
I am honestly not sure why it's not working for you and Itch comments are not very easy to troubleshoot problems like this, so I have went ahead and made a demo project for this plugin. Hopefully the demo clears things up for you, let me know if you are still having problems with the splash animation after looking at the demo.
Hi. Great plugin, but for some reason I cannot get it to work. Whenever the player approaches the water, pressing the "swim" key does nothing at all.
Hi, without being able to see your parameters, it is hard to know what you have set up that might be going wrong.
First thing to check is to make sure the player has access to swimming. You can either start a new game with the "Swim Access" parameter under "Initial Settings" set to true, or you can use the plugin command "Change Swim Access" and set it to "true".
Some less common issues you may be running into:
If you have set the "swim key" to a capital letter, you will need to hit shift+that letter.
If you have a Swim Enter or Exit region set, the player will only be able to enter/exit swimming while standing ON those regions.
Check that the boat can pass the tiles you are trying to swim on. Swimming gives the player boat passability, and the plugin will check if the boat can move on the tile you are trying to swim on. Depending on how your tileset is set up, your water tiles may not be boat passable.
I have this error : Utils.parseSoundEffectJSON is not a function so the plugin dosent work it seem to have an error in the code ...
Hi, you need to install [CGMZ] Core and/or make sure it is placed above all other [CGMZ] plugins. All of my plugins have this requirement.
This is already done i'm not new with your plugins they are incredibles haha.The only way i find to make the game launch with your plugin is to delete the ' parseSoundEffectJSON ' section from the code and it work but no swim animation, no splash sound and no animation splash but the player jump in water and walk normally. And for the swim animation , when i select my character sprite sheet, is the plugin simulate the swim animation ?
I see, if you already have [CGMZ] Core, then you need to update it if you are getting that error. The parseSoundEffectJSON function comes from my core as multiple plugins of mine have sound effect parameters and I got tired of re-writing the same code over and over again to parse it out into a usable object for the actual code, so I put it in the core. The current version is 1.14.1 but that function was added in 1.12.0 of my core. If you delete the sound effect setup then no sound effect will be able to play.
The splash animation works via spritesheet animation. What does your Splash Animation, animation frame width/height/speed/time parameters look like?
For swimming animation, you will need to create a swim sprite sheet for each actor, and then if that actor is the lead party member it will change their character walking sprite sheet to the swimming sprite sheet while they are swimming and change it back when they stop swimming.
No splash animation
Could you try putting this image as your Splash Animation parameter, and then using the settings Animation Frame Width = 48, Animation Frame Height = 48, Animation Speed = 10, Animation Time = 30? Maybe having a working example you can modify would be easier, so you can see how it works and edit it as needed for your own game.
Also, were you able to get the other issues you were having solved? If you already deleted the parseSoundEffectJSON lines from the code, you will probably need to revert those changes or just redownload the plugin after updating my CGMZ Core to get sound effects working again.
I will update cgmz first i think this is the problem
This is amazing! I was just racking my brain recently about how I could implement swimming into my game and you come to the rescue! :D I extra love how you want to implement diving too which is something I wanted to do. Similar to how in Animal Crossing New Horizons the player can dive when they swim over a shadow and get a sea creature.