Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ################################################################################
- # CHARACTER EDITOR
- # with
- # Extended Actor Parameters
- # By: Ixfuru
- ################################################################################
- # This is a rather simplistic Character Editor/Creator that I put together.
- # This scirpt allows you to alter the graphics used for actors through a
- # Creation Scene. You can add files to the selectable images which will
- # allow you to offer any face/character graphic combination as choice to the
- # player. This would also be good for the beginnig of projects, where the
- # player can select his/her character before beginning the quest.
- # Just place the script above Main and below Materials in the script editor of
- # your project. Then, when you want to call the scene, use the script call:
- #
- # $scene = Scene_CharCreate.new(party_position, false)
- #
- # Replace party_position with the position of the actor in your party. For
- # the leader of the party, place 0. By default, You could change Ralph with:
- # $scene = Scene_CharCreate.new(0, false)
- #
- # The boolean should be kept at false for now, as it makes reference to a script
- # I'm not quite finished with yet. With that script, you'll be able to access
- # this editor from the main menu.
- #
- ################################################################################
- # Read through each of the customization options in the module carefully to
- # understand the setup of this script. By default, I set up the module to
- # provide most of the faces and characters in the RTP. You'll notice that I
- # commented out some filenames in the MALES and FEMALES sections because they
- # were custom graphics and unless you picked up the demo, they will cause an
- # error when they are not found in your project. If you got the demo, feel free
- # to uncomment the lines and everything should run smoothly.
- # Also, if you do, be sure to give credit to FenixFyre and RPGLover who made
- # these graphics.
- ################################################################################
- # You can use this script in any NON-COMMERCIAL project you wish. If you want to
- # make something commercial which includes the script, just contact me at
- # RPGMakerVX.net or on RMRK.net and we'll discuss it.
- # Either way, you MUST credit IXFURU in the final project if you use it.
- ################################################################################
- ################################################################################
- #*******************************************************************************
- # MODULE CHARCREATE
- ################################################################################
- module CharCreate
- #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- # BEGIN CUSTOMIZATION
- #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- # SECTION ONE
- #
- # In this section, you will place the selectable graphics you wish to include
- # in the editor scene. These will be the faces and character graphics the
- # player can choose from when editting/creating their characters. To set it
- # up, use this formula:
- #
- # ID => [face/char graphic, face/char index]
- #
- # An important note is that you must have a matching face and character to
- # any filenames you place in the formula. If not, an error will be thrown.
- # Also, the ID, should be an integer equal or above zero in numeric order. The
- # graphic is the sheet you want to use, and the index is the actual index of the
- # character you wish to be able to select. This formula is applicable for both
- # the MALES and FEMALES portion of the module.
- MALES = {#<<<Don't delete this!
- 0 => ["Actor1", 0],
- 1 => ["Actor1", 2],
- 2 => ["Actor1", 6],
- 3 => ["Actor1", 7],
- 4 => ["Actor2", 2],
- 5 => ["Actor2", 4],
- 6 => ["Actor2", 6],
- 7 => ["Actor3", 0],
- 8 => ["Actor3", 2],
- 9 => ["Actor3", 4],
- 10 => ["Actor3", 6],
- 11 => ["Evil", 0],
- 12 => ["Evil", 1],
- 13 => ["Evil", 2],
- 14 => ["Evil", 3],
- 15 => ["Evil", 4],
- 16 => ["Evil", 5],
- 17 => ["Evil", 6],
- 18 => ["Evil", 7],
- 19 => ["Monster", 2],
- 20 => ["Monster", 4],
- 21 => ["People1", 4],
- 22 => ["People1", 6],
- 23 => ["People2", 0],
- 24 => ["People2", 2],
- 25 => ["People2", 3],
- 26 => ["People2", 4],
- 27 => ["People2", 6],
- 28 => ["People3", 1],
- 29 => ["People3", 3],
- 30 => ["People3", 4],
- 31 => ["People4", 0],
- 32 => ["People4", 2],
- 33 => ["People4", 4],
- 34 => ["People4", 5],
- 35 => ["People4", 6],
- 36 => ["People4", 7],
- 37 => ["Spiritual", 7],
- #~ 38 => ["FenixFyre", 2],
- #~ 39 => ["RPGLover", 0],
- #~ 40 => ["RPGLover", 1],
- #~ 41 => ["RPGLover", 2],
- #~ 42 => ["RPGLover", 4],
- #~ 43 => ["RPGLover", 5],
- }#<<<Don't delete this!
- FEMALES = {#<<<Don't delete this!
- 0 => ["Actor1", 1],
- 1 => ["Actor1", 3],
- 2 => ["Actor1", 4],
- 3 => ["Actor1", 5],
- 4 => ["Actor2", 0],
- 5 => ["Actor2", 1],
- 6 => ["Actor2", 3],
- 7 => ["Actor2", 5],
- 8 => ["Actor2", 7],
- 9 => ["Actor3", 1],
- 10 => ["Actor3", 3],
- 11 => ["Actor3", 5],
- 12 => ["Actor3", 7],
- 13 => ["Monster", 5],
- 14 => ["People1", 5],
- 15 => ["People1", 7],
- 16 => ["People2", 1],
- 17 => ["People2", 5],
- 18 => ["People2", 7],
- 19 => ["People3", 0],
- 20 => ["People3", 2],
- 21 => ["People3", 5],
- 22 => ["People3", 7],
- 23 => ["People4", 1],
- 24 => ["People4", 3],
- 25 => ["Spiritual", 0],
- 26 => ["Spiritual", 1],
- 27 => ["Spiritual", 3],
- 28 => ["Spiritual", 4],
- 29 => ["Spiritual", 5],
- 30 => ["Spiritual", 6],
- #~ 31 => ["FenixFyre", 1],
- #~ 32 => ["FenixFyre", 0],
- #~ 33 => ["RPGLover", 3],
- }#<<<Don't delete this!
- # SECTION TWO
- #
- # Hometowns are a custom string associated with the actors. You can use any
- # text you want in the array, as long as it's "" double quoted.
- HOMETOWNS = ["Bell Toll", "Rychestown", "Metchfield", "Blumbogan", "Strott"]
- # SECTION THREE
- #
- # These are the commands you wish to appear in the scene. The 'categories' the
- # player gets to select from. These are just strings. So you must have
- # a double quoted text for each of these.
- NAME_COMMAND = "Select Name"
- GENDER_COMMAND = "Select Gender"
- CHARACTER_COMMAND = "Select Character"
- CLASS_COMMAND = "Select Class"
- HOMETOWN_COMMAND = "Select Hometown"
- READY_COMMAND = "READY!"
- # SECTION FOUR
- #
- # The following are miscellaneous items which are found in the script. They
- # control sound effects, strings, colors, etc. An explanatin is found next
- # to each of the constants.
- READY_COMMAND_COLOR = 23 # This is the color of the READY_COMMAND string
- PREVIEW_NAME_COLOR = 5 #Color of Actors name in preview window
- PREVIEW_GENDER_COLOR = 10 # Color of gender string in preview window
- PREVIEW_CLASS_COLOR = 15 # color of class name in preview window
- PREVIEW_HOMETOWN_COLOR = 20 # color of hometown in preveiew window
- AVAILABLE_CLASSES = 8 # Amount of classes to choose from. (1 - X)
- CCS_USE_RECRUIT_SHOPS = false # Are you using my recruit shop script?
- CCS_USE_MENUFURU = false # Are you using my menu overhaul script?
- # These strings are used to set gender of specific actors found in your
- # party at the beginning of the game.
- ACTOR_INITIAL_GENDER = {#<<<Don't touch this!
- 1 => "Male",
- 2 => "Female",
- 3 => "Male",
- 4 => "Female",
- }#<<<<Don't touch this!
- HOMETOWN_TAG = "HOME" # This is the sytem tag for where hometown
- # is found in the status window
- GENDER_COLORS = [1, 27] # These are the text colors used for display
- # of Gender marker. By default, it's
- # blue and pink. [male, female]
- #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- # END CUSTOMIZATION
- #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- end
- ################################################################################
- #*******************************************************************************
- # GAME TEMP
- ################################################################################
- class Game_Temp
- attr_accessor :chosen_gender
- alias ccs_gtemp_initialize initialize unless $@
- def initialize
- ccs_gtemp_initialize
- @chosen_gender = 0
- end
- end
- ################################################################################
- #*******************************************************************************
- # GAME ACTOR
- ################################################################################
- class Game_Actor < Game_Battler
- include CharCreate
- attr_accessor :hometown
- attr_accessor :wisdom
- attr_accessor :gender
- alias ccs_gactor_setup setup unless $@
- def setup(actor_id)
- ccs_gactor_setup(actor_id)
- @hometown = "none"
- @wisdom = 0
- if ACTOR_INITIAL_GENDER.include?(actor_id)
- @gender = ACTOR_INITIAL_GENDER[actor_id]
- else
- @gender = ""
- end
- end
- def wisdom_is(value)
- if @wisdom >= value
- return true
- else
- return false
- end
- end
- def hometown_is(string)
- if @hometown == string
- return true
- else
- return false
- end
- end
- end
- ################################################################################
- #*******************************************************************************
- # WINDOW BASE
- ################################################################################
- class Window_Base < Window
- include CharCreate
- #-----------------------------------------------------------------------------
- # Draw Selectable Actor
- #-----------------------------------------------------------------------------
- def draw_selectable_actor(key, x, y)
- draw_face(key[0], key[1], x, y)
- draw_character(key[0], key[1], x + 110, y + 32)
- end
- #-----------------------------------------------------------------------------
- # Creation Rect
- #-----------------------------------------------------------------------------
- def creation_rect(index)
- cursor = Rect.new(0, 0, 0, 0)
- cursor.width = (contents.width + @spacing) / @column_max - @spacing
- cursor.height = 96
- cursor.x = index % @column_max * (cursor.width + @spacing)
- cursor.y = index / @column_max * cursor.height
- return cursor
- end
- end
- ################################################################################
- #*******************************************************************************
- # WINDOW STATUS
- ################################################################################
- class Window_Status < Window_Base
- include CharCreate
- alias ccs_winstatus_refresh refresh unless $@
- def refresh
- ccs_winstatus_refresh
- self.contents.font.color = system_color
- self.contents.draw_text(0, 130, self.width, WLH, HOMETOWN_TAG)
- self.contents.font.color = normal_color
- self.contents.draw_text(70, 130, self.width, WLH, @actor.hometown)
- if @actor.gender == "Male"
- self.contents.font.color = text_color(GENDER_COLORS[0])
- self.contents.draw_text(110, 30, self.width, WLH, "M")
- elsif @actor.gender == "Female"
- self.contents.font.color = text_color(GENDER_COLORS[1])
- self.contents.draw_text(110, 30, self.width, WLH, "F")
- end
- end
- end
- ################################################################################
- #*******************************************************************************
- # WINDOW NAME EDIT
- ################################################################################
- class Window_NameEdit < Window_Base
- attr_accessor :creation
- alias ccs_wnedit_refresh refresh unless $@
- def refresh
- if @creation
- self.contents.clear
- name_array = @name.split(//)
- for i in 0...@max_char
- c = name_array[i]
- c = '_' if c == nil
- self.contents.draw_text(item_rect(i), c)#, 1)
- end
- else
- ccs_wnedit_refresh
- end
- end
- end
- ################################################################################
- #*******************************************************************************
- # WINDOW CREATION COMMANDS
- ################################################################################
- class Window_CreationCommands < Window_Selectable
- include CharCreate
- def initialize(x, y, width, height)
- super(x, y, width, height)
- c1 = NAME_COMMAND
- c2 = GENDER_COMMAND
- c3 = CHARACTER_COMMAND
- c4 = CLASS_COMMAND
- c5 = HOMETOWN_COMMAND
- c6 = READY_COMMAND
- @commands = [c1, c2, c3, c4, c5, c6]
- @item_max = @commands.size
- refresh
- self.index = 0
- end
- def refresh
- self.contents.clear
- create_contents
- for i in 0...@item_max
- draw_items(i)
- end
- end
- def draw_items(index)
- rect = item_rect(index)
- rect.x += 4
- rect.width -= 8
- self.contents.clear_rect(rect)
- self.contents.draw_text(rect, @commands[index])
- end
- end
- ################################################################################
- #*******************************************************************************
- # WINDOW GENDER SELECT
- ################################################################################
- class Window_GenderSelect < Window_Selectable
- include CharCreate
- def initialize(x, y, width, height, actor)
- super(x, y, width, height)
- @actor = actor
- c1 = "Male"
- c2 = "Female"
- @commands = [c1, c2]
- @item_max = @commands.size
- refresh
- self.index = 0
- end
- def refresh
- self.contents.clear
- for i in 0...@item_max
- draw_items(i)
- end
- end
- def draw_items(index)
- rect = item_rect(index)
- rect.x += 4
- rect.width -= 8
- self.contents.clear_rect(rect)
- self.contents.draw_text(rect, @commands[index])
- end
- end
- ################################################################################
- #*******************************************************************************
- # WINDOW HOMETOWN SELECT
- ################################################################################
- class Window_HometownSelect < Window_Selectable
- include CharCreate
- def initialize(x, y, width, height)
- super(x, y, width, height)
- @commands = HOMETOWNS
- @item_max = @commands.size
- refresh
- self.index = 0
- end
- def refresh
- self.contents.clear
- for i in 0...@item_max
- draw_items(i)
- end
- end
- def draw_items(index)
- rect = item_rect(index)
- rect.x += 4
- rect.width -= 8
- self.contents.clear_rect(rect)
- self.contents.draw_text(rect, @commands[index])
- end
- end
- ################################################################################
- #*******************************************************************************
- # WINDOW CHARACTER SELCTION
- ################################################################################
- class Window_CharacterSelect < Window_Selectable
- include CharCreate
- attr_accessor :keys
- attr_accessor :item_max
- def initialize(x, y, width, height)
- super(x, y, width, height)
- case $game_temp.chosen_gender
- when 0
- @keys = MALES
- when 1
- @keys = FEMALES
- end
- @item_max = @keys.size
- refresh
- self.index = 0
- end
- def refresh
- self.contents.clear
- create_contents
- for i in 0...@item_max
- draw_items(i)
- end
- end
- def draw_items(index)
- rect = creation_rect(index)
- rect.x += 4
- rect.width -= 8
- self.contents.clear_rect(rect)
- draw_selectable_actor(@keys[index], rect.x, rect.y)
- end
- def create_contents
- self.contents.dispose
- self.contents = Bitmap.new(width - 32, [height - 32, row_max * 96].max)
- end
- def update_cursor
- if @index < 0 # If the cursor position is less than 0
- self.cursor_rect.empty # Empty cursor
- else # If the cursor position is 0 or more
- row = @index / @column_max # Get current row
- if row < top_row # If before the currently displayed
- self.top_row = row # Scroll up
- end
- if row > bottom_row # If after the currently displayed
- self.bottom_row = row # Scroll down
- end
- rect = creation_rect(@index) # Get rectangle of selected item
- rect.y -= self.oy # Match rectangle to scroll position
- self.cursor_rect = rect # Refresh cursor rectangle
- end
- end
- #--------------------------------------------------------------------------
- # * Get Top Row
- #--------------------------------------------------------------------------
- def top_row
- return self.oy / 96
- end
- #--------------------------------------------------------------------------
- # * Set Top Row
- # row : row shown on top
- #--------------------------------------------------------------------------
- def top_row=(row)
- row = 0 if row < 0
- row = row_max - 1 if row > row_max - 1
- self.oy = row * 96
- end
- #--------------------------------------------------------------------------
- # * Get Number of Rows Displayable on 1 Page
- #--------------------------------------------------------------------------
- def page_row_max
- return (self.height - 32) / 96
- end
- end
- ################################################################################
- #*******************************************************************************
- # WINDOW CLASS SELECTION
- ################################################################################
- class Window_ClassSelect < Window_Selectable
- include CharCreate
- def initialize(x, y, width, height)
- super(x, y, width, height)
- @commands = []
- for i in 1..AVAILABLE_CLASSES
- @commands.push($data_classes[i].name)
- end
- @item_max = @commands.size
- refresh
- self.index = 0
- end
- def refresh
- self.contents.clear
- for i in 0...@item_max
- draw_items(i)
- end
- end
- def draw_items(index)
- rect = item_rect(index)
- rect.x += 4
- rect.width -= 8
- self.contents.clear_rect(rect)
- self.contents.draw_text(rect, @commands[index])
- end
- end
- ################################################################################
- #*******************************************************************************
- # WINDOW CHARACTER PREVIEW
- ################################################################################
- class Window_CharacterPreview < Window_Base
- include CharCreate
- def initialize(x, y, width, height, actor)
- super(x, y, width, height)
- @actor = actor
- refresh
- end
- def refresh
- self.contents.clear
- draw_actor_face(@actor, 0, 0)
- draw_actor_graphic(@actor, 450, 90)
- self.contents.font.color = system_color
- self.contents.draw_text(110, 0, self.width, WLH, "Name:")
- self.contents.draw_text(110, WLH, self.width, WLH, "Gender:")
- self.contents.draw_text(110, WLH * 2, self.width, WLH, "Class:")
- self.contents.draw_text(300, 0, self.width, WLH, "Hometown:")
- self.contents.font.color = text_color(PREVIEW_NAME_COLOR)
- self.contents.draw_text(190, 0, self.width, WLH, @actor.name)
- self.contents.font.color = text_color(PREVIEW_GENDER_COLOR)
- self.contents.draw_text(190, WLH, self.width, WLH, @actor.gender)
- self.contents.font.color = text_color(PREVIEW_CLASS_COLOR)
- draw_actor_class(@actor, 190, WLH * 2)
- self.contents.font.color = text_color(PREVIEW_HOMETOWN_COLOR)
- self.contents.draw_text(410, 0, self.width, WLH, @actor.hometown)
- self.contents.font.color = normal_color
- end
- end
- ################################################################################
- #*******************************************************************************
- # WINDOW CONFIRMATION
- ################################################################################
- class Window_Confirmation < Window_Selectable
- include CharCreate
- def initialize(x, y, width, height)
- super(x, y, width, height)
- @commands = ["Confirm", "Back"]
- @item_max = @commands.size
- refresh
- self.index = 0
- end
- def refresh
- self.contents.clear
- for i in 0...@item_max
- draw_items(i)
- end
- end
- def draw_items(index)
- rect = item_rect(index)
- rect.x += 4
- rect.width -= 8
- self.contents.clear_rect(rect)
- self.contents.draw_text(rect, @commands[index])
- end
- end
- ################################################################################
- #*******************************************************************************
- # SCENE NAME
- ################################################################################
- class Scene_Name < Scene_Base
- def initialize(creation = false)
- @creation = creation
- end
- alias ccs_sname_start start unless $@
- def start
- ccs_sname_start
- if @creation
- @edit_window.creation = true
- @edit_window.refresh
- end
- end
- alias ccs_sname_return_scene return_scene unless $@
- def return_scene
- if @creation
- for i in 0...$game_party.members.size
- if $game_party.members[i] == @actor
- $scene = Scene_CharCreate.new(i)
- end
- end
- else
- ccs_sname_return_scene
- end
- end
- end
- ################################################################################
- #*******************************************************************************
- # SCENE CHARCREATE
- ################################################################################
- class Scene_CharCreate < Scene_Base
- include CharCreate
- def initialize(member_id, menufuru = false)
- @from_furu = menufuru
- @actor = $game_party.members[member_id]
- end
- def start
- @win_commands = Window_CreationCommands.new(0, 0, 180, 180)
- @win_gender = Window_GenderSelect.new(220, 0, 130, 80, @actor)
- @win_hometown = Window_HometownSelect.new(220, 0, 160, 280)
- @win_character = Window_CharacterSelect.new(220, 0, 160, 280)
- @win_class = Window_ClassSelect.new(220, 0, 160, 280)
- @win_preview = Window_CharacterPreview.new(0, 280, 544, 136, @actor)
- @win_confirm = Window_Confirmation.new(220, 0, 160, 80)
- @win_gender.visible = false
- @win_hometown.visible = false
- @win_character.visible = false
- @win_class.visible = false
- @win_confirm.visible = false
- @win_gender.active = false
- @win_hometown.active = false
- @win_character.active = false
- @win_class.active = false
- @win_confirm.active = false
- @win_commands.active = true
- end
- #-----------------------------------------------------------------------------
- # Update
- #-----------------------------------------------------------------------------
- def update
- @win_commands.update
- if @win_commands.active
- if Input.trigger?(Input::C)
- Sound.play_decision
- case @win_commands.index
- when 0
- $game_temp.name_actor_id = @actor.id
- $game_temp.name_max_char = 12
- $scene = Scene_Name.new(true)
- when 1
- activate_gender_selection
- when 2
- activate_character_selection
- when 3
- activate_class_selection
- when 4
- activate_hometown_selection
- when 5
- activate_confirmation_selection
- end
- end
- elsif @win_gender.active
- update_gender_selection
- elsif @win_character.active
- update_character_selection
- elsif @win_class.active
- update_class_selection
- elsif @win_hometown.active
- update_hometown_selection
- elsif @win_confirm
- update_confirmation_selection
- end
- end
- #-----------------------------------------------------------------------------
- # Activate Gender Selection
- #-----------------------------------------------------------------------------
- def activate_gender_selection
- @win_gender.visible = true
- @win_commands.active = false
- @win_gender.index = 0
- @win_gender.active = true
- end
- #-----------------------------------------------------------------------------
- # Activate Character Selection
- #-----------------------------------------------------------------------------
- def activate_character_selection
- @win_character.active = true
- @win_character.visible = true
- @win_commands.active = false
- @win_character.index = 0
- end
- #-----------------------------------------------------------------------------
- # Activate Class Selection
- #-----------------------------------------------------------------------------
- def activate_class_selection
- @win_class.visible = true
- @win_commands.active = false
- @win_class.index = 0
- @win_class.active = true
- end
- #-----------------------------------------------------------------------------
- # Activate Hometown Selection
- #-----------------------------------------------------------------------------
- def activate_hometown_selection
- @win_hometown.visible = true
- @win_commands.active = false
- @win_hometown.index = 0
- @win_hometown.active = true
- end
- #-----------------------------------------------------------------------------
- # Activate Confirmation Selection
- #-----------------------------------------------------------------------------
- def activate_confirmation_selection
- @win_confirm.visible = true
- @win_commands.active = false
- @win_confirm.index = 0
- @win_confirm.active = true
- end
- #-----------------------------------------------------------------------------
- # Update Gender Selection
- #-----------------------------------------------------------------------------
- def update_gender_selection
- @win_gender.update
- if Input.trigger?(Input::C)
- Sound.play_decision
- case @win_gender.index
- when 0
- @actor.gender = "Male"
- $game_temp.chosen_gender = 0
- @win_character.keys = MALES
- @win_character.item_max = @win_character.keys.size
- @win_character.refresh
- when 1
- @actor.gender = "Female"
- $game_temp.chosen_gender = 1
- @win_character.keys = FEMALES
- @win_character.item_max = @win_character.keys.size
- @win_character.refresh
- end
- @win_preview.refresh
- elsif Input.trigger?(Input::B)
- Sound.play_cancel
- back_to_commands
- end
- end
- #-----------------------------------------------------------------------------
- # Update Character Selection
- #-----------------------------------------------------------------------------
- def update_character_selection
- @win_character.update
- if Input.trigger?(Input::C)
- Sound.play_decision
- cname = @win_character.keys[@win_character.index][0]
- cdex = @win_character.keys[@win_character.index][1]
- @actor.set_graphic(cname, cdex, cname, cdex)
- @win_preview.refresh
- @win_character.refresh
- elsif Input.trigger?(Input::B)
- Sound.play_cancel
- back_to_commands
- end
- end
- #-----------------------------------------------------------------------------
- # Update Class Selection
- #-----------------------------------------------------------------------------
- def update_class_selection
- @win_class.update
- if Input.trigger?(Input::C)
- Sound.play_decision
- @actor.class_id=(@win_class.index + 1)
- @win_preview.refresh
- elsif Input.trigger?(Input::B)
- Sound.play_cancel
- back_to_commands
- end
- end
- #-----------------------------------------------------------------------------
- # Update Hometown Selection
- #-----------------------------------------------------------------------------
- def update_hometown_selection
- @win_hometown.update
- if Input.trigger?(Input::C)
- Sound.play_decision
- @actor.hometown = HOMETOWNS[@win_hometown.index]
- @win_preview.refresh
- elsif Input.trigger?(Input::B)
- Sound.play_cancel
- back_to_commands
- end
- end
- #-----------------------------------------------------------------------------
- # Update Confirmation Selection
- #-----------------------------------------------------------------------------
- def update_confirmation_selection
- @win_confirm.update
- if Input.trigger?(Input::C)
- Sound.play_decision
- case @win_confirm.index
- when 0
- if CCS_USE_RECRUIT_SHOPS
- @actor.is_set = true
- end
- if @from_furu
- $scene = Scene_MenuFuru.new(9)
- else
- $scene = Scene_Map.new
- end
- when 1
- back_to_commands
- end
- elsif Input.trigger?(Input::B)
- Sound.play_cancel
- back_to_commands
- end
- end
- #-----------------------------------------------------------------------------
- # Back to Commands
- #-----------------------------------------------------------------------------
- def back_to_commands
- case @win_commands.index
- when 1
- @win_gender.active = false
- @win_gender.visible = false
- when 2
- @win_character.active = false
- @win_character.visible = false
- when 3
- @win_class.active = false
- @win_class.visible = false
- when 4
- @win_hometown.active = false
- @win_hometown.visible = false
- when 5
- @win_confirm.active = false
- @win_confirm.visible = false
- end
- @win_commands.active = true
- end
- #-----------------------------------------------------------------------------
- # Terminate
- #-----------------------------------------------------------------------------
- def terminate
- $game_player.refresh
- @win_commands.dispose
- @win_preview.dispose
- @win_gender.dispose
- @win_character.dispose
- @win_class.dispose
- @win_hometown.dispose
- @win_confirm.dispose
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment