YEP.66 – Steal & Snatch

Yanfly Engine Plugins is a plugin library made for RPG Maker MV, a wonderful piece of software to help you make that role playing game of your dreams. You can find out more about RPG Maker MV here.

You can grab the plugin here:
English Dropbox
English Mirror

Stealing is a commonly used mechanic found in many traditional RPG’s. This plugin enables you to replicate that mechanic and add more depth upon it.


Introduction


Stealing is a commonly used mechanic found in many traditional RPG’s. This plugin enables you to replicate that mechanic and add more depth upon it.

Enemies can have multiple items to steal in addition to their default drops. When an actor goes to steal from an enemy, the actor has a percent change for the steal attempt to be successful. If successful, the actor grabs a random item from the stealable items pool and the party gains the said item.

In addition to stealing, there is a new mechanic called ‘Snatch’. While stealing allows your actors to grab random items from the enemy, snatching lets your actors target the item they want to steal and focus only on that item alone.

Another feature for this plugin is that stealing a piece of equipment can now ‘debuff’ the enemy. If an actor steals a sword that gives 10 ATK, the enemy will lose 10 ATK. This feature can be turned off. Also new (and optional) is the ability to steal the enemy’s drop items. Enemies won’t always necessarily drop their items after being defeated, but stealing from them directly will allow your players to secure those items. Once an item is stolen, it will not drop again at the end of battle.


Notetags


Use the following notetags to set up your steal effects.

Enemy Notetags:

<Steal Item x: y%>
<Steal Weapon x: y%>
<Steal Armor x: y%>
<Steal Gold x: y%>
Gives the enemy the respect item to be stolen. x is the item’s ID while y% is the rate at which the item can be stolen from.

<Steal Potion: y%>
<Steal Short Sword: y%>
<Steal Round Shield: y%>
If you decide to use names instead of item ID’s, you can use the above notetag format. If you have multiple items with the same name, priority will be given to the item with the highest item ID in the order of items, weapons, and then armors.

<Steal Resist: +x%>
<Steal Resist: -x%>
This is the enemy’s inherent resistance against stealing.

Skill and Item Notetags:

<Steal>
<Steal: +x%>
<Steal: -x%>
This enables the skill/item to have steal properties. Actions with steal properties will have a chance of stealing an item. This notetag applies to all item types. If you use the notetag versions with +x% or -x%, the steal rate is increased/decreased by x%.

<Steal Item>
<Steal Item: +x%>
<Steal Item: -x%>
This enables the skill/item to have steal properties. Actions with steal properties will have a chance of stealing an item. This notetag adds item types to the stealable item pool. If you use the notetag versions with +x% or -x%, the steal rate is increased/decreased for item types by x%.

<Steal Weapon>
<Steal Weapon: +x%>
<Steal Weapon: -x%>
This enables the skill/item to have steal properties. Actions with steal properties will have a chance of stealing an item. This notetag adds weapon types to the stealable item pool. If you use the notetag versions with +x% or -x%, the steal rate is increased/decreased weapon item types by x%.

<Steal Armor>
<Steal Armor: +x%>
<Steal Armor: -x%>
This enables the skill/item to have steal properties. Actions with steal properties will have a chance of stealing an item. This notetag adds armor types to the stealable item pool. If you use the notetag versions with +x% or -x%, the steal rate is increased/decreased for armor types by x%.

<Steal Gold>
<Steal Gold: +x%>
<Steal Gold: -x%>
This enables the skill/item to have steal properties. Actions with steal properties will have a chance of stealing an item. This notetag adds gold types to the stealable item pool. If you use the notetag versions with +x% or -x%, the steal rate is increased/decreased for gold by x%.

<Snatch>
<Snatch: +x%>
<Snatch: -x%>
This enables the skill/item to have snatch properties. Actions with snatch properties are able to select the exact item they wish to steal. This notetag applies to all item types. If you use the notetag versions with +x% or -x%, the snatch rate is increased/decreased by x%.
* Note: Snatching only works on skills/items that target.

<Snatch Item>
<Snatch Item: +x%>
<Snatch Item: -x%>
This enables the skill/item to have snatch properties. Actions with snatch properties are able to select the exact item they wish to steal. This notetag adds items to the pool. If you use the notetag versions with +x% or -x%, the snatch rate is increased/decreased by x% for items.
* Note: Snatching only works on skills/items that target.

<Snatch Weapon>
<Snatch Weapon: +x%>
<Snatch Weapon: -x%>
This enables the skill/item to have snatch properties. Actions with snatch properties are able to select the exact item they wish to steal. This notetag adds weapons to the pool. If you use the notetag versions with +x% or -x%, the snatch rate is increased/decreased by x% for weapons.
* Note: Snatching only works on skills/items that target.

<Snatch Armor>
<Snatch Armor: +x%>
<Snatch Armor: -x%>
This enables the skill/item to have snatch properties. Actions with snatch properties are able to select the exact item they wish to steal. This notetag adds armors to the pool. If you use the notetag versions with +x% or -x%, the snatch rate is increased/decreased by x% for armors.
* Note: Snatching only works on skills/items that target.

<Snatch Gold>
<Snatch Gold: +x%>
<Snatch Gold: -x%>
This enables the skill/item to have snatch properties. Actions with snatch properties are able to select the exact item they wish to steal. This notetag adds gold targets to the pool. If you use the notetag versions with +x% or -x%, the snatch rate is increased/decreased by x% for gold.
* Note: Snatching only works on skills/items that target.

Item, Weapon, and Armor Notetags:

<Enable Automatic Debuff>
<Disable Automatic Debuff>
This let’s you override the ‘Automatic Effect’ settings in the parameters for this individual item. Enabling it will cause any weapons and armors to debuff the enemy’s parameters relative to the piece of equipment stolen. Disabling it will make no such thing occur. Automatic Debuffing is only applied to weapons and armors.

<Steal Sound Name: filename>
If you wish to give an item a unique sound effect when stolen, use this notetag to accomplish that. Exclude file extensions from the ‘filename’.

<Steal Sound Volume: x>
To change the volume for this item’s sound effect when it is stolen, use this notetag and replace x with the volume level desired.

<Steal Sound Pitch: x>
To change the pitch for this item’s sound effect when it is stolen, use this notetag and replace x with the pitch desired.

<Steal Sound Pan: x>
To change the pan for this item’s sound effect when it is stolen, use this notetag and replace x with the pan desired.

Actor, Class, Weapon, Armor, and State Notetags:

<Steal Rate: +x%>
<Steal Rate: -x%>
<Steal Type Rate: +x%>
<Steal Type Rate: -x%>
Increase/decrease the steal rate for the user by x%. If you use the ‘Type’ notetag, replace ‘Type’ with ‘Item’, ‘Weapon’, ‘Armor’, or ‘Gold’ to apply individual steal rate bonuses for just those types.


Lunatic Mode – Custom Steal Rates


For those with JavaScript experience and would like to create their own custom steal rates for individual skills and/or items, you can use this notetag to accomplish that:

Skill and Item Notetags:

<Custom Steal Rate>
rate += user.hp / user.mhp;
rate += user.level * 0.01;
</Custom Steal Rate>
The ‘rate’ variable is already predefined with the default calculations. You can either add onto it or overwrite it. The ‘rate’ variable is then returned after this for rate calculation. This formula is applied for both steal and snatching.

Item, Weapon, and Armor Notetags:

<After Steal Effect>
target.atk -= 10;
user.addBuff(3, 5);
</After Steal Effect>
When this item, weapon, or piece of armor gets stolen, this piece of code will run affecting the target enemy it was stolen from. ‘item’ will refer to the item that was stolen. ‘target’ will refer to the target enemy the actor stole from. ‘user’ will refer to the actor stealing the item.


Happy RPG Making!


 

 

 

 

 

Happy RPG Making!


These plugins and Tips & Tricks ideas are made possible thanks to our creative patrons on Patreon! The majority of our Tips & Tricks, Plugins, and Lunatic Pack ideas are placed within the Patreon-exclusive Sample Project for quick and easy access! If you'd like to make a Plugin Suggestion, Yanfly's Patreon-based Suggestion Box a visit here:


If you have any bugs to report, visit the following link:


If you have any questions about Action Sequences, visit the following link:



Thank you!