page.move_route.list if pre_mv_command.code == move_code and !move_command.empty? fname = eval("pre_"+move_str_eval) unless file_list.include?(fname) file_list.push(fname) end end end end for command in page.list if command.code == 204 if command.parameters[0] == parameter_204_0 fname = eval(str_eval) unless file_list.include?(fname) file_list.push(fname) end end elsif command.code == 209 and !move_command.empty? for mv_command in command.parameters[1].list if mv_command.code == move_code fname = eval(move_str_eval) unless file_list.include?(fname) file_list.push(fname) end end end elsif command.code == code fname = eval(str_eval) unless file_list.include?(fname) file_list.push(fname) end end end end end end def commons_events(file_list, command, move_command=[], parameter_204_0=false) code = command[0] parameter = command[1] misc_name = command[2] str_eval = "command.parameters\[#{parameter}\]#{misc_name}" unless move_command.empty? move_code = move_command[0] move_parameter = move_command[1] move_misc_name = move_command[2] move_str_eval = "mv_command.parameters\[#{move_parameter}\]#{move_misc_name}" end for command in Data_common_events[1].list if command.code == 204 if command.parameters[0] == parameter_204_0 fname = eval(str_eval) unless file_list.include?(fname) file_list.push(fname) end end elsif command.code == 209 and !move_command.empty? for mv_command in command.parameters[1].list if mv_command.code == move_code fname = eval(move_str_eval) unless file_list.include?(fname) file_list.push(fname) end end end elsif command.code == code fname = eval(str_eval) unless file_list.include?(fname) file_list.push(fname) end end end end def troops_events(file_list, command, move_command=[], parameter_204_0=false) code = command[0] parameter = command[1] misc_name = command[2] str_eval = "command.parameters\[#{parameter}\]#{misc_name}" unless move_command.empty? move_code = move_command[0] move_parameter = move_command[1] move_misc_name = move_command[2] move_str_eval = "mv_command.parameters\[#{move_parameter}\]#{move_misc_name}" end for troop in Data_troops next if troop.nil? for page in troop.pages for command in page.list if command.code == 204 if command.parameters[0] == parameter_204_0 fname = eval(str_eval) unless file_list.include?(fname) file_list.push(fname) end end elsif command.code == 209 and !move_command.empty? for mv_command in command.parameters[1].list if mv_command.code == move_code fname = eval(move_str_eval) unless file_list.include?(fname) file_list.push(fname) end end end elsif command.code == code fname = eval(str_eval) unless file_list.include?(fname) file_list.push(fname) end end end end end end def push_in(file_list, data, misc_name) for d in data next if d.nil? fname = eval("d#{misc_name}") unless file_list.include?(fname) file_list.push(fname) end end end #add to general file list def add2list(file_list, folder_in_path) ls = list_files(folder_in_path) ls_noext = list_files(folder_in_path, false) for name in file_list if ls_noext.include?(name) file_name = ls[ls_noext.index(name)] file = folder_in_path + "\\#{file_name}" @list.push(file) end end end #prepare the list os files to extract def extract_list() ####### # AUDIO # ####### ############################################# #BGMs bgms = [] for i in 1..Data_mapinfos.size map = load_data(sprintf("Data/Map%03d.rxdata", i)) bgms.push(map.bgm.name) map_events(map, bgms, [132, 0, '.name']) map_events(map, bgms, [241, 0, '.name']) end commons_events(bgms, [132, 0, '.name']) commons_events(bgms, [241, 0, '.name']) troops_events(bgms, [132, 0, '.name']) troops_events(bgms, [241, 0, '.name']) bgms.push(Data_system.title_bgm.name) bgms.push(Data_system.battle_bgm.name) add2list(bgms, BGM) ############################################# #BGSs bgss = [] for i in 1..Data_mapinfos.size map = load_data(sprintf("Data/Map%03d.rxdata", i)) bgss.push(map.bgs.name) map_events(map, bgss, [245, 0, '.name']) end commons_events(bgss, [245, 0, '.name']) troops_events(bgss, [245, 0, '.name']) add2list(bgss, BGS) ############################################# #MEs mes = [] for i in 1..Data_mapinfos.size map = load_data(sprintf("Data/Map%03d.rxdata", i)) map_events(map, mes, [133, 0, '.name']) map_events(map, mes, [249, 0, '.name']) end commons_events(mes, [133, 0, '.name']) commons_events(mes, [249, 0, '.name']) troops_events(mes, [133, 0, '.name']) troops_events(mes, [249, 0, '.name']) mes.push(Data_system.battle_end_me.name) mes.push(Data_system.gameover_me.name) add2list(mes, ME) ############################################# #SEs ses = [] push_in(ses, Data_items, ".menu_se.name") push_in(ses, Data_skills, ".menu_se.name") animations = Data_animations for i in 1...animations.size for j in 0...animations[i].timings.size unless ses.include?(animations[i].timings[j].se.name) ses.push(animations[i].timings[j].se.name) end end end for i in 1..Data_mapinfos.size map = load_data(sprintf("Data/Map%03d.rxdata", i)) map_events(map, ses, [250, 0, '.name'], [44, 0, '.name']) end commons_events(ses, [250, 0, '.name'], [44, 0, '.name']) troops_events(ses, [250, 0, '.name'], [44, 0, '.name'])