Choice Options

This script provides “choice options” that provide finer control over your choices.

You can now hide choices that should not be shown using a few simple conditions rather than duplicating a choice list several times using conditional branches.

You can disable choices from being selected, which is simply impossible under normal circumstances.

Additional options may be added in the future

choice_options1

Download

Script: download here
You may be interested in the Large Choices script as well

Tutorials

A list of tutorials that show how choice options can be used.

Usage

In your event, before the show choices commands, use script calls to set each choice option
The general format of the script call is

method_name(choice_number, arguments, ... )

You can look up the available methods in the reference section of the script.
The choice_number is 1 for the first choice, 2 for the second choice, and so on.
The arguments are specified in in the reference.

Any option that uses a formula can use formula variables. The following formula variables are available

p = $game_party
t = $game_troop
s = $game_switches
v = $game_variables

All formulas are evaluated within the context of the game interpreter, so any game interpreter methods can be called directly.

Hidden Choice

When the condition is true, the specified choice will not be shown on the list. Use a script call

hide_choice(choice_num, condition)

Where the condition is a string representing your conditional statement.

Disabled Choice

When the condition is true, the specified choice will not be selectable, though it will be shown on the list. Use a script call

disable_choice(choice_num, condition)

Colored Choice

The text of the specified choice will be drawn with the selected color. The color is currently a number from 0 to 32, which is not very useful.

color_choice(choice_num, color_num)

Disabled Choice Color

The colored choice ignores whether the choice is enabled or not. You can use the “disable colored” option to set the color of the text if the choice is disabled.

disable_color_choice(choice_num, color_num)

Text Choice

The text of the specified choice will be replaced by the text for this option. This allows you to exceed the 50-char limit imposed by the editor.

text_choice(choice_num, text)

You can also specify a condition along with the text. When the condition is satisfied, the text will be displayed.

text_choice(choice_num, text, condition)

For example, to make it so that the first choice’s text will be changed to “???” if Switch 3 is OFF, you would write

text_choice(1, "???", "$game_switches[3] == false")

Note

This is a common issue. When you are trying to condition on a switch or variable, you may be tempted to write things like

$game_switches[0001]

Because that’s how the editor displays it. This is wrong. Leading zeroes are treated as octal numbers, which is completely different.

The correct way to write numbers  is to remove all leading zeroes like this

$game_switches[1]

You may also like...

145 Responses

  1. JosephNum says:

    Plumbers working together on a drain clearing job
    Irvine CA Emergency Plumber
    Rest assured we are here for your plumbing needs 24/7/365

    Barker and Sons provide a variety of services to our Irvine customers. You can see a complete list of these services to the side here, such as drain cleaning and water heater installation. Barker and Sons Plumbing & Rooter is eager to help fix your plumbing problems in Irvine.

    The Best Emergency Plumbing Services in Irvine, CA!
    Barker & Sons plumber performing sewer camera inspection in Orange County
    Barker and Sons is your emergency plumbing solution in Irvine. For over 35 years, we’ve served the area, and we’re proud to serve you, too. Our technicians are easy-to-understand and personable. We’ll show up to your Irvine home ready to work.

    We offer friendly and courteous service from the moment you contact us to any questions or problems after leaving. Barker and Sons work hard to ensure your plumbing issues are fixed right the first time. Contact us now.

    Sewer Line Repair & Replacement in Irvine
    Do you have a sewer line problem and not exactly sure what the issue is?

    Here’s a list of potential reasons:

    Broken or cracked pipes
    Pipes blocked by tree roots or grease
    Corroding or deteriorating pipes
    Pipes that have bellied or sunk into the ground due to soil conditions
    Pipes that have leaking joints
    When needing sewer repair services in the Irvine area, Barker and Sons Plumbing has got you covered. We offer a variety of trenchless sewer repair solutions and guarantee to have your sewer line up and running efficiently again with minimal disruption to your landscaping, sidewalk or driveway.

    If your tree roots have caused a blockage to your home’s sewer line, it might be time for a replacement. Luckily, we have great technology and the technical knowledge to find your problems fast! With our in-pipe video inspection, you can view in real time the condition of your underground piping.

    Check out our approach to trenchless pipe replacement.

    Choose Barker and Sons and Put Your Plumbing Issues Behind You
    Want to know why you should choose Barker and Sons as your go-to emergency plumbers? Here are a few reasons:

    100% satisfaction guaranteed. We ensure your plumbing issues are fixed and fixed correctly before we leave your home – every time.
    We provide a map you can check to see where your technician is and their ETA. We understand your time is essential.
    Customer-centric plumbing solutions. Your time and money are valuable. We don’t want to waste either. We’ll give you honest recommendations upfront, and we’re available to fix your plumbing problem in Irvine 24/7.
    Contact Barker and Sons now. We’re here to answer questions, schedule service calls, and reassure you that we’re the only Irvine plumber for you.

    We’re Plumbing Experts First and Foremost
    Barker and Sons lives and breathes plumbing. We’ve been doing this a long time, and we’ve learned a lot along the way. By continuing to educate ourselves and challenging ourselves with Irvine’s plumbing issues, we can make sure that our technicians are prepared for anything. This only benefits our customers as we find unique solutions to your home’s plumbing problems when needed.

    Guaranteed Fast and Friendly Service in Irvine
    We don’t want to waste your time with plumbing solutions that won’t work. We help you understand what’s wrong, offer the best solution possible, and get the job done right the first time. Barker and Sons is proud to provide the highest level of customer service you’ll see in plumbing in Irvine. We’re here for you when you first contact us for anything you need after the job is complete.

    Want to see the Barker and Sons difference? Call us or contact us today to schedule an appointment and tackle your plumbing issues once and for all.

    Our Plumbing Services in Irvine
    Our plumbing services encompass any and all plumbing repairs, replacements, and new installations, including:

    24-Hour Emergency Plumbing
    Pipe Leak Detection and Repair
    Slab Leaks Repairs
    Drain Cleaning
    Sewer Line Repairs
    Video Sewer Camera Inspections
    Rooter Service
    Gas Leak Detection
    Water Heaters & Tankless Water Heaters
    Toilet Repair & Installation
    Tubs & Showers
    Sink and Faucet Replacement
    Garbage Disposals
    Hydro Jetting
    Trenchless “No Dig” Sewer Pipe Repair
    Copper & PEX Repiping
    Water Purification Services
    Earthquake Safety Valves
    You name it, we can repair, install or replace it!

    Contact Barker & Sons For All Your Plumbing Needs
    When you need an emergency plumber in Irvine, your first call should be to Barker and Sons Plumbing. Our friendly and professional plumbers are available 24/7 to respond to any plumbing and water treatment issue you may be facing in your home. From drain cleaning to full pipe replacement, there’s no job too small, and nothing too big that we can’t take care of.

    Contact Barker and Sons today to get the peace of mind that comes with having a well maintained plumbing system.

    Featured Coupon
    Barker & Sons Plumbing
    $99
    Drain Cleaning

    This applies to first time residential customers during regular business hours, main lines thru and accessible outside clean-out, cabling only, homeowners must be present (no rentals).

    See More Coupons

    Featured Video
    See More Videos

    Our Services
    Emergency Plumbing Services
    Burst Pipe Repair
    Rooter Services
    Pipe Leak Detection & Repair
    Slab Leak Repairs
    Orange County’s Repiping Experts
    Orange County Gas Leak Detection & Gas Line Repair
    Gas Line Installations
    Garbage Disposal
    Tubs & Showers
    Sinks
    Toilets
    Sump Pumps
    Water Heaters
    Water Treatment & Conditioning
    Residential Plumbing
    Commercial Plumbing
    Need service today?
    Call our plumbing experts at 714-452-8460 or send
    a request by clicking the button below.

    What Our Customers Are Saying
    Trusted and highly recommended

    Reviews icon
    4.9
    Total stars
    Google reviews icon
    3777
    Google reviews
    Facebook reviews icon
    377
    Facebook reviews
    Yelp reviews icon
    1023
    Yelp reviews

    Recognition
    Barker & Sons Plumbing
    Barker & Sons Plumbing

    3900 E Miraloma Ave

    Anaheim

    CA 92806

    714-452-8460

    Quick Links
    Emergency Plumbing Repair
    Why Us
    Plumbing Solutions
    Drain Cleaning
    Sewer Cleaning
    Plumbing Financing in Anaheim
    Blog
    Contact Us
    Privacy Policy
    Savings
    $99
    Drain Cleaning

    This applies to first time residential customers during regular business hours, main lines thru and accessible outside clean-out, cabling only, homeowners must be present (no rentals).

    See more savings

    Reviews
    4.9
    Based on 5177 reviews

    Other
    We accept: Visa MasterCard American Express

    Copyright © 2024 Barker & Sons Plumbing. All rights reserved.

    Visit us on Facebook Follow us on Instagram Follow us on Twitter Visit us on YouTube

  2. Ed says:

    Hi. Unfortunately, the text gets cut off when I use the ‘text_choice’ function with > 50 characters. I’ve tried removing any other scripts that affect font such as Yanfly’s as suggested by another comment but couldn’t get it to work. Would really appreciate any help.

  3. august says:

    Welcome to my blog ,
    I’m Kyran Mckinney.
    If you’ve ever been overscheduled and couldn’t finish a research paper , then you’ve come to the right place. I assist students in all areas of the writing steps . I can also write the essay from start to finish.
    My career as an academic writer started during my school years . After learning that I was very capable in the field of academic writing, I decided to take it up as a job .

    Skilled Academic Writer- Kyran Mckinney- centro-emprego.com Team

  4. R says:

    I am super late to the party but thank you. This and the “large choices” script are lifesavers to a simple quality of life problem.

    Coupled to the built-in condition tools, it’s possible to make pretty powerful per-choice options using an always true script call on one of the conditions when in need to apply the option effects. When used just before the choice calls it can make them so dynamically changing it’s super cool!

  5. Slick says:

    Hey Hime, just wanted to know if I could use these scripts in commercial games:
    Item Rarity, Map Screenshot, Shop Manager, Shop Stock, and Choice Options.
    Do note, I don’t yet know if my game I am making will be commercial but just in case would it be ok?

  6. Micheallitle says:

    SCUM >>>>> http://bit.ly/2UrP6TP

  7. excellent points altogether, you just received a emblem new reader.

    What may you suggest in regards to your publish that you simply made
    some days ago? Any sure?

  8. I am genuinely grateful to the owner of this website who has
    shared this great paragraph at here.

  9. It’s great that you are getting thoughts from this piece of
    writing as well as from our discussion made at this time.

  10. PeteTrip fotbollströjor MaritzaY HungyfL billige fodboldtrøjer Adelaide
    TheresaN maglie calcio bambino Charolet Logansol fotballdrakter ban TammaraC

  11. Guardinthena says:

    Forgive me if this has been asked already, but can this script do -or be updated to- display message/text/help_window when hovering over a choice option to display additional information to the player outside of the choice box? For instance, I’m creating a character creation and when selecting ‘Race’ it would show additional choice options such as ‘Human,’ ‘Elf,’ etc. So when hovering over the choice option of say ‘Human,’ a message box/text/help_window would display information to the player about that choice before selecting.

  12. download says:

    It’s awesome in favor of me to have a web page, which is good
    in favor of my knowledge. thanks admin

  13. here says:

    Hello! This post could not be written any better! Reading this
    post reminds me of my good old room mate! He always
    kept chatting about this. I will forward this post
    to him. Fairly certain he will have a good read.
    Thank you for sharing!

  14. Rodita says:

    One question from you…
    If a have a variable,the id is “1” ok?
    And i pretend to disable the choice if this variable is “ON” and the value is 5 our more…What i need to do?
    Please,give me a exemple,i really bad on understand by works…

  15. togel-hongkong
    togelhongkong
    togel hongkong

  16. João Miguel says:

    A luz das colunas de clareza refletiu nos móveis brancos,
    nos fios de cristal e também nas cortinas semitransparentes
    criando um evento belo no salão. porque sei que As duas formas de decoração de casório são possíveis. http://www.game1.info/yybbs/yybbs.cgi?list=thread

  17. Thankfulness to my father who stated to me about this website, this web
    site is actually remarkable.

  18. arenaqq says:

    Hey There. I found your blog the use of msn. This is an extremely
    well written article. I’ll be sure to bookmark it and return to learn more of your
    useful info. Thanks for the post. I’ll certainly return.

  19. Full Review says:

    First off I would like to say superb blog! I had a quick question which I’d like
    to ask if you don’t mind. I was curious to know how you center yourself and clear your thoughts before writing.
    I’ve had difficulty clearing my thoughts in getting my thoughts out
    there. I do enjoy writing however it just seems like the first 10 to 15 minutes
    are usually lost simply just trying to figure out how to
    begin. Any ideas or tips? Thanks!

  20. I have read so many content concerning the blogger lovers but this piece of writing is in fact a
    nice article, keep it up.

  21. MARINA SMIR says:

    Different colored shirts signified the key opposing sides that featured prominently within the 2008 Thai political crisis , with purple having been worn by the supporters of the populist Folks’s Energy Party
    (PPP), and yellow being worn by the supporters of the royalist and anti- Thaksin Shinawatra motion the People’s Alliance for Democracy (PAD).

  22. lasertest says:

    I am genuinely delighted to glance at this blog posts which includes lots of
    useful data, thanks for providing such data.

  23. Shiny Flare says:

    Hello, GREAT script! However, I run into an issue if it’s combined with Yanfly’s Message System. When both scripts are installed, the choices will not extend correctly according to the text in them – if the text within the choice is too long, it will be simply cut off at the right end of the screen.

    I tested this in a new project with only this script and Yanfly’s Message system and it really seems to be a compatibility problem. Since many people use his scripts, maybe you could look into it?

    • Shiny Flare says:

      Okay, strange, I played around a bit and it seems like this only happens to the [first] choice in a project. After that, everything works perfectly. So now I’ll just have to think of a choice with short answers for the first choice in my game I guess!

    • Shiny Flare says:

      Alright, I was wrong again. It’s not the first choice in the game that gets cut off, but the first choice in each PLAY.

      Example: You start the game – the first choice will get cut off and after that, all other choices work fine. That is, until you close the game, restart it, and then again the first choice will get cut off. This is really giving me a headache…

    • Shiny Flare says:

      I kinda figured out the cause of the problem. Only using Yanfly’s Message System with Choice options will not lead to issues, but if you use Yanfly’s Message System to customize the font of the game, the choices may get cut off at the right side of the screen.

      I looked through your script and realized that it also applies changes to the font settings. I don’t know much about RGSS but I can imagine that’s the reason why they work against each other a bit.

      • Hime says:

        Yes, this script includes the ability to change text color, which may conflict with others that also change font settings.

        • Shiny Flare says:

          I kinda “solved” the problem by commenting out the “def reset_font_settings” in line 322. Now I cannot change the color of choices anymore, but all other functions of your script work completely fine and there are no compatibility issues.

  24. kevin eontrainer says:

    line 306: NoMethodError occured
    undeefined method ‘each_with_index’ for nil:NilClass

    Please help… This is a good script.. But it always comes up with this error everytime I start new game or load a saved game..

    • Hime says:

      Do you have other scripts installed? There may be a compatibility issue. I just checked in a new project and it starts a new game fine.

  25. piksalh says:

    Hello, supernice script! is it possible to set that the choice will be hidden if the specific enemy IS NOT in the ongoing battle troop list?

    • Hime says:

      I will provide an example. Let’s say you wanted to know if the first enemy is alive:
      $game_troop.alive_members.include?($game_troop.members[0])

      You should be able to use that as your formula.
      Note that counting starts from 0 instead of 1.

  26. lonequeso says:

    I’m having an issue combining conditions. I can’t seem to get the syntax right.

    hide_choice(4, “$game_actors[2].level < 20”) or (“v[216] < 2”) or (“s[102]== false”)

    This one doesn’t give an error message, but it doesn’t hide the choices properly either.

  27. Xxen says:

    Strange bug, setting “Show Choices -> When Cancel -> Dissalow” does not block Cancel button when choosing options in menu. :[

  28. Anonymous says:

    Heys, there’s a bug in this script where disallowing “cancel out of choice list” doesn’t work anymore.

  29. Amyrakunejo says:

    It’s like, I could never figure this out on my own. Thanks, miss (I presume you’re a lady), I really am hoping that when I implement this, that it works. I also used your ‘Large Choices’ script, and it works flawlessly.

    I do wonder though, if you happen to have a script that will allow me to press a button on any map screen to call up a special menu? I was able to do this on RPG MAKER XP, but the script module there, compared with VX ACE…no comparison. I’ve even tried to import those scripts, and failed. Thanks in advance for any insight.

  30. Brandon says:

    Could I get some help on this?

    I have an event set up to where the player can choose monsters to “craft”; however, if they don’t have the necessary ingredients to craft a monster, that monster will only appear as “???” and will be disabled. So when you have no ingredients, only five “???”s are there and the Cancel option is the only selectable option.

    Here is the script I have set up.

    After atttempting to select [Craft] in-game, I get this error:

    Script ‘Game_Interpreter’ line 1409: SyntaxError occurred.

    unexpected ‘)’, expecting ‘:’

    And so I thought, oh, that seems easy to fix. I just have to go into the script and change, in example, (1, “game_switches[63]”) to (1, “game_switches[63]”: true).

    But when I did that, I got this error instead:

    Script ‘Game_Interpreter’ line 1409: SyntaxError occurred.

    unexpected ‘:’, expecting ‘)’
    disable_choice (1, “$game_switches[63]”: true)

    How can I fix this?

    • Hime says:

      Your disable_choice call was initially correct.
      But the overall problem here is that my script does not support conditional text display, so when you tried to specify a condition for your text_choice call, it did not work (along with syntax errors)

      And so I have updated it so that for the text_choice command, you can specify a second argument which will be a condition that determines whether the text_choice command will have any effect.

      Compare the following:

      text_choice(1, "???")
      text_choice(1, "???", "$game_switches[63]")
      

      The first one is the same as specifying a condition that is always true.
      The second one specifies that the text “???” will only be displayed when switch 63 is ON. When switch 63 is OFF, it will display whatever the original text should be.

  31. Pedro says:

    i put hide_choice(1,”$game_actor[1].skills.include?($data_skills[26])”) but still crash

    Script ‘Game_Interpreter’ line 1411: NoMethodError occured.
    Undefined method `skills’ for [1]:array

    • Hime says:

      If the editor breaks up your script call into multiple lines you need to break it up like

      $game_actors[1].
      skills.include?(
      $data_skills[26])
      

      Notice where the periods and parentheses are placed.

      • Pedro says:

        i also try notinclude (to don’t show if don’t haves skill 26) but again error. what is the correct code/syntax to don’t have skill

      • Pedro says:

        THANKS so very much, please ignore the notinclude bellow i try

        hide_choice(1,”$game_actors[1].

        skills.include?(

        $data_skills[26])==false”) (don’t haves skill 26, don’t show)

        And work

        • Hime says:

          Alternatively you could use the exclamation mark ! to negate the condition.
          So if

          $game_actors[1].skills.include?($data_skills[26])

          means if actor 1 has learned skill 26, then

          !$game_actors[1].skills.include?($data_skills[26])

          means if actor 1 has not learned skill 26.

  32. Pedro says:

    who i do to hind/disable a option if the actor 1 (from data base) or actor 0 from party (the leader) don’t haves a specific skill, equipment , name, or class?
    Also who i do tho do the same if a switch is off

  33. Burny says:

    Is it possible to hide choices if a certain actor name is applied? (I’m storing string variables in actor names)
    Thank you.

    • Hime says:

      $game_actors[3].name.include?(“test”)

      Will check whether actor 3’s name has the string “test”
      Depending on what you need it may or may not be more complex.

  34. Andar says:

    Hi Hime,
    something is mixed up in the script’s description of the disable option.

    The tutorial above says “disable if condition is true”, the comments inside the script say “disable if condition is NOT met”. Because someone had a problem with that, I assume that the script instruction are correct and the tutorial description above wrong – please check.

    http://forums.rpgmakerweb.com/index.php?/topic/34406-vx-ace-trouble-with-hime-choice-options-script/

  35. Piers says:

    Hi, I have a doubt, I want to make this:

    -Disable choice 1 if variable 42 is equal to variable 60 AND if variable 41 is equal to 0

    -Disable choice 2 if variables 47, 51, 55 and 59 are equal to 0 (ALL of them)

    Can someone help me with this one? Thanks

    • Hime says:

      Here are the conditions:

      Choice 1:
      v[42] == v[60] && v[41] == 0

      Choice 2:
      v[47] == 0 && v[51] == 0 && v[55] == 0 && v[59] == 0

      • Piers says:

        If I try it like this

        disable_choice(1,v[42] == v[60] && v[41] ==
        0)

        It doesn’t work, the argument is too long, same when I try the second choice

  36. Anonymous says:

    I have a question/problem in eventing.
    I want to disable a choice after I selected it, so i made this script call
    disable_choice(3,”true”) and It works! But, it’s not permanent. When I pick another choice,
    the disabled one re-become enabled. How can I solve this? Here is a screenshot

  37. Smelipanda says:

    Hey Hime, i was wondering if its possible to have a multiple checks for the same choice. When i put them, one ontop of the other, it doesnt appear to play nice.
    disable_choice(1, “$game_variables[2] 2”) is what im using and it seems the bottom takes precedence. Any tips or tricks :P?

    • Hime says:

      You need to use logical AND && or OR || to combine them.

      disable_choice(1, “$game_variables[2] && other_condition″ )

      • Smelipanda says:

        LOL somehow i couldnt figure out to extend the “” around both arguement. smh. Thanks for the quick response Hime!

  38. Neoz Kaho says:

    This script is marvelous! It helps me a lot on creating choices with many customization. However, I encountered a problem when I use this script with Large Choice.
    Suppose I create 4 choices + 4 choices
    Choice 1
    Choice 2 and so on…

    Choice 8
    and use hide_choice(7, "$game_variables[27]< 1") to hide Choice 7. It works.

    There's however a slight problem because I used Choice 8 as a branch that will be executed on pressing Cancel button.
    When all 8 choices appear, cancelling works as intended. (Choice 8 is executed.) However, when choice 7 is hidden, cancelling suddenly does not work as if choice 8 never existed.
    After testing out more by changing Cancel to activate Choice 7 instead, it executed Choice 8 when the actual Choice 7 is hidden. It will still however execute Choice 7 as intended when all choices appear and none are hidden.

    I believe this is numbering problem, if there's any workaround or update to the script in the future to remedy this problem, it would be wonderful! In the meantime I'll use the workaround for now. Thanks again for the great scripts!

    • Hime says:

      Thanks for the report. I will look at the demo you have sent and see if I can resolve the issue.

      • Neoz Kaho says:

        Thank you so much for bug fixes. Issues with the scripts are resolved and now it works like charm!

  39. BananaBoy says:

    Hi, nice script! Will this work with your Large Choices script?

  40. johnny5 says:

    hello Hime, thanks for the great scripts.

    your large choices script worked flawlessly for me, but I'm encountering an error with your choice options script.

    the error returned says:

    "
    Script 'hide_choice' line 257: NoMethodError occured.

    unidentified method error 'each_with_index' for nil:NilClass

    "

    here is line 257:

    $game_message.orig_choices.each_with_index do |choice, i|

    any idea what this might mean?

  41. Jaden says:

    Hey Tsukihime, how can I make it work with items from inventory? 🙂

    • Hime says:

      What do you mean? If you want to check whether an item is in the inventory you can use

      $game_party.has_item?($data_items[2])
      

      Or something like that.

      • Jaden says:

        Tsukihime, Yep, it works, but in a different way as I need. I'll explain:
        I want to make a choice appear when a specific item exists in the inventory.
        When I put this command:
        hide_choice(1,"$game_party.has_item?($data_items[2])")
        the choice is hidden when I have the item #2, and revealed when I don't have the item. What do I add or change in that command you previously gave me?

      • Rabid-Mermaid says:

        Hi,
        I have the exact same problem with items as Jaden had, except when I try to disable or hide a choice based on whether I have the item, I receive an error in game whenever it gets to that point.
        I'm not exactly sure what's wrong, because otherwise everything is working, I can hide choices based on character stats, using switches, etc., but for some reason the has_item? line doesn't work.
        Any ideas?

        • Hime says:

          What is the error that you’re getting?

          • Rabid-Mermaid says:

            So, if I try with "!$game_party.has_item?($data_items[2])"

            i get:
            Script 'Game_Interpreter' line 1411: ArgumentError occured.
            wrong number of arguments (0 for 1)

          • Hime says:

            Script call box is too small and breaking up the lines.
            You can try

            item = $data_items[2]
            s = "!$game_party.has_item?($data_items[2])"
            hide_choice( ..., s)
            

            Let me know if it’s still too long for the box.

          • Rabid-Mermaid says:

            Ah, thanks a lot!
            Yeah, it was because the line cut off… i'm a total newbie, don't know what any errors mean or what can go wrong 😛

            your scripts are awesome, btw.
            Thanks again.

          • Piers says:

            Hi Hime, nice work over here!

            I tried the same but I had a trouble

            In my game I tried this
            item = $data_items[35]
            s = "!$game_party.has_item?($data_items[35])"
            hide_choice( 1, s)

            The problem is the s = "!$game_party.has_item?($data_items[35])" is too long for the script command, is there a way to fix that? thank you

          • Hime says:

            You can try this:

            item = "$data_items[35]"
            s = "!$game_party.has_item?(#{item})"

          • Piers says:

            It works perfectly now, thank you! 😀

  42. Whygee says:

    Hi! I'm trying to make an event which triggers a teleport action unto the player, with available destinations based on whether or not certain triggers are On or Off (think Dragon Quest Return spell, or FF14 warp crystals).

    So I try stuff like hide_choice(1, "$game_switches[xxxx] == true"), with and without the ! in front of the !, and all I can get is either having all choices to show (without !) or none (with the !).

    Any help would be greatly appreciated!

    • Hime says:

      Choices are hidden if the condition you pass in is met. So for example, if you want the first choice to be hidden when switch 1 is OFF, you would say

      hide_choice(1, &quot;!$game_switches[1]&quot;)
      

      Which means "hide choice 1 when switch 1 is not ON". Have you tried changing your switches in-game?

      • Whygee says:

        Hello! Thanks for your quick response.

        This is exactly what is currently written in the call script event:
        hide_choice(1, "!$game_switches[0022]")
        hide_choice(2, "!$game_switches[0023]")
        hide_choice(3, "!$game_switches[0024]")

        0022 is currently triggered ON, 0023/4 are OFF.

        Only choice 4 is shown.

        I made a NPC event that triggers 0023 ON when you talk to him.

        Only choice 4 is shown.

        Does this script require another one of your base script? I only have Large Choice besides this one.

        • Hime says:

          Remove the leading zeroes. This script can be use standalone, and is compatible with large choices.

          • Whygee says:

            Success! Thanks! I'd put you in the credits, but you are already there. So name your price 😉

  43. Greg says:

    Hey there Tsukihime I really like your script and it's perfect for what I need to do, unfortunately I seem to have a bit of a problem that I can't figure out!

    So I have hide_choice(2,"!s[0021]") and it hides the choice just fine. BUT! When I switch the switch on, it doesn't seem to unhide the choice. Any ideas?

    • Hime says:

      Remove the leading 0's. Those should not be part of a number.

      • Greg says:

        Hoho! Indeed! Thank you very much, don't know why I didn't try that. I just figured that it would be fine, since that's how it has them inside the program itself.

        • Hime says:

          Those are mainly for display purposes and honestly quite misleading, because the way Ruby handles numbers treats leading 0's very specifically.

  44. Arsist says:

    Normally I would go
    Message:
    1. “Why would I want to do something like that?
    .Do it yourself if you’re going to want it done so quickly.
    ..Hire a mercenary or two if you need to.
    Message:
    2. “Okay. .But give me some time. I know this is important to you personally,
    but like it or not, .getting as stong as we can by month’s end is our biggest priority.”
    Message:
    3. ..”Looks to be we’ll heading out, .everyone.
    .I will grant you this.
    .However…… from here on out you will be joining us.”
    Message:
    4. “That’s ridiculous. .It has absolutely nothing to do with me, .or anyone
    on the team, for that matter.”

    then the choices will be
    “Choice 1”
    “Choice 2”
    “Choice 3”
    “More”

    “Choice 4”
    “Back”
    “Review”

    and by selecting review, it will go back up and display the last thing that the person who you’re responding to said.
    But when there are a lot of choices or a lot of things said, then reviewing a lot slows things down.

    • Hime says:

      The script doesn’t provide support for variable-height choices. I don’t think the default choices support it either. You’d have to make a request to have that kind of functionality.

      • Arsist says:

        I didn’t mean literal variable heights, I meant either the ability to line break/ “enter”/ the choices formatting to a new line when the text stretches the width of the screen.
        And okay. I just wasn’t sure since it says you can break the 50 character limit.

        • Hime says:

          From the perspective of the window, they are variable heights, because one line of text could be 1 line, another could be 2 lines, 3 lines, etc.

  45. Arsist says:

    Also did I try n and N.
    This may have some relevance
    break if $game_message.texts.size >= Variable.message_rows
    but I’m not for sure

  46. Arsist says:

    How do you do a line break with text choices? It lets you break the 50 character limit, but it doesn’t
    enter
    when
    I
    enter
    but there were no given instructions on how to do so in the script.
    I tried | and LB and |LB with no luck.

  47. Memory says:

    Hi hime ^_^
    Today i have only a little question. Where i can find reference for the condition that i have to use in the script call?
    For example i want that choise 1 is show only if pharmacology is 100.
    I know that i can’t every time i want to use a condition came here and ask for the answer so if you can tell me where i can find some reference to study i belive it’s better for both of us ^_^

    • Hime says:

      The reference is basically the scripts and the help file. For the most part, you would have to dig around and hope to find what you’re looking for. For example, phamacology is a battler parameter, so that means you would look at Game_BattlerBase or Game_Battler or Game_Actor or Game_Enemy to find where that can be obtained. All parameters are defined in Game_BattlerBase near the top so that isn’t too bad.

  48. Kostas says:

    I can’t get it to work. Now the command gets too large to fit in the script window, and it automatically breaks onto another line (Damn limitation)… Anyway Tsuki, I’ll go by the Variable system, since I don’t want to further bother you with this!
    Thanks for the help you provided, no matter the result! 🙂

  49. Kostas says:

    How can I make it check for a skill? I would like to highlight a special choice if one person in the party (not necessarily the protagonist) has, for example [Persuation] available. I tried out of experimenting, the[ hide_choice(1, “$game_actors[2].skill_id == 50”) ]but this should be tottaly wrong (It crashes ^^)

    • Hime says:
      $game_actors.skills.include?($data_skills[50])
      
      • Kostas says:

        hide_choice(1,”$game_actors.skills.include? ($data_skills[50])”)

        Ends up with this error:
        Script ‘Game_Interpreter’ line 1411: NoMethodError occured.
        Undefined method `skills’ for #

        I tried this also on a new, clean project and results in the same error… If you know what Im doing wrong, let me know! If not, I’ll use the Variable system instead!
        Thank you for your reply though, Tsuki! 🙂

  50. Demos says:

    Does it work with actor’s class as well? I’ve tried it but sadly failed 🙁

    • Hime says:

      What did you try?

      • Demos says:

        Sorry for the time, I forgot to check “Notify me” below ^^”

        Well, if I recall correctly, I typed :

        hide_choice(1, “$game_actors[1].class(1)”)

        [In order to make it not present in the list if the first actor has this class already]

      • Demos says:

        Tried, but got this :
        Script ‘Game Interpreter’ line 1411: SyntaxError occured.
        unexpected $end, expecting ‘)’

        Though, I just typed hide_choice(1, "$game_actors[1].class_id == 1)"
        But the call script put 1)" in a line below the rest.

        I wonder if I’ve done anything wrong again ^^”

      • Demos says:

        Oh wait, I think I’ve noticed my mistake. How silly I am (facepalm), I didn’t see my quotation note wasn’t symetrical in conjuction with the parenthese ^^”

        The script is now working like a charm. Thank you so much, Hime! What would I do without your help 😀

  51. I’m working on a basis crafting system that allows players to combine 2 basic items into a more advanced item (included two of the same item.) To do this, I’m using 4 variables to ‘watch’ the inventory, and calling said variables using this script to manage what can be made.

    My problem is being able to tie 2 variables to a single choice. I’ve tried “hide_choice(1,”$game_variables(101) < 2 && $game_variables(103) < 2")"
    as well as using two separate lines in the same script call.

    • I managed to figure it out. I guess some additional variable-work was needed.
      I was able to put together the following script call. It has passed my initial testing in-game.

      A = $game_variables(101) * $game_variables(103) #Should be 4
      B = $game_variables(101) * $game_variables(104) #Should be 1
      X = $game_variables(102) * $game_variables(103) #Should be 1
      Y = $game_variables(102) * $game_variables(104) #Should be 4

      hide_choice(1,”A <= 3")
      hide_choice(2,"B <= 0")
      hide_choice(3,"X <= 0")
      hide_choice(4,"Y <= 3")

      • Hime says:

        && is the AND operator, which means both conditions must be satisfied. If you say v1 <= 2 && v3 <= 2, then if you have 10 v1's, the condition would be false and therefore it will not be hidden.

        When you're combining items, the option should not be available if either v1 OR v3 are insufficient, using the || operator.

  52. Ellpeck says:

    This is a really cool script. But I downloadet it to use it with modern algebra’s Quest System, so that I could make kind of a guild master who could give you quests and when you chose one, the quest disappears. Because I don’t want to make an extra switch for every quest, I wanted to use the built-in script call for conditional branches “quest_revealed?(quest_id)”, but is there any way I can use that as a condition in your script? Thanks for replay.

  53. Liam says:

    Hi I keep getiing this error:
    Script ‘Game_interpreter’ line 1411: syntaxError ocurred.
    unexpecter tIDENTIFIER, expecting keyword_do or ‘}’or ‘)’
    (text_choice(1, text)

    Does anyone know what I’m doing wrong? Thanks in advance.

  54. Yu Mi says:

    Works fine. 🙂 I have question. I want to change the color of disable choice. How can I do that? o_o thanks.

  55. Kostas says:

    How can I make it work with variables?

    • Tsukihime says:

      You just need to use

      $game_variables[id]
      

      where id is the the ID of the variable you want

      • Kostas says:

        Thanks, Tsuki! But one more question! I want to make a variable that controls the character aligment (lets say variable 1). In some specific dialogs, i want to make some choices available or not available if, for example variable 1 is higher or equal to 25. How do I tell the script to make this comparison? Does “disable_choice(1, $game_variables[1] >= 25)” works, or I got it wrong?

      • Kostas says:

        Yeah! It works! Amazing script and very good job! Thanks alot, Tsuki! 😀

  56. Aaron says:

    Ok, one more question: How can you tell if there is an actor in the party.

  57. Aaron says:

    how can I make an “if a switch is on, show a choice”

    I tried:
    hide_choice(3, if “$game_switches[1]”)
    and I got an error:
    Script ‘Game_Interpreter’ line 1411: SyntaxError occurred.
    unexpected ‘)’, expecting keyword_then or ‘;’ or ‘n’
    I get a similar error with:
    hide_choice(3, if “$game_switches[1]”)

    Thanks.

  58. Mark McKeich says:

    Theoretically, could you use this to call a previous choice in a branching dialogue? For example:

    Person A: Any questions?
    Person B: Choice 1
    Choice 2
    Choice 3
    Selecting choice 1 opens up a whole line of dialogue, which would end with a choice of ‘asking another question’, which would return you to the choice situation above. I know you can just copy/paste, but when you get to so many lines of dialogue and branches, it gets a little hard to keep track.

    • Tsukihime says:

      No, but you can use “Label” and “Jump to Label” commands to go back and forth. Choice options only affect the choices themselves.

  59. Tsukihime says:

    Script updated with a new option “text_choice” which allows you to use a script call to set the text to display for a particular choice. This allows you to exceed the 50-char limit the editor imposes.

  1. August 1, 2014

    […] bug report was sent to me indicating that when the Choice Options script was installed, developers could no longer use the “branch” cancel option when […]

  2. September 17, 2015

    […] the script from Hime’s website, open the script editor (F11) and insert it under the “▼ Materials section” and above the […]

Leave a Reply

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