public IEnumerable <FileModResult> TryApply(FileStorage storage) { var voicetable = storage.TryGetDuplicate(new HyoutaUtils.Checksum.SHA1(0x90a5c55ed954d771ul, 0x11563b9f3bb62ce7ul, 0xc534135au)); if (voicetable == null) { return(null); } // remove the new-for-PC english voice clips from the JP voice table var data = new VoiceTable(voicetable, EndianUtils.Endianness.LittleEndian); data.Entries.RemoveRange(9495, data.Entries.Count - 9495); MemoryStream newvoicetable = new MemoryStream(); data.WriteToStream(newvoicetable, EndianUtils.Endianness.LittleEndian); // the PS3 and PS4 versions disagree slightly on some lines, I took the PS3 timings here but maybe the PS4 ones are better? var newvoicetiming3 = storage.TryGetDuplicate(new HyoutaUtils.Checksum.SHA1(0x60e82f9eb05d4b5dul, 0x15fbff5e3b341b0cul, 0xabfcae9du)); //var newvoicetiming4 = storage.TryGetDuplicate(new HyoutaUtils.Checksum.SHA1(0xf94e4188145f004cul, 0x86ae6fa0b6ff8a1bul, 0x818b4562u)); if (newvoicetiming3 == null) { return(null); } return(new FileModResult[] { new FileModResult("data/text/dat/t_voice.tbl", newvoicetable), new FileModResult("data/text/dat/t_vctiming.tbl", newvoicetiming3), }); }
public IEnumerable <FileModResult> TryApply(FileStorage storage) { var voicetable = storage.TryGetDuplicate(new HyoutaUtils.Checksum.SHA1(0xdc8fa92820abc1b4ul, 0x6a646b4d75ba5d23ul, 0x9bd22ee9u)); var saraclip = storage.TryGetDuplicate(new HyoutaUtils.Checksum.SHA1(0x0037f27d49910859ul, 0x38a613aae6000493ul, 0x68768874u)); var alisaclip = storage.TryGetDuplicate(new HyoutaUtils.Checksum.SHA1(0xe9bd9a1d50cf6170ul, 0x728942e9fead6f2bul, 0xa635fcc6u)); if (voicetable == null || saraclip == null || alisaclip == null) { return(null); } var data = new VoiceTable(voicetable); data.Entries.Find(x => x.Index == 64300).Name = "pc8v10299"; data.Entries.Find(x => x.Index == 61752).Name += "_a"; // alternate take of the same line; PS4 uses this one and I agree, it's the better take in that context MemoryStream newvoicetable = new MemoryStream(); data.WriteToStream(newvoicetable, EndianUtils.Endianness.LittleEndian); // We use the PS4 timings for here because several lines (particularly in the Prologue) were re-recorded between PS3 and PC // and the PS4 timings should match that better. // Note that the PC version by default uses timings that exactly match the PS3 version, so they were not updated for that release. // NOTE: I originally thought I needed to copy e8v04585 from 3 to 4 since we use the PS3 line there // (Emma's "class spirit" line in the final dungeon) but it turns out those have the same timings in both versions, // so that's not actually necessary. //var voicetiming3 = storage.TryGetDuplicate(new HyoutaUtils.Checksum.SHA1(0x4530f8f99feffdd6ul, 0xbdb3b6e43ab769d0ul, 0xa0e9d5d8u)); var voicetiming4 = storage.TryGetDuplicate(new HyoutaUtils.Checksum.SHA1(0x47b8e01924115c99ul, 0x14f4a5fa65873309ul, 0xc5825a41u)); if (voicetiming4 == null) { return(null); } return(new FileModResult[] { new FileModResult("data/text/dat_us/t_voice.tbl", newvoicetable), new FileModResult("data/text/dat_us/t_vctiming.tbl", voicetiming4), new FileModResult("data/voice/wav/pc8v10299.wav", saraclip), new FileModResult("data/voice/wav/pc8v02551.wav", alisaclip), }); }