И да еще вопрос, как сделать вывод своего поля ввода, чтобы не как набор имени, а только цифры, например?
25.12.2014, 16:46
JackCL
Цитата:
Сообщение от Paranoid
Все разобрался! Спасибо большое!
И да еще вопрос, как сделать вывод своего поля ввода, чтобы не как набор имени, а только цифры, например?
Для ввода только цифр скриптов не нужно, есть готовая ивентовая команда Input Number, там можно задать разрядность вводимой цифры и переменную куда ее писать.
ps. К сожалению, там нельзя задать рейндж от чего я, бывает, страдаю и ругаю е-брейнов нехорошо.
26.12.2014, 18:17
Personigo de la Ĉefo
Есть ли какой-нибудь скрипт или команда на запоминание, к примеру, инвентаря? Чтобы можно было его одним движением убрать а потом вернусь, не вписывая кондишнл для каждого предмета? А то же самое для скиллов?
05.01.2015, 01:24
temakadet
Не могу запустить ни один из скопированных скриптов. А конкретно минимап. Что не так делаю, Брал из разных демок и сайтов, результат один.
05.01.2015, 02:20
Eviald
Друзья! Прошу за ранее простить меня, если мой вопрос где то и кем то был освещен ранее в этой теме, просто 135 страниц просмотреть проблемно, со свободным временем не айс:( Вопрос такой: Возможно ли в RPG Maker VX Ace как то без скриптов сделать проигрывание вступительного видео ролика при запуске игры до появления титульного экрана с выбором новой игры и.т.д.? И если нет, то существует ли подобный скрипт? И если существует, буду благодарен за подсказку где его можно было бы достать.
05.01.2015, 04:52
Рольф
Цитата:
Не могу запустить ни один из скопированных скриптов. А конкретно минимап. Что не так делаю, Брал из разных демок и сайтов, результат один.
Движок точно совпадает с твоим? Если да то скинь демку, посмотрю?
05.01.2015, 12:54
dirge
Цитата:
Сообщение от Eviald
Друзья! Прошу за ранее простить меня, если мой вопрос где то и кем то был освещен ранее в этой теме, просто 135 страниц просмотреть проблемно, со свободным временем не айс:( Вопрос такой: Возможно ли в RPG Maker VX Ace как то без скриптов сделать проигрывание вступительного видео ролика при запуске игры до появления титульного экрана с выбором новой игры и.т.д.? И если нет, то существует ли подобный скрипт? И если существует, буду благодарен за подсказку где его можно было бы достать.
Без скриптов никак, можно взять скрипт на пропуск титульного экрана и сделать меню на ивентах, а можно взять вот этот скрипт
Спойлерскрипт:
Код:
#==============================================================================
# XS - Pre Title
# Author: Nicke
# Created: 31/08/2012
# Edited: 30/12/2012
# Version: 1.0e
#==============================================================================
# Instructions
# -----------------------------------------------------------------------------
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ? Materials but above ? Main. Remember to save.
#==============================================================================
# Requires: XS - Core Script. - не требуется, убрал зависимость.
#==============================================================================
# Pre title script.
# This will enables you to show pictures, texts and play movies before the title
# scene is presented.
#
# *** Only for RPG Maker VX Ace. ***
#==============================================================================
($imported ||= {})["XAIL-PRE-TITLE"] = true
# Setup the text here.
# TEXTS = [name, x, y, delay (can be nil), fade_in, fade_out]
TEXTS = {
#0 => ["Text is cooool", 20, -100, 200, 50, 255],
#1 => ["Moink!", 80, -50, 200, 50, 255],
#2 => ["Hehe... :)", 160, 0, 200, 50, 255]
} # Don't remove this line.
# Setup the movies here.
# MOVIES = [filename, goto_title?]
MOVIES = {
#0 => ["Movie01", true],
#1 => ["Movie02", true],
} # Don't remove this line.
# Set the order. ID 0 begin the first one to be shown.
# SHOW_ORDER[id] => symbol
# symbol:
# :m = movies
# :p = pictures
# :t = texts
SHOW_ORDER = {
0 => :m,
1 => :t,
2 => :p
} # Don't remove this line.
# Set the button to manually skip trough each texts and pictures.
# BUTTON = symbol
BUTTON = :C
# Use this if you wish to skip the pre title scene.
# Can be used when debugging your game.
# SKIP_PRE_TITLE = true/false
SKIP_PRE_TITLE = false
#Задержка перед переходом к главному меню после поиграша всех эффектов.
PRE_DELAY = 60
end
end
# *** Don't edit below unless you know what you are doing. ***
#==============================================================================
# ** Sound
#==============================================================================
class << Sound
def play(name, volume, pitch, type = :se)
# // Method to play a sound. If specified name isn't valid throw an error.
case type
when :se ; RPG::SE.new(name, volume, pitch).play rescue valid?(name)
when :me ; RPG::ME.new(name, volume, pitch).play rescue valid?(name)
when :bgm ; RPG::BGM.new(name, volume, pitch).play rescue valid?(name)
when :bgs ; RPG::BGS.new(name, volume, pitch).play rescue valid?(name)
end
end
def valid?(name)
# // Method to raise error if specified sound name is invalid.
msgbox("Error. Unable to find sound file: " + name)
exit
end
end
#==============================================================================#
# ** Error Handler
#==============================================================================#
#unless $imported["XAIL-XS-CORE"]
# // Error handler when XS - Core is not installed.
#msg = "The script %s requires the latest version of XS - Core in order to function properly."
#name = "XS - Pre Title"
#msgbox(sprintf(msg, name))
#exit
# end
#==============================================================================#
# ** SceneManager
#==============================================================================#
class << SceneManager
alias xail_pre_title_scenemanager_first_scene_class first_scene_class
def first_scene_class(*args, &block)
# // Method for first scene class.
return xail_pre_title_scenemanager_first_scene_class(*args, &block) if XAIL::PRE_TITLE::SKIP_PRE_TITLE
return Scene_Title if DataManager.save_file_exists?
$BTEST ? Scene_Battle : Scene_Pre_Title
end
end
#==============================================================================#
# ** Scene_Base
# If YEA - Menu Cursor is installed change update_menu_cursors method to
# prevent bug.
#==============================================================================#
if $imported["YEA-MenuCursor"]
class Scene_Base
alias xail_pre_title_yea_upd_menu_cur update_menu_cursors
def update_menu_cursors(*args, &block)
# // Method to update menu cursors.
return if @menu_cursors.nil?
xail_pre_title_yea_upd_menu_cur(*args, &block)
end
end
end
#==============================================================================#
# ** Scene_Pre_Title
#==============================================================================#
class Scene_Pre_Title < Scene_Base
def initialize
# // Method to initialize the scene.
Graphics.fadeout(0)
setup_music unless XAIL::PRE_TITLE::MUSIC.nil?
for i in XAIL::PRE_TITLE::SHOW_ORDER.values
case i
when :p ; setup_pictures
when :t ; setup_texts
when :m ; setup_movies
end
end
end
def update
# // Method to update the scene.
super
goto_title
end
def setup_music
# // Method to play a bgm.
bgm = XAIL::PRE_TITLE::MUSIC
Sound.play(bgm[0], bgm[1], bgm[2], :bgm)
end
def setup_pictures
# // Method to setup the picture(s).
pics = XAIL::PRE_TITLE::PICTURES
pics.keys.each {|i| display_picture(pics[i])}
end
def setup_texts
# // Method to setup the text(s).
texts = XAIL::PRE_TITLE::TEXTS
texts.keys.each {|i| display_texts(texts[i])}
end
def setup_movies
# // Method to setup the movie(s).
movies = XAIL::PRE_TITLE::MOVIES
movies.keys.each {|i| display_movie(movies[i])}
end
def delay?(amount)
# // Method to delay.
if amount.nil?
loop do
update_basic
break if Input.trigger?(XAIL::PRE_TITLE::BUTTON)
end
else
amount.times do
update_basic
break if Input.trigger?(XAIL::PRE_TITLE::BUTTON)
end
end
end
def display_picture(picture)
# // Method to display a picture.
return if picture.nil?
begin
pictures = Sprite.new
pictures.bitmap = Cache.picture(picture[0])
pictures.opacity = picture[1]
rescue
msgbox("Error. Unable to locate picture: " + picture[0])
exit
end
Graphics.fadein(picture[3])
delay?(picture[2])
Graphics.fadeout(picture[4])
delay?(60)
pictures = nil, pictures.dispose unless pictures.nil?
end
def display_texts(text)
# // Method to display a text.
return if text.nil?
Graphics.fadein(60)
texts = Sprite.new
texts.opacity = 0
texts.bitmap = Bitmap.new(Graphics.width, Graphics.height)
texts.bitmap.font.name = XAIL::PRE_TITLE::FONT[0]
texts.bitmap.font.size = XAIL::PRE_TITLE::FONT[1]
texts.bitmap.font.color = XAIL::PRE_TITLE::FONT[2]
texts.bitmap.font.bold = XAIL::PRE_TITLE::FONT[3]
texts.bitmap.font.shadow = XAIL::PRE_TITLE::FONT[4]
texts.bitmap.draw_text(text[1], text[2], Graphics.width, Graphics.height, text[0])
for i in 1..text[4]
update_basic
texts.opacity = i * (255 / text[4])
end
delay?(text[3])
for i in 1..text[5]
update_basic
texts.opacity = 255 - i * (255 / text[5])
end
delay?(60)
texts = nil, texts.dispose unless texts.nil?
end
def display_movie(movie)
# // Method to display a movie.
return if movie.nil?
begin
Graphics.play_movie("Movies/" + movie[0])
rescue
msgbox("Error. Unable to locate movie: " + movie[0])
exit
end
delay?(60)
goto_title if movie[1]
end
def goto_title
# // Method to go to title scene.
RPG::BGM.fade(1000)
delay?(XAIL::PRE_TITLE::PRE_DELAY)
RPG::BGM.stop
SceneManager.goto(Scene_Title)
end
end # END OF FILE
#=*==========================================================================*=#
# ** END OF FILE
#=*==========================================================================*=#
Он там требовал еще один скрипт, но я вроде бы его отвязал+добавил возможность управлять задержкой перед переходом к титульнику. Скрипт довольно простой в настройке, особых знаний скриптинга не требует. Если что - спрашивай.
06.01.2015, 02:19
Eviald
Цитата:
Сообщение от dirge
Без скриптов никак, можно взять скрипт на пропуск титульного экрана и сделать меню на ивентах, а можно взять вот этот скрипт
Спойлерскрипт:
Код:
#==============================================================================
# XS - Pre Title
# Author: Nicke
# Created: 31/08/2012
# Edited: 30/12/2012
# Version: 1.0e
#==============================================================================
# Instructions
# -----------------------------------------------------------------------------
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ? Materials but above ? Main. Remember to save.
#==============================================================================
# Requires: XS - Core Script. - не требуется, убрал зависимость.
#==============================================================================
# Pre title script.
# This will enables you to show pictures, texts and play movies before the title
# scene is presented.
#
# *** Only for RPG Maker VX Ace. ***
#==============================================================================
($imported ||= {})["XAIL-PRE-TITLE"] = true
# Setup the text here.
# TEXTS = [name, x, y, delay (can be nil), fade_in, fade_out]
TEXTS = {
#0 => ["Text is cooool", 20, -100, 200, 50, 255],
#1 => ["Moink!", 80, -50, 200, 50, 255],
#2 => ["Hehe... :)", 160, 0, 200, 50, 255]
} # Don't remove this line.
# Setup the movies here.
# MOVIES = [filename, goto_title?]
MOVIES = {
#0 => ["Movie01", true],
#1 => ["Movie02", true],
} # Don't remove this line.
# Set the order. ID 0 begin the first one to be shown.
# SHOW_ORDER[id] => symbol
# symbol:
# :m = movies
# :p = pictures
# :t = texts
SHOW_ORDER = {
0 => :m,
1 => :t,
2 => :p
} # Don't remove this line.
# Set the button to manually skip trough each texts and pictures.
# BUTTON = symbol
BUTTON = :C
# Use this if you wish to skip the pre title scene.
# Can be used when debugging your game.
# SKIP_PRE_TITLE = true/false
SKIP_PRE_TITLE = false
#Задержка перед переходом к главному меню после поиграша всех эффектов.
PRE_DELAY = 60
end
end
# *** Don't edit below unless you know what you are doing. ***
#==============================================================================
# ** Sound
#==============================================================================
class << Sound
def play(name, volume, pitch, type = :se)
# // Method to play a sound. If specified name isn't valid throw an error.
case type
when :se ; RPG::SE.new(name, volume, pitch).play rescue valid?(name)
when :me ; RPG::ME.new(name, volume, pitch).play rescue valid?(name)
when :bgm ; RPG::BGM.new(name, volume, pitch).play rescue valid?(name)
when :bgs ; RPG::BGS.new(name, volume, pitch).play rescue valid?(name)
end
end
def valid?(name)
# // Method to raise error if specified sound name is invalid.
msgbox("Error. Unable to find sound file: " + name)
exit
end
end
#==============================================================================#
# ** Error Handler
#==============================================================================#
#unless $imported["XAIL-XS-CORE"]
# // Error handler when XS - Core is not installed.
#msg = "The script %s requires the latest version of XS - Core in order to function properly."
#name = "XS - Pre Title"
#msgbox(sprintf(msg, name))
#exit
# end
#==============================================================================#
# ** SceneManager
#==============================================================================#
class << SceneManager
alias xail_pre_title_scenemanager_first_scene_class first_scene_class
def first_scene_class(*args, &block)
# // Method for first scene class.
return xail_pre_title_scenemanager_first_scene_class(*args, &block) if XAIL::PRE_TITLE::SKIP_PRE_TITLE
return Scene_Title if DataManager.save_file_exists?
$BTEST ? Scene_Battle : Scene_Pre_Title
end
end
#==============================================================================#
# ** Scene_Base
# If YEA - Menu Cursor is installed change update_menu_cursors method to
# prevent bug.
#==============================================================================#
if $imported["YEA-MenuCursor"]
class Scene_Base
alias xail_pre_title_yea_upd_menu_cur update_menu_cursors
def update_menu_cursors(*args, &block)
# // Method to update menu cursors.
return if @menu_cursors.nil?
xail_pre_title_yea_upd_menu_cur(*args, &block)
end
end
end
#==============================================================================#
# ** Scene_Pre_Title
#==============================================================================#
class Scene_Pre_Title < Scene_Base
def initialize
# // Method to initialize the scene.
Graphics.fadeout(0)
setup_music unless XAIL::PRE_TITLE::MUSIC.nil?
for i in XAIL::PRE_TITLE::SHOW_ORDER.values
case i
when :p ; setup_pictures
when :t ; setup_texts
when :m ; setup_movies
end
end
end
def update
# // Method to update the scene.
super
goto_title
end
def setup_music
# // Method to play a bgm.
bgm = XAIL::PRE_TITLE::MUSIC
Sound.play(bgm[0], bgm[1], bgm[2], :bgm)
end
def setup_pictures
# // Method to setup the picture(s).
pics = XAIL::PRE_TITLE::PICTURES
pics.keys.each {|i| display_picture(pics[i])}
end
def setup_texts
# // Method to setup the text(s).
texts = XAIL::PRE_TITLE::TEXTS
texts.keys.each {|i| display_texts(texts[i])}
end
def setup_movies
# // Method to setup the movie(s).
movies = XAIL::PRE_TITLE::MOVIES
movies.keys.each {|i| display_movie(movies[i])}
end
def delay?(amount)
# // Method to delay.
if amount.nil?
loop do
update_basic
break if Input.trigger?(XAIL::PRE_TITLE::BUTTON)
end
else
amount.times do
update_basic
break if Input.trigger?(XAIL::PRE_TITLE::BUTTON)
end
end
end
def display_picture(picture)
# // Method to display a picture.
return if picture.nil?
begin
pictures = Sprite.new
pictures.bitmap = Cache.picture(picture[0])
pictures.opacity = picture[1]
rescue
msgbox("Error. Unable to locate picture: " + picture[0])
exit
end
Graphics.fadein(picture[3])
delay?(picture[2])
Graphics.fadeout(picture[4])
delay?(60)
pictures = nil, pictures.dispose unless pictures.nil?
end
def display_texts(text)
# // Method to display a text.
return if text.nil?
Graphics.fadein(60)
texts = Sprite.new
texts.opacity = 0
texts.bitmap = Bitmap.new(Graphics.width, Graphics.height)
texts.bitmap.font.name = XAIL::PRE_TITLE::FONT[0]
texts.bitmap.font.size = XAIL::PRE_TITLE::FONT[1]
texts.bitmap.font.color = XAIL::PRE_TITLE::FONT[2]
texts.bitmap.font.bold = XAIL::PRE_TITLE::FONT[3]
texts.bitmap.font.shadow = XAIL::PRE_TITLE::FONT[4]
texts.bitmap.draw_text(text[1], text[2], Graphics.width, Graphics.height, text[0])
for i in 1..text[4]
update_basic
texts.opacity = i * (255 / text[4])
end
delay?(text[3])
for i in 1..text[5]
update_basic
texts.opacity = 255 - i * (255 / text[5])
end
delay?(60)
texts = nil, texts.dispose unless texts.nil?
end
def display_movie(movie)
# // Method to display a movie.
return if movie.nil?
begin
Graphics.play_movie("Movies/" + movie[0])
rescue
msgbox("Error. Unable to locate movie: " + movie[0])
exit
end
delay?(60)
goto_title if movie[1]
end
def goto_title
# // Method to go to title scene.
RPG::BGM.fade(1000)
delay?(XAIL::PRE_TITLE::PRE_DELAY)
RPG::BGM.stop
SceneManager.goto(Scene_Title)
end
end # END OF FILE
#=*==========================================================================*=#
# ** END OF FILE
#=*==========================================================================*=#
Он там требовал еще один скрипт, но я вроде бы его отвязал+добавил возможность управлять задержкой перед переходом к титульнику. Скрипт довольно простой в настройке, особых знаний скриптинга не требует. Если что - спрашивай.
dirge, большое спасибо и за скрипт, и за предложение помощи! Сперва попробую сам разобраться.
06.01.2015, 03:59
Eviald
Мде... даже с учетом того, что скрипт простой в настройке, даже без особых знаний скриптинга я все равно, разобраться увы не смог :(
Если я правильно понял, то именно в этом куске скрипта:
52 # Setup the movies here.
53 # MOVIES = [filename, goto_title?]
54 MOVIES = {
55 #0 => ["Movie01", true],
56 #1 => ["Movie02", true],
57 } # Don't remove this line.
вписывается имя видеоролика, который требуется воспроизвести до появления титульника. И что я только не делал, итог один - выдает ошибки...
dirge, прошу твоей помощи.
06.01.2015, 06:04
Рольф
Обычно есть ограничения по формату файла, разрешения. Может проблема в этом.