Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Personal Save Files
#1
This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given. If you are the owner of the thread, please contact administration.


Features:
This script allows you to have a name for your save files and have more unlimited save files that the unlimited save files script
Replaces Scene_Title

Instructions:
Place directly above main

Demo:
None unless requested

Script:

.txt   Personal_Save_Files_VX.txt (Size: 28.72 KB / Downloads: 0)

Code:
#---------------------
# Personal Save Files
# By: Polraudio
# Credits: Polraudio, RPG Advocate, Cybersam
# Version: 1.0
#---------------------
=begin
#----------------------------------------------------
Features:
- Allows you to have up to Unlimited save files
- You can have a name for your save files

Instructions:
Place above main

Contact:
If you have any questions or comments you can find me
at www.rmxpunlimited.net(Best Method)

Or email me polraudio@gmail.com
=end
class Scene_File < Scene_Base
  def initialize(saving, from_title, from_event)
    @saving = saving
    @from_title = from_title
    @from_event = from_event
  end
  def start
    super
    create_menu_background
    @help_window = Window_Help.new
    create_savefile_windows
    if @saving
      @index = $game_temp.last_file_index
      @help_window.set_text(Vocab::SaveMessage)
    else
      @index = self.latest_file_index
      @help_window.set_text(Vocab::LoadMessage)
    end
    @savefile_windows[@index].selected = true
  end
  def terminate
    super
    dispose_menu_background
    @help_window.dispose
    dispose_item_windows
  end
  def return_scene
    if @from_title
      $scene = Scene_Title.new
    elsif @from_event
      $scene = Scene_Map.new
    else
      $scene = Scene_Menu.new(4)
    end
  end
  def update
    super
    update_menu_background
    @help_window.update
    update_savefile_windows
    update_savefile_selection
  end
  def create_savefile_windows
    @savefile_windows = []
    for i in 0..3
      @savefile_windows.push(Window_SaveFile.new(i, make_filename(i)))
    end
    @item_max = 4
  end
  def dispose_item_windows
    for window in @savefile_windows
      window.dispose
    end
  end
  def update_savefile_windows
    for window in @savefile_windows
      window.update
    end
  end
  def update_savefile_selection
    if Input.trigger?(Input::C)
      determine_savefile
    elsif Input.trigger?(Input::B)
      Sound.play_cancel
      return_scene
    else
      last_index = @index
      if Input.repeat?(Input::DOWN)
        cursor_down(Input.trigger?(Input::DOWN))
      end
      if Input.repeat?(Input::UP)
        cursor_up(Input.trigger?(Input::UP))
      end
      if @index != last_index
        Sound.play_cursor
        @savefile_windows[last_index].selected = false
        @savefile_windows[@index].selected = true
      end
    end
  end
  def determine_savefile
    if @saving
      Sound.play_save
      do_save
    else
      if @savefile_windows[@index].file_exist
        Sound.play_load
        do_load
      else
        Sound.play_buzzer
        return
      end
    end
    $game_temp.last_file_index = @index
  end
  def cursor_down(wrap)
    if @index < @item_max - 1 or wrap
      @index = (@index + 1) % @item_max
    end
  end
  def cursor_up(wrap)
    if @index > 0 or wrap
      @index = (@index - 1 + @item_max) % @item_max
    end
  end
  def make_filename(file_index)
    return "Save#{file_index + 1}." + $savename
  end
  def latest_file_index
    index = 0
    latest_time = Time.at(0)
    for i in 0...@savefile_windows.size
      if @savefile_windows[i].time_stamp > latest_time
        latest_time = @savefile_windows[i].time_stamp
        index = i
      end
    end
    return index
  end
  def do_save
    file = File.open(@savefile_windows[@index].filename, "wb")
    write_save_data(file)
    file.close
    return_scene
  end
  def do_load
    file = File.open(@savefile_windows[@index].filename, "rb")
    read_save_data(file)
    file.close
    $scene = Scene_Map.new
    RPG::BGM.fade(1500)
    Graphics.fadeout(60)
    Graphics.wait(40)
    @last_bgm.play
    @last_bgs.play
  end
  def write_save_data(file)
    characters = []
    for actor in $game_party.members
      characters.push([actor.character_name, actor.character_index])
    end
    $game_system.save_count += 1
    $game_system.version_id = $data_system.version_id
    @last_bgm = RPG::BGM::last
    @last_bgs = RPG::BGS::last
    Marshal.dump(characters,           file)
    Marshal.dump(Graphics.frame_count, file)
    Marshal.dump(@last_bgm,            file)
    Marshal.dump(@last_bgs,            file)
    Marshal.dump($game_system,         file)
    Marshal.dump($game_message,        file)
    Marshal.dump($game_switches,       file)
    Marshal.dump($game_variables,      file)
    Marshal.dump($game_self_switches,  file)
    Marshal.dump($game_actors,         file)
    Marshal.dump($game_party,          file)
    Marshal.dump($game_troop,          file)
    Marshal.dump($game_map,            file)
    Marshal.dump($game_player,         file)
  end
  def read_save_data(file)
    characters           = Marshal.load(file)
    Graphics.frame_count = Marshal.load(file)
    @last_bgm            = Marshal.load(file)
    @last_bgs            = Marshal.load(file)
    $game_system         = Marshal.load(file)
    $game_message        = Marshal.load(file)
    $game_switches       = Marshal.load(file)
    $game_variables      = Marshal.load(file)
    $game_self_switches  = Marshal.load(file)
    $game_actors         = Marshal.load(file)
    $game_party          = Marshal.load(file)
    $game_troop          = Marshal.load(file)
    $game_map            = Marshal.load(file)
    $game_player         = Marshal.load(file)
    if $game_system.version_id != $data_system.version_id
      $game_map.setup($game_map.map_id)
      $game_player.center($game_player.x, $game_player.y)
    end
  end
end
class Scene_Title < Scene_Base
  def main
    if $BTEST
      battle_test
    else
      super
    end
  end
  def start
    super
    load_database
    create_game_objects
    check_continue
    create_title_graphic
    create_command_window
    play_title_music
  end
  def perform_transition
    Graphics.transition(20)
  end
  def post_start
    super
    open_command_window
  end
  def pre_terminate
    super
    close_command_window
  end
  def terminate
    super
    dispose_command_window
    snapshot_for_background
    dispose_title_graphic
  end
  def update
    super
    @command_window.update
    if Input.trigger?(Input::C)
      case @command_window.index
      when 0    #New game
        command_new_game
      when 1    # Continue
        command_continue
      when 2    # Shutdown
        command_shutdown
      end
    end
  end
  def load_database
    $data_actors        = load_data("Data/Actors.rvdata")
    $data_classes       = load_data("Data/Classes.rvdata")
    $data_skills        = load_data("Data/Skills.rvdata")
    $data_items         = load_data("Data/Items.rvdata")
    $data_weapons       = load_data("Data/Weapons.rvdata")
    $data_armors        = load_data("Data/Armors.rvdata")
    $data_enemies       = load_data("Data/Enemies.rvdata")
    $data_troops        = load_data("Data/Troops.rvdata")
    $data_states        = load_data("Data/States.rvdata")
    $data_animations    = load_data("Data/Animations.rvdata")
    $data_common_events = load_data("Data/CommonEvents.rvdata")
    $data_system        = load_data("Data/System.rvdata")
    $data_areas         = load_data("Data/Areas.rvdata")
  end
  def load_bt_database
    $data_actors        = load_data("Data/BT_Actors.rvdata")
    $data_classes       = load_data("Data/BT_Classes.rvdata")
    $data_skills        = load_data("Data/BT_Skills.rvdata")
    $data_items         = load_data("Data/BT_Items.rvdata")
    $data_weapons       = load_data("Data/BT_Weapons.rvdata")
    $data_armors        = load_data("Data/BT_Armors.rvdata")
    $data_enemies       = load_data("Data/BT_Enemies.rvdata")
    $data_troops        = load_data("Data/BT_Troops.rvdata")
    $data_states        = load_data("Data/BT_States.rvdata")
    $data_animations    = load_data("Data/BT_Animations.rvdata")
    $data_common_events = load_data("Data/BT_CommonEvents.rvdata")
    $data_system        = load_data("Data/BT_System.rvdata")
  end
  def create_game_objects
    $game_temp          = Game_Temp.new
    $game_message       = Game_Message.new
    $game_system        = Game_System.new
    $game_switches      = Game_Switches.new
    $game_variables     = Game_Variables.new
    $game_self_switches = Game_SelfSwitches.new
    $game_actors        = Game_Actors.new
    $game_party         = Game_Party.new
    $game_troop         = Game_Troop.new
    $game_map           = Game_Map.new
    $game_player        = Game_Player.new
  end
  def check_continue
    @continue_enabled = (Dir.glob('Save*.rvdata').size > 0)
  end
  def create_title_graphic
    @sprite = Sprite.new
    @sprite.bitmap = Cache.system("Title")
  end
  def dispose_title_graphic
    @sprite.bitmap.dispose
    @sprite.dispose
  end
  def create_command_window
    s1 = Vocab::new_game
    s2 = Vocab::continue
    s3 = Vocab::shutdown
    @command_window = Window_Command.new(172, [s1, s2, s3])
    @command_window.x = (544 - @command_window.width) / 2
    @command_window.y = 288
    @command_window.openness = 0
    @command_window.open
  end
  def dispose_command_window
    @command_window.dispose
  end
  def open_command_window
    @command_window.open
    begin
      @command_window.update
      Graphics.update
    end until @command_window.openness == 255
  end
  def close_command_window
    @command_window.close
    begin
      @command_window.update
      Graphics.update
    end until @command_window.openness == 0
  end
  def play_title_music
    $data_system.title_bgm.play
    RPG::BGS.stop
    RPG::ME.stop
  end
  def confirm_player_location
    if $data_system.start_map_id == 0
      print "Player start location not set."
      exit
    end
  end
  def command_new_game
    data = []
    top_text = "Please make a save name"
    text = ""
    font = "Arial"
    max = 9
    size = 24
    $savename = Text_input.new(top_text, text, font, max, size).text
    confirm_player_location
    Sound.play_decision
    $game_party.setup_starting_members
    $game_map.setup($data_system.start_map_id)
    $game_player.moveto($data_system.start_x, $data_system.start_y)
    $game_player.refresh
    $scene = Scene_Map.new
    RPG::BGM.fade(1500)
    close_command_window
    Graphics.fadeout(60)
    Graphics.wait(40)
    Graphics.frame_count = 0
    RPG::BGM.stop
    $game_map.autoplay
  end
  def command_continue
    data = []
    top_text = "Please type your save name"
    text = ""
    font = "Arial"
    max = 9
    size = 24
    $savename = Text_input.new(top_text, text, font, max, size).text
    Sound.play_decision
    $scene = Scene_File.new(false, true, false)
  end
  def command_shutdown
    Sound.play_decision
    RPG::BGM.fade(800)
    RPG::BGS.fade(800)
    RPG::ME.fade(800)
    $scene = nil
  end
  def battle_test
    load_bt_database
    create_game_objects
    Graphics.frame_count = 0
    $game_party.setup_battle_test_members
    $game_troop.setup($data_system.test_troop_id)
    $game_troop.can_escape = true
    $game_system.battle_bgm.play
    snapshot_for_background
    $scene = Scene_Battle.new
  end
end
#======================================
# ■ Keyboard Script
#---------------------------------------------------------------------------
#  By: Cybersam
#   Date: 25/05/05
#   Version 4
#======================================
# How to use
# if Kboard.keyboard($R_Key_A)
#
module Kboard
#--------------------------------------------------------------------------
$RMouse_BUTTON_L = 0x01        # left mouse button
$RMouse_BUTTON_R = 0x02        # right mouse button
$RMouse_BUTTON_M = 0x04        # middle mouse button
$RMouse_BUTTON_4 = 0x05        # 4th mouse button
$RMouse_BUTTON_5 = 0x06        # 5th mouse button
#--------------------------------------------------------------------------
$R_Key_BACK      = 0x08        # BACKSPACE key
$R_Key_TAB       = 0x09        # TAB key
$R_Key_RETURN    = 0x0D        # ENTER key
$R_Key_SHIFT     = 0x10        # SHIFT key
$R_Key_CTLR      = 0x11        # CTLR key
$R_Key_ALT       = 0x12        # ALT key
$R_Key_PAUSE     = 0x13        # PAUSE key
$R_Key_CAPITAL   = 0x14        # CAPS LOCK key
$R_Key_ESCAPE    = 0x1B        # ESC key
$R_Key_SPACE     = 0x20        # SPACEBAR
$R_Key_PRIOR     = 0x21        # PAGE UP key
$R_Key_NEXT      = 0x22        # PAGE DOWN key
$R_Key_END       = 0x23        # END key
$R_Key_HOME      = 0x24        # HOME key
$R_Key_LEFT      = 0x25        # LEFT ARROW key
$R_Key_UP        = 0x26        # UP ARROW key
$R_Key_RIGHT     = 0x27        # RIGHT ARROW key
$R_Key_DOWN      = 0x28        # DOWN ARROW key
$R_Key_SELECT    = 0x29        # SELECT key
$R_Key_PRINT     = 0x2A        # PRINT key
$R_Key_SNAPSHOT  = 0x2C        # PRINT SCREEN key
$R_Key_INSERT    = 0x2D        # INS key
$R_Key_DELETE    = 0x2E        # DEL key
#--------------------------------------------------------------------------
$R_Key_0         = 0x30        # 0 key
$R_Key_1         = 0x31        # 1 key
$R_Key_2         = 0x32        # 2 key
$R_Key_3         = 0x33        # 3 key
$R_Key_4         = 0x34        # 4 key
$R_Key_5         = 0x35        # 5 key
$R_Key_6         = 0x36        # 6 key
$R_Key_7         = 0x37        # 7 key
$R_Key_8         = 0x38        # 8 key
$R_Key_9         = 0x39        # 9 key
#--------------------------------------------------------------------------
$R_Key_A         = 0x41        # A key
$R_Key_B         = 0x42        # B key
$R_Key_C         = 0x43        # C key
$R_Key_D         = 0x44        # D key
$R_Key_E         = 0x45        # E key
$R_Key_F         = 0x46        # F key
$R_Key_G         = 0x47        # G key
$R_Key_H         = 0x48        # H key
$R_Key_I         = 0x49        # I key
$R_Key_J         = 0x4A        # J key
$R_Key_K         = 0x4B        # K key
$R_Key_L         = 0x4C        # L key
$R_Key_M         = 0x4D        # M key
$R_Key_N         = 0x4E        # N key
$R_Key_O         = 0x4F        # O key
$R_Key_P         = 0x50        # P key
$R_Key_Q         = 0x51        # Q key
$R_Key_R         = 0x52        # R key
$R_Key_S         = 0x53        # S key
$R_Key_T         = 0x54        # T key
$R_Key_U         = 0x55        # U key
$R_Key_V         = 0x56        # V key
$R_Key_W         = 0x57        # W key
$R_Key_X         = 0x58        # X key
$R_Key_Y         = 0x59        # Y key
$R_Key_Z         = 0x5A        # Z key
#--------------------------------------------------------------------------
$R_Key_LWIN      = 0x5B        # Left Windows key (Microsoft Natural keyboard)
$R_Key_RWIN      = 0x5C        # Right Windows key (Natural keyboard)
$R_Key_APPS      = 0x5D        # Applications key (Natural keyboard)
#--------------------------------------------------------------------------
$R_Key_NUMPAD0   = 0x60        # Numeric keypad 0 key
$R_Key_NUMPAD1   = 0x61        # Numeric keypad 1 key
$R_Key_NUMPAD2   = 0x62        # Numeric keypad 2 key
$R_Key_NUMPAD3   = 0x63        # Numeric keypad 3 key
$R_Key_NUMPAD4   = 0x64        # Numeric keypad 4 key
$R_Key_NUMPAD5   = 0x65        # Numeric keypad 5 key
$R_Key_NUMPAD6   = 0x66        # Numeric keypad 6 key
$R_Key_NUMPAD7   = 0x67        # Numeric keypad 7 key
$R_Key_NUMPAD8   = 0x68        # Numeric keypad 8 key
$R_Key_NUMPAD9   = 0x69        # Numeric keypad 9 key
$R_Key_MULTIPLY  = 0x6A        # Multiply key (*)
$R_Key_ADD       = 0x6B        # Add key (+)
$R_Key_SEPARATOR = 0x6C        # Separator key
$R_Key_SUBTRACT  = 0x6D        # Subtract key (-)
$R_Key_DECIMAL   = 0x6E        # Decimal key
$R_Key_DIVIDE    = 0x6F        # Divide key (/)
#--------------------------------------------------------------------------
$R_Key_F1        = 0x70        # F1 key
$R_Key_F2        = 0x71        # F2 key
$R_Key_F3        = 0x72        # F3 key
$R_Key_F4        = 0x73        # F4 key
$R_Key_F5        = 0x74        # F5 key
$R_Key_F6        = 0x75        # F6 key
$R_Key_F7        = 0x76        # F7 key
$R_Key_F8        = 0x77        # F8 key
$R_Key_F9        = 0x78        # F9 key
$R_Key_F10       = 0x79        # F10 key
$R_Key_F11       = 0x7A        # F11 key
$R_Key_F12       = 0x7B        # F12 key
#--------------------------------------------------------------------------
$R_Key_NUMLOCK   = 0x90        # NUM LOCK key
$R_Key_SCROLL    = 0x91        # SCROLL LOCK key
#--------------------------------------------------------------------------
$R_Key_LSHIFT    = 0xA0        # Left SHIFT key
$R_Key_RSHIFT    = 0xA1        # Right SHIFT key
$R_Key_LCONTROL  = 0xA2        # Left CONTROL key
$R_Key_RCONTROL  = 0xA3        # Right CONTROL key
$R_Key_L_ALT     = 0xA4        # Left ALT key
$R_Key_R_ALT     = 0xA5        # Right ALT key
#--------------------------------------------------------------------------
$R_Key_SEP       = 0xBC        # , key
$R_Key_DASH      = 0xBD        # - key
$R_Key_DOTT      = 0xBE        # . key
#--------------------------------------------------------------------------
GetKeyState = Win32API.new("user32","GetAsyncKeyState",['i'],'i')
GetKeyboardState = Win32API.new("user32","GetKeyState",['i'],'i')
GetSetKeyState = Win32API.new("user32","SetKeyboardState",['i'],'i')
#--------------------------------------------------------------------------
module_function
#--------------------------------------------------------------------------
def keyb(rkey)
    if GetKeyState.call(rkey) != 0
      return 1
    end
    return 0
end
  #--------------------------------------------------------------------------
def keyboard(rkey)
   GetKeyState.call(rkey) & 0x01 == 1  #
end
#--------------------------------------------------------------------------
def key(rkey, key = 0)
   GetKeyboardState.call(rkey) & 0x01 == key #
end
end
#===============================================================================
#
# Text-Input Script v1                                     created by: cybersam
#
# hi boys and ladys.... and whatever else ^-^
#
# here comes the script that allows you to insert text with the keyboard
# in your game... ^-^
#
# i didnt make it work with the default name edit/input script
# but with this it should be easier for you guys to do it...
# the reason ?!.. i said it already in other scripts... ^-^
#
# "i dont wana do a complete script that you can post in your games and it works
# without a single modification"...
#
# since there are people here that just dont even wont try to learn ruby...
# this script works perfect of its own....
# but it wont let you edit the character name without modification...
# so go on and try it out...
#
# if you need help to edit something just ask...
# i would gladly help but i wont do all the work for you...
#
# thats it from my side...
# as for now... this will be the last update
# for this script (keyboard/mouse script) from my side...
# if you find any bugs please contact me... you should already now how... ^-^
# and dont tell me "there is a bug in you script!"
# that alone is not enough... ^-^
#
# cya all ^-^
# sam
#
#===============================================================================

class Text_input < Window_Base

  def initialize(top_text = "Here comes the new Version of the keyboard script", text = "Keyboad - Script v3", font = "Arial", max = 20, size = 16, free = "_")
    @toptext = top_text
    @text =  text
    @font = font
    @max = max
    @size = size
    @free = free
    super(320 - (@max*@size+@size)/2, 240-@size*2-32, @max * @size + 32, 128)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = @font
    self.contents.font.size = @size
    self.z = 256
    @twidth = @max*@size
    refresh
    update
  end
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(0, 0, @twidth, @size, @toptext, 1)
    for i in 0...@max
      text = @text[i]
      if text == nil
        text = @free
      else
        text = text.chr
      end
      self.contents.font.color = normal_color
      self.contents.draw_text(@size * i, @size + 24, @size, @size, text, 1)
    end
  end
    def update
      loop do
        Graphics.update
        refresh
        if Kboard.keyboard($R_Key_BACK) # delete (with backspace)
          text = ""
          if @text.size != 0
            for i in 0...@text.size - 1
              text  += @text[i].chr
            end
          @text = text
          else
          end
        end
        if Kboard.keyboard($R_Key_RETURN) # Enter key... to end...
          #$game_variables[1]=@text
          return
        end

        if @text.size < @max

# putting Key's to the text


          if Kboard.keyboard($R_Key_SPACE) # space key (to insert space between the chars... ^-^)
            @text += " " # space.. you can set anything else if you want ^-^'
          end
          if Kboard.key($R_Key_CAPITAL, 1) # if caps lock is active then write the chars in higher case
            if Kboard.keyboard($R_Key_A)
              @text += "A"
            end
            if Kboard.keyboard($R_Key_B)
              @text += "B"
            end
            if Kboard.keyboard($R_Key_C)
            @text += "C"
            end
            if Kboard.keyboard($R_Key_D)
              @text += "D"
            end          
            if Kboard.keyboard($R_Key_E)
              @text += "E"
            end
            if Kboard.keyboard($R_Key_F)
              @text += "F"
            end
            if Kboard.keyboard($R_Key_G)
              @text += "G"
            end
            if Kboard.keyboard($R_Key_H)
              @text += "H"
            end
            if Kboard.keyboard($R_Key_I)
              @text += "I"
            end
            if Kboard.keyboard($R_Key_J)
              @text += "J"
            end
            if Kboard.keyboard($R_Key_K)
              @text += "K"
            end
            if Kboard.keyboard($R_Key_L)
              @text += "L"
            end
            if Kboard.keyboard($R_Key_M)
              @text += "M"
            end
            if Kboard.keyboard($R_Key_N)
              @text += "N"
            end
            if Kboard.keyboard($R_Key_O)
              @text += "O"
            end
            if Kboard.keyboard($R_Key_P)
              @text += "P"
            end
            if Kboard.keyboard($R_Key_Q)
              @text += "Q"
            end
            if Kboard.keyboard($R_Key_R)
              @text += "R"
            end
            if Kboard.keyboard($R_Key_S)
              @text += "S"
            end
            if Kboard.keyboard($R_Key_T)
              @text += "T"
            end
            if Kboard.keyboard($R_Key_U)
              @text += "U"
            end
            if Kboard.keyboard($R_Key_V)
              @text += "V"
            end
            if Kboard.keyboard($R_Key_W)
              @text += "W"
            end
            if Kboard.keyboard($R_Key_X)
              @text += "X"
            end
            if Kboard.keyboard($R_Key_Y)
              @text += "Y"
            end
            if Kboard.keyboard($R_Key_Z)
              @text += "Z"
            end

          elsif Kboard.key($R_Key_CAPITAL) # if caps lock is deactivated then write in lower case

            if Kboard.keyboard($R_Key_A)
              @text += "a"
            end
            if Kboard.keyboard($R_Key_B)
              @text += "b"
            end
            if Kboard.keyboard($R_Key_C)
            @text += "c"
            end
            if Kboard.keyboard($R_Key_D)
              @text += "d"
            end          
            if Kboard.keyboard($R_Key_E)
              @text += "e"
            end
            if Kboard.keyboard($R_Key_F)
              @text += "f"
            end
            if Kboard.keyboard($R_Key_G)
              @text += "g"
            end
            if Kboard.keyboard($R_Key_H)
              @text += "h"
            end
            if Kboard.keyboard($R_Key_I)
              @text += "i"
            end
            if Kboard.keyboard($R_Key_J)
              @text += "j"
            end
            if Kboard.keyboard($R_Key_K)
              @text += "k"
            end
            if Kboard.keyboard($R_Key_L)
              @text += "l"
            end
            if Kboard.keyboard($R_Key_M)
              @text += "m"
            end
            if Kboard.keyboard($R_Key_N)
              @text += "n"
            end
            if Kboard.keyboard($R_Key_O)
              @text += "o"
            end
            if Kboard.keyboard($R_Key_P)
              @text += "p"
            end
            if Kboard.keyboard($R_Key_Q)
              @text += "q"
            end
            if Kboard.keyboard($R_Key_R)
              @text += "r"
            end
            if Kboard.keyboard($R_Key_S)
              @text += "s"
            end
            if Kboard.keyboard($R_Key_T)
              @text += "t"
            end
            if Kboard.keyboard($R_Key_U)
              @text += "u"
            end
            if Kboard.keyboard($R_Key_V)
              @text += "v"
            end
            if Kboard.keyboard($R_Key_W)
              @text += "w"
            end
            if Kboard.keyboard($R_Key_X)
              @text += "x"
            end
            if Kboard.keyboard($R_Key_Y)
              @text += "y"
            end
            if Kboard.keyboard($R_Key_Z)
              @text += "z"
            end
          end
  
# numbers

          if Kboard.keyboard($R_Key_0)
            @text += "0"
          end
          if Kboard.keyboard($R_Key_1)
            @text += "1"
          end
          if Kboard.keyboard($R_Key_2)
            @text += "2"
          end
          if Kboard.keyboard($R_Key_3)
            @text += "3"
          end
          if Kboard.keyboard($R_Key_4)
            @text += "4"
          end
          if Kboard.keyboard($R_Key_5)
            @text += "5"
          end
          if Kboard.keyboard($R_Key_6)
            @text += "6"
          end
          if Kboard.keyboard($R_Key_7)
            @text += "7"
          end
          if Kboard.keyboard($R_Key_8)
            @text += "8"
          end
          if Kboard.keyboard($R_Key_9)
            @text += "9"
          end
          
    
          
# numpad
          if Kboard.keyboard($R_Key_NUMPAD0)
            @text += "0"
          end
          if Kboard.keyboard($R_Key_NUMPAD1)
            @text += "1"
          end
          if Kboard.keyboard($R_Key_NUMPAD2)
            @text += "2"
          end
          if Kboard.keyboard($R_Key_NUMPAD3)
            @text += "3"
          end
          if Kboard.keyboard($R_Key_NUMPAD4)
            @text += "4"
          end
          if Kboard.keyboard($R_Key_NUMPAD5)
            @text += "5"
          end
          if Kboard.keyboard($R_Key_NUMPAD6)
            @text += "6"
          end
          if Kboard.keyboard($R_Key_NUMPAD7)
            @text += "7"
          end
          if Kboard.keyboard($R_Key_NUMPAD8)
            @text += "8"
          end
          if Kboard.keyboard($R_Key_NUMPAD9)
            @text += "9"
          end

          if Kboard.keyboard($R_Key_ADD) # + (numpad)
            @text += "+"
          end
          if Kboard.keyboard($R_Key_SUBTRACT) # - (numpad)
            @text += "-"
          end
          if Kboard.keyboard($R_Key_DIVIDE) # / (numpad)
            @text += "/"
          end
          if Kboard.keyboard($R_Key_MULTIPLY) # * (numpad)
            @text += "*"
          end
          
          if Kboard.key($R_Key_CAPITAL) # since i dont want to change my keyboard layout you need to test it for you'r self...
            if Kboard.keyboard($R_Key_SEP) # , (key) (tested german keyboard layout)
              @text += ","
            end
            if Kboard.keyboard($R_Key_DASH) # - (key) (tested german keyboard layout)
              @text += "-"
            end
            if Kboard.keyboard($R_Key_DOTT) # . (key) (tested german keyboard layout)
              @text += "."
            end
          elsif Kboard.key($R_Key_CAPITAL, 1)
            if Kboard.keyboard($R_Key_SEP) # , (key) (tested german keyboard layout)
              @text += ";"
            end
            if Kboard.keyboard($R_Key_DASH) # - (key) (tested german keyboard layout)
              @text += "_"
            end
            if Kboard.keyboard($R_Key_DOTT) # . (key) (tested german keyboard layout)
              @text += ":"
            end
          end

        else
        end
      refresh
    end
  end
  def text()
    self.contents.dispose
    self.dispose

    return @text
  end
end

Credits:
Polraudio
RPG Advocate(Unlimited Save Files)
Cybersam(Keyboard and Input Text)
}




Users browsing this thread: