Author Topic: [XP]Teleport Skill  (Read 473 times)

Offline Wraith89

  • Trained Member
  • *
  • Posts: 41
  • LV: 9
  • Sous le ciel de Paris
    • View Profile
[XP]Teleport Skill
« on: June 25, 2017, 12:47:13 AM »
Teleport Skill

I became bored and I just wanted to share a mechanic I have in some of my projects.


Introduction

A teleport skill is something I saw in Pokemon, particularly the Pokemon Casey (Abra) which uses Teleport to flee from battle, making it tough to catch. It also has an overworld effect where it transports you to the nearest Pokemon Centre. For a while I made a Teleport skill using common events and also gave it an effect where it would fail against mandatory boss battles, but I found the skill to be lacking though escaping without fail on regular monsters is pretty cool. There was no conditional branch to check whether one was in battle or not, so I thought of something to make this actually work in both overworld AND battle! All I needed was a switch, but I felt dumb for not thinking about this in the first place, considering I did the same trick in my transformation skill. This tutorial will show you how to make a teleport skill that works both in overworld and in battle. There might be a script for this, I do not know, but I think it is easier doing this without any.

Also I apologise in advance for Korean in the pictures. The English copy of mine no longer runs on my computer no matter what I do so I will try my best to translate the things to English as best as possible. I believe these also work in latter installations of RPG Makers, since VX/Ace seems to have similar interface with the eventing. I'm unsure about MV however.

What We Need
  • One Actor / Hero (or more, it can be used on anyone really)
  • Two Common Events (Or One)
  • One to Three Switches, depending on what you want to accomplish
  • Three to Four Variables (Zero if you do not need Overworld Teleport)
  • Optional: One New Animation
  • One Extra Page in Troops Tab
  • Literacy

Set Up

First let's just make a simple teleport animation. You can do whatever you want really with this, and if you already have your own animation, you can skip this step. Just take the RTP animation for CAST MAGIC and COPY it. Then expand the list so it can contain more than whatever the default amount is.. I believe it is 100, so make it 101 or whatever, depending on what you have. Then paste the animation so you can copy what was there.

(click to show/hide)

Afterwards, delete the settings above and add in the following instead:

(click to show/hide)

At Frame 2, play SE Teleport 3 always, and "Remove Object" with around 40-50 frames. This really depends on your computer, but I found 40 to be fine on my teleport animation. This is for better effect when "teleport failed" message comes and such. I will be honest and say the Cast Magic animation is lame, but I just picked something very simple for this tutorial. You should enhance these animations on your own.

Now we should set up two Common Events, one called 'Teleport', and another called 'BattleOff', or whatever you wish to call it, like so.

(click to show/hide)

(Note: Second Common Event is not required if you only wish to allow teleport during battle)

Actually, because we are in the Common Events window, we might as well set up the switches we need. First, let us go to the second switch "BattleOff". Make this PARALLEL PROCESS, and where it says "Conditional Switch", click on the arrow. Make Three Switches, one called "Battle", one called "MandatoryBattle", and one called "Dungeon". Once again, you do not need to name it exactly as I named it, just pick what you would like, as long as you remember each switch's functionality. The switch you want the conditional switch as is BATTLE.

(click to show/hide)

(Note: If you only wish to allow teleport during battle, only "MandatoryBattle" switch is needed, unless for some strange reason you want the players to be able to teleport away from bosses).

Common Event 2 ought to look like this:

(click to show/hide)

There is a reason I made Common Event 2. It is to provide the functionality of checking whether one is in battle or not, since the default Conditional Branch did not provide it. Unfortunately, this means we go to the Enemies Group tab, and set up pages to turn on Battle Switch during Battle. Make sure the setting are the following:

Condition: Turn 0 + 0X
Span: Battle
And then turn the switch called Battle ON.

(click to show/hide)

It should in the end look like this:

(click to show/hide)

The green box means, use that COPY box and paste it in the other Enemies Group slots as well. Unfortunately, there is no way around this if you want Teleport to function both during battle and outside battle. If you are not interested in teleporting outside of battle, skip this step, and you do not even need that common event #2 nor the Battle Switch.

Next, we ought to create the actual Skill Teleport. This is what I did:
Scope should be set to all Allies (makes a bit more sense than one person just running away while the rest of the battlers are surrounded by foes).
Use should be set to Always, unless you only wish for Teleport to work in Battles only, then adjust it accordingly.
Common Event should be set to the first common event, which we called "Teleport"

As for the rest of the settings, the MP consumed can be whatever you want. Make sure everything else is 0, except the accuracy, which is 100%. Also, I remember when I first made this, Teleport would make that strange "Miss!" appear after using it. In order to prevent that, we can trick the system. On the status change window, make it so it removes some temporary stat boost status, such as weaken, or sharp, since those are temporary and you are escaping the battle anyways. However, that will come in an adverse effect of removing the status when you make teleport fail against bosses. Maybe you can get rid of Stun, which is an instant 1 turn status, or some dummy status that will never be inflicted. I would recommend the latter.

It should look like this:

(click to show/hide)

(the yellow box are things you can probably configure yourself, and the status change thing, remove a dummy status)

Finally add it to some actor in the class menu. I gave it to Hilda in this tutorial because teleport and magic and things. Mage is an obvious choice, but some people would probably give it to a ninja for smokescreen effect.

(click to show/hide)


Teleport (Battle Event)

Do not test out teleport just yet! We did not finish the Common Event set up!
Going back to Common Event 1, set a Conditional Branch for "Switch Battle ==  ON"

(click to show/hide)

Now if that is true, we need to set up another Conditional Branch inside, where it should be "Switch MandatoryBattle == OFF". This is for those cases it is a special battle, or bosses or any cases where the actor should not be able to flee, unless for some reason you want Teleport to be possible anytime anywhere.

(click to show/hide)

Of course, this means when it is during battle and if it is not a mandatory battle, then... we can add another item to this list: "End Battle", which is in events page 3. As the character teleports, the battle will then end.

(click to show/hide)

However, if it is during battle, but the particular enemy is MANDATORY to fight, then in the "Else" branch, just add something to the effect of "But it failed!" as a message or something. I personally put a Sound Effect and the message "Teleport cannot be used here!", like so:

(click to show/hide)

If you are only looking for Teleport during battle, you are pretty much done here. The first "Battle" switch is pretty redundant in that case, but just in case you want to experiment with having an overworld teleport event, that is there. But now we can test out teleport and see how this works.

(click to show/hide)

And now, I am going to demonstrate Hilda can disappear from creepy Zombie guys, because nobody wants to stay around Zombies too long.

(click to show/hide)

... I am sorry that screenshots really do not do this event justice. But I promise you, if you set up everything correctly, then it should work.

But what about those boss battles? Let us set one up. For example, we can take the Lich monster from the RTP and make him a boss. Go to Enemies Group tab, add the Lich or whoever you want as the boss or an unescapable battle, and like before, add the Battle switch and set condition to "Turn 0 + 0X" and span as "Battle". But now, you must also add "MandatoryBattle" switch to turn on also. The battle page should look like this:

(click to show/hide)

Now I will playtest this and see if things work as intended:

(click to show/hide)

And there we have it! We are unable to escape the Lich fight because of that switch. If this is really all you need for Teleport, you can stop reading here. Otherwise, keep going so we can set up Overworld use of Teleport.

EXTRA: You can use G_G's First Strike Skill code if you wish to make Teleport go first. Just an idea. No, Pokemon does not do this, thankfully.


Setting Up Overworld Event



Now that you set up In-Battle Teleport, how can we make Teleport work outside? It actually involves a bunch of eventing and configuration, but it is not at all difficult.

We have to go back to Common Event #1, Teleport, and add a new conditional branch, within the "Else" branch from "Battle == ON" switch. Basically this means "If this is not a battle, then..."

Within that parameter, add another Conditional Branch "If Switch Dungeon == ON". This will check whether the character is inside a dungeon or not, because generally that is where you would want to teleport.

(click to show/hide)

When one is inside a dungeon, there would be a prompt asking whether you would like to teleport outside. It is not necessary, but I like doing that. I think, though, the MP gets wasted before the prompt comes up, so when you hit NO, you can add "change MP" for actor, but I do not think there is a specific actor MP change. I could be wrong, but I cannot bother to check at the moment. Anyways, I have a prompt with choices Yes and No. I set it up like this:

(click to show/hide)

When YES, we will want to show animation (on page 2 of events) for "Teleport" animation we made a while ago. Now we have to make a set of three variables, one for MAPID, one for MapX, and one for MapY. This ensures the coordinates Teleport is at will change depending on certain settings. We do not want Teleport to ALWAYS take one to a fixed location, unless that is what you want, then you will not need these variables. Also if you would like, make the character face down after the teleportation, which is generally the case in most RPGs, but it is up to you.

(click to show/hide)

Also, this is important, but TURN OFF the Switch for Dungeon after using Teleport, otherwise the character can teleport right after exiting the dungeon, which would be weird. Of course you can set parallel events in every map to turn the dungeon switch off where it does not apply, but do you really want to do that?

(click to show/hide)

I added other things, such as Sound Effect, and changing colour to reset, and removing picture 1. The reason for these is because sometimes I make caves which the colour hues are different, and picture 1 is also a "light picture" that follows my character in certain deeper parts of caves, so I want that removed when teleporting outside. There are other things you can add, or find it unnecessary to use some of my things, but I put those in for my own purpose.

Now in the branch "Else" from "If Dungeon == ON", you can just add the usual "play sound effect" and text "Teleport cannot be used here!" This means if you are not in a dungeon, teleport cannot be used.

(click to show/hide)

Once you have finished this, you are actually finished the Common Events section!


Back In The Overworld

Now to demonstrate overworld functionality, I created two 5 minute maps to show how teleport works. Do not make maps like this, because ledges are not always THIS straight in real life. It looks weird, honestly.

Create a new event in front of the entrance of a cave. We want to adjust the variables, with Map ID to equal the Map ID, Map X to equal to the actor's X position, and Map Y to equal to actor's Y position. Also make sure the event is "Player Touch", so as soon as the player crosses the area, the variables are set up as so. If my explanation is confusing, here are some pictures:

(click to show/hide)

I put it in both sides, the entrance and exit, so that when the player touches either place before entering the cave, she will teleport out in those locations. Now for the actual entrance event, make sure to turn the Dungeon switch ON before transferring the player to the inside of the dungeon. This will make it so that the Teleport skill is enabled while inside the cave, though you can alternatively do this with a parallel event which erases itself inside the cave.

(click to show/hide)

For inside the cave, make sure the Dungeon switch is turned OFF before exiting the dungeon, so that the player is unable to teleport when outside the cave.

(click to show/hide)

Finally the maps look like this:

(click to show/hide)

That extra event in the cave is just a parallel process that changes the cave's colour hue and the likes. Do not worry about that.

Anyways it is time to test things out:

(click to show/hide)

As expected, teleport does not work outside.

(click to show/hide)

Using teleport inside takes us back outdoors to the last location which was done. And yeah, I forgot to set the character to face down, but there is your little demonstration of how Teleport can work in battle and outside battle.



Extra

If you want Teleport to randomly fail during battle, you can make another variable. We will call it "Random". We can go back to the first branch of "Teleport" and add "Set Random" to a random number between 0 to 100, or whatever number of your choice.

(click to show/hide)

Now just make a conditional branch inside MandatoryBattle == OFF section, by setting the random variable's number, and then adding another conditional branch, checking Random's value. For example, here I want Teleport to work 70% of the time, so I made a conditional branch, "If Random is Greater than 30", then Battle Ends. Otherwise, the message, "Teleport failed!" appears.

(click to show/hide)

The Random Number Variable has many applications, and can be used in a lot of other skills and events which can be useful for varied gameplay, so make use of your variables!

That is all! I think this system is relatively easy to use and can have interesting applications. Skill can be added to any amount of characters and it only uses up that same common event for all.

Offline LiTTleDRAgo

  • Astral Trancist
  • *****
  • Posts: 841
  • LV: 514
  • Gender: Male
    • View Profile
    • ~
Re: [XP]Teleport Skill
« Reply #1 on: June 29, 2017, 03:11:10 AM »
Nice tutorial, too bad a lot of things still in korean but overall it's a great tutorial.

Btw, if you use some scripting, I think you can skip some step and save a few switch.

(click to show/hide)

Offline Wraith89

  • Trained Member
  • *
  • Posts: 41
  • LV: 9
  • Sous le ciel de Paris
    • View Profile
Re: [XP]Teleport Skill
« Reply #2 on: June 29, 2017, 07:15:06 PM »
Nice tutorial, too bad a lot of things still in korean but overall it's a great tutorial.

Btw, if you use some scripting, I think you can skip some step and save a few switch.

Good grief. Thank you! I knew there were parameters to check for such conditions, but I do not know enough about the inner mechanics of this. It saves tons of variables and switches, that is for sure.