The RPG Maker Resource Kit

RMRK RPG Maker Creation => VX Ace => VXA Scripts Database => Topic started by: lpz_Nq on May 25, 2012, 05:52:37 PM

Title: "Better" NameInput (+ Deleting Letters )
Post by: lpz_Nq on May 25, 2012, 05:52:37 PM
Better NameInput

Description


Hi, this is my first Script I release here.
My friends kept asking, how they delete letters in the Name Input Window, because "Esc" or "Num 0" isn't really intuitive,
I changed the Window so there is now a "«" symbol to remove other letters.
I had to remove some other symbols, because there was no more space.
Feel free to add again some special characters you wish for into free slots.

Features


Screenshots

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg7.imagebanana.com%2Fimg%2Fk8y4u3vz%2FUnbenannt.png&hash=3624470f4b61493839b57b6fe1b257e762a6ab7f)

Instructions

Just add the script above main, like the other scripts.
If you want to change something, just look into the script.

Script


Code: [Select]
# "Better" NameInput v1
# by fyzzo
# --------------------------
# If you want to change the symbol to delete letters, make sure you
# change it on 3 (THREE) positions in this script or it would not work properly.
# I have chosen the « character to delete other letters

class Window_NameInput < Window_Selectable
  CUSTOM1 = [ 'A','B','C','D','E',  'a','b','c','d','e',
             'F','G','H','I','J',  'f','g','h','i','j',
             'K','L','M','N','O',  'k','l','m','n','o',
             'P','Q','R','S','T',  'p','q','r','s','t',
             'U','V','W','X','Y',  'u','v','w','x','y',
             'Z',' ',' ',' ',' ',  'z',' ',' ',' ',' ', # You may replace these
             '0','1','2','3','4',  ' ',' ',' ',' ',' ', # empty spaces with
             '5','6','7','8','9',  ' ',' ',' ',' ',' ', # characters you miss ;)
             '.',' ',' ',' ',' ',  ' ',' ','«','Page','OK'] # deleting character in this row
  CUSTOM2 = [ 'Á','É','Í','Ó','Ú',  'á','é','í','ó','ú',
             'À','È','Ì','Ò','Ù',  'à','è','ì','ò','ù',
             'Â','Ê','Î','Ô','Û',  'â','ê','î','ô','û',
             'Ä','Ë','Ï','Ö','Ü',  'ä','ë','ï','ö','ü',
             '?','?','?','?','?',  '?','?','?','?','?',
             'Ã','Å','Æ','Ç','Ð',  'ã','å','æ','ç','ð',
             'Ñ','Õ','Ø','Š','?',  'ñ','õ','ø','š','?',
             'Ý','?','Ÿ','Ž','Þ',  'ý','ÿ','?','ž','þ',
             '?','Œ','?','œ','ß',  ' ',' ','«','Page','OK'] # I smell a deleting character somewhere around here
  def table
    return [CUSTOM1, CUSTOM2]
  end
 
  def process_ok
    if character == "«" # the character to go back
      process_back
    elsif !character.empty?
      on_name_add
    elsif is_page_change?
      Sound.play_ok
      cursor_pagedown
    elsif is_ok?
      on_name_ok
    end
  end
end

This Scripts was so easy to make, you do not need to credit me in the Game.
If you improve this Script - a credit would be nice.

You can give me Feedback if you want ;)
Title: Re: "Better" NameInput (+ Deleting Letters )
Post by: Wiimeiser on May 26, 2012, 01:54:42 AM
Would it be possible to add more pages?
Title: Re: "Better" NameInput (+ Deleting Letters )
Post by: lpz_Nq on May 26, 2012, 07:17:07 AM
It should, I think. You can edit it if you want.
Title: Re: "Better" NameInput (+ Deleting Letters )
Post by: Brady on June 04, 2012, 08:49:36 PM
I'm new to scripting so bear with me, but how to you trigger the naming window to come up in the first place?  The only option in the events window is to manually rename the character yourself, and I've no idea how to event in a script call :(
Title: Re: "Better" NameInput (+ Deleting Letters )
Post by: DoctorTodd on June 04, 2012, 09:08:52 PM
Use "Name Input Processing" on the third page of the event menu.
Title: Re: "Better" NameInput (+ Deleting Letters )
Post by: Brady on June 04, 2012, 09:10:48 PM
You're a star, thank-you :)

S'all comin' back to me now.  S'pose it's my fault, even on 2k3 I never used that function!
Title: Re: "Better" NameInput (+ Deleting Letters )
Post by: OffeNDer on January 16, 2013, 06:33:38 AM
i have question, how exactly this work, i have added the script but it is not working with me, also can you show me how to do it with pictures, ?