Difference between revisions of "Event Signals VisuStella MZ"

From Yanfly.moe Wiki
Jump to navigation Jump to search
Line 1: Line 1:
 
{{MzPlugin
 
{{MzPlugin
<!-- |preview = <youtube>link</youtube> -->
+
<!-- |preview = <youtube>https://youtu.be/lLCr7T93Ndw</youtube> -->
 
|preview = [[File:VisuMZ.143.jpg|600px]]
 
|preview = [[File:VisuMZ.143.jpg|600px]]
 
|link1 = <html><iframe frameborder="0" src="https://itch.io/embed/2452275" width="552" height="167"><a href="https://visustellamz.itch.io/event-signals">Event Signals plugin for RPG Maker MZ by VisuStellaMZ</a></iframe></html>
 
|link1 = <html><iframe frameborder="0" src="https://itch.io/embed/2452275" width="552" height="167"><a href="https://visustellamz.itch.io/event-signals">Event Signals plugin for RPG Maker MZ by VisuStellaMZ</a></iframe></html>

Revision as of 16:18, 12 January 2024

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.


VisuMZ.143.jpg


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


EventSignals Preview.gif

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

Event Signals is a new way for events to trigger actions, either to or from one another. This will cause events to respond in certain ways based on the type of signals they receive provided that they have a response set up for those specific signals.

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

  • Emit signals from specific locations (ie the player's location) using a Plugin Command.
  • Any nearby events or events within the designated range can respond to them if they have the associated notetags.
  • Responding events will stop whatever it is that they're doing and perform the signal page's event commands as a parallel.
  • Optionally play an animation at the emitting tile location.
  • Once the signal page's event commands are finished, events will resume regular behavior.
  • This signal response setup allows for a more organic way for events to respond to various scenarios in-game.


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.



How Do Event Signals Work?

EventSignals Preview.gif

This section explains how Event Signals Work.

---

Signal Emitters

EventSignal Command1.png

Signal emitters are where it all begins. A signal is nothing more than a piece of "text" that is sent to nearby events or events within the designated range.

To emit a signal, use either a Plugin Command or a Script Call. The Plugin Commands and Script Calls will determine the range and center of where the signal will be emitted from.

---

Signal Responses

EventSignals ResponsePage.png

Only events can respond to signals. In order to respond to a signal, they need to have a signal response comment tag applied to one of their pages.

 <Responds to Signal: text>

If this comment tag exists on a page, this page can NEVER be the active page on its own unless an emitted signal causes it to trigger. When it does trigger, the signal response page will take over as the active page, perform its event command actions as a parallel from start to finish, and then the event will resume its normal event behavior.

This means that the event will need a valid event page OTHER than the signal response page. Otherwise, the event will be invisible until the signal response conditions are met, appear temporarily, and the return back to being invisible.

Keep in mind that even if an event is the one launching the Plugin Command to emit a signal, it can respond to its own signal, too. However, you can bypass this by utilizing the Event variant of the plugin command and setting the designated event as its own exception.

---

Different Signal Responses

If you want an event to be able to respond to different signals, make them separate pages for the event. For example:

 <Responds to Signal: Bomb>
 <Responds to Signal: Fire>

These should be on different pages. Therefore, if the event receives a nearby "Bomb" signal, then the "Bomb" page will become the active event page until it is done. If a "Fire" signal is sent, then the "Fire" page will be active and performing and not the "Bomb" page.

---

Signal Immunity

Sometimes, you don't want an event to respond to specific signals all the time. This can be achieved through this comment tag:

 <Immune to Signal: text>

This immunity will only last while the current event page is the active page and not a random page.

Also, if an event is already responding to a signal, then it cannot respond to any other signals until the event signal response page is finished. From there, it will only respond to signals it receives after finishing.

---

Response Switch

If you are emitting a signal through a Plugin Command, you can set up a "Response Switch ID" to turn ON/OFF a Switch if there are any events that have responded to the signals.

---


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.

---

Signal-Related Notetags

---

<Responds to Signal: text>
<Responds to Signals: text, text, text>

- Used for: Event Comment Tags
- Must be used in an event's page comments and NOT its note box.
- Causes this specific event page to be a response to receiving 'text'
  signal(s) as long as its other page conditions are met.
- This page becomes the active page and the event commands will be ran as
  a parallel from start to finish.
- Once the events finished, the event returns to its normal behavior.
- Replace 'text' with the signal being emitted.
  - Insert multiple 'text' entries for this page to respond to multiple
    signals being emitted.

---

<Immune to Signal: text>
<Immune to Signals: text, text, text>

- Used for: Event Comment Tags
- Must be used in an event's page comments and NOT its note box.
- While this page is the active event page, it will not respond to 'text'
  signal even if the other signal respond conditions are met.
- Replace 'text' with the signal that this active event page will ignore.
  - Insert multiple 'text' entires for this active event page to ignore as
    signal emissions.

---


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.

---

Emit Signal Plugin Commands

EventSignals Preview.gif

---

EventSignal Command1.png

Emit Signal: From Coordinate
- Emit Signal(s) from target coordinate as the central location.
- Must be used on the map scene!

  Coordinate X:
  - The x coordinate for the signal emmission center.
  - You may use JavaScript code.

  Coordinate Y:
  - The y coordinate for the signal emmission center.
  - You may use JavaScript code.

  Signal(s):
  - What signal do you wish to emit to the surroundings?

  Range Type:
  - What is the range type to emit the signal to?
    - Square: A square-shaped range with the event at the center.
    - Circle: A circle-shaped range with the event at the center.
    - Delta: A diamond-shaped range with the event at the center.
    - Row: Spans horizontally across the map. 'x' expands up and down.
    - Column: Spans vertically across the map. 'x' expands left and right.
    - Exact: Ignores range distance. Picks only coordinates.

    Range Distance:
    - What is the range distance to emit the signal to?

  Response Switch ID:
  - Turns ON this Switch if an event responds to the signal.
  - Use 0 to ignore.

  Animation ID:
  - Play this animation at target tile location.
  - Leave at 0 to not play an animation.
  - Requires VisuMZ_0_CoreEngine!

    Mirror Animation?:
    - Mirror the animation?

    Mute Animation?:
    - Mute the animation?

---

EventSignal Command2.png

Emit Signal: From Event
- Emit Signal(s) from target event as the central location.
- Must be used on the map scene!

  Event ID:
  - The ID of the target event.  Use 0 for current event.
  - You may use JavaScript code.

  Signal(s):
  - What signal do you wish to emit to the surroundings?

  Range Type:
  - What is the range type to emit the signal to?
    - Square: A square-shaped range with the event at the center.
    - Circle: A circle-shaped range with the event at the center.
    - Delta: A diamond-shaped range with the event at the center.
    - Row: Spans horizontally across the map. 'x' expands up and down.
    - Column: Spans vertically across the map. 'x' expands left and right.
    - Exact: Ignores range distance. Picks only coordinates.

    Range Distance:
    - What is the range distance to emit the signal to?

  Response Switch ID:
  - Turns ON this Switch if an event responds to the signal.
  - Use 0 to ignore.

  Animation ID:
  - Play this animation at target tile location.
  - Leave at 0 to not play an animation.
  - Requires VisuMZ_0_CoreEngine!

    Mirror Animation?:
    - Mirror the animation?

    Mute Animation?:
    - Mute the animation?

---

EventSignal Command3.png

Emit Signal: From Player
- Emit Signal(s) from player as the central location.
- Must be used on the map scene!

  Signal(s):
  - What signal do you wish to emit to the surroundings?

  Range Type:
  - What is the range type to emit the signal to?
    - Square: A square-shaped range with the event at the center.
    - Circle: A circle-shaped range with the event at the center.
    - Delta: A diamond-shaped range with the event at the center.
    - Row: Spans horizontally across the map. 'x' expands up and down.
    - Column: Spans vertically across the map. 'x' expands left and right.
    - Exact: Ignores range distance. Picks only coordinates.

    Range Distance:
    - What is the range distance to emit the signal to?

  Response Switch ID:
  - Turns ON this Switch if an event responds to the signal.
  - Use 0 to ignore.

  Animation ID:
  - Play this animation at target tile location.
  - Leave at 0 to not play an animation.
  - Requires VisuMZ_0_CoreEngine!

    Mirror Animation?:
    - Mirror the animation?

    Mute Animation?:
    - Mute the animation?

---


Script Calls

EventSignals Preview.gif

The following are Script Calls that can be used with this plugin. These are made for JavaScript proficient users. We are not responsible if you use them incorrectly or for unintended usage.

---

Type-Related Script Calls

---

$emitSignalAtSquare(signal, centerX, centerY, range, exceptions)
$emitSignalAtCircle(signal, centerX, centerY, range, exceptions)
$emitSignalAtDelta(signal, centerX, centerY, range, exceptions)
$emitSignalAtRow(signal, centerX, centerY, range, exceptions)
$emitSignalAtColumn(signal, centerX, centerY, range, exceptions)

- Emits a 'signal' in a certain shape of a square with the center coordinate
  'centerX' and 'centerY' with a 'range' distance.
- Replace 'signal' with a string indicating the signal.
- Replace 'centerX' with a number representing the X map coordinate.
- Replace 'centerY' with a number representing the Y map coordinate.
- Replace 'range' to determine the range of the area to emit the signal.
- OPTIONAL ARG. Replace 'exceptions' with an array including the ID's of the
  events to not send signals to. 0 does NOT work here for "this event"
  unlike the Plugin Command. Be sure to include the target ID manually.

  Example:

  $emitSignalAtSquare('panic', 5, 8, 3)
  $emitSignalAtCircle('aggro', $gamePlayer.x, $gamePlayer.y, 5, [2])
  $emitSignalAtDelta('toggle', $gameMap.event(1).x, $gameMap.event(1).y, 1)
  $emitSignalAtRow('beam', 5, 4, 2, [$gameVariables.value(8)])
  $emitSignalAtColumn('charm', 8, 6, 4, [1, 2, 3])

---



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.00 Official Release Date: January 24, 2024

  • Finished Plugin!


See Also


End of Helpfile