Project1
标题:
取自《信赖铃音-莫扎特之梦》的免系统标题脚本
[打印本页]
作者:
dingjianwei
时间:
2008-2-4 07:06
标题:
取自《信赖铃音-莫扎特之梦》的免系统标题脚本
RMVX自定义开始画面的一种新方案~~~
我下载《信赖铃音-莫扎特之梦~Trusty Bell》开始游戏是发现开始画面异常华丽{/qiang}
但是游戏载入时间过长引起了我的好奇心,打开工程发现标题画面的信息和素材都在名为“标题画面”的地图上,原来作者是跳过系统的标题画面直接开始游戏载入地图,游戏的开始菜单以事件编写,我将目光放在Scene_Title的脚本上就发现了秘密{/cy}
我用莫妮卡的RPG Maker VX 1.0 简体中文安装版生成新建工程然后对照《信赖铃音-莫扎特之梦》的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 # 判断继续是否有效
command_new_game # 跳过游戏标题跳转到自定义标题
end
#--------------------------------------------------------------------------
# ● 执行转换
#--------------------------------------------------------------------------
def perform_transition
Graphics.transition(20)
end
#--------------------------------------------------------------------------
# ● 结束处理
#--------------------------------------------------------------------------
def terminate
super
snapshot_for_background
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 confirm_player_location
if $data_system.start_map_id == 0
print "没有设置游戏者初期位置。"
exit
end
end
#--------------------------------------------------------------------------
# ● 指令 : 新游戏
#--------------------------------------------------------------------------
def command_new_game
confirm_player_location
$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
Graphics.frame_count = 0
$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
复制代码
没什么技术含量,大家对照游戏脚本自己也会发现~~发出来只是为了了却自己对RMVX不能自定义开始画面的残念~~(虽然可以替换System下的同名文件)
附《信赖铃音-莫扎特之梦~Trusty Bell》http://rpg.blue/viewthread.php?tid=74734
RPG Maker VX 1.0 简体中文安装版 http://rpg.blue/viewthread.php?tid=72185
作者:
5693744
时间:
2008-2-4 11:08
不错的脚本
作者:
earlysummer
时间:
2010-10-2 10:43
额,把title.png改成同名的自己画的标题,不是就可以换了吗?不过脚本很好啊^^嘿嘿,抱走
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1