One Time Purchase 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


OneTimePurchase Preview.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

OneTimePurchase Preview.png

Not all NPC peddlers have infinite stocks of items. Sometimes, it makes more sense for them to only sell whatever they have on hand, regardless of the item's usual limitability. This plugin allows you to switch between a "One Time Purchase" mode where item entries can only be bought once in a store versus unlimited. To sell more than one of a specific item type, just add more entries to it. However, anything that has been bought will remain sold out until the NPC peddler restocks.

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

  • Plugin Command that lets you switch between "One Time Purchase" mode for single entry buy versus unlimited buy.
  • Shop contents are stored based on what the player has bought.
  • Plugin Commands allow for the player to revisit those instances of the shop where the item entries have already been bought.
  • Inserting multiple copies of the item type in a shop's goods listing will allow for the player to buy multiples in restricted form.

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.


Instructions - Quick Start

Here are some instructions to get yourself started quickly on using the Randomize Shop feature.

---

OneTimePurchase Command1.png

Step 1: Create An Event with a Plugin Command

1. Create a new event on a map.
2. Open it up.
3. Add a new Plugin Command: "Mode: Enable One Time Purchase Mode?".
4. Set the "Enable/Disable" parameter to "true".
5. Click OK to save the contents of the Plugin Command.

---

OneTimePurchase Step2.png

Step 2: Populate Shop Goods

1. Create a new event command with "Shop Processing".
2. Add merchanise to it.
3. Add three copies of "Potion" (yes, the same exact item).
4. This will be used to demonstrate how to purchase multiple "copies" of the
   items in limited form.
5. Any price variations among the copies will be based on the first copy of
   the item listed. This is how vanilla RPG Maker MZ handles it.
6. Add in other items, too.
7. Click OK to save the contents of the "Shop Processing" event.

---

OneTimePurchase Step3.png

Step 3: Close the One Time Purchase Mode:

1. Add a new Plugin Command: "Mode: Enable One Time Purchase Mode?".
2. Set the "Enable/Disable" parameter to "false".
3. Click OK to save the contents of the Plugin Command.
4. This is so that the mode does not affect other shops.

---

OneTimePurchase Step4.png

Step 4: Add in a Self Switch

1. After the Plugin Command is inserted, add in a Self Switch.
2. Set Self Switch "A" to ON.
3. Click OK to save the contents of the Self Switch.

---

OneTimePurchase Step5.png

Step 5: New Page

1. Create a new page for the event.
2. Make the new page require Self Switch "A" to be ON in order to appear.
3. Remember to give the new event page a graphic.

---

OneTimePurchase Step6.png

Step 6: Add the "Open" Plugin Command

1. Add a new Plugin Command: "Mode: Enable One Time Purchase Mode?" with
   the setting set to true.
2. Add a new Plugin Command: "This Event: Open Last Shop".
3. Add a new Plugin Command: "Mode: Enable One Time Purchase Mode?" with
   the setting set to false.
4. Save the event.
5. Save your game and Play Test it.

---

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.

---

Mode Plugin Commands

OneTimePurchase Preview.png

---

OneTimePurchase Command1.png

Mode: Enable One Time Purchase Mode?
- Enables/disables One Time Purchase mode for shops.

  Enable/Disable?:
  - Enables/disables One Time Purchase mode for shops.
    - One Time Purchase
    - Unlimited Purchase

---

Remote Event Plugin Commands

---

OneTimePurchase Command2.png

Remote Event: Open Last Shop
- Reopens the last shop for remote event, retaining any and all sold items
  in their main shop settings.
- One Time Purchase settings are not saved and have to be manually reenabled.

  Remote:

    Map ID:
    - ID of map, remote event is on. Use 0 for this map.
    - You may use JavaScript code.

    Event ID:
    - ID of remote event.
    - You may use JavaScript code.

---

This Event Plugin Commands

OneTimePurchase Preview.png

---

OneTimePurchase Command3.png

This Event: Open Last Shop
- Reopens the last shop for this event, retaining any and all sold items in
  their main shop settings.
- One Time Purchase settings are not saved and have to be manually reenabled.

---

Plugin Parameters

General Settings

OneTimePurchase Params.png

These are the general settings for this plugin.

---

General Settings

 Default On/Off:
 - Do you want "One Time Purchase" mode to be on by default?
   - One Time Purchase
   - Unlimited Purchase
 Sold Text:
 - Text that's shown for any bought items.
 - You may use text codes.
   Offset X:
   - Offset the "Sold Text" by this many pixels.
   - Negative: left, Positive: right
   Offset Y:
   - Offset the "Sold Text" by this many pixels.
   - Negative: up, Positive: down

---


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: March 9, 2022

  • Finished Plugin!


See Also


End of File