Is it possible to use Help Window for Choices from DiamondandPlatinum3 on Events as well?

Hi folks,

I'm using this version of DiamondandPlatinum3's script "Help Window for Choices" and it does a quite good job for me.

Spoiler: Help Window for Choices - DiamondandPlatinum3
Ruby:
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#             Help Window for Choices
#             Version: 2.0
#             Authors: DiamondandPlatinum3
#             Date: December 4, 2012  (Original)
#                   December 14, 2013 (Updated)
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Description:
#
#    This script adds on to the default choice system, allowing you to have a
#    help window at the top of the screen to assist players in the choices they
#    have to make
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#------------------------------------------------------------------------------
#  Instructions:
#
#   {Note to previous users of this script: This script has updated the way you
#    Insert data. Fear not, for the old way to insert data is still available;
#    so you will not have to redo anything, however read up on the new way to
#    insert data}
#
#
#
#   ~ To use this script, just before using a choice event, use the following
#     script call to begin adding text to the help window:
#             add_command_list_help_text
#
#     Now using Show Text Windows, insert the text to be displayed.
#     Once the desired information is inserted, close the link with
#     the following script call:
#             end_command_list_help_text
#
#     Continue using that same pattern until all of your choices have
#     descriptions.
#
#
#   ~ The Position of the Help Window depends on what position you gave the
#     Show Text window.
#
#
#     # Example Screen Can Be Found Here:
#           http://i.imgur.com/XAkhNEf.png
#
#
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#                  THERE IS NO EDITABLE REGION TO THIS SCRIPT
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=





#==============================================================================
# ** Game_Message
#------------------------------------------------------------------------------
#  This class handles the state of the message window that displays text or
# selections, etc. The instance of this class is referenced by $game_message.
#==============================================================================

class Game_Message
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # *= Alias Listings
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias_method(:dp3_gamemessage_initialize_235ufnh,               :initialize)
  alias_method(:dp3_gamemessage_clear_235ufnh,                    :clear     )
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * New Public Instance Variables
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  attr_accessor :choice_help_text              # Help Text for choices (Hash)
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Aliased Method: Object Initialization
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def initialize()
    dp3_gamemessage_initialize_235ufnh() # Call Original Method
    @choice_help_text = Hash.new()
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Aliased Method: Clear
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def clear()
    dp3_gamemessage_clear_235ufnh() # Call Original Method
    @choice_help_text = Hash.new()
  end
end








#==============================================================================
# ** DP3_Choice_Window_Help
#------------------------------------------------------------------------------
#  This window displays help text for the choices inside of a choice window
#==============================================================================

class DP3_Choice_Window_Help < Window_Help
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * New Method: Object Initialization
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def initialize(text, position, background)
    super( [text.split("\n").size, 1].max )
    self.y = position * (Graphics.height - self.height) / 2
    self.openness = 0
    self.opacity = background ==0 ? 255 : 0
    create_back_bitmap
    create_back_sprite
    @back_sprite.visible = true if background == 1
    set_text(text)
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * New Method: Immediately Open
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def immediately_open()
    self.openness = 255
  end
 
  def create_back_bitmap
    @back_bitmap = Bitmap.new(width, height)
    rect1 = Rect.new(0, 0, width, 12)
    rect2 = Rect.new(0, 12, width, height - 24)
    rect3 = Rect.new(0, height - 12, width, 12)
    @back_bitmap.gradient_fill_rect(rect1, back_color2, back_color1, true)
    @back_bitmap.fill_rect(rect2, back_color1)
    @back_bitmap.gradient_fill_rect(rect3, back_color1, back_color2, true)
  end
  #--------------------------------------------------------------------------
  # * Get Background Color 1
  #--------------------------------------------------------------------------
  def back_color1
    Color.new(0, 0, 0, 80)
  end
  #--------------------------------------------------------------------------
  # * Get Background Color 2
  #--------------------------------------------------------------------------
  def back_color2
    Color.new(0, 0, 0, 0)
  end
  #--------------------------------------------------------------------------
  # * Create Background Sprite
  #--------------------------------------------------------------------------
  def create_back_sprite
    @back_sprite = Sprite.new
    @back_sprite.y = self.y
    @back_sprite.bitmap = @back_bitmap
    @back_sprite.visible = false
    @back_sprite.z = z - 1
  end
 
  def dispose
    @back_sprite.dispose
    super
  end
 
end








#==============================================================================
# ** Window_ChoiceList
#------------------------------------------------------------------------------
#  This window is used for the event command [Show Choices].
#==============================================================================

class Window_ChoiceList < Window_Command
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # *= Alias Listings
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias_method(:dp3_windowchoicelist_update_235ufnh,            :update     )
  alias_method(:dp3_windowchoicelist_select_235ufnh,            :select     )
  alias_method(:dp3_windowchoicelist_cursordown_235ufnh,        :cursor_down)
  alias_method(:dp3_windowchoicelist_cursorup_235ufnh,          :cursor_up  )
  alias_method(:dp3_windowchoicelist_open_235ufnh,              :open       )
  alias_method(:dp3_windowchoicelist_close_235ufnh,             :close      )
  alias_method(:dp3_windowchoicelist_dispose_235ufnh,           :dispose    )
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Aliased Method: Update
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def update(*args)
    dp3_windowchoicelist_update_235ufnh(*args)
    @choicehelp_helpwindow.update() unless @choicehelp_helpwindow.nil?
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Aliased Method: Select Item
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def select(*args)
    dp3_windowchoicelist_select_235ufnh(*args)
    dp3_dispose_choicehelp_window()
    unless dp3_get_current_choice_windowinfo[0].nil?
      @choicehelp_helpwindow = DP3_Choice_Window_Help.new(*dp3_get_current_choice_windowinfo)
    end
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Aliased Method: Move Cursor Down
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def cursor_down(*args)
    dp3_windowchoicelist_cursordown_235ufnh(*args)
    @choicehelp_helpwindow.immediately_open() unless @choicehelp_helpwindow.nil?
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Aliased Method: Move Cursor Up
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def cursor_up(*args)
    dp3_windowchoicelist_cursorup_235ufnh(*args)
    @choicehelp_helpwindow.immediately_open() unless @choicehelp_helpwindow.nil?
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Aliased Method: Open
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def open(*args)
    dp3_windowchoicelist_open_235ufnh(*args) # Call Original Method
    @choicehelp_helpwindow.open() unless @choicehelp_helpwindow.nil?
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Aliased Method: Close
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def close(*args)
    @choicehelp_helpwindow.close() unless @choicehelp_helpwindow.nil?
    dp3_windowchoicelist_close_235ufnh(*args) # Call Original Method
    dp3_dispose_choicehelp_window()
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Aliased Method: Dispose
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def dispose(*args)
    dp3_windowchoicelist_dispose_235ufnh(*args) # Call Original Method
    dp3_dispose_choicehelp_window()
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * New Method: Dispose ChoiceHelp Window
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def dp3_dispose_choicehelp_window()
    @choicehelp_helpwindow.dispose unless @choicehelp_helpwindow.nil? || @choicehelp_helpwindow.disposed?
    @choicehelp_helpwindow = nil
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * New Method: Get Required Info for the Window Choice
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def dp3_get_current_choice_windowinfo()
    return [nil] if $game_message.choice_help_text[self.index].nil?
    return [$game_message.choice_help_text[self.index][:text],
            $game_message.choice_help_text[self.index][:position],
            $game_message.choice_help_text[self.index][:background]]
    end
end








#==============================================================================
# ** Game_Interpreter
#------------------------------------------------------------------------------
#  An interpreter for executing event commands. This class is used within the
# Game_Map, Game_Troop, and Game_Event classes.
#==============================================================================

class Game_Interpreter
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * New Method: Add Command List Help Text
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def add_command_list_help_text( text = nil )
    position = 0
    background = 0
    # Add Text Argument
    unless text.nil?
      text = text.gsub(/[\n\r]+/, "")
      text = text.gsub(/\\endl/, "\n")
 
    # Add Show Text Command Text Paramters
    else
      text = ""
      while( !@list[@index].nil? )
        @index += 1
        case @list[@index].code
        when 101 # Show Text Window Command
          background =  @list[@index].parameters[2]
          position = @list[@index].parameters[3]
        when 401 # Show Text Line
          text += @list[@index].parameters[0] + "\n"
        when 355 # Script Command
          script = @list[@index].parameters[0] + "\n"
          while next_event_code == 655
            @index += 1
            script += @list[@index].parameters[0] + "\n"
          end
          break if script.include?("end_command_list_help_text")
        end
      end
    end
 
 
    # Add to List
    index = $game_message.choice_help_text.size
    $game_message.choice_help_text[index]             = Hash.new()
    $game_message.choice_help_text[index][:position]  = position
    $game_message.choice_help_text[index][:text]      = text
    $game_message.choice_help_text[index][:background]= background
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * New Method: End Command List Help Text
  #--------------------------------------------------------------------------
  # Method only exists in case the user actually tries to call it outside of
  # bounds.
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def end_command_list_help_text()
  end
end

In one of my games, I use the Help Window functionality for a way to select my character's color (it's the dragon, in case anyone is wondering :LZSjoy:). The dragon can be green, red, blue or yellow based on what you select, obviously. The dragon is an animated Event Graphic (Walking Anim. ON, Stepping Anim. ON, Direction Fix ON).

Spoiler: Ingame picture
DragonUnleashedColorChange.png

Now, what I want to do, is to showcase the dragon's color before they actually select it. To achieve this, I wonder if there's a way to change the Event Graphic of my beloved dragon based on what choice option the player is hovering over?
Are you using the show choices event command there?
Are you using the show choices event command there?
Yes, I do.
I'm not sure if this is what you need, it would be good to have a look first:


I included above line 196 a variable control that changes the value of variable 0001 to the value of the selected position and used this same variable on the event pages on the map.
Or use my script to update the page graphic without issues!
It might need to get approved by a moderator first...
I'm not sure if this is what you need, it would be good to have a look first:


I included above line 196 a variable control that changes the value of variable 0001 to the value of the selected position and used this same variable on the event pages on the map.

Seeing the functionality, that is exactly what I'm looking for. Of course, the graphic changes should only count for this defined set of choices (not all choices in the game). Happy to see how you did it?

Or use my script to update the page graphic without issues!
It might need to get approved by a moderator first...
Yes, seems it will take some time until I can access your script. Looking forward to check it out then.
Of course, the graphic changes should only count for this defined set of choices (not all choices in the game)
It won't affect the entire game if you don't use this variable elsewhere although this variable must be exclusive to the choice window.

In the example, the choices part is merely illustrative, you can create conditional branches after the choices to confirm each value, being 0, 1, 2 and 3 and within each one define what will affect the character, such as changing class, changing the value of another variable, include specific item, equip specific weapon, etc.
And after that just don't use this variable anywhere.

In @kyonides script there is a way to change the variable using the "SCRIPT" event command if you want to use it in another situation, but I don't remember how to do it correctly.
I assume it would be like this to change the ID to 101 if that were the case, but the instruction would be ideal:
Ruby:
ChoicesEvent::EVENT_ID_VAR = 101

I can't test it now, but I advise you to use the Script and do the tests for better understanding. If you have difficulty, create a new project and do the tests on it, this will prevent you from causing problems in your project.
The dev only needs to set the value of the EVENT_ID_VAR constant found in the ChoicesEvent module to the most convenient variable ID that is still available.

Then go to the event with your list of choices and right above that list use the Change Variable command to set its value to its new event ID.

Original thread: https://forums.rpgmakerweb.com/threads/is-it-possible-to-use-help-window-for-choices-from-diamondandplatinum3-on-events-as-well.165992/