Improved Scene Name
Version 1.0
by rendy1287
Release Date: 20/01/2009
Introduction
This is only to improve Scene_Name, I was modified three buttons to delete character, move page to next, and move page back. You can see it in the screenshot. I want to modify the window more, but i'm still learning ruby :D
Screenshot
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg255.imageshack.us%2Fimg255%2F7936%2Fimprvdwinnamenc4.png&hash=a75d110d9e982c8e13758548d27e5c71a2d26983) (http://imageshack.us)
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg255.imageshack.us%2Fimg255%2Fimprvdwinnamenc4.png%2F1%2Fw544.png&hash=17f5f88d14bc1aeb7dc63307a31e1ee31df52829) (http://g.imageshack.us/img255/imprvdwinnamenc4.png/1/)
Features
Version 1.0 (20 January 2009)
- Modified three buttons, 1. Del, 2. Back, 3. Next
- Added greek, cyrillic, and symbol characters
- First Released
Script
Place it above main.
Code:
[spoiler]
#==============================================================================
# ** Improved Window_NameInput v1.0
# Created by rendy1287 a.k.a Keiyh Aruya
# 20 January 2009
# Featured:
# - New characters
# - Modified three button to delete character, go to next, go to back
# Next feature:
# - Add japanese characters (if your font support it)
#------------------------------------------------------------------------------
# This window is used to select text characters on the name input screen.
#==============================================================================
module Keiyh_Imprvd_SceneName
DEL = 'Del'
BACK = '<--'
NEXT = '-->'
OK = 'OK'
EDIT_WINDOW = 'Window' # this is the windowskin of edit window
INPUT_WINDOW = 'Window' # this is the windowskin of input window
end
class Window_NameInput < Window_Base
#--------------------------------------------------------------------------
# * Text Character Table
#--------------------------------------------------------------------------
ENGLISH = [ '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',' ',' ',' ',' ',
' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',
'1','2','3','4','5', ' ',' ',' ',' ',' ',
'6','7','8','9','0', ' ',
Keiyh_Imprvd_SceneName::DEL,Keiyh_Imprvd_SceneName::BACK,
Keiyh_Imprvd_SceneName::NEXT,Keiyh_Imprvd_SceneName::OK]
# sorry if i put these characters randomly, not alphabetically
GREEK = [ '?','?','?','?','?', '?','?','?','?','?',
'?','?','?','?','?', '?','?','?','?','?',
'?','?','?','?','?', '?','?','?','?','?',
'?','?','?','?','?', '?','?','?','?','?',
'?','?','?','?',' ', '?','?','?','?','?',
'?','?','?','?','?', '?','?','?','?','?',
'?','?','?','?','?', '?','?','?','?','?',
'?','?','?','?','?', '?','?','?','?',' ',
'?','?','?','?','?', ' ',
Keiyh_Imprvd_SceneName::DEL,Keiyh_Imprvd_SceneName::BACK,
Keiyh_Imprvd_SceneName::NEXT,Keiyh_Imprvd_SceneName::OK]
CYRILLIC= [ '?','?','?','?','?', '?','?','?','?','?',
'?','?','?','?','?', '?','?','?','?','?',
'?','?','?','?','?', '?','?','?','?','?',
'?','?','?','?','?', '?','?','?',' ',' ',
'?','?','?','?','?', '?','?','?',' ',' ',
' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ', ' ',
Keiyh_Imprvd_SceneName::DEL,Keiyh_Imprvd_SceneName::BACK,
Keiyh_Imprvd_SceneName::NEXT,Keiyh_Imprvd_SceneName::OK]
SYMBOL = [ '!','"','#','$','%', '&',"'",'(',')','*',
'+',',','-','.','/', ':',';','<','=','>',
'?','@','[','\\',']', '^','_','`','{','}',
'|','~','¡','¢','£', '¤','¥','¦','§','©',
'ª','«','»','®','°', '±','¹','²','³','?',
'µ','¶','º','½','¼', '?','¾','?','?','?',
'¿','×','÷','?','–', '—',''',''',',','"',
' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ', ' ',
Keiyh_Imprvd_SceneName::DEL,Keiyh_Imprvd_SceneName::BACK,
Keiyh_Imprvd_SceneName::NEXT,Keiyh_Imprvd_SceneName::OK]
SYMBOL2 = [ '"',',,','†','‡','•', '...','‰','‹','›','?',
'€','?','?','?','™', '?','?','?','?','?',
'?','?','?','?','?', '?','?','?','?','?',
'?','?','?','?','?', '?','?',' ',' ',' ',
' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ', ' ',
Keiyh_Imprvd_SceneName::DEL,Keiyh_Imprvd_SceneName::BACK,
Keiyh_Imprvd_SceneName::NEXT,Keiyh_Imprvd_SceneName::OK]
TABLE = [ENGLISH, GREEK, CYRILLIC, SYMBOL, SYMBOL2]
#--------------------------------------------------------------------------
# * Text Character Acquisition
#--------------------------------------------------------------------------
def character
if @index < 86
return TABLE[@mode][@index]
else
return ""
end
end
#--------------------------------------------------------------------------
# * Determine Cursor Position: Delete
#--------------------------------------------------------------------------
def is_delete
return (@index == 86)
end
#--------------------------------------------------------------------------
# * Determine Cursor Position: Mode Switch (BACK)
#--------------------------------------------------------------------------
def is_mode_back #pagedown
return (@index == 87)
end
#--------------------------------------------------------------------------
# * Determine Cursor Position: Mode Switch (NEXT)
#--------------------------------------------------------------------------
def is_mode_next #pageup
return (@index == 88)
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
alias rendy1287_improved_scenename_update update
def update
rendy1287_improved_scenename_update
if Input.trigger?(Input::C) and is_mode_back
cursor_pageup
end
end
end
#==============================================================================
# ** Scene_Name
#------------------------------------------------------------------------------
# This class performs name input screen processing.
#==============================================================================
class Scene_Name < Scene_Base
#--------------------------------------------------------------------------
# * Start processing
#--------------------------------------------------------------------------
alias rendy1287_improved_scenename_start start
def start
rendy1287_improved_scenename_start
@edit_window.windowskin = Cache.system(Keiyh_Imprvd_SceneName::EDIT_WINDOW)
@input_window.windowskin = Cache.system(Keiyh_Imprvd_SceneName::INPUT_WINDOW)
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
alias rendy1287_improved_scenename_update update
def update
rendy1287_improved_scenename_update
if Input.trigger?(Input::C)
if @input_window.is_delete
if @edit_window.index > 0
Sound.play_cancel
@edit_window.back
end
end
end
end
end
[/spoiler]
Instruction
Just put the script above main.
Author's Notes
Free for use in your non-commercial work if credit included. If your project is commercial, please contact me.
Please do not redistribute this script without permission. If you want to post it on any forum, please link to this topic.