private void Uninstall_ERS(string path, _File file) { try { ERS_File binaryFile = (ERS_File)GetParsedFile <ERS_File>(path, false); ERS_File cpkBinFile = (ERS_File)GetParsedFile <ERS_File>(path, true); UninstallSubEntries <ERS_MainTableEntry, ERS_MainTable>(binaryFile.Entries, (cpkBinFile != null) ? cpkBinFile.Entries : null, file, false); } catch (Exception ex) { string error = string.Format("Failed at ERS uninstall phase ({0}).", path); throw new Exception(error, ex); } }
private ObservableCollection <GameEntity> LoadDemoNames(ERS_File ersFile) { ObservableCollection <GameEntity> entities = new ObservableCollection <GameEntity>(); foreach (var entry in ersFile.GetSubentryList(4)) { entities.Add(new GameEntity() { Name = Path.GetFileNameWithoutExtension(entry.FILE_PATH), EepkPath = String.Format("vfx/{0}", entry.FILE_PATH) }); } return(entities); }
public LoadFromGameHelper() { CUS_File cusFile = (CUS_File)Xenoverse2.Instance.GetParsedFileFromGame(CUS_PATH); CMS_File cmsFile = (CMS_File)Xenoverse2.Instance.GetParsedFileFromGame(CMS_PATH); ERS_File ersFile = (ERS_File)Xenoverse2.Instance.GetParsedFileFromGame(ERS_PATH); characters = LoadCharacterNames(cmsFile, ersFile); superSkills = LoadSkillNames(CUS_File.SkillType.Super, cusFile, cmsFile); ultimateSkills = LoadSkillNames(CUS_File.SkillType.Ultimate, cusFile, cmsFile); evasiveSkills = LoadSkillNames(CUS_File.SkillType.Evasive, cusFile, cmsFile); blastSkills = LoadSkillNames(CUS_File.SkillType.Blast, cusFile, cmsFile); awokenSkills = LoadSkillNames(CUS_File.SkillType.Awoken, cusFile, cmsFile); cmn = LoadCmnNames(ersFile); demo = LoadDemoNames(ersFile); }
public GameInterface(Xv2FileIO _fileIO) { fileIO = _fileIO; CUS_File cusFile = CUS_File.Load(fileIO.GetFileFromGame(CUS_PATH)); CMS_File cmsFile = CMS_File.Load(fileIO.GetFileFromGame(CMS_PATH)); ERS_File ersFile = ERS_File.Load(fileIO.GetFileFromGame(ERS_PATH)); characters = LoadCharacterNames(cmsFile, ersFile); superSkills = LoadSkillNames(CUS_File.SkillType.Super, cusFile, cmsFile); ultimateSkills = LoadSkillNames(CUS_File.SkillType.Ultimate, cusFile, cmsFile); evasiveSkills = LoadSkillNames(CUS_File.SkillType.Evasive, cusFile, cmsFile); blastSkills = LoadSkillNames(CUS_File.SkillType.Blast, cusFile, cmsFile); awokenSkills = LoadSkillNames(CUS_File.SkillType.Awoken, cusFile, cmsFile); cmn = LoadCmnNames(ersFile); demo = LoadDemoNames(ersFile); }
private ObservableCollection <GameEntity> LoadCharacterNames(CMS_File cmsFile, ERS_File ersFile) { ObservableCollection <GameEntity> entities = new ObservableCollection <GameEntity>(); MSG_File characterMsgFile = MSG_File.Load(fileIO.GetFileFromGame(CHARACTER_MSG_PATH)); foreach (var ersEntry in ersFile.GetSubentryList(2)) { CMS_Entry cmsEntry = cmsFile.GetEntry(ersEntry.Index); string name = null; string eepkPath = string.Format("vfx/{0}", ersEntry.FILE_PATH); if (cmsEntry != null) { name = characterMsgFile.GetCharacterName(cmsEntry.Str_04); if (string.IsNullOrWhiteSpace(name)) { name = String.Format("??? ({0} / {1})", cmsEntry.Index, cmsEntry.Str_04); } } entities.Add(new GameEntity() { Name = name, EepkPath = eepkPath }); } return(entities); }