#ACE rtp提取工具,by garfeng
#只能提取bgm,和图片
#请把原始rtp复制一份使用,不要使用原始的rtp路径
#因为是移动文件,而非复制。
$rootDir = "../rtp/"
def mvBgm(bgm)
name = bgm.name
p name
path = "Audio/BGM/" + name + ".ogg"
exist = File.exist?(path)
if !exist
ori = $rootDir + path
if File.exist?(ori)
p ori
File.rename(ori,path)
end
end
end
def mvImg(img)
path1 = img+".png"
path2 = img+".jpg"
exist = File.exist?(path1) || File.exist?(path2)
if !exist
ori1 = $rootDir + path1
ori2 = $rootDir + path2
if File.exist?(ori1)
File.rename(ori1,path1)
elsif File.exist?(ori2)
file.rename(ori2,path2)
end
end
end
module Cache
def self.normal_bitmap(path)
mvImg(path)
@cache[path] = Bitmap.new(path) unless include?(path)
@cache[path]
end
end
class Game_Map
def autoplay
if @map.autoplay_bgm
mvBgm(@map.bgm)
end
@map.bgm.play if @map.autoplay_bgm
@map.bgs.play if @map.autoplay_bgs
end
end
module BattleManager
def self.play_battle_bgm
mvBgm($game_system.battle_bgm)
$game_system.battle_bgm.play
RPG::BGS.stop
end
end
class Game_Vehicle < Game_Character
def get_on
@driving = true
@walk_anime = true
@step_anime = true
@walking_bgm = RPG::BGM.last
mvBgm(system_vehicle.bgm)
system_vehicle.bgm.play
end
def get_off
@driving = false
@walk_anime = false
@step_anime = false
@direction = 4
mvBgm(@walking_bgm)
@walking_bgm.play
end
end
class Scene_Title < Scene_Base
def play_title_music
mvBgm($data_system.title_bgm)
$data_system.title_bgm.play
RPG::BGS.stop
RPG::ME.stop
end
end
class Game_Interpreter
def command_241
mvBgm(@params[0])
@params[0].play
end
end