Steal Item

Last Updated: 2012.01.09
Download Link
Github Link

Stealing items has been something that’s became a staple in many RPG’s. It’s a great way for players to acquire new items and a fun way, too. This script adds in the functionality to steal items through either blind stealing, stealing specific types, or stealing even specific items. Furthermore, this script gives the LUK stat more functionality by having it add to the success rate of stealing an item.

Steal skills can be set to steal any kind of item or all specific types of items. These items can range from gold to usable items to weapons to armours. Insert these notetags in either skill or item noteboxes.

<steal: +x%>
<steal: -x%>

This gives the skill a blind steal property, allowing it to steal a random item the enemy has, if the enemy has any items to steal. If the 2nd/3rd tag is used, the success rate will increase by +x% (or decrease).

<steal type>
<steal type: +x%>
<steal type: -x%>

This gives the skill the ability to only be able to steal items of that type. Anything that is outside of that type list cannot be stolen. If the 2nd/3rd tag is used, the success rate will increase by +x% (or decrease). Replace “type” with “item”, “weapon”, “armour”, or “gold”. Insert multiple of these tags to increase the types that can be stolen.

Snatch is a new type of steal that lets the player select which item to steal. This will cause the actor to specifically target that item and that item alone instead of going for all of a particular type in an enemy’s stealable item list. Insert these notetags in skill or item noteboxes:

<snatch: +x%>
<snatch: -x%>

This gives the skill a snatch property, which allows the player to select a specific stealable item on the enemy. If the 2nd/3rd tag is used, the success rate will increase by +x% (or decrease). Snatch only works for single target enemy skills.

<snatch type>
<snatch type: +x%>
<snatch type: -x%>

This gives the skill a snatch property, which allows the player to select a specific selectable item on the enemy. However, this tag limits the types of items that can be stolen. If the 2nd/3rd tag is used, the success rate will increase by +x% (or decrease). Replace “type” with “item”, “weapon”, “armour”, or “gold”. Insert multiple of these tags to increase the types that can be stolen. Snatch only works for single target enemy skills.

Set stealable items in the enemy notebox and their success rates. You can insert multiples of the tags to allow an enemy to have multiple stealable items.

<steal Ix: y%>
<steal Wx: y%>
<steal Ax: y%>
<steal Gx: y%>

Gives enemy a stealable item, weapon, or armour (marked by I, W, or A) x at a rate of y percent. If G is used, that is how much gold can be stolen from the enemy. Insert multiples of this tag to increase the number of stolen items an enemy can possibly have.

When an item is successfully stolen, it will be displayed across the log window. Success rates may be altered by traits. These traits can be applied to actors, classes, weapons, armours, and states.

<steal rate: +x%>
<steal rate: -x%>

Sets the bonus steal rate to increase or decrease by x%.

<steal type rate: +x%>
<steal type rate: -x%>

Sets the bonus steal rate for that specific type of item by +x% or -x%. Replace “type” with “item”, “weapon”, “armour”, or “gold”.

For enemies, they can have a defending stat against steal rates:

<steal rate: -x%>
<steal rate: +x%>

This is the defending modifier used for enemy. All success rate calculations will apply the defending enemy’s steal rate against success.

The various settings in the module can affect how stealing works in your game. You can add in an addition bonus rate dependent on the LUK value of an actor to even having stolen weapons and armours lower an enemy’s stats. Adjust them as you see fit!

82 comments on “Steal Item

  1. Pingback: Eric’s Battler Cut-In! | Division Heaven

  2. Pingback: It’s time to take a break ~ | Yami World

  3. What’s going on at lines 630 and 661? You have two different versions of apply_steal_effect. Isn’t the first one being overwritten? If so, what’s the point of having it there?

  4. Hi, I’m trying to do a Steal-Card skill assuming the enemy can have cards and other items. Steal-Card only allows the actor to steal Card items, not potions etc. How can I do this with this script?

  5. There seem to be a bug with the snatch effect applied to a skill.
    When the battler is about to steal the chosen item, game crashes with this error:
    line 694 undefined local variable or method ‘stealable_items’ for #

  6. I think this is incompatible with the Battle Command List Script for some reason. When I set Steal to be a custom command from the Actor Command Window, it always fails. However, when I select it from a skill list, it works properly.

  7. I am attempting to modify the script to take theif and victim agility into account like this:
    STEAL_BONUS_RATE = “(user.luk/(512.0+user.luk)+(user.agi – enemy.agi))*0.3333”
    What is the correct way to write enemy.agi?

  8. Snatch seems to be bugging out for me, when I select the snatch type skill it brings open the snatch window but it acts as a normal steal, so the skill goes off and I still have the snatch window on my screen as the battle continues, but I can still select items to snatch, but doing so crashes the game. Any fixes?

  9. In my game i intend to have essentially two steal commands. One which is the regular steal, like above, which you have a chance at a low-level item or amount of gold, and a character specific steal command which hits the enemy for 50% of the character’s power, but is garunteed to steal a rare item.

    I read the description above, however, I was a mite overwhelmed. I can understand putting the notetags on the individual enemy, it may take me a while to actually nutter out what to do, but I can get there, if I follow the directions here, but the second steal skill, the one where you are guarunteed a rare item, I do not know how to work it out, as it does not coincide with the regular steal, and you can ONLY steal a rare item. Also, with both steal skills, you cannot choose the item or gold you want to steal, you just select the skill and you have a chance of either gold, an item or nothing (or rare as the case may be).

    I am not a scripter by any means, and I like your scripts because they are, for me, essentially plug-and-play (since the default script settings are what I need anyway), so I am unsure of how to work it out. I can use the note-tags easy enough, becasue I can understand them, as well as events, but actual scripting is a bit above my head.

    Thanks for your consideration.

  10. I am having an issue with this because I did everything and it DOES work expect my character does steal he attacks the enemy 4 times and it keeps saying had no effect and nothing to steal 3 times after I stole the item all in the same time when I use the skill I have the repeats set up to 1 so it will only be used once per turn but the character keeps using it 4 times???

  11. Is there a way with this script to increase the steal success rate as the actor goes up levels? maybe base success off the actor’s luck parameter?


  12. Are the stolen items added directly into your inventory? or added to the end of battle dropped items?
    I’m mainly asking because i’m trying to write a script that checks battle dropped items and auto equips the best matched items to party members.

  13. I’m having a compatibility issue with your Ace Battle Engine script. The steal command works, but there is no way of knowing exactly WHAT I succeeded to stealing. Is there a line somewhere in the ABE or this script that I can edit to make the two work together?

    P.S. Sorry if this is kind of an ignorant question, this is my first time applying custom scripts to an RPG Maker project.

    • Never mind, fixed the problem on my own. Just tacked the Steal script onto the end of the Battle Engine script and it worked like a charm. While I’m sure there’s a programmer-y explanation for why this was the right course of action, my thought process was significantly closer to that of a Patrick Meme. Hooray blind luck!

  14. Seems there’s some sort of small incompatibility with either Victor Engine Animated Battle 1.14 or Victor Engine Actor Battlers 1.06. When a custom pose is attached to the Steal skill via notetags…

    i.e. “action pose: steal”

    Before it’s asked, yes the skill also has the “steal” notetag attached to it.

    However, the skill fails to respond. The character animation takes place, but an item is never stolen, nor is a failure message ever brought up in the battle log. It’s as though the skill does absolutely nothing. If no custom action pose is attached to the skill, it functions as normal.

    REAAAAAAALLY need these scripts to work together. Your steal item script is the best of all of the steal scripts I’ve seen, and giving it up for such a small issue is not an option, keep up the great work!

  15. Can anyone tell me why I can use a ‘Steal’ skill, it plays the animation and the notetags are all in the correct locations, but I do not steal anything at all. Here is how it is set up:

    Skill –

    Enemy –

    Like I said, the animation plays and everything, but no fail or success message is shown. It just acts like a regular skill, ignoring the steal notetag.

    • I apologize, it wiped my text:

      Skill –
      notetags for stealing gold

      Enemies –
      Four tags for varying amounts of gold, copy and pasted off the script itself.

  16. I don’t think I’m installing the script right. When I run a game test, it crashes and has an error. Something about “line 102” which says something about “unless yanfly core engine”. Plleeeaasseee help.

  17. Does this script work for enemies, too? This script gave me the idea to make an enemy that was capable of stealing the party’s random item or gold.

  18. Is it possible to create a variable that stores the number of successful steal attempts? I’ve been able to make a variable to store the number of times the steal skill is used, but I don’t want failed attempts stored. I would like to use the variable in various skills. Thanks.

  19. Is it possible to apply a state to an enemy that will increase or decrease the chance to steal or snatch an item? I’ve tried putting a steal rate: +x% into a state and applying it to the enemy, but that has no effect. If it is actually possible, that would be great, but if not, i can still live with out it.

  20. I think I found some compatibility issues.
    First of all, when I use a skill with the tag, it never works it just keeps telling me I couldn’t steal anything. This happens while using the Victor Engine – Popup Damage script.
    Secondly, when i use a skill with a tag, it opens de item menu, then after choosing the item, the enemy target window opens behind the item window (why?), as if you were going to use the item on that enemy, but nothing happens. Instead it just closes and turns back to the item window in an endless loop. Also I found I cannot cancel de snatch action once I chose it. This happens while using Victor Engine – Active Time Battle Script.

    Give it a try if you want. Hope it’s useful as all these scripts (YEA and VE) are quite popular, I think it’s worth to achieve compatibility.

  21. Hey, amazing scripts so far Yanfly. I had a question with using this combined with the sub jobs script. If i have the Thief as a main, I want them to have a 100% chance to steal something, but if they have Thief as a sub job, I want the success rate to be lowered. Any idea on how I can do this?

    • “Success rates may be altered by traits. These traits can be applied to actors, classes, weapons, armours, and states.?

      Sorry, didn’t see this while I was looking at the page for some reason.

  22. Hi – big fan with a slight problem using this script.

    I managed to set up “steal” absolutely fine. But at a later level that character learns Mug (steal item + do damage) – but the damage overrides the item stolen in the battle log, which muddies the thing up. I don’t need it to show damage in the battle log, because I’m using Victor’s damage popup.

    So, for example, when using Raid (mug):

    Character X did 120 damage!

    Rather than

    Character X stole Magic Potion!

    Is there a script-n00b friendly way to fix this issue?

    Great script anyhow.


  23. Students will do more than listen to Rock and Roll the will learn Rock and Roll’s place in music and American history.

    The movie was bankrolled for a measly $775,000, pocket change for movie
    making in the early 70’s (it has gone on to gross over $118,000,000.
    The Belair version alone arrive at the show-rooms
    with ten two tone cloth and vinyl fabric interior colorings in 1957.

    • Sorry to double post, specifically this works just fine w/o the tactical battle system, but in it, it doesn’t do anything (either with steal, or with snatch). It works awesome on the standard battle system though.

  24. I’m trying to get a 100% [or 99%] chance snatch working.. let’s say the enemy has 3 stealable items with 10% rate. You can steal them with the normal steal skill, but I also want a snatch skill, that steals the selected item with a 100% chance – the problem is the tag doesn’t seem to be working & if I use the normal tag I end up (ofc) with the predefined 10% rate.. how do I get this working? 1 steal skill (10%-succes rate) & 1 snatch skill (100%-succes rate) for the same items?

    • I encountered another bug.. when the steal rate is 99% or 100% it’s still possible that the steal attempt can fail.. that shouldn’t be like that I guess..

  25. I have some problems making the script work. I copy/pasted it from Github.
    If someone could help me…
    And yes, I’m a noob at RPG Maker >u<

    • I just find out what was going wrong. I put 001 instead of 1 in the enemy notebox’s
      stealable items. Sorry for that ^u^”

  26. can someone reply to me please, my problem with this is that i setted it all up but when i use steal nothing happens i set it up as……. [steal I1: 50%] on enemy ……..skill has [steal] [steal item] [steal item: +20%] [steal: +5%] thats the basics right am i missing something? its not coming up with the steal box or saying if i stolen or that steal has failed and like the skill is not counting as a steal command please help i need a steal command and i cant get 1 anywhere else im using side view mode script and no errors are poping up.

  27. I can’t seem to get snatch to work, I’m using Luna engine with the Yanfly battle engine but everytime I try and snatch something it says I couldn’t steal anything.
    I have the tag in the skill notetag and the tag in the enemy notetag. Am I doing something wrong?

    • It seems like it doesn’t work with the battle luna script, is there any way to keep the battle luna script and use this one?

  28. It it isn’t compatible with the yanfly battle system… 1 hour wasted trying to find out what was wrong, and it isn’t compatible with a script from the same dev.

  29. Hello.
    This script is my first try at a custom script – but sadly I can’t make it work. I’m sure it’s down to my inexperience, but would be great if someone could help.

    I have created a Steal skill and in the notes I have added

    In the enemies notes I have added .

    When I try to steal in the battle test – I get a message which says:

    “There was no effect on ….”

    I’ve clearly done something wrong – but is it immediately obvious to someone with more experience than me what that is?


  30. When I add the script to my game, I get an error saying that there’s a TypeError at line 742 and that it “can’t clone NilClass”

  31. This doesn’t work with YanFly’s Battle System. Bummer, I was looking forward to this but I suppose their may be a fix in the future.

  32. Pingback: RMVXA Scripting Proficiency Levels | doublexrpgmaker

  33. Can I add other stats to STEAL_BONUS_RATE formula for exemple: user.agi or
    enemy.agi? is that how i reference to the stats?

  34. I would like a somewhat detailed video tutorral on this script… I can’t seem to make it work no matter what I do.

  35. Is there a way, maybe with a script call, to make an enemy (or the whole troop)’s set of stealable items reset? I found that when an enemy transforms into another enemy, the stealable items for that enemy are based on its original form, and do not ‘update’ along with the transform. Thanks!

  36. Anyone has a demo for this script?
    I don’t understand half of this things :D
    I tried for like 15 minutes and no luck to make it work, especially with the picture where it says “NOTE” it don’t say for what that “NOTE” window is, enemy, player, item, weapon, etc. Would really appreciate it

  37. Reminds me of my first gameplay changing script, Shop Steal.
    It is nowhere near as refined as this. I’ts just neat for other people to have in their game.
    Your’s can be more useful in more projects.

  38. Need some help with this. The steal script works, but the steal message disappears very quickly and I barely get a chance to read what I steal. I tried changing the number in “3.times do @log_window.wait” to a larger number but it didn’t make a difference so I must be doing something wrong. Can anyone help me out?

    • Never mind. Got it working. Not sure what happened, but I closed down my game without saving. When I went back in and made the changes again, it worked.

  39. Need more help. I’m trying to make a ‘snatch’ skill. I put the snatch tag into the skill notes, but the snatch window will not open when I use the skill. I always get a message saying ‘Failed. Couldn’t steal an item.’ Steal works on that same enemy, so I know I set up the enemy’s tags correctly. How do I get the snatch window to pop up?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s