Project1
标题:
关于标题新选项,昨晚我搜索了很久都没找到合适的。
[打印本页]
作者:
一瞬间的幻觉
时间:
2010-11-16 06:10
标题:
关于标题新选项,昨晚我搜索了很久都没找到合适的。
本帖最后由 一瞬间的幻觉 于 2010-11-20 16:56 编辑
在游戏标题再多增加一个选项,比如说“成就”、“音乐鉴赏”或者“制作名单”
这问题大家可能都提烂了吧,可惜我本着“先搜索,后提问”的原则,去找了一个晚上,没找到我需要的解决答案
无奈还是来麻烦大家吧,相信好心的你们不会嫌我烦。
问题1是:如何不用外部脚本,只通过修改VX的 scene title来完成“菜单和文字都消失”的效果吗?
菜单文字的透明度还有把XY值调节到底在哪一行?
我对照别人的提问帖找遍了自己的scene title,完全找不到指定的代码,我一度怀疑自己是不是VX版本的?
问题2是:如何点击新增的第三类选项,就会出现一张图片?我只要简单的一句脚本,如果是很复杂的就算了
附上scene title的代码,帮我看看,文字透明度和光标指向的位置修改是哪一行代码,不甚感激~~
#==============================================================================
# ** Scene_Title
#------------------------------------------------------------------------------
# 这个类用来执行显示标题画面的程式。
#==============================================================================
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 # 播放标题画面BGM
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 # 新的剧情
command_new_game
when 1 # 读取存档
command_continue
when 2 # 退出游戏
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 = "制作群" #这个s3是后面添加的,155行的s3也一样,我自己添加的
s4 = Vocab::shutdown
@command_window = Window_Command.new(172, [s1, s2, s3, s4])
@command_window.x = 278#(544 - @command_window.width) / 2 要恢复把前面278删
@command_window.y = 110#本来是288
if @continue_enabled # 如果[读取存档]可用
@command_window.index = 1 # 移动光标至该命令项目上
else # 如果[读取存档]不可用
@command_window.draw_item(1, false) # 半透明显示该命令项目
end
@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
#--------------------------------------------------------------------------
# * 播放标题画面BGM
#--------------------------------------------------------------------------
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 "玩家起始位置没有被指定。"
exit
end
end
#--------------------------------------------------------------------------
# * 命令项目:新的剧情
#--------------------------------------------------------------------------
def command_new_game
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
if @continue_enabled
Sound.play_decision
$scene = Scene_File.new(false, true, false)
else
Sound.play_buzzer
end
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
复制代码
作者:
Rion幻音
时间:
2010-11-16 08:52
62行update那里改
def update
super
@command_window.update
if Input.trigger?(Input::C)
case @command_window.index
when 0 # 新的剧情
command_new_game
when 1 # 读取存档
command_continue
when 2
#自行设定
when 3 # 退出游戏
command_shutdown
end
end
end
复制代码
显示图片参考138行……
作者:
一瞬间的幻觉
时间:
2010-11-16 18:21
菜单文字的透明度还有把XY值调节到底在哪一行?
作者:
Rion幻音
时间:
2010-11-16 18:40
本帖最后由 Rion幻音 于 2010-11-16 18:43 编辑
回复
一瞬间的幻觉
的帖子
看这样行吗?
然后放你的制作群图案在Picture文档命名为Test……(如果要更改名称就改脚本的第83行)
#==============================================================================
# ** Scene_Title
#------------------------------------------------------------------------------
# 这个类用来执行显示标题画面的程式。
#==============================================================================
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 # 播放标题画面BGM
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 # 新的剧情
command_new_game
when 1 # 读取存档
command_continue
when 2
create_graphic#自行设定
close_command_window
when 3 # 退出游戏
command_shutdown
end
elsif Input.trigger?(Input::B)
remove_graphic
end
end
def create_graphic
@sprite_test = Sprite.new
@sprite_test.bitmap = Cache.picture("Test")
end
def remove_graphic
@sprite_test.dispose
open_command_window
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 = "制作群" #这个s3是后面添加的,155行的s3也一样,我自己添加的
s4 = Vocab::shutdown
@command_window = Window_Command.new(172, [s1, s2, s3, s4])
@command_window.x = 278#(544 - @command_window.width) / 2 要恢复把前面278删
@command_window.y = 110#本来是288
if @continue_enabled # 如果[读取存档]可用
@command_window.index = 1 # 移动光标至该命令项目上
else # 如果[读取存档]不可用
@command_window.draw_item(1, false) # 半透明显示该命令项目
end
@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
#--------------------------------------------------------------------------
# * 播放标题画面BGM
#--------------------------------------------------------------------------
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 "玩家起始位置没有被指定。"
exit
end
end
#--------------------------------------------------------------------------
# * 命令项目:新的剧情
#--------------------------------------------------------------------------
def command_new_game
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
if @continue_enabled
Sound.play_decision
$scene = Scene_File.new(false, true, false)
else
Sound.play_buzzer
end
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
复制代码
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1