Steal Items VisuStella MZ

From Yanfly.moe Wiki
Jump to navigation Jump to search

Welcome to the wiki! This is where you can find resources from Yanfly.moe, Ækashics.moe,
VisuStella, Caz Wolf, Fallen Angel Olivia, Atelier Irina, and other affiliated content creators.



Download

System

This is a plugin created for RPG Maker MZ.

InstallPluginsMz.png

UpdatePlugins.png

Troubleshooting.jpg

Click here for help on how to install plugins and an explanation on the Tier Hierarchy System.

Click here to learn how to update plugins.

Click here for how to troubleshoot plugins if you get an error.


Masterarbeit Writer


StealItems Steal.gif

StealItems Snatch.png

Required Plugins

The following plugins are required in order to use this plugin.

Place the following plugins above this plugin located in the Plugin Manager.


VisuStella MZ

This plugin is a part of the VisuStella MZ Plugin Library.

Click here if you want to help support VisuStella on Patreon.

Introduction

Thieves with the ability to steal items from enemies aren't an uncommon class in RPG's. This plugin lets you set up enemies with items that can be stolen from with different types of effects that can occur upon stealing.

Features include all (but not limited to) the following:

  • Create a pool of stealable items for each enemy.
  • Make skills or items that have stealing properties attached to them.
  • Some skills/items can be dedicated towards stealing specific types of loot (Gold, Items, Weapons, and/or Armor).
  • Have different success rates for skills and items.
  • Actors can gain trait effects that increase or decrease success rates.
  • Enemies can gain resistance towards stealing.
  • JavaScript uses can enable special effects to occur upon successfully stealing, failing, or emptying out an enemy's loot.
  • Automatically translate drop items from the database into stealable loot.
  • If weapons or armors are stolen, they can debuff the enemy and lower their parameters by their base bonuses.
  • Use a Snatch effect to directly target a specific item to be stolen from the enemy.

Requirements

This plugin is made for RPG Maker MZ. This will not work in other iterations of RPG Maker.

Required Plugin List

This plugin requires the above listed plugins to be installed inside your game's Plugin Manager list in order to work. You cannot start your game with this plugin enabled without the listed plugins.


Tier 3

This plugin is a Tier 3 plugin. Place it under other plugins of lower tier value on your Plugin Manager list (ie: 0, 1, 2, 3, 4, 5).

This is to ensure that your plugins will have the best compatibility with the rest of the VisuStella MZ Plugin library.


Major Changes

This plugin adds some new hard-coded features to RPG Maker MZ's functions. The following is a list of them.

---

Gold and Item Drop Removals

This is an optional effect that can be enabled from the Plugin Parameters.

If you have enabled Automatic Gold Drop and Item Drop inclusions from the plugin parameters as well as enabled their respective "Loot Removal" plugin parameters, then once the gold/items have been stolen a target enemy, that enemy will not drop the specific gold value or specific item drop during the victory aftermath phase.

---

Notetags

RPG Maker MZ's editor is unable to allow for custom traits/properties that a game dev may wish to associate with a database object, event, map, etc. Notetags are used to work around such limitations by allowing the game dev to tag certain traits/properties using specific Notetags declared by the related plugin.

Here is a list of Notetag(s) that you may use.


The following are notetags that have been added through this plugin. These notetags will not work with your game if this plugin is OFF or not present.

---

Steal Action-Related Notetags

StealItems Steal.gif

The following are notetags that are used to place on skills/items that you want to have stealing properties for.

---

<Steal>
<Steal type>
<Steal type, type, type>

- Used for: Skill, Item Notetags
- Gives the skill/item stealing properties.
- Replace 'type' with 'All', 'Gold', 'Item', 'Weapon', 'Armor' to restrict
  steal targets to those types.

---

<Steal type: x%>

- Used for: Skill, Item Notetags
- Gives the skill/item stealing properties with increased/decreased
  multiplicative success rates.
- Replace 'type' with 'All', 'Gold', 'Item', 'Weapon', 'Armor' to restrict
  steal targets to those types.
- Replace 'x' with a number representing the percent value to alter the
  success rate multiplicatively by.

---

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

- Used for: Skill, Item Notetags
- Gives the skill/item stealing properties with increased/decreased
  additive success rates.
- Replace 'type' with 'All', 'Gold', 'Item', 'Weapon', 'Armor' to restrict
  steal targets to those types.
- Replace 'x' with a number representing the percent value to alter the
  success rate additively by.

---

StealItems Snatch.png

<Snatch>
<Targeting Steal>

- Used for: Skill, Item Notetags
- Changes the steal action from targeting a random item from the stealable
  types pool to a specific item that the player can select.
- If the snatch attempt fails, it will not attempt to steal other items.
- Both the <Snatch> and <Targeting Steal> notetags do the same thing.
- This does not work with abilities that target multiple enemies, random
  enemies, or actors.
- Use this in addition to the <Steal>, <Steal type>, or
  <Steal type, type, type> notetags as this does not have any steal
  properties on its own.

---

JavaScript Notetags: Steal Action-Related

StealItems Steal.gif

The following are notetags made for users with JavaScript knowledge to apply special effects for steal-related skills/items.

---

<JS Steal Rate>
 code
 code
 rate = code;
</JS Steal Rate>

- Used for: Skill, Item Notetags
- Uses JavaScript code to determine the success rate of the steal action.
  - The 'rate' value is multiplied against the success rate of the target
    item being stolen. This is a multiplicative stack.
  - This means an item's default steal rate of 5% and a 200% steal rate on
    this notetag's 'rate' variable will yield 10%. Alternatively, if the
    default steal rate is 0%, it will yield 0% regardless of this notetag's
    'rate' variable value.
- This applies to all steal target types.
- The 'rate' variable starts at a value equal to the current success rate.
- The 'rate' variable will be returned as the declared success rate.
- The 'user' variable represents the user who will perform the skill/item.
- The 'target' variable represents the target who was stolen from.

---

<JS Steal Gold Rate>
 code
 code
 rate = code;
</JS Steal Gold Rate>

- Used for: Skill, Item Notetags
- Uses JavaScript code to determine the success rate of the steal action.
  - The 'rate' value is multiplied against the success rate of the target
    item being stolen. This is a multiplicative stack.
  - This means an item's default steal rate of 5% and a 200% steal rate on
    this notetag's 'rate' variable will yield 10%. Alternatively, if the
    default steal rate is 0%, it will yield 0% regardless of this notetag's
    'rate' variable value.
- This applies to only the stealable gold type.
- The 'rate' variable starts at a value equal to the current success rate.
- The 'rate' variable will be returned as the declared success rate.
- The 'user' variable represents the user who will perform the skill/item.
- The 'target' variable represents the target who was stolen from.

---

<JS Steal Item Rate>
 code
 code
 rate = code;
</JS Steal Item Rate>

- Used for: Skill, Item Notetags
- Uses JavaScript code to determine the success rate of the steal action.
  - The 'rate' value is multiplied against the success rate of the target
    item being stolen. This is a multiplicative stack.
  - This means an item's default steal rate of 5% and a 200% steal rate on
    this notetag's 'rate' variable will yield 10%. Alternatively, if the
    default steal rate is 0%, it will yield 0% regardless of this notetag's
    'rate' variable value.
- This applies to only the stealable item type.
- The 'rate' variable starts at a value equal to the current success rate.
- The 'rate' variable will be returned as the declared success rate.
- The 'user' variable represents the user who will perform the skill/item.
- The 'target' variable represents the target who was stolen from.

---

<JS Steal Weapon Rate>
 code
 code
 rate = code;
</JS Steal Weapon Rate>

- Used for: Skill, Item Notetags
- Uses JavaScript code to determine the success rate of the steal action.
  - The 'rate' value is multiplied against the success rate of the target
    item being stolen. This is a multiplicative stack.
  - This means an item's default steal rate of 5% and a 200% steal rate on
    this notetag's 'rate' variable will yield 10%. Alternatively, if the
    default steal rate is 0%, it will yield 0% regardless of this notetag's
    'rate' variable value.
- This applies to only the stealable weapon type.
- The 'rate' variable starts at a value equal to the current success rate.
- The 'rate' variable will be returned as the declared success rate.
- The 'user' variable represents the user who will perform the skill/item.
- The 'target' variable represents the target who was stolen from.

---

<JS Steal Armor Rate>
 code
 code
 rate = code;
</JS Steal Armor Rate>

- Used for: Skill, Item Notetags
- Uses JavaScript code to determine the success rate of the steal action.
  - The 'rate' value is multiplied against the success rate of the target
    item being stolen. This is a multiplicative stack.
  - This means an item's default steal rate of 5% and a 200% steal rate on
    this notetag's 'rate' variable will yield 10%. Alternatively, if the
    default steal rate is 0%, it will yield 0% regardless of this notetag's
    'rate' variable value.
- This applies to only the stealable armor type.
- The 'rate' variable starts at a value equal to the current success rate.
- The 'rate' variable will be returned as the declared success rate.
- The 'user' variable represents the user who will perform the skill/item.
- The 'target' variable represents the target who was stolen from.

---

<JS On Steal Success>
 code
 code
 code
</JS On Steal Success>

- Used for: Skill, Item Notetags
- Runs the inserted JavaScript code upon successfully stealing.
- The 'user' variable represents the user who will perform the skill/item.
- The 'target' variable represents the target who was stolen from.
- The 'item' variable represents the item that was stolen if there is one.
  This will return a null value if gold was stolen instead.
- The 'gold' variable represents the gold quantity that was stolen if any.
  This will return a 0 value if there was no gold stolen.

---

<JS On Steal Failure>
 code
 code
 code
</JS On Steal Failure>

- Used for: Skill, Item Notetags
- Runs the inserted JavaScript code upon failing a stealth attempt.
- The 'user' variable represents the user who will perform the skill/item.
- The 'target' variable represents the target who was the theft target.

---

<JS On Steal Empty>
 code
 code
 code
</JS On Steal Empty>

- Used for: Skill, Item Notetags
- Runs the inserted JavaScript code if there was nothing to steal.
- The 'user' variable represents the user who will perform the skill/item.
- The 'target' variable represents the target who was the theft target.

---

Steal Loot Setup-Related Notetags

StealItems Steal.gif

The following notetags are made for enemies and used to set up the loot that can be stolen.

---

<Steal Gold value: x%>

<Steal Item id: x%>
<Steal Item name: x%>

<Steal Weapon id: x%>
<Steal Weapon name: x%>

<Steal Armor id: x%>
<Steal Armor name: x%>

- Used for: Enemy Notetags
- Sets up droppable loot for the enemy.
- When setting up gold loot, replace 'value' with the amount of gold that
  will be stolen from this loot entry.
- When setting up items, weapons, or armors, replace 'id' with the ID of the
  item, weapon, or armor for the loot entry.
- When setting up items, weapons, or armors, replace 'name' with the name of
  the item, weapon, or armor for the loot entry.
- Replace 'x' with a number value representing the base percent chance of
  successfully stealing this loot entry.
- Insert multiple notetags for multiple loot entries to be stolen.

---

<Steal>
 Gold value: x%

 Item id: x%
 Item name: x%

 Weapon id: x%
 Weapon name: x%

 Armor id: x%
 Armor name: x%
</Steal>

- Used for: Enemy Notetags
- Sets up a batch setup of droppable loot for the enemy.
- When setting up gold loot, replace 'value' with the amount of gold that
  will be stolen from this loot entry.
- When setting up items, weapons, or armors, replace 'id' with the ID of the
  item, weapon, or armor for the loot entry.
- When setting up items, weapons, or armors, replace 'name' with the name of
  the item, weapon, or armor for the loot entry.
- Replace 'x' with a number value representing the base percent chance of
  successfully stealing this loot entry.
- Insert/remove multiple copies of the loot entries inside the <Steal>
  notetags to add more or reduce entries.

---

Steal Rate Traits-Related Notetags

StealItems Steal.gif

The following notetags are made for trait objects that can alter the success rates of steal skills/items.

---

<Steal Rate: x%>

- Used for: Actor, Class, Weapon, Armor, State Notetags
- Alters the steal rate for the stealing actor multiplicatively.
- Replace 'x' with a number representing the percent value to alter the
  success rate multiplicatively by.

---

<Steal Rate: +x%>
<Steal Rate: -x%>

- Used for: Actor, Class, Weapon, Armor, State Notetags
- Alters the steal rate for the stealing actor multiplicatively.
- Replace 'x' with a number representing the percent value to alter the
  success rate additively by.

---

<Steal Resist: +x%>
<Steal Resist: -x%>

- Used for: Enemy Notetags
- Alters the steal resistance for enemies. Higher numbers mean higher steal
  resistance.
- Replace 'x' with a number representing the percent value to alter the
  steal resistance by.

---

Plugin Parameters

Automatic Settings

StealItems Steal.gif

StealItems Param1.png

Automatic settings pertaining to the steal mechanics of the game.

---

Settings

 Add Gold Drop?:
 - Automatically include enemy gold drop into stealable items?
   Success Rate:
   - If automatically include gold drop, what is the steal rate?
   - Use a number between 0 and 1.
   Loot Removal:
   - If using automatic gold, remove the rewards from the enemy gold
     when defeated?
 Add Item Drops?:
 - Automatically include enemy item drop into stealable items?
   Success Modifier:
   - If automatically include item drops, how much do you want to alter
     their drop modifiers by?
   Loot Removal:
   - If using automatic drops, remove the rewards from the enemy items
     when defeated?

---

Battle Log Settings

StealItems Param2.png

Settings pertaining to the steal-related messages that appear in the Battle Log Window.

---

Settings

 Show Messages:
 - Show messages regarding stolen items in the Battle Log window?
 Steal Item:
 - Message displayed when stealing an item.
 - %1 - Item's Name, %2 - Item's Icon
 Steal Gold:
 - Message displayed when stealing gold.
 - %1 - Gold Name, %2 - Gold Amount
 Steal Fail:
 - Message displayed when a steal attempt fails.
 Steal Empty:
 - Message displayed when there is nothing to steal.

---

Mechanics Settings

StealItems Param3.png

Special game mechanics related to stealing.

---

General

 Equip Debuff:
 - When weapons/armors are stolen, decrease the enemy's parameters based
   on the weapon/armor parameters?

---

JavaScript

 JS: Bonus Steal %:
 - Code used to determine an additive bonus steal rate.
 JS: Steal Resist %:
 - Code used to determine an additive steal resistance.
 JS: On Steal Success:
 - What kind of code do you want to run when stealing succeeds?
 JS: On Steal Failure:
 - What kind of code do you want to run when stealing fails?
 JS: On Steal Empty:
 - What kind of code do you want to run when there is nothing to steal?

---

Popup Settings

StealItems Steal.gif

StealItems Param4.png

Popup settings related to stealing.

---

Success

Failure

Empty

 Text:
 - Text displayed upon stealing an item.
 Text Color:
 - Use #rrggbb for custom colors or regular numbers for text colors from
   the Window Skin.
 Flash Color:
 - Adjust the popup's flash color.
 - Format: [red, green, blue, alpha]
 Flash Duration:
 - What is the frame duration of the flash effect?

---

Snatch Settings

StealItems Snatch.png

StealItems Param5.png

These are the settings for the effect when used with the <Snatch> notetag. When snatching an item, the player can target a specific item in the enemy's loot to be stolen from. The success rates and lists of items will be visible at the expense of only being able to steal just that item.

---

Gold

 Icon:
 - Icon used to represent gold.
 - Ignore if VisuMZ_0_CoreEngine is present.
 Name Format:
 - Name format on how gold is displayed.
 - %1 - Icon, %2 - Quantity, %3 - Current Name
 Help Text:
 - Text that's displayed in the help window when gold is selected in the
   Snatch window.

---

Success Rate

 Display Success Rate:
 - Display success rates in the Snatch window?
 Already Stolen:
 - Text displayed when an item has already been stolen.

---

Sound Settings

StealItems Param6.png

Determine the sound effects played related to stealing.

---

Successful Gold Steal

Successful Item Steal

Successful Weapon Steal

Successful Armor Steal

Failure

Empty

 Filename:
 - Filename of the sound effect played.
 Volume:
 - Volume of the sound effect played.
 Pitch:
 - Pitch of the sound effect played.
 Pan:
 - Pan of the sound effect played.

---


Terms of Use

1. These plugins may be used in free or commercial games provided that they have been acquired through legitimate means at VisuStella.com and/or any other official approved VisuStella sources. Exceptions and special circumstances that may prohibit usage will be listed on VisuStella.com.

2. All of the listed coders found in the Credits section of this plugin must be given credit in your games or credited as a collective under the name: "VisuStella".

3. You may edit the source code to suit your needs, so long as you do not claim the source code belongs to you. VisuStella also does not take responsibility for the plugin if any changes have been made to the plugin's code, nor does VisuStella take responsibility for user-provided custom code used for custom control effects including advanced JavaScript notetags and/or plugin parameters that allow custom JavaScript code.

4. You may NOT redistribute these plugins nor take code from this plugin to use as your own. These plugins and their code are only to be downloaded from VisuStella.com and other official/approved VisuStella sources. A list of official/approved sources can also be found on VisuStella.com.

5. VisuStella is not responsible for problems found in your game due to unintended usage, incompatibility problems with plugins outside of the VisuStella MZ library, plugin versions that aren't up to date, nor responsible for the proper working of compatibility patches made by any third parties. VisuStella is not responsible for errors caused by any user-provided custom code used for custom control effects including advanced JavaScript notetags and/or plugin parameters that allow JavaScript code.

6. If a compatibility patch needs to be made through a third party that is unaffiliated with VisuStella that involves using code from the VisuStella MZ library, contact must be made with a member from VisuStella and have it approved. The patch would be placed on VisuStella.com as a free download to the public. Such patches cannot be sold for monetary gain, including commissions, crowdfunding, and/or donations.

7. If this VisuStella MZ plugin is a paid product, all project team members must purchase their own individual copies of the paid product if they are to use it. Usage includes working on related game mechanics, managing related code, and/or using related Plugin Commands and features. Redistribution of the plugin and/or its code to other members of the team is NOT allowed unless they own the plugin itself as that conflicts with Article 4.

8. Any extensions and/or addendums made to this plugin's Terms of Use can be found on VisuStella.com and must be followed.

Terms of Use: Japanese


『VisuStella MZ』利用規約

1. これらのプラグインは、VisuStella.comおよび/または公式に承認されたVisuStellaのソースから合法的な手段で入手したものである限り、フリーゲームや商用ゲームに使用することができます。例外的に使用が禁止される場合については、VisuStella.comの記載をご確認ください。

2. 本プラグインの「クレジット」部分に記載されているすべてのコーダーの名前は、ゲーム内にクレジット表記を行うか、もしくは「VisuStella」という名前の下にまとめて表記する必要があります。

3. ソースコードを自分のものだと主張しない限りは、必要に応じて編集することが可能です。ただしプラグインのコードに変更が加えられた場合、VisuStellaはそのプラグインに対して一切の責任を負いません。高度なJavaScriptのノートタグやJavaScriptコードを許可するプラグインのパラメータを含む、カスタムコントロールエフェクトに使用される、ユーザー提供のカスタムコードについても、VisuStellaは一切の責任を負いません。

4. これらのプラグインやプラグイン内のコードを、「自分のもの」として再配布したり使用したりすることはできません。これらのプラグインとそのコードは、VisuStella.comおよび、その他の公式/承認済みVisuStellaソースからのみダウンロードすることができます。公式/承認済みのソースのリストは、VisuStella.comでご確認いただけます。

5. VisuStellaは、意図しない使用方法による問題、VisuStella MZライブラリ以外のプラグインとの非互換性の問題、プラグインのバージョンが最新でないことによる問題、第三者による互換性パッチが適切に動作していないことなどが原因でゲーム内で発生した問題については、一切の責任を負いません。VisuStellaは、高度なJavaScriptのノートタグやJavaScriptコードを許可するプラグインのパラメータを含む、カスタムコントロールエフェクトに使用される、ユーザー提供のカスタムコードに起因するエラーについても、一切の責任を負いません。

6. VisuStella MZライブラリのコードを使用した互換性パッチをVisuStellaとは関係のない第三者を通じて作成する必要がある場合は、まずVisuStellaのメンバーと連絡を取り、承認を得る必要があります。パッチはVisuStella.comに公開され、誰でも無料でダウンロードすることができるようになります。このようなパッチを、制作発注やクラウドファンディングの対象にしたり、寄付などの金銭的な利益を得るために販売することはできません。

7. このVisuStella MZプラグインが商用製品である場合、プロジェクトチームのすべてのメンバーは、それを使用するため、それぞれ製品を購入しなければなりません。使用方法には、関連するゲームメカニクスの作業、関連するコードの管理、および/または関連するプラグインコマンドや機能の使用、が含まれます。プラグインそのものやそのコードをチームの他のメンバーに再配布することは第4項に抵触するため、そのメンバーがプラグインそのものを所有していない限りは許可されません。

8. このプラグインの利用規約の追加項目や補足については、VisuStella.comに掲載されていますので、それを参照し従ってください。

Credits

If you are using this plugin, credit the following people in your game:

Team VisuStella

Changelog

Version 1.07: June 9, 2022

  • Compatibility Update
    • Plugins should be more compatible with one another.


Version 1.06: January 13, 2022

  • Compatibility Update!
    • Better compatibility update with Extra Enemy Drops. Update made by Irina.


Version 1.05: July 23, 2021

  • Bug Fixes!
    • Fixed <JS Steal Armor Rate> notetag. It did not work properly.
  • Documentation Update!
    • Added notes for the various <JS Steal Rate> notetags:
      • The 'rate' value is multiplied against the success rate of the target item being stolen. This is a multiplicative stack.
      • This means an item's default steal rate of 5% and a 200% steal rate on this notetag's 'rate' variable will yield 10%. Alternatively, if the default steal rate is 0%, it will yield 0% regardless of this notetag's 'rate' variable value.


Version 1.04: July 9, 2021

  • Compatibility Update
    • Added compatibility functionality for future plugins.


Version 1.03: June 4, 2021

  • Bug Fixes!
    • <JS Steal Rate> should now work properly. Fix by Arisu.
  • Documentation Update!
    • Added clarity to <JS Steal Rate> to mention it affects all types.
    • Help file updated for new features.
  • New Features!
    • New JS notetags added by Arisu.
      • <JS Steal Gold Rate>
      • <JS Steal Item Rate>
      • <JS Steal Weapon Rate>
      • <JS Steal Armor Rate>
        • Similar to the <JS Steal Rate> notetag but works only for specific categories of items.


Version 1.02: April 2, 2021

  • Feature Update!
    • Success rate calculation should no longer be skewed by JavaScript's float value math quirks. Update made by Yanfly.


Version 1.01: December 11, 2020

  • Optimization Update!
    • Plugin should run more optimized.


Version 1.00: December 9, 2020

  • Finished Plugin!


See Also


End of File