店舗情報を管理するコアプラグイン – HIME_ShopManager.js

タイトル
Core plugin that manages shop information
作者名
ヘルプ
-------------------------------------------------------------------------------
== Description ==

In RPG Maker, you can open shops to allow players to buy or sell items.
However, the functionality that is available is very limited.

The Shop Manager provides basic shop management functionality.

At the core of this plugin is the ability to assign "names" to your shops,
and to be able to have the game open a specific shop when you would like to
enter one.

The ability to call up specific shops allows you to keep track of additional
information about the shop that would otherwise not be possible.

For example, you may want the shop to maintain a set of items for a period
of time, and then randomly refresh them after that time has passed.

Or perhaps you may want the shop to hold only a limited amount of each
item, and once you buy them all, it will be out of stock.

The shop manager serves as the basis for additional shop plugins and aims
to improve compatibility between them, as well as providing a standard way
to manage shops and shop goods.

== Terms of Use ==

- Free for use in non-commercial projects with credits
- Free for use in commercial projects, but it would be nice to let me know
- Please provide credits to HimeWorks

== Change Log ==

1.0 - Apr 12, 2016
Initial release

== Usage ==

-- Opening a Shop --

Before opening a shop, you must tell the game which shop you would like
to open. This can be done with a script call:

Shop.open( SHOP_NAME );

Where the SHOP_NAME is any name you would like. Make sure you're using
a script call and not a plugin command.

For example, you might
call your shop

"my shop"
"city1_weapon_shop1"
"fruit_shop2"

And so on. You might come up with a naming scheme that is easy to remember.
Once the name is set, it cannot be changed, so choose wisely!

When a shop is open, the game will automatically load all of the information
for that shop. This plugin offers some extra functionality built-in, but
additional plugins can be developed on top of it.

Finally, you can run the "Open Shop Processing" command to go to the shop.

-- Setting up Shop Goods --

After opening a shop, the first time you run the "shop processing" event
command will involve setting up the shop goods. For example, if your shop
sells potions and fruits, the shop will have those set up in the store
automatically.

During this setup process, any other "setup" methods provided by other
plugins will be called. The setup process serves as the initialization
process.

After that, however, the shop will not set up again until you choose to
reset the shop. This means that whenever you visit the shop, it will be
the same as when you left, unless you explicitly change it.

-- Reset Shop Goods --

If you would like to reset the shop, use the script call

Shop.resetShop( SHOP_NAME )

The next time you run the "shop processing" event, the shop will automatically
set up the goods again.

By default, it will simply set up all of the items that you specify.
Any custom changes to the shop that occur during the game will be reverted.

-- Multiple Shops in one Event --

If you would like to open different shops in the same event, simply make the
script call before the "Open Shop Processing" command.

For example, you can use conditional branches to ask the player which shop
they would like to visit, and then open the appropriate shop.

-- Same Shop from Different Events --

You can visit the same shop from different events by opening the same shop.

For example, if you have a traveling merchant that follows you around and
appears at every dungeon, and you wanted to make it look like the same person
that the player had done business with before, you would simply use the
shop open script call with the same name.

I would recommend using a common event for this, so that whenever the common
event is called, you know it is the same shop.

-------------------------------------------------------------------------------
パラメータ
title Shop Manager
date Apr 12, 2016
version 1.0
filename HIME_ShopManager.js
url

If you enjoy my work, consider supporting me on Patreon!

https://www.patreon.com/himeworks

If you have any questions or concerns, you can contact me at any of
the following sites:

Main Website: http://himeworks.com
Facebook: https://www.facebook.com/himeworkscom/
Twitter: https://twitter.com/HimeWorks
Youtube: https://www.youtube.com/c/HimeWorks
Tumblr: http://himeworks.tumblr.com/
-------------------------------------------------------------------------------
ライセンス表記
However, the functionality that is available is very limited.
Or perhaps you may want the shop to hold only a limited amount of each
- Free for use in non-commercial projects with credits
- Free for use in commercial projects, but it would be nice to let me know

紹介ページ http://himeworks.com/2016/04/shop-manager-mv/