Large Choices – “built-in” multiple choices

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

UnderstandingLargeChoices2

This script allows you to create choice selections with more than 4 choices, without using any script calls or comments. All you have to do is create multiple “show choice” commands and the game will handle the rest for you!

Download

Script: Download Here

You may be interested in using Choice Options as well.
If you find yourself running out of room on the screen because there are too many choices, check out Scrolling Choices!

Usage

Adding Choices

You start by adding a show choice command as usual, filling in each choice field

large_choice1

If you want more choices, just add another show choice command, and fill it out as usual.

large_choice2

Only show choice commands that appear immediately after a previous show choice command on the same level will be merged together, so if you had any other commands in between “show choice” commands, they will be treated as separate choice prompts.

Cancel choice

The choice editor comes with 6 options when you press the “cancel” button

  1. Disallow
  2. Choice 1
  3. Choice 2
  4. Choice 3
  5. Choice 4
  6. Branch

Each “show choice” command comes with their own options. All you need to do is select the cancel choice in the appropriate “show choice” command and the script sets it up for you! You should set the other commands to “disallow” otherwise I will simply choose the last one.

For the branch choice, all cancel branches will be executed if you choose that, so you should only create a cancel branch on the very last group of choices.

Manual Combine

large_choices3

There is an option in the configuration section called “Manual Combine”. By default, this is set to false, which means all choice commands will be automatically combined together. If you would like to be able to manually specify whether choice commands should be combined or not, you can set this to true.

When manual combining is enabled, before your first large show choice command, you must make a script call

combine_choices

In order to combine the following show choice commands together.  This must be done before each set of large choices.

Developer notes

The idea behind the script is simple: Notice that all show choice commands exhibit the same pattern

  • It begins with command 102, which holds the choices to draw as well as the cancel choice
  • It is followed by command 402, which is the “when” check to determine whether the branch should be executed
  • It is optionally followed by command 403, which is the “branch” case

We can take advantage of this fact by determining whether the next command AFTER all choice branches is another command 102. If it is, then we can merge it with the initial show choice command (of the current group). Delete the unneeded command 102, and update all branch numbers to correctly merge it with the initial branches.

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...

40 Responses

  1. Al says:

    I’m using Large choices for my game and hopefully go commercial with it.

  2. Rike93 says:

    I have to report a bug: when I set the cancel choice as “condition”, if I chose the second choice, then it does the condition that i set for the cancel choice, even if I use only one “show choices”. For example:
    If i set the show choices like this:
    @> Show choices: Swordsman, Knight, Wizard, Cleric
    if [Swordsman]

    @>Message -, -, Normal, Bottom

    : :You’re a Swordsman!

    if [Knight]

    @>Message -, -, Normal, Bottom

    : :You’re a Knight!

    if [Wizard]

    @>Message -, -, Normal, Bottom

    : :You’re a Wizard!

    if [Cleric]

    @>Message -, -, Normal, Bottom

    : :You’re a Cleric!

    if [Swordsman]

    @>Message -, -, Normal, Bottom

    : :You’re a Swordsman!

    if cancel

    @>Message -, -, Normal, Bottom

    : :You have no class!

    When I chose “Knight”, it appears “You’re a Knight”, then “You have no class!”.

    • Hime says:

      I created a show choice selection with 4 options, along with the “branch” cancel, and selecting the second option only shows the text message for the second option. Determine if there is another script that’s causing a compatibility issue.

      It looks like you have 5 options. I’m assuming this means you are using two choice selections?

      • Rike93 says:

        No, I miswrited (I writed “swordsman” two times), I’m using 4 choices and one choice selection. I tried to disactivate all the other scripts, but the error is the same every time. I try to re-download the script.

        • Rike93 says:

          No, I miswrited (I writed “swordsman” two times), I’m using 4 choices and one choice selection. I tried to disactivate all the other scripts, but the error is the same every time. I try to re-download the script.
          UPDATE: If remove the “def update_branch_choices” part, it returns the wright option, but the cancel option doesn’t work at all.

  3. Gord says:

    This was exactly what I needed and was very easy to use. Thank you! 🙂

  4. 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.

  5. automaton says:

    wondering what the script is to set face image into choice to make character select

  6. Sales_Kital says:

    Are this and Choice Options free for commercial use? I can’t seem to find seperate terms of use for these and I only saw your “Changes in terms” post had a comment saying to check scripts on the blog for their terms.

    I found your site thanks to a post about fast travel which is what I’m looking to add to my game.

  7. RikaAltraz says:

    Hey, I found your script and it was perfect for my needs, up until I tried making more than 12 choices…so I found out a way to make the choices show up in columns like the inventory.

    Go to the Window_ChoiceList in the script editor, the core script.
    Put this between "Update Window Position" and "Get Maximum Width of Choices":
    #————————————————————————–
    # * Get Digit Count
    #————————————————————————–
    def col_max
    return 2
    end
    If you change the 2 in the script above to higher numbers, make sure to have shorter choices so that they don't get squished or overlap each other. {Great for things like number grids and puzzle type selections!}
    Make line 32 at the end say max instead of min.
    And change line 33 in there to:
    self.height = item_height * {Whatever number you want between 3 and 16 based on how big you want your box height. I used 10 and it works for bigger lists.}
    That seems to be the only thing I had to do to make it work. And remember, it is in the actual script.
    PS: I know nothing of scripting so this was pretty much a major achievement after hours of fiddling and tweaking with it using bits from other scripts to try and get it to work…

    • Hime says:

      Looks nice. I'm not sure what happens when you have some options that are really long, and how that might affect column size.

      In general, if you define col_max, you would achieve multiple columns.

      If you are interested in scrolling options, you might also consider using the Choice Options script which comes with scrolled options.

      • RikaAltraz says:

        Funny thing is, this actually does scrolling somehow without the Choice Options script, I'm not entirely sure how though. I couldn't get the Choice Options script to work for me and ended up doing things a bit differently, but I like how it worked out so I'm not changing it. But I'll have to work on it a bit to see how to make it work with large choices. It's not a part of my game to have such large choices at this point and I'm not foreseeing any happening of them, but I'll give it a shot to make it work for others if I have the time.

  8. Neoz Kaho says:

    Thanks again for this script! This and Choices Options are great for my game. I'm here to report another incompatibility bug.
    Supposed I have 8 choices with extra 9th case when pressing Cancel button, when Large Choice script is used alone, it works as intended.

    However, when I use this script with Choice Options, the extra 9th choice nor any choice is executed at all as if there is nothing. But if I take out Choices Options, it will work again as intended.

    I have tested this on a clean project with the latest version of both scripts. Also please look at my comment on Choice Options too regarding another Cancelling problem. An update to address this incompatibility would be greatly appreciated! 🙂

  9. Michael says:

    Is this script free for commercial use?
    It is very useful and solves a very simple problem.
    I want to use it to select months on a calendar and four months just isn't enough.

    Thanks! 🙂

  10. Chaco says:

    Another brilliant script, thank you! 😀

  11. skullfire58 says:

    I’m having a weird bug happen to me. Say I make two choice windows with all choices filled. The first choice branch will have the choices 1, 2, 3, 4, and the second will be 5, 6, 7, 8. On the first time activating those choices, it displays correctly, but if I activate them again it duplicates the second choice branch. So it turns into this: 1, 2, 3, 4, 5, 6, 7, 8, 5, 6, 7, 8. Then on the third try it would turn into this: 1, 2, 3, 4, 5, 6, 7, 8, 5, 6, 7, 8, 5, 6, 7, 8, and so on. Has this happened before?

  12. InfectedChild says:

    okay it worked that time. okay then let me say this. this might have been my problem the whole time. i have been trying to make it to where the player can choose whether they want to be any of the classes before the start of the game. but it kept giving me that error message.

  13. InfectedChild says:

    i am using rpg maker vx ace

    • InfectedChild says:

      How i did it. i copied the script and i put it where it belongs and i left it havent done nothing to my game or the script. i pressed play game and it says that message.

  14. InfectedChild says:

    that is where i have it. and i even made sure i copied it right and i did. it says the same thing. and when i go to check the line 87 the line says “”alias :th_large_choices_clear :clear””

  15. InfectedChild says:

    Everytime i try to play the game it stops and says …
    line 87:NameError occured undefined method ‘clear’ for class ‘Game_Interpreter’ how do i fix this?

  16. holeyshirt says:

    Evidently not. aheh. Upon further tinkering, it appears there was an error in copy/pasting the script into the script editor. I have no idea what the deal was, but everything is working fine now. Thank you for your time and your patience.

  17. holeyshirt says:

    I get an error when I run this.
    Script ‘Large Choices’ line 215: NoMethodError occurred.
    undefined method ‘indent’ for [13]:Array

    I’m using the version dated 4-10-2013

  18. Mark Joseph Middleton says:

    You are an outstanding coder thank you!

  1. September 11, 2015

    […] we need to do is to obtain the script from Hime’s website, open the script editor (F11) and insert it under the “▼ Materials section” and […]

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