RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Character Select System with a twist

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 82
Hello, I really like Omegas7's Script that let the player choose a character to play with, however, it lacks one thing I need very much: The ability to define where each character will start. What I mean is, that one character will start up in a desert area, while the other in a castle and to keep making bad examples another in a dungeon. As it stands now, all characters start up in the *same* area.

Is there any way to modify this script in order to implement such an option at where the player can start up? Maybe one could do an "extra" script, like if one know the ID of the character and it comes up in one map (the start one) is directly teleported to its real start-area. Alas, I am to bad to code this up myself :(

Thanks in advance for any kind assistance

Code: [Select]
# =============================================================================
#                   Omegas7's Character Select System Script.
# =============================================================================
#   Version: 1.0.
#   Author: Omegas7.
#   Exclusive For:   www.myrpgmaker.com
# =============================================================================
#   Instructions:
#   Below you will find an array called CHARACTERS.
#   Put the ID number of the actors you want to be selectable.
#   Each number separated by a comma.
#
#   DESCRIPTIONS is an array containing the description lines for each actor.
#   DESCRIPTIONS[0] has the description lines for the first selectable actor.
#   The description lines are inside another array.
#   DESCRIPTIONS[0] = ["Text","Text","Text"...]
#   Each description line is a string, inside quotes " ".
#   Each description line is separated by a comma.
# =============================================================================


module OMEGAS7
  module CHARACTER_SELECT
    CHARACTERS = [1,2,6]
   
    DESCRIPTIONS = []   # <--- Don't edit.
   
    DESCRIPTIONS[0] = ["He is a common RTP hero.","Sometimes he's a true loser.","But you got to learn to respect him."]
    DESCRIPTIONS[1] = ["This girl is extremely evil.","She's Ralph's girlfriend."]
    DESCRIPTIONS[2] = ["This guy is actually evil.","He hates Ralph.","He loves Ulrika."]
  end
end

class Character_Select < Scene_Base
  include OMEGAS7::CHARACTER_SELECT
  def initialize
    @phase = 1
  end
  def start
    create_commands
    create_descriptions
    create_preview
    refresh_info
  end
  def create_commands
    @actors = []
    for i in 0...CHARACTERS.size
      @actors[@actors.size] = $game_actors[CHARACTERS[i].to_i].name
    end
    @command = Window_Command.new(150,@actors)
    @command.x = 180
    @command.height = 180
    @index = @command.index
  end
  def create_descriptions
    @descriptions = Window_Base.new(0,416 - 180,544,180)
  end
  def create_preview
    @preview = Window_Base.new(0,0,180,180)
  end
  def refresh_info
    @descriptions.contents.clear
    @preview.contents.clear
    for i in 0...DESCRIPTIONS[@command.index.to_i].size
      @descriptions.contents.draw_text(0,24 * i,500,24,DESCRIPTIONS[@command.index.to_i][i].to_s)
    end
    @preview.draw_face($game_actors[CHARACTERS[@command.index.to_i]].face_name,$game_actors[CHARACTERS[@command.index.to_i]].face_index,0,0)
    @preview.draw_character($game_actors[CHARACTERS[@command.index.to_i]].character_name,$game_actors[CHARACTERS[@command.index.to_i]].character_index,16,130)
  end
  def update
    @command.update if @phase == 1
    @confirm.update if @phase == 2
    if @index != @command.index
      refresh_info
      @index = @command.index
    end
    if Input.trigger?(Input::C)
      if @phase == 1
        start_confirm
      elsif @phase == 2
        if @confirm.index == 0
          finish
        elsif @confirm.index == 1
          finish_confirm
        end
      end
    end
    if Input.trigger?(Input::B)
      if @phase == 2
        finish_confirm
      end
    end
  end
  def start_confirm
    @confirm = Window_Command.new(544 - 360,["I'm sure.","No, go back."])
    @confirm.x = 360
    @phase = 2
  end
  def finish_confirm
    @confirm.dispose
    @phase = 1
  end
  def finish
    $game_party.add_actor(CHARACTERS[@command.index].to_i)
    @command.dispose if @command != nil
    @confirm.dispose if @confirm != nil
    @preview.dispose if @preview != nil
    @descriptions.dispose if @descriptions != nil
    $scene = Scene_Map.new
  end
end