Chaos Project

RPG Maker => RPG Maker Scripts => RMXP Script Database => Topic started by: Heretic86 on April 29, 2015, 08:14:31 pm

Title: [XP] Heretic's Vehicles XP (Boat and Magic Carpet)
Post by: Heretic86 on April 29, 2015, 08:14:31 pm
Heretic's Vehicles XP
Authors: Heretic
Version: 1.01
Type: Custom Movement System
Key Term: Custom Movement System


This script allows you to use full XP RTP Style Vehicles in your game!  You have FULL CONTROL over where these Vehicles can move, their Size, Embark and Disembark, everything!  This script also contains two cubic craptons of features specifically designed for Vehicle Animations, such as Float, Sprite Offsets, Sprite Clipping, etc.

It is strongly recommended to fully examine the detailed Demo for more information.

(Recommended for Advanced Users ONLY!!!)



Spoiler: ShowHide

Boat at Sea

Caterpillar Boarding the Boat

Docking the Boat (uses Multiple Message Windows)

Magic Carpet


This version of the Demo does not contain any Eventing to allow a Caterpillar to board a Vehicle, but the version contained within Heretic's Collection 2.0 does contain Eventing for Caterpillars.


Available in the Demo.


Place below Modular Passable  (,14986.0.html) (Required)
Place below Collision Optimizer (Optional)
Place below Loop Maps (Optional)
Place below Heretic's Caterpillar 2.0+ (Optional)

Required: Heretic's Restrict Tile Passages 1.0+

Recommended: Restrict Bush Passages 1.0+ (For Bush Effects simulating Water)


Not compatible with Titanic or the SS Minnow.  May capsize in heavy weather....

This script is fully compatible with all other Modular Passable scripts written by Heretic.

Credits and Thanks

Author's Notes

This script requires Modular Passable and Restrict Tile Passages.

Restrict Tile Passages is the core of Vehicle Movement on normally Impassable Terrain such as water.

This script is strongly recommended for Advanced Users Only.


I gave a minor update to the Eventing in the Demo to provide an example of how to allow Boats to be parked at shore tiles.  The script was given a new move route command of "jump_forward" because eventing Jumping forward is just tedius.  Also added attr_accessor :opacity for Game_Character because it is used in Move Routes in the Demo.  There were no fatal flaws in the previous version and this is a very minor update.

I'd love to have some Feedback on this script, or at least the Demo for it!  So what do you think?  Is this a good Vehicle System?  How does it stack up against other Vehicle Scripts out there for RPG Maker XP?  I tried a couple of other types of vehicles and was very disappointed.  Do you think this one does it better?  What could be improved?
Title: Re: [XP] Heretic's Vehicles XP (Boat and Magic Carpet)
Post by: Heretic86 on April 30, 2015, 09:54:47 am
Frequently Asked Questions

Spoiler: ShowHide
Q: How do I put the Player on a Boat?
A: Just run a script: enable_vehicle

Q: How do I get the Player off of a Boat?
A: Just run a script: disable_vehicle

Q: How do I change from Boat to Magic Carpet?
A: Run a Script: $game_system.vehicle_type = N
Set N to 0 for Boats and 1 for Magic Carpet

Q: How do I Animate boarding a Boat or Carpet?
A: That is ALL done with Eventing! You can use the Vehicles in the Demo as Templates for your game!

Q: How do I only let the Player move on Water?
A: That is a feature controlled by Restrict Tile Passages script. In the Demo, I use Simple Tile IDs 2, 3, and 4 for Water tiles that the Player is allowed to move on. To Restrict the Player to only these tiles, run a Move Route Script on the Player that reads: @tile_only_move = [2, 3, 4] so the Player can now ONLY move on Water Tiles, or Tiles with these Simple Tile IDs. Yes, those are Autotiles by the way.

Q: How do I let the Player move on Land again?
A: This is also controlled by Restrict Tile Passages script. Just clear out the Tile Only Move property by running a Move Route Script that reads: @tile_only_move = nil

Q: Can I use Restrict Tile Passages to control other Events?
A: You sure can. Put a Coment on the Event that you want to move on a specific tile, lets say Water, and 2, 3, and 4 again, Just make the comment read: \tile_only_move[2,3,4] and that Event can now only move on those specific Simple Tile IDs.

Q: Can you please make me a Starship Vehicle?
A: I wouldn't know where to begin, but I do suspect the real world physics has some things about Spacetime incorrect, such as Magentism actually being a Dimension in Spacetime in an Eleven Dimensional Universe. Most people call me crazy, but it certainly explains a couple of things, such as why Iron is Magnetic, as well as Quantum Entanglement. They also have the concept of Spacetime wrong too. If you think about Spacetime as a Substance, E=MC2 only describes the Viscosity of Spacetime, but they have at least figured out that Spacetime itself can move much faster than light, which explains why the universe is 13.7 billion years old and the universe is 93 billion light years across. Space itself is the thing that is moving. Of course, that is beyond the scope of this Vehicles script. Just find the appropriate graphics and the Labels of Boat and Magic Carpet really don't matter that much.

Q: How do I Disembark anywhere?
A: This one is a bit tricky. Use what is called a "trigger_id". A Trigger ID is the ID of a Map Event that will run every time the Player presses Enter. Set the Trigger ID with a Script: set_vehicle_trigger_id(event_id) when boarding a Vehicle or changing maps. Trigger ID is cleared when you change maps, so every Map that vehicles are to be allowed on will need an Event hidden somewhere that will control the Player's Disembark Animation. This was done so you don't have to use a Parallel Event to Disembark.

Q: How can I keep the Player from Disembarking where they shouldn't?
A: Use a Conditional Branch and run a Script: can_disembark_here? for Crpets and can_disembark_there? for Boats. This will typically be done with a Disembark Controller Event, set by your Trigger ID. Alter the Passages by using the features of the Restrict Tile Passages script on your Disembark Controller (set by your Trigger ID) if you need to in order to control where the Player is allowed to Disembark. This allows you to let the Player Disembark at Beach Tiles, but not other types of land tiles. To do that, simply give your Disembark Controller Event (again, set by your Trigger ID) a Comment that reads: \tile_only_move[2, 3] where Simple Tile IDs are your Shore Tiles.

Q: How do I make the Player Float?
A: Run a Move Route Script that reads: @float_anime = true

Q: Can I make the Float Animation bigger?
A: Run a Move Route Script that reads: @float_max = 8

Q: Can I change the Speed of the Float Animation?
A: Run a Move Route Script that reads: @float_speed = 6

Q: How do I prevent "snapping" when I set @float_anime = false?
A: Run a Move Route Script that reads: @float_smooth = true before setting @float_anime to false.

Q: How do I make the Player Float higher or lower than their actual position?
A: Make changes to @float_base = N. Use Negative Numbers to float Higher and Positive Numbers to float Lower. Carpets will look better when given a Negative Number like 10, and Boats seem to look best with a minimal @float_base, roughly 4. Float Base adjustments are per pixel. So setting @float_base = -11, the Player's Sprite will be shifted UP by 11 pixels.

Q: How do I make the Player look like they are IN the Boat and not just ON the boat?
A: There are two possible answers here, both use Clip Sprite. Run a Move Route Script that reads clip_sprite_to(4, 4) which clips off the bottom four pixels of the Player's Sprite over 4 Frames. Clip Sprite To provides a Transition, which means the first argument is the Target, and the second argument is the Duration. Using clip_sprite_to(target_clip, duration) will Animate the Transition and cause the Sprite to "sink" into the boat. The other way to do it causes a "snap", but is simply @clip_base = 4. This will clip the bottom four pixels off of the sprite.

Q: I have more Questions than you posted answers for! What's up with that?
A: I spent a lot of time putting together a very comprehensive demo that shows you all of the necessary features within the demo itself. That is the purpose of a Demo, which is to Demonstrate how to do many of the questions that you have.

If you have additional questions that are not covered, feel free to post a question and I'll do my best to explain thoroughly.