Shop option: price formula

The Shop Manager now supports a new shop option called “price formula”. This allows you to set the price of a good using a formula.

The basic use case is to allow you to enter arbitrary prices (for example, an easy way to set prices over 999999).


The real power of price formulas comes in when you begin using formulas. For example, you can base the price on game variables or switches to have the prices fluctuate over-time. You can base the price on your actor’s levels or stats. Perhaps you have a script that provides you with a “merchant” skill level, and you want to base the price on this skill level.

As with any other shop option, they apply to a single good for that specific shop.


This is built into the Shop Manager


To specify a price formula, in your event, before the shop processing command, make the script call

price_good(good_id, formula)

Where the good_id is the ID of the shop good that you want to apply this formula to (where 1 is the first item on the list, 2 is the second item, etc), and `formula` is the formula you want to use.

You may also like...

4 Responses

  1. Disponi says:

    So I’m not really sure I understand how to base a formula off of a character’s stats. I want to base the price off the difference between each character’s max HP and MP and their current HP and MP.

    • Hime says:

      If you need to get each actor’s HP differences you would need to write a long formula. See if this works

      $game_party.members.inject(0) {|r, actor| r + (actor.mhp – actor.hp) }

  2. Mega says:

    Ah man, I thought this would let me create a shop that would sell items that would require a certain amount of a certain variable like reputation or something. This was not what I had expected but then again that's my own misunderstanding.

    • Hime says:

      The formula only supports a number as a final value and uses that to pull from your bank. How are you showing the cost based on some variable?

Leave a Reply

Your email address will not be published. Required fields are marked *