Map Camera Zoom 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 MapCameraZoom Preview Zoom.gif

VisuMZ MapCameraZoom Preview Focus.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 MapCameraZoom Title.png

VisuMZ MapCameraZoom Preview Zoom.gif

This plugin enables the ability to zoom the in-game camera inward and make the visible game area larger and more focused. The camera can also focus on events or specific tiles other than just the player, making it helpful for cutscenes. Easing accessibility also makes the zoom and camera shifts more soft and less rough feeling.

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

  • Zoom ability allows the camera to zoom inward and enlarge the focal point.
  • Auto-zoom notetag allows for the camera to automatically shift when entering specific maps.
  • Camera focus function allows the game camera to instantly move over to the target event or target tile.
  • Easing accessibility allow for smoothing zooming and camera focus changes alongside dedicated wait time control.
  • Wait for Zoom and Wait for Camera Focus plugin commands are available for more on the go flexibility in eventing.

Requirements

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


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.


Caution

When using this plugin, there are things to be cautious about.

---

Screen Tearing

When using non-whole odd numbers like 1.3, 1.5, and 1.7, the likelihood of there being a "screen tearing" effect for the tilemap or for sprites is greatly increased. This can be avoided by having sprites with a pixel-worth of buffering space or by just simply avoiding to use non-whole odd numbers altogether.

---

Major Changes

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

---

Cannot Go Under 100%

VisuMZ MapCameraZoom Preview Zoom.gif

You can zoom in (aka go above 100% zoom), but you cannot zoom out (aka go under 100% zoom). The reasoning behind this is because of the limitation between PixiJS and WebGL. Going under 100% zoom will break the tilemap and cause large chunks of it to go missing.

This is true even without this plugin installed as you can try to use the innate RPG Maker MZ zoom functions and try to set the zoom scale under 100%. The tileset will immediately start to fall apart.

---

Sprites No Longer Smoothed

VisuMZ MapCameraZoom Preview Focus.gif

When using this plugin, certain resources like on-map character sprites and some tile sprites will have bitmap smoothing removed. The reason for this is due to PixiJS's texture bleeding problem when the sprites are zoomed in. If left alone, this causes an ugly filmy border around the edges of the sprite's dimensions that are otherwise an eye-sore to look at.

---

VisuStella MZ Compatibility

VisuMZ MapCameraZoom Preview Zoom.gif

While this plugin is compatible with the majority of the VisuStella MZ plugin library, it is not compatible with specific plugins or specific features. This section will highlight the main plugins/features that will not be compatible with this plugin or put focus on how the make certain features compatible.

---

Core Engine VisuStella MZ

Having the VisuMZ Core Engine installed will enable you to use easing when it comes to zooming and camera panning.

---

Picture Zooming

If you are NOT using the VisuMZ Core Engine, pictures will be bound to the zoom scale. This is NOT a bug. If you are using pictures in a completely vanilla RPG Maker MZ project without any plugins installed and enter a battle, the battle zoom will also make the pictures zoom in as well.

---

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.

---

Map-Related Notetags

VisuMZ MapCameraZoom Preview Zoom.gif

---

<Zoom: x%>
<AutoZoom: x%>
<Auto Zoom: x%>

- Used for: Map Notetags
- Causes the game camera to automatically zoom to x% when entering a map
  with this notetag.
  - This does NOT reverse itself when exiting the map. The zoom settings
    will carry over to other maps unless those maps have their own auto-zoom
    notetag present.
- The notetag variants do the same thing. Which you choose to use is
  entirely up to personal preference.
- Replace 'x' with a percentage value above 100% to represent the zoom scale
  you wish to change to when entering this map.
  - 'x' cannot be under 100%! Read the "Cannot Go Under 100%" section for
    more information as to why.

---

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.

---

Camera Plugin Commands

VisuMZ MapCameraZoom Preview Focus.gif

---

Camera: Focus Player
- Puts the camera focus on the player character.

  Duration:
  - How many frames should it take to finish focus?
  - 60 frames = 1 second.

  Easing Type:
  - Select which easing type you wish to apply.
  - Requires VisuMZ_0_CoreEngine!

---

Camera: Focus Target Event
- Puts the camera focus on target event.

  Event ID:
  - Insert the ID of the event to focus on.
  - Use 0 for this event.
  - You may use JavaScript code.

  Duration:
  - How many frames should it take to finish focus?
  - 60 frames = 1 second.

  Easing Type:
  - Select which easing type you wish to apply.
  - Requires VisuMZ_0_CoreEngine!

---

Camera: Focus Target Tile
- Puts the camera focus on target map tile.

  Map Tile X:
  - What is the X coordinate of the target map tile?
  - You may use JavaScript code.

  Map Tile Y:
  - What is the Y coordinate of the target map tile?
  - You may use JavaScript code.

  Duration:
  - How many frames should it take to finish focus?
  - 60 frames = 1 second.

  Easing Type:
  - Select which easing type you wish to apply.
  - Requires VisuMZ_0_CoreEngine!

---

Camera: Wait for Focus
- Waits for camera focus to finish changing before continuing.

---

Zoom Plugin Commands

VisuMZ MapCameraZoom Preview Zoom.gif

---

Zoom: Change Zoom
- Change the current zoom amount.

  Target Zoom Scale:
  - What is the target zoom scale?
  - 1.0 = 100%; 1.5 = 150%; 2.0 = 200%;
  - Cannot go under 1.0!

  Duration:
  - How many frames should it take to finish zooming?
  - 60 frames = 1 second.

  Easing Type:
  - Select which easing type you wish to apply.
  - Requires VisuMZ_0_CoreEngine!

---

Zoom: Wait for Zoom
- Waits for zoom to finish changing before continuing.

---

Plugin Parameters

General Settings

VisuMZ MapCameraZoom Preview Zoom.gif

VisuMZ MapCameraZoom Preview Focus.gif

These are the general settings used for the Map Camera Zoom plugin.

---

Settings

 Default Zoom:
 - What is the default zoom value?
 - 1.0 = 100%; 1.5 = 150%; 2.0 = 200%;
 - Cannot go under 1.0!
 Adapt Battle Encounter Ani:
 - Adapt the battle encounter zoom effect?
 - Occurs when entering battle from the map.
 Force Pixelated Map:
 - Force the map's tilesets to be rendered in pixelated form regardless of
   what other plugins may do.
 - This is primarily for pixel art games that would look better with more
   pixelated tiles when zoomed in.

---

Compatibility

 Map Lock Adjust:
 - Adjusts the Map Lock effect to the map's display position when exiting
   menus.
 - For VisuMZ_4_VisualParallaxes.
 - Best left false unless you know what you're doing.

---


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.06: October 17, 2024

  • Compatibility Update!
    • Added better compatibility with Visual Parallaxes when using plugin commands to focus scroll.


Version 1.05: July 18, 2024

  • Bug Fixes!
    • Fixed a bug where screen scrolling and focus didn't work properly. Fix made by Irina.
  • Compatibility Update!
    • Plugin now works better with Movement Core's smooth scroll.


Version 1.04: April 18, 2024

  • Documentation Update!
    • Help file updated for new features.
  • New Features!
    • New Plugin Parameter added by Arisu:
      • Plugin Parameters > Compatibility > Map Lock Adjust
        • Adjusts the Map Lock effect to the map's display position when exiting menus.
        • For VisuMZ_4_VisualParallaxes.
        • Best left false unless you know what you're doing.


Version 1.03: March 14, 2024

  • Documentation Update!
    • Help file updated for new features.
    • Added a new section called "Caution":
      • When using non-whole odd numbers like 1.3, 1.5, and 1.7, the likelihood of there being a "screen tearing" effect for the tilemap or for sprites is greatly increased. This can be avoided by having sprites with a pixel-worth of buffering space or by just simply avoiding to use non-whole odd numbers altogether.
  • New Features!
    • New Plugin Parameter added by Irina:
      • Plugin Parameters > Force Pixelated Map
        • Force the map's tilesets to be rendered in pixelated form regardless of what other plugins may do.
        • This is primarily for pixel art games that would look better with more pixelated tiles when zoomed in.


Version 1.02: July 13, 2023

  • Optimization Update!
    • Plugin should run more optimized.


Version 1.01: March 16, 2023

  • Compatibility Update
    • Better camera zoom with VisuStella MZ Movement Effect's Smooth Scrolling when this plugin's 'Adapt Battle Encounter Ani' setting is turned off.


Version 1.00 Official Release Date: November 2, 2022

  • Finished Plugin!

See Also

End of File