Map Damage Effect 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


VisuMZ MapDamageEffect Preview.gif


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

VisuMZ MapDamageEffect Title.png

VisuMZ MapDamageEffect Preview.gif

This plugin changes the cheap-looking red flash when taking floor damage or slip damage on the map to something more elegant looking or allows you to utilize a custom image in place of it. The effect can vary depending on the region the player is currently standing on to the slip state the effect is originating from.

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

  • Pre-rendered damage gradient that is easier on the eyes for those not using any custom images for their map effects.
  • Custom images can be used for a more personal touch.
  • Map Damage Effects can vary depending on the regions the player is currently standing when taking floor damage.
  • Map Damage Effects can vary depending on the states damaging the player when taking damage from them on the map.
  • Use Plugin Commands to artificially prompt the Map Damage Effect for custom created damage events.
  • Certain region-marked tiles can inflict states on the player's party by simply stepping on them.
  • Utilize custom floor damage formulas for region-marked tiles to make some tiles more dangerous than others.

Requirements

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

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 4

This plugin is a Tier 4 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.

---

Basic Floor Damage Calculations

VisuMZ MapDamageEffect Preview.gif

Any changes made to floor damage calculations are overwritten in favor of this plugin's ability to allow custom floor damage based on regions by using the notetags available through this plugin.

---

Extra Features

There are some extra features found if other VisuStella MZ plugins are found present in the Plugin Manager list.

---

Core Engine VisuStella MZ

The "Once Parallel" feature of the Core Engine can be used and be triggered upon taking Floor Damage or Slip Damage while on the map scene. Once Parallel events will run in the background like a parallel process, except that it does not repeat after finishing.

---

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.

---

Custom Tile Effect-Related Notetags

VisuMZ MapDamageEffect Preview.gif

---

<Floor State Region x: id>
<Floor State Region x: id, id, id>
<Floor State Region x: name>
<Floor State Region x: name, name, name>

- Used for: Map Notetags
- When stepping onto a tile marked by region 'x', afflict all party members
  with the associated state(s).
- The notetag variants do the same thing. Which you choose to use is
  entirely up to personal preference.
- Replace 'x' with a number (0 to 255) representing the Region ID used to
  mark the floor damage tiles with this Map Damage Effect.
- Replace 'id' with a number representing the ID of the state to afflict
  upon all party members.
- Replace 'name' with the name of the state(s) to afflict all party members.

---

JavaScript Notetags: Custom Floor Damage

VisuMZ MapDamageEffect Regions.png

---

<Floor Damage Formula Region x>
 code
 code
 damage = code
</Floor Damage Formula Region x>

- Used for: Map Notetags
- Determines the amount of damage to deal to each actor when this Map Damage
  Effect triggers. Also changes any tile marked by region 'x' into a damage
  tile regardless of its setting in the database's tileset.
- Replace 'x' with a number (0 to 255) representing the Region ID used to
  mark the floor damage tiles with this Map Damage Effect.
- The 'damage' variable is returned to determine how much damage the actor
  will receive as floor damage (before being affected by the actor's FDR).
- Replace 'code' with JavaScript code used to calculate the 'damage'.
- The 'a' variable represents the actor receiving the damage.
- The 'user' variable represents the actor receiving the damage.

---

Floor Damage Effect-Related Notetags

VisuMZ MapDamageEffect Preview.gif

---

<Map Damage Effect Region x Color: #rrggbb>
<Damage Region x Color: #rrggbb>

- Used for: Map Notetags
- When taking damage from tiles marked by 'x' region, play a custom color.
- The notetag variants do the same thing. Which you choose to use is
  entirely up to personal preference.
- Replace 'x' with a number (0 to 255) representing the Region ID used to
  mark the floor damage tiles with this Map Damage Effect.
- Replace 'rr' with a hexadecimal value for red.
- Replace 'gg' with a hexadecimal value for green.
- Replace 'bb' with a hexadecimal value for blue.
- Leave the '#' in place.
- If you are unsure of what hexadecimal value your color is, please use an
  online site like: https://htmlcolorcodes.com/
- When using this notetag, custom images won't be used.

---

<Map Damage Effect Region x Gradient Length: y>
<Damage Region x Gradient Length: y>

- Used for: Map Notetags
- Changes the gradient length of the pre-render effect.
- The notetag variants do the same thing. Which you choose to use is
  entirely up to personal preference.
- Replace 'x' with a number (0 to 255) representing the Region ID used to
  mark the floor damage tiles with this Map Damage Effect.
- Replace 'y' with a number representing in pixels how long the gradient
  length is.

---

<Map Damage Effect Region x Image: filename>
<Damage Region x Image: filename>

- Used for: Map Notetags
- Uses a custom image found in the img/pictures/ folder of your game project
  to use when taking floor damage on these region-marked tiles.
- The notetag variants do the same thing. Which you choose to use is
  entirely up to personal preference.
- Replace 'x' with a number (0 to 255) representing the Region ID used to
  mark the floor damage tiles with this Map Damage Effect.
- Replace 'filename' with a picture found within your game project's
  img/pictures/ folder. Filenames are case sensitive. Leave out the filename
  extension from the notetag.
- If this notetag is used, ignore the hex color and gradient notetags.

---

<Map Damage Effect Region x Opacity: y>
<Damage Region x Opacity: y>

- Used for: Map Notetags
- Adjusts the starting opacity to 'y' for this region-marked-tile's
  Map Damage Effect.
- The notetag variants do the same thing. Which you choose to use is
  entirely up to personal preference.
- Replace 'x' with a number (0 to 255) representing the Region ID used to
  mark the floor damage tiles with this Map Damage Effect.
- Replace 'y' with a number (0 to 255) representing the starting opacity
  used by the region-marked-tile's Map Damage Effect.

---

<Map Damage Effect Region x Opacity: y%>
<Damage Region x Opacity: y%>

- Used for: Map Notetags
- Adjusts the starting opacity to 'y%' for this region-marked-tile's
  Map Damage Effect.
- The notetag variants do the same thing. Which you choose to use is
  entirely up to personal preference.
- Replace 'x' with a number (0 to 255) representing the Region ID used to
  mark the floor damage tiles with this Map Damage Effect.
- Replace 'y' with a percent (0% to 100%) representing the starting opacity
  used by the region-marked-tile's Map Damage Effect.

---

<Map Damage Effect Region x Duration: y>
<Damage Region x Duration: y>

- Used for: Map Notetags
- Alters the duration for this region-marked-tile's Map Damage Effect.
- The notetag variants do the same thing. Which you choose to use is
  entirely up to personal preference.
- Replace 'x' with a number (0 to 255) representing the Region ID used to
  mark the floor damage tiles with this Map Damage Effect.
- Replace 'y' with a number representing the duration of the Map Damage
  Effect in frames where 60 frames is equal to 1 second.

---

<Map Damage Effect Region x Blend Mode: Normal>
<Map Damage Effect Region x Blend Mode: Additive>
<Map Damage Effect Region x Blend Mode: Multiply>
<Map Damage Effect Region x Blend Mode: Screen>
<Damage Region x Blend Mode: Normal>
<Damage Region x Blend Mode: Additive>
<Damage Region x Blend Mode: Multiply>
<Damage Region x Blend Mode: Screen>

- Used for: Map Notetags
- Changes the blend mode used for the region-marked-tile's Map Damage Effect
  sprite to mesh with the map screen differently.
- The notetag variants do the same thing. Which you choose to use is
  entirely up to personal preference.
- Replace 'x' with a number (0 to 255) representing the Region ID used to
  mark the floor damage tiles with this Map Damage Effect.

---

<Map Damage Effect Region x Once Parallel: y>
<Damage Region x Once Parallel: y>

- Used for: Map Notetags
- Requires VisuMZ_0_CoreEngine!
- Causes a region-marked-tile's Map Damage Effect to also launch a Once
  Parallel from the VisuMZ Core Engine.
  - A Once Parallel is a Common Event that occurs as a one-time parallel
    process event that does not loop.
- The notetag variants do the same thing. Which you choose to use is
  entirely up to personal preference.
- Replace 'x' with a number (0 to 255) representing the Region ID used to
  mark the floor damage tiles with this Map Damage Effect.
- Replace 'y' with a number representing the ID of the Common Event to run
  as a Once Parallel.

---

State Damage-Related Notetags

VisuMZ MapDamageEffect Preview.gif

---

<Map Damage Effect Color: #rrggbb>
<Damage Color: #rrggbb>

- Used for: State Notetags
- When taking damage from states on the map, play a custom color.
- The notetag variants do the same thing. Which you choose to use is
  entirely up to personal preference.
- Replace 'rr' with a hexadecimal value for red.
- Replace 'gg' with a hexadecimal value for green.
- Replace 'bb' with a hexadecimal value for blue.
- Leave the '#' in place.
- If you are unsure of what hexadecimal value your color is, please use an
  online site like: https://htmlcolorcodes.com/
- When using this notetag, custom images won't be used.
- If an actor has multiple damage states, the damage state with a Map Damage
  Effect and the highest priority will take effect.

---

<Map Damage Effect Gradient Length: y>
<Damage Gradient Length: y>

- Used for: State Notetags
- Changes the gradient length of the pre-render effect.
- The notetag variants do the same thing. Which you choose to use is
  entirely up to personal preference.
- Replace 'y' with a number representing in pixels how long the gradient
  length is.
- If an actor has multiple damage states, the damage state with a Map Damage
  Effect and the highest priority will take effect.

---

<Map Damage Effect Image: filename>
<Damage Image: filename>

- Used for: State Notetags
- Uses a custom image found in the img/pictures/ folder of your game project
  to use when taking damage from states on the map.
- The notetag variants do the same thing. Which you choose to use is
  entirely up to personal preference.
- Replace 'filename' with a picture found within your game project's
  img/pictures/ folder. Filenames are case sensitive. Leave out the filename
  extension from the notetag.
- If an actor has multiple damage states, the damage state with a Map Damage
  Effect and the highest priority will take effect.
- If this notetag is used, ignore the hex color and gradient notetags.

---

<Map Damage Effect Opacity: y>
<Damage Opacity: y>

- Used for: State Notetags
- Adjusts the starting opacity to 'y' for this damage state's
  Map Damage Effect.
- The notetag variants do the same thing. Which you choose to use is
  entirely up to personal preference.
- Replace 'y' with a number (0 to 255) representing the starting opacity
  used by the region-marked-tile's Map Damage Effect.
- If an actor has multiple damage states, the damage state with a Map Damage
  Effect and the highest priority will take effect.

---

<Map Damage Effect Opacity: y%>
<Damage Opacity: y%>

- Used for: State Notetags
- Adjusts the starting opacity to 'y%' for this damage state's
  Map Damage Effect.
- The notetag variants do the same thing. Which you choose to use is
  entirely up to personal preference.
- Replace 'y' with a percent (0% to 100%) representing the starting opacity
  used by the region-marked-tile's Map Damage Effect.
- If an actor has multiple damage states, the damage state with a Map Damage
  Effect and the highest priority will take effect.

---

<Map Damage Effect Duration: y>
<Damage Duration: y>

- Used for: State Notetags
- Alters the duration for this damage state's Map Damage Effect.
- The notetag variants do the same thing. Which you choose to use is
  entirely up to personal preference.
- Replace 'y' with a number representing the duration of the Map Damage
  Effect in frames where 60 frames is equal to 1 second.
- If an actor has multiple damage states, the damage state with a Map Damage
  Effect and the highest priority will take effect.

---

<Map Damage Effect Blend Mode: Normal>
<Map Damage Effect Blend Mode: Additive>
<Map Damage Effect Blend Mode: Multiply>
<Map Damage Effect Blend Mode: Screen>
<Damage Blend Mode: Normal>
<Damage Blend Mode: Additive>
<Damage Blend Mode: Multiply>
<Damage Blend Mode: Screen>

- Used for: State Notetags
- Changes the blend mode used for the damage state's Map Damage Effect
  sprite to mesh with the map screen differently.
- The notetag variants do the same thing. Which you choose to use is
  entirely up to personal preference.
- If an actor has multiple damage states, the damage state with a Map Damage
  Effect and the highest priority will take effect.

---

<Map Damage Effect Once Parallel: y>
<Damage Once Parallel: y>

- Used for: State Notetags
- Requires VisuMZ_0_CoreEngine!
- Causes the damage state's Map Damage Effect to also launch a Once
  Parallel from the VisuMZ Core Engine.
  - A Once Parallel is a Common Event that occurs as a one-time parallel
    process event that does not loop.
- The notetag variants do the same thing. Which you choose to use is
  entirely up to personal preference.
- Replace 'y' with a number representing the ID of the Common Event to run
  as a Once Parallel.
- If an actor has multiple damage states, the damage state with a Map Damage
  Effect and the highest priority will take effect.

---

Plugin Commands

PluginCommandsMZ.png

Plugin Commands are event commands that are used to call upon functions added by a plugin that aren't inherently a part of RPG Maker MZ.

Here is a list of Plugin Command(s) that you may use:

---

The following are Plugin Commands that come with this plugin. They can be accessed through the Plugin Command event command.

---

Visual Plugin Commands

---

Visual: Map Damage Effect
- Produces the visual Map Damage Effect without any damage tied to it.

  Damage Appearance:

    Hex Color:
    - Use #rrggbb for custom colors.

      Gradient Length:
      - What is the length of the gradient effect?

    Image Filename:
    - Filename of the map damage effect.
    - Using this will ignore "Hex Color" and "Gradient Length".

  Damage Animation

    Opacity:
    - What is the starting opacity before fading?

    Total Duration:
    - How many frames should the animation be played?

    Blend Mode:
    - The blend mode used for map damage effect.

    Once Parallel:
    - Plays this Common Event as a "Once Parallel" upon trigger.
    - Requires VisuMZ_0_CoreEngine!

---

Plugin Parameters

General Settings

VisuMZ MapDamageEffect Preview.gif

These settings found in the Plugin Parameters will determine the default settings used across Floor-based Map Damage Effect types and Slip State-based Map Damage Effect types.

---

Floor

 Damage Appearance:
   Hex Color:
   - Use #rrggbb for custom colors.
     Gradient Length:
     - What is the length of the gradient effect?
   Image Filename:
   - Filename of the map damage effect.
   - Using this will ignore "Hex Color" and "Gradient Length".
 Damage Animation
   Opacity:
   - What is the starting opacity before fading?
   Total Duration:
   - How many frames should the animation be played?
   Blend Mode:
   - The blend mode used for map damage effect.
   Once Parallel:
   - Plays this Common Event as a "Once Parallel" upon trigger.
   - Requires VisuMZ_0_CoreEngine!

---

Slip-State

 Damage Appearance:
   Hex Color:
   - Use #rrggbb for custom colors.
     Gradient Length:
     - What is the length of the gradient effect?
   Image Filename:
   - Filename of the map damage effect.
   - Using this will ignore "Hex Color" and "Gradient Length".
 Damage Animation
   Opacity:
   - What is the starting opacity before fading?
   Total Duration:
   - How many frames should the animation be played?
   Blend Mode:
   - The blend mode used for map damage effect.
   Once Parallel:
   - Plays this Common Event as a "Once Parallel" upon trigger.
   - Requires VisuMZ_0_CoreEngine!

---


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.02: December 15, 2022

  • Optimization Update!
    • Plugin should run more optimized.


Version 1.01: October 20, 2022

  • Bug Fixes!
    • Fixed a bug where the <Floor Damage Formula Region x> notetag wasn't working properly. Fix made by Arisu.
    • Fixed a bug where the graphics didn't scale according to the screen scale properly. Fix made by Arisu.


Version 1.00 Official Release Date: November 4, 2022

  • Finished Plugin!


See Also


End of File