Large Choices - "built-in" multiple choices

Discussion in 'RGSS3 Scripts (RMVX Ace)' started by Tsukihime, Dec 6, 2012.

    Tags:
  1. Tsukihime

    Tsukihime Veteran Veteran

    Messages:
    8,230
    Likes Received:
    3,020
    Location:
    Toronto
    First Language:
    English
    This script combines groups of "show choice" options together as one large command. This allows you to create more than 4 choices by simply creating several "show choice" commands in a row. No script call required!


    Download


    Get it at Hime Works


    Usage


    Adding choices


    Add a show choice command and fill it out as usual.


    [​IMG]


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


    [​IMG]


    Only show choice commands that appear immediately after a previous show choice command on the same level will be merged together.


    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


    [​IMG]


    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.
     
    Last edited by a moderator: Sep 21, 2016
    #1
    VicWhite, felsenstern, Modge and 4 others like this.
  2. Jesse - PVGames

    Jesse - PVGames Game and Graphics Developer Veteran

    Messages:
    1,485
    Likes Received:
    2,329
    Location:
    U.S.
    First Language:
    English
    Another great script. This one is very useful and easy to use. Great job!
     
    #2
  3. Tsukihime

    Tsukihime Veteran Veteran

    Messages:
    8,230
    Likes Received:
    3,020
    Location:
    Toronto
    First Language:
    English
    Script updated to support the "branch" cancel choice.

    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.

    Note that this script overwrites command_403 in the interpreter so that it doesn't check a hardcoded value.

    I might change it further so that it will ignore any intermediate cancel branches...
     
    Last edited by a moderator: Dec 8, 2012
    #3
  4. ThallionDarkshine

    ThallionDarkshine Veteran Veteran

    Messages:
    83
    Likes Received:
    4
    First Language:
    English
    Just an idea, you might want to add a config option to specify the maximum number of lines that the choices can extend to.
     
    #4
  5. Tsukihime

    Tsukihime Veteran Veteran

    Messages:
    8,230
    Likes Received:
    3,020
    Location:
    Toronto
    First Language:
    English
    It is a good idea, but I won't be adding it to this script for compatibility reasons: the only purpose of this script is to merge "Show Choice" commands, and nothing more.

    Choice Options has a config option for that, which you can set for each event as well. For now it is based on Enelvon's scrolled choices script. I will implement paginated choices (first post in the request) when I have time.
     
    Last edited by a moderator: Dec 8, 2012
    #5
  6. ThallionDarkshine

    ThallionDarkshine Veteran Veteran

    Messages:
    83
    Likes Received:
    4
    First Language:
    English
    Alright, that makes sense. And btw, paginated choices sound awesome.
     
    #6
  7. pinkapinkie

    pinkapinkie Veteran Veteran

    Messages:
    69
    Likes Received:
    6
    First Language:
    Italian
    There seems to be a bad crash when selecting a choice or pressing the cancel button.

    My bad, was an incompatibily with another script.

    Is it possible to activate or deactivate options with switches?

    If switch 1 is ON then choice is active, else is not.

    Tried with choice_option:)condition, 1, "$game_switches[4] = true") doesnt seem to work.
     
    Last edited by a moderator: Dec 28, 2012
    #7
  8. Tsukihime

    Tsukihime Veteran Veteran

    Messages:
    8,230
    Likes Received:
    3,020
    Location:
    Toronto
    First Language:
    English
    There was a bug where the first set options from a nested Show Choices command was numbered incorrectly.

    The issue arises in cases where you have something like



    Code:
    Show Choices [1, 2]
    When 1
      Hi
    When 2
      Show Choices [3, 4]
      When 3
      When 4
      Show Choices [5, 6]
      When 5
      When 6
    
    The 3 and 4 would be considered part of the previous show choices, and therefore wouldn't respond correctly.

    The 5 and 6, however, were numbered correctly, so basically everything would work as expected except when you chose option 3 or 4.

    It has been resolved and the script updated.

    You would write

    "$game_switches[4] == true"

    Because one = is assignment and is evaluated to true since it is not nil or empty or false.
     
    Last edited by a moderator: Jan 13, 2013
    #8
  9. AeonSpark

    AeonSpark Veteran Veteran

    Messages:
    102
    Likes Received:
    5
    First Language:
    English
    This has to be the easiest more choices scripts for VX I've ever seen!

    Thanks very much for this Tsukihime!
     
    #9
  10. Tsukihime

    Tsukihime Veteran Veteran

    Messages:
    8,230
    Likes Received:
    3,020
    Location:
    Toronto
    First Language:
    English
    Fixed bug where the cancel choice selected the wrong choice (eg: if you selected choice 7, it would incorrectly go to choice 6)
     
    #10
  11. Tsukihime

    Tsukihime Veteran Veteran

    Messages:
    8,230
    Likes Received:
    3,020
    Location:
    Toronto
    First Language:
    English
    Script updated

    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_choicesIn order to combine the following show choice commands together. This must be done before each set of large choices.[​IMG]
     
    #11

Share This Page