Conditional Shop Prices (YEP)

From Yanfly.moe Wiki
Jump to navigation Jump to search


System

This is a plugin created for RPG Maker MV.

For help on how to install plugins, click here.

For help on how to update plugins, click here.

Got errors with your RPG Maker MV plugin? Click here.

Download

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.

Yanfly Engine Plugins

This plugin is a part of the Yanfly Engine Plugins library.

Click here if you want to help support Team Yanfly on Patreon.

Introduction

This plugin requires YEP_ShopMenuCore. Make sure this plugin is located
under YEP_ShopMenuCore in the plugin list.

Ever wanted to have shop prices for certain items fluctuate as your game
progresses? Or maybe even set market values for certain items that change
over time. This plugin lets you bind base prices, percentages, increases,
exact values, and more! And the best part is, this can be done through
variables so you can have extremely dynamic control over your game's market.

Notetags

NotetagsMV.png

RPG Maker MV'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.

Insert the following notetags into the items, weapons, and/or armors you
want these notetags to affect.

Item, Weapon, and Armor Notetags:

  <Base Price Variable: x>
  - Sets the base price of the item to this variable's value.
  This will replace the price set in the database.

  <Percent Price Variable: x>
  - Sets the variable which defines the percent modifier for the price.
  If the variable's value is 100, then the percentage is 100%.
  If the variable's value is 50, then the percentage is 50%.
  If the variable's value is 350, then the percentage is 350%.
  Use multiples of this notetag to have multiple variables affect the price.
  This is calculated after the base price.

  <Increase Price Variable: x>
  - Sets the variable which defines a flat increase/decrease for the price.
  If the variable's value is 100, then the price is increased by 100.
  If the variable's value is -200, then the price is decreased by 200.
  Use multiples of this notetag to have multiple variables affect the price.
  This is calculated after the price percentage modifier.

  <Exact Price Variable: x>
  - Sets the variable which determines the exact value of the price.
  If the variable's value is 50, then the price becomes 50.
  If the variable's value is 2000, then the price becomes 2000.
  This ignores all other modifiers.

  <Price Minimum: x>
  <Price Maximum: x>
  - Sets the minimum/maximum values the price can reach. This is used to
  prevent some prices from overinflating drastically.

Order of Calculation

Calculations will be done in the following order:

  1. Default price of the item
  2. <Base Price Variable: x>
  3. Percentage calculated by the global percentage variable plugin parameter
  4. All instances of <Percent Price Variable: x>
  5. Flat increase calculated by the global increase variable plugin parameter
  6. All instances of <Increase Price Variable: x>
  7. Overwrite all if <Exact Price Variable: x> exists
  8. Running the code of the Global Price Finalization plugin parameter
  9. Finishing up with <Price Minimum: x> and <Price Maximum: x>

Changelog

Version 1.01:
- Fixed a bug that would reset the global variables.

Version 1.00:
- Finished Plugin!