STEAL COMMAND

Making a Steal command, and various Steal abilities.

  • Xenomic
  • 04/17/2013 03:32 AM
  • 5237 views
Welcome! You're probably wondering "But Xenomic! We already know about how to make Steal! There's a tutorial here on this site!" (I actually don't know if there is. It might've been the one I used long ago but modified). In which I reply "But grasshopper, there is a bit more you can do to make Steal interesting! Let's look shall we?

I. The Basics

First off, make as many switches as enemies you'll be having max in any given group (for safety reasons, have 8 switches saved for this project). Name them appropriately (Steal 1, Steal 2, etc.). These are the only switches you'll be needing here. Next, have a condition reserved to prevent your character from attacking (name it whatever, but for this example, I'll name the condition Steal). Set the condition to O Turns for recovery over time, and set 100% for % chance to recover each turn. Also set the Action Restriction to "No Action Allowed". This will keep your character from attacking during, before, or after the script and allow the script to run correctly. Finally, make a Battle Command, name it Steal, and set its Archetype to Attack. This is extremely important! Otherwise, you won't be able to target one enemy and will have to run a script for it to target every enemy on-screen. We don't want that! We will also want one variable for this exercise, and name it Random for simplicity's sake. We will want to "Set" it to be a random number between 1-100, done through Variable Operations.

So recap:

1) "Steal" condition, 100% recovery per turn, 0 turns recovery over time, No Action Allowed.
2) Steal battle command, archetype Attack.
3) 8 switches
4) 1 variable, Set to Random Number between 1-100.


II. Steal Command

Now we're going to make the basic Steal command. In your Enemy Groups tab, go to any enemy you wish to test this on (for this exercise, we will be using only one enemy, and its name will be Inferno), and make sure there's at least one battle event available. The next thing to do is to set your Trigger, which will be your character using the Steal command (for this example, it will be Marisa). You should therefore be seeing "{Marisa} uses the {Steal} command" in your Trigger.

Next in your coding area, you'll want to set your Steal condition as the very first bit of coding (you can even set the animation of this in your Conditions tab to whatever you feel fits the animation for Steal). This will prevent the character from Attacking. Next, add your Random variable and have it set to a random number between 1-100. This is needed for the success rate of stealing! After this, we will be setting up a Conditional Branch, and have it checking if Inferno is currently targeted. Inside this branch, make another Conditional Branch to see if switch "Steal 1" is on (have "Execute Custom Event" checked as well). In this branch, set a message "Nothing to steal!" or whatever message you wish to have. If you wish to have the message automated, add "\|\|\^" at the end of the message, without the quotation marks.

In the Else Handler, have a conditional branch checking if variable "Random" is equal to or greater than whatever value you wish for the steal to be (in this example, we'll make it greater than or equal to 60. This effectively makes it so that the steal rate is 40%). Make sure that "Execute Custom Event" is checked here as well! In this branch, have your message saying you stole the item ("Stole a Potion!") or some such, add your item using the Change Items command, and then turn on your "Steal 1" switch. Finally, in the Else Handler for the Steal variable branch, set a message that the player couldn't steal from the enemy (something like "Couldn't steal!"). Make sure to add a "Wait: 0.0 Sec" at the very end!

That's it! For more than one enemy, you will need to add additional conditional branches checking if that particular enemy is targeted, as well as setting the appropriate switches and steal rates for them (the "Steal 2" switch is for enemy #2, "Steal 3" for enemy #3, and so on and so forth).

It is entirely possible to even make it so that the Steal command is a Mug command instead. For this, set everything as normal for the Steal command, and at the very end, remove the Steal condition, and have "Enable Combo" Marisa Fight Repeats 1 Time". You can even set it so that Mug replaces Fight or Mug, but that'll be a tutorial for another day~

Using this method, it is also entirely possible to make it so that there is a % chance to steal MULTIPLE items from the enemy by setting the Random variable to specific values for each item. You can set a conditional branch to check if the Random variable is equal to or less than 25 for a 25% Steal item, and then in the Else Handler for that branch, have another branch check if the variable is greater than 25 (making it a 75% Steal item). You can effectively also make it so you can have as many items as you want (though with this method, you can only steal one of said items at any given time. You'll have to touch up on the coding to make it so that the player can steal multiple items akin to Final Fantasy IX, if that's what floats your boat).

It is also entirely possible to make a Steal Gil ability, also native to ''Final Fantasy IX'', as well as making it only happen once when stealing from an enemy (in which case, the coding goes inside the Steal coding for the item) or repeatable (by making it happen at the very end of the Else Handler for checking if the "Steal X" switches are on, and then setting up the coding as well in the "Steal X" switch branch itself).





III. Bandit

Bandit, which is an ability that comes from "Final Fantasy IX", is an ability that doubles Steal% rates. This is a simple thing to add into the game, if one wishes to add it in. In a common event, have a parallel process checking if a piece of equipment or skill is equipped or used, and if it is equipped or used, then set a variable (called "Bandit" for this exercise) to 1.

Now, set up your Steal command coding as normal (adding in your Steal condition, your Random variable, if the monster is targeted (Inferno in this case), and if "Steal 1" switch is on). Now, in the Else Handler for the "Steal 1" switch, make a conditional branch to check if variable "Bandit" is set to 0, and in here, set your normal steals. Make sure that "Execute Custom Event" is checked for this, and in the Else Handler, have a conditional branch checking to see if variable "Bandit" is set to 1 instead. Here, add in the same coding for your normal Steal, but for the conditional branch checking if variable "Random" is greater than or equal to the normal steal rating (which would be 60 in this exercise), double this value (since 60 is a 40% chance, it must become 20 for it to be a 80% chance). The rest of the coding is the same as the default Steal/Mug command.





Hope that this helped somewhat! I know that there's quite a few Steal tutorials, but figured I'd do one myself, and add a little extra to it. Below is one more additional image, for those who may be interested in such a thing~ Until next time!


Just one of the extra things you can do to spice up your Steal command!




If you have any comments or criticisms about how I should be doing my tutorials, or for future tutorials, feel free to comment.

You can find this and more in one tutorial here: http://rpgmaker.net/media/content/users/18498/locker/RPG_Maker_2k3_Tutorials.txt

Posts

Pages: 1
kentona
I am tired of Earth. These people. I am tired of being caught in the tangle of their lives.
21220
Yes, there is at least one other steal tutorial on RMN! http://rpgmaker.net/tutorials/13/
Huh. THAT'S a completely different and unique way to handle it. I was thinking of doing common events myself, but I wouldn't know how to handle that for battles correctly. Especially since I go the old ye route of fixed % per monster and all that. I know that your tutorial wasn't the one that I used to help me long ago though...maybe it was on another site.

Also, if I may add, couldn't you have set the monster's Agility stat in the battle event, and then set up the rest of the formula for the common event, in the event that you ever decided to change it? That's what I decided to do for most of my battle events that uses formulas like that. I do like how the steal is always randomized too essentially. Nice touch~
kentona
I am tired of Earth. These people. I am tired of being caught in the tangle of their lives.
21220
Oh most certainly it is a good idea to externalize as much of the Battle Event code into common events as possible. I think I wrote this steal skill and code prior to my desire to do that.

But yes, put whatever you can into Common Events so that it is easier to manage.
Yeah, wish I would've discovered and done that when I started doing all of these battle events lol. It's terrible to try and fix coding over 200-400 monster groups, that it is. And gonna get even worse as more is added in. x_x;;

As far as I know on my end, I can't think of anything else to toss into the tutorial (aside from Steal Gil) or possibly showing how to do multiple item steals or something. There's only so much one can do with the command due to how 2k3's system handles things (why are there no ways to target your own allies with a command Enterbrain!? Rawr!), but I guess there's people out there that can get creative with it (such as your formula with the Agility stats for instance being the success rate and the randomized chests).
Pages: 1