Choice Window edit

Discussion in 'RGSS3 Script Requests' started by ShadowFox, Jul 30, 2013.

Thread Status:
Not open for further replies.
  1. ShadowFox

    ShadowFox Adventurer Member

    Messages:
    255
    Likes Received:
    10
    First Language:
    English
    I have found that this idea I have IS actually possible, so I thought I'd actually ask for a script.

    I am after a script that would activate via a switch and would change the layout of the choices window.

    I want the window to show each choice side by side.

    Like in this rough picture:

    Choice Window.png

    The choices that need to be side by side also needs to be larger then normal, so the window must match the font size and font type of the choices
     
    Last edited by a moderator: Jul 30, 2013
    #1
  2. Tsukihime

    Tsukihime Veteran Veteran

    Messages:
    8,230
    Likes Received:
    3,062
    Location:
    Toronto
    First Language:
    English
    So you want separate windows for each choice?
     
    #2
  3. ShadowFox

    ShadowFox Adventurer Member

    Messages:
    255
    Likes Received:
    10
    First Language:
    English
    Yes..

    And the font and size must be to be changed as well for the choices.
     
    #3
  4. Tsukihime

    Tsukihime Veteran Veteran

    Messages:
    8,230
    Likes Received:
    3,062
    Location:
    Toronto
    First Language:
    English
    I can't tell what font you're using just by looking at a picture.
     
    #4
  5. ShadowFox

    ShadowFox Adventurer Member

    Messages:
    255
    Likes Received:
    10
    First Language:
    English
    well... that picture is just an example. It could be any font, but I'm planning on having two different custom special fonts for when I use the two choices in the game. And it won't be the fonts used in the example picture, as that is just what I'm hoping it will look like... minus the font

    After saying that I believe the font is "Arial Rounded MT Bold"
     
    #5
  6. ShadowFox

    ShadowFox Adventurer Member

    Messages:
    255
    Likes Received:
    10
    First Language:
    English
    Bump
     
    #6
  7. Archeia

    Archeia Level 99 Demi-fiend Staff Member Developer

    Messages:
    14,586
    Likes Received:
    14,293
    Location:
    Game Dev Salt Mines
    First Language:
    Filipino
    Primarily Uses:
    VNM
  8. ShadowFox

    ShadowFox Adventurer Member

    Messages:
    255
    Likes Received:
    10
    First Language:
    English
    #8
  9. Archeia

    Archeia Level 99 Demi-fiend Staff Member Developer

    Messages:
    14,586
    Likes Received:
    14,293
    Location:
    Game Dev Salt Mines
    First Language:
    Filipino
    Primarily Uses:
    VNM
    Can't you edit the positioning in the script?
     
    #9
  10. ShadowFox

    ShadowFox Adventurer Member

    Messages:
    255
    Likes Received:
    10
    First Language:
    English
    I guess I should have explained my request more then I have. I am only wanting specific choices to be side by side. Choices such as a YES or a NO I am wanting to be side by side, The option to do the Tutorial or Skip the tutorial... As well as all major 2 choices I am wanting to be side by side. All other choices even choices that have 3 or 4 options I am not wanting to be side by side.

    So after saying that I have experimented with changing the Visual Novel Choices but everything I have tried completely failed.
     
    #10
  11. ShadowFox

    ShadowFox Adventurer Member

    Messages:
    255
    Likes Received:
    10
    First Language:
    English
    Bump
     
    Last edited by a moderator: Aug 9, 2013
    #11
  12. ShadowFox

    ShadowFox Adventurer Member

    Messages:
    255
    Likes Received:
    10
    First Language:
    English
    Big Bump here. Need help badly.
     
    #12
  13. ShadowFox

    ShadowFox Adventurer Member

    Messages:
    255
    Likes Received:
    10
    First Language:
    English
    bump
     
    #13
  14. Venka

    Venka Veteran Veteran

    Messages:
    945
    Likes Received:
    365
    Location:
    United States
    First Language:
    English
    hope this helps, it's like your second picture. It's not in it's own separate windows. Just put in the switch ID you want to use.

    Code:
    #==============================================================================# ** Window_ChoiceList#------------------------------------------------------------------------------#  This window is used for the event command [Show Choices].#==============================================================================class Window_ChoiceList < Window_Command   Horz_Choices_Switch_ID = 5   # In game switch ID to make horizontal choices   #--------------------------------------------------------------------------  # * Get Digit Count  #--------------------------------------------------------------------------  alias make_choices_horizontal_col_max    col_max  def col_max    return item_max if $game_switches[Horz_Choices_Switch_ID]    make_choices_horizontal_col_max  end  #--------------------------------------------------------------------------  # * Get Alignment  #--------------------------------------------------------------------------  alias make_choices_horizontal_alignment    alignment  def alignment    return 1 if $game_switches[Horz_Choices_Switch_ID]    return 0  end  #--------------------------------------------------------------------------  # * Update Window Position  #--------------------------------------------------------------------------  alias make_choices_horizontal_update_placement   update_placement  def update_placement    if $game_switches[Horz_Choices_Switch_ID]      self.width = Graphics.width      self.height = fitting_height(1)      self.x = 0      if @message_window.y >= Graphics.height / 2        self.y = @message_window.y - height      else        self.y = @message_window.y + @message_window.height      end    else      make_choices_horizontal_update_placement    end  end  #--------------------------------------------------------------------------  # * Draw Item  #--------------------------------------------------------------------------  alias make_choices_horizontal_draw_item      draw_item  def draw_item(index)    if $game_switches[Horz_Choices_Switch_ID]      draw_text(item_rect_for_text(index), command_name(index), alignment)    else      make_choices_horizontal_draw_item(index)    end  end  #--------------------------------------------------------------------------  # * Calculate Height of Window Contents  #--------------------------------------------------------------------------  alias make_choices_horizontal_contents_height      contents_height  def contents_height    return line_height if $game_switches[Horz_Choices_Switch_ID]    make_choices_horizontal_contents_height  endend 
     
    #14
  15. ShadowFox

    ShadowFox Adventurer Member

    Messages:
    255
    Likes Received:
    10
    First Language:
    English
    It worked, and it is almost perfect.

    However I am wondering how I could make the choices closer to the bottom of the screen?

    As that is the only gripe I have is that they are not closer to the bottom of the screen.
     
    #15
  16. Venka

    Venka Veteran Veteran

    Messages:
    945
    Likes Received:
    365
    Location:
    United States
    First Language:
    English
    Not exactly sure where you want the choices to show. A screen shot might help ;) .

    I posted the definition that you'll want to look at and added a couple of comments. self.y is the vertical position of the choice window. You can change the stuff in the self.y if you want and play around with the positioning.

    Code:
      #--------------------------------------------------------------------------  # * Update Window Position  #--------------------------------------------------------------------------  alias make_choices_horizontal_update_placement   update_placement  def update_placement    if $game_switches[Horz_Choices_Switch_ID]      self.width = Graphics.width      self.height = fitting_height(1)      self.x = 0      if @message_window.y >= Graphics.height / 2        # place choices above message window if message windows is in the bottom half of the screen        self.y = @message_window.y - height      else        # place choices above below window if message windows is in the top half of the screen        self.y = @message_window.y + @message_window.height      end    else      make_choices_horizontal_update_placement    end  end
     
    #16
  17. ShadowFox

    ShadowFox Adventurer Member

    Messages:
    255
    Likes Received:
    10
    First Language:
    English
    ok. The first picture is the current location for the choises

    Current Choice Location.png

    The next picture is where I want the choices to be.

    (I had to use a show text command to get the location right with the words of the choice.)

    New Choice Location.png
     
    #17
  18. Venka

    Venka Veteran Veteran

    Messages:
    945
    Likes Received:
    365
    Location:
    United States
    First Language:
    English
    let me know if this works for you. Added a new switch so you can always put the choices at the bottom of the screen

    Code:
    #==============================================================================# ** Window_ChoiceList#------------------------------------------------------------------------------#  This window is used for the event command [Show Choices].#==============================================================================class Window_ChoiceList < Window_Command   Horz_Choices_Switch_ID = 5   # In game switch ID to make horzonital choices  Choices_on_Bottom      = 8   # Will always show the choice box at the bottom  #--------------------------------------------------------------------------  # * Get Digit Count  #--------------------------------------------------------------------------  alias make_choices_horizontal_col_max    col_max  def col_max    return item_max if $game_switches[Horz_Choices_Switch_ID]    make_choices_horizontal_col_max  end  #--------------------------------------------------------------------------  # * Get Alignment  #--------------------------------------------------------------------------  alias make_choices_horizontal_alignment    alignment  def alignment    return 1 if $game_switches[Horz_Choices_Switch_ID]    return 0  end  #--------------------------------------------------------------------------  # * Update Window Position  #--------------------------------------------------------------------------  alias make_choices_horizontal_update_placement   update_placement  def update_placement    if $game_switches[Horz_Choices_Switch_ID]      self.width = Graphics.width      self.height = fitting_height(1)      self.x = 0      if $game_switches[Choices_on_Bottom]        self.y = Graphics.height - height        self.z += 50      elsif @message_window.y >= Graphics.height / 2        self.y = @message_window.y - height      else        self.y = @message_window.y + @message_window.height      end    else      make_choices_horizontal_update_placement    end  end  #--------------------------------------------------------------------------  # * Draw Item  #--------------------------------------------------------------------------  alias make_choices_horizontal_draw_item      draw_item  def draw_item(index)    if $game_switches[Horz_Choices_Switch_ID]      draw_text(item_rect_for_text(index), command_name(index), alignment)    else      make_choices_horizontal_draw_item(index)    end  end  #--------------------------------------------------------------------------  # * Calculate Height of Window Contents  #--------------------------------------------------------------------------  alias make_choices_horizontal_contents_height      contents_height  def contents_height    return line_height if $game_switches[Horz_Choices_Switch_ID]    make_choices_horizontal_contents_height  endend 
     
    Last edited by a moderator: Aug 24, 2013
    #18
  19. ShadowFox

    ShadowFox Adventurer Member

    Messages:
    255
    Likes Received:
    10
    First Language:
    English
    It worked. Thanks Venka
     
    #19
  20. Shaz

    Shaz Veteran Veteran

    Messages:
    37,714
    Likes Received:
    11,421
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
     
    #20
Thread Status:
Not open for further replies.

Share This Page