Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # 「Show Face in Choices」(ACE) ver1.0
- # Script: Nana
- # Happy Nana- http://heptanas.mamagoto.com/
- #
- # ◇Terms of Use
- # Please credit "Nana" and link http://heptanas.mamagoto.com/ if possible.
- # Feel free to modify this script and/or distribute it.
- # Also please include the credit in the readme or somewhere it's accessible. (Not from credit roll)
- #
- # ◇Non-commercial use
- #
- #------------------------------------------------------------------------------
- #
- # Insert "Show Choice" as a message window
- # (No need to set the scripts in a particular order)
- #
- # Display "choices" after the "message display"
- # You can use the face graphics and window settings.
- # (If you leave the message text blank, you can display options only)
- # If it fits in the window, the choices are displayed below the text.
- #
- #==============================================================================
- #==============================================================================
- # ■ Game_Message
- #------------------------------------------------------------------------------
- # It handles the message that displays sentences and choices.
- # Instances of this class are referenced in $game_message.
- #==============================================================================
- class Game_Message
- #--------------------------------------------------------------------------
- # ● Public instance variable
- #--------------------------------------------------------------------------
- attr_accessor :texts # Sentence arrangements (line units)
- end
- #==============================================================================
- # ■ Window_ChoiceList
- #------------------------------------------------------------------------------
- # Event window used for "Show Choice."
- #==============================================================================
- class Window_ChoiceList < Window_Command
- #--------------------------------------------------------------------------
- # ● Object initialization
- #--------------------------------------------------------------------------
- alias cc_initialize initialize
- def initialize(message_window)
- cc_initialize(message_window)
- self.opacity = 0
- self.z = @message_window.z + 1
- end
- #--------------------------------------------------------------------------
- # ● Start input processing
- #--------------------------------------------------------------------------
- def start(y_mod)
- update_placement(y_mod)
- refresh
- select(0)
- open
- activate
- end
- #--------------------------------------------------------------------------
- # ● Update window position
- #--------------------------------------------------------------------------
- def update_placement(y_mod)
- self.width = @message_window.width - @message_window.new_line_x
- self.height = fitting_height($game_message.choices.size)
- self.x = @message_window.x + @message_window.new_line_x
- self.y = @message_window.y + y_mod
- end
- end
- #==============================================================================
- # ■ Window_Message
- #------------------------------------------------------------------------------
- # Message window used for text display.
- #==============================================================================
- class Window_Message < Window_Base
- #--------------------------------------------------------------------------
- # ● Input processing options
- #--------------------------------------------------------------------------
- def input_choice
- if $game_message.texts == [""]
- @choice_window.start(0)
- elsif $game_message.texts.size + $game_message.choices.size > visible_line_number
- input_pause unless @pause_skip
- new_page("", {})
- @choice_window.start(0)
- else
- @choice_window.start($game_message.texts.size * line_height)
- end
- Fiber.yield while @choice_window.active
- end
- end
- #==============================================================================
- # ■ Game_Interpreter
- #------------------------------------------------------------------------------
- # An interpreter that executes event commands. This is a Game_Map class,
- # Game_Troop Used inside class、Game_Event class.
- #==============================================================================
- class Game_Interpreter
- #--------------------------------------------------------------------------
- # ● Display choices
- #--------------------------------------------------------------------------
- def command_102
- wait_for_message
- $game_message.face_name = ""
- $game_message.face_index = 0
- $game_message.background = 0
- $game_message.position = 2
- $game_message.add("")
- setup_choices(@params)
- wait_for_message
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement