Conditional "Show Choices" (hide or disable choices)

● ARCHIVED · READ-ONLY
Started by Aloe Guvner 59 posts Page 2 of 3 View original ↗
  1. Heyo, wanted to post a thank you! This is an absolute life-saver for me! I dropped it in, set it up like you said, and it worked like a charm!
  2. It doesn't work for me, once I run the game the choices show the <<s[1]>> and <<v[1]>> strings.
    Is the plugin broken already?
  3. @lendokhar Works fine in all the tests I've run.

    Some basic problem solving questions for you:

    1. Do you have the latest version?
    2. Does it work with all other plugins turned off?
      • If yes, it's a compatibility issue. You need to identify the incompatible plugin by turning them on one-by-one until the issue is found
      • If it's a compatibility issue, please post a screenshot of the list of plugins you use from your Plugin Manager
    3. Did you rename the plugin to something besides the original name?
    4. Did you change the plugin parameters to use something besides << and >> ?
      • Please post a screenshot of the settings of this plugin from the Plugin Manager
    5. Do any errors appear in the console? (press F8 during playtest to open it)
  4. Is there a way to put a sound when selecting the disabled choice?
    I don't know if i have authorization to change your plug-in.

    For example:
    Code:
            var se = {};
            se.name = 'Item3';
            se.pan = 0;
            se.pitch = 100;
            se.volume = 90;
            AudioManager.playSe(se);

    It looks awesome !

    EDITED:
    Only now occurred to me that i disabled all rmmv default audio settings, and the default "disabled choice audio" will probably play when selecting. xD

    EDITED 2:
    Yes, it does. Lol, i'm sorry.
    Don't know how to deleted this spam. D:
  5. I never tested for sound, so it's good to know it works :)

    People are allowed to edit my plugins, if the edit can benefit most people then I request the edit is shared and I add it to a new version of the plugin.
  6. Is there a way to change the word on the option when player confrim their selection? I want to fool the player a bit
  7. What do you mean? When the player "confirms their selection"?

    When the player selects a choice, the choice window goes away and the event moves to the next command. There would be no text to change.
  8. lendokhar said:
    It doesn't work for me, once I run the game the choices show the <<s[1]>> and <<v[1]>> strings.

    I have this same problem and I can confirm that it is because of the Yanfly Extended Messaging Pack 1 (YEP_X_ExtMesPack1). When I switch that plugin off, the problem goes away. Unfortunately, the extended messaging pack is quite valuable for my game.

    fyi, thanks.
  9. Orleron said:
    I have this same problem and I can confirm that it is because of the Yanfly Extended Messaging Pack 1 (YEP_X_ExtMesPack1). When I switch that plugin off, the problem goes away. Unfortunately, the extended messaging pack is quite valuable for my game.

    fyi, thanks.
    I don't seem to have this issue myself, and I'm running a big load of plugins, are you placing Aloe's plugin BELOW Yanfly's?
  10. OR statement doesn't work.
    <<,v[119] < 8 || ,v[119] >= 17>>
    My 119 variable is set to 15 and it's disabled.

    btw is it possible to check for an item? If party has item ID 3, show choice?
  11. I've tested "or" statements, it works fine

    kako05 said:
    <<,v[119] < 8 || ,v[119] >= 17>>
    There's an extra comma after the || operator that's probably causing a syntax error, if you remove the comma it should work. I log all errors to the console which can be opened in playtest by pressing F8.

    You can also do it based on if the party has an item or not. You'll want to use the game party has item function.

    Code:
    gp.hasItem($dataItems[ID])
    Replace ID with the ID# of the item. "gp" is an abbreviation for "$gameParty" only for this plugin.
  12. gp.hasItem($dataItems[ID]) works just fine, but instead of disabling I need to enable a choice.
    I tried <<,gp.hasItem($dataItems[ID]) <= 0>> which should disable a choice if party has zero items? but had no success.

    Also, you were right, it was a syntax error.
    Really good plugin, one of my favorites. It helps with quest givers and progression of the quests.
  13. No problem - here's a quick tip:

    In Javascript there are different types of data. The most common types are:
    • Numbers
    • Strings (letters / text)
    • Boolean (true or false)
    The "has Item" function returns a boolean, so the result is either true or false. True if the party has the item and false if the party doesn't have the item (there must be a function that tells you how many items the party has but I forget what it is!)

    To flip it so the choice is enabled when the party has an item, you do the opposite - in Javascript and many programming languages this is called a not operator and it is a "!" mark.

    Code:
    <<,!gp.hasItem($dataItems[ID])>>

    In English, this means "Disable if the party does not have item" which is exactly the same as saying "Enable if the party does have item"

    Hopefully this makes sense? :biggrin:
  14. Oh, thanks! That makes sense. Really appreciate. I made a workaround with IF command and control variables (if this item = set variable to X), but it'll be easier for the next event knowing what you told me :)
    btw I'm using it with galv's picture choices
    https://galvs-scripts.com/2016/12/09/mv-choice-pictures/
    unfortunately, if the choice has a command << anything >> it won't display a picture upon choosing the choice. Would you take a look at it and what's causing it? I would pay for a compatibility patch :)
  15. If you find you are setting variables equal to the quantity of items a lot, you might be interested in this plugin. I found myself setting variables a lot so I wrote that to make it easier.

    I'll look at the Galv plugin to see if there is a conflict.

    Edit: Try putting my plugin below Galv's. He overwrites a function, I don't overwrite it (Window_ChoiceList.prototype.makeCommandList)
  16. Good news. I did that, it still didn't work. I managed to fix it by changing
    Dog House <p:travel_dog_1,960,368> <<v[112] < 1>>
    to
    Dog House <<v[112] < 1>> <p:travel_dog_1,960,368>
    :D
    Galvs must be in front of the syntax.
  17. was referred to this utility by another because i was having issues with another like plugin... (it kept freezing my game TT~~TT ) and it was SUPER SIMPLE!!! Thanks so much!!!
  18. Hey!
    I seem to have a problem with this plugin when combined with Galv's Visual Novel Choices. If I put this plugin on top of his, your plugin doesn't seem to work, but if I put it below his, the pictures for his visual novel choices don't load and it cuts off the beginning and the end of my text.
    Should I edit something in the plugins?
  19. Almightypebble said:
    Hey!
    I seem to have a problem with this plugin when combined with Galv's Visual Novel Choices. If I put this plugin on top of his, your plugin doesn't seem to work, but if I put it below his, the pictures for his visual novel choices don't load and it cuts off the beginning and the end of my text.
    Should I edit something in the plugins?
    Galv's vnc is not compatible with this plugin. With this plugin, the text is pushed off the center in my project since this plugin code is invisible on gamerun, but it's treated as an additional text in dialogue menu. I add empty spaces to counter that, but it's a messy way to do it.
  20. Excellent. This plugin works great. Hide and easily choose options.
    Good work