Shop Options: Hidden and Disabled

Help spread the word!Share on FacebookShare on TumblrTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditFlattr the author

The Shop Manager now comes with the ability to set two “shop options”. You can now choose whether a shop good should be included on the list, or whether a shop good should be selectable or not.

These options apply to all shops as long as they inherit from the base classes provided by the Shop Manager. I have updated my existing shops to support these options.

Required: Shop Manager

Usage

Hidden shop goods

To hide a shop good, you can specify a “hidden condition”, which is any valid ruby statement that evaluates to true or false. When the hidden condition is met, the shop good will not be listed in the buy window.

To specify a hidden condition, before the Shop Processing command in your event editor, make a script call

hide_good(good_id, condition)

For example, if we wanted to hide the 2nd good if actor 1’s level is below 10, we can say

hide_good(2, "$game_actors[1].level < 10")

Disable Shop Goods

To disable a shop good, you can specify a “disable condition”, which is any valid ruby statement that evaluates to true or false. When the disable condition is met, the shop good will not be selectable even if you have enough money to buy it.

To specify a disable condition, before the Shop Processing command in your event editor, make a script call

disable_good(good_id, condition)

For example, if we wanted to disable the 3rd good if the party leader’s level is less than 5, we can say

disable_good(3, "$game_party.leader.level < 5")
Help spread the word!Share on FacebookShare on TumblrTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditFlattr the author

You may also like...

5 Responses

  1. Mike says:

    Hime, can you help me with hiding an item while switch X is on/off? Can’t figure it out 🙁

    • Hime says:

      Making the following script call before opening the shop

      hide_good(2, "$game_switches[3] == false")

      Will hide the second good on the list if switch 3 is OFF.

  2. Uh? Where is the script download?

Leave a Reply

Your email address will not be published.

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax