Example #1
0
        public IEnumerable <FileModResult> TryApply(FileStorage storage)
        {
            var s = storage.TryGetDuplicate(new HyoutaUtils.Checksum.SHA1(0x9a75c8439ca12500ul, 0x437af585d0ae9474ul, 0x4b620dfdu));

            if (s == null)
            {
                return(null);
            }
            MemoryStream bin = s.CopyToMemoryAndDispose();

            // fix duplicate line on Imperial Chronicle sign
            var patcher = new SenScriptPatcher(bin);

            patcher.RemovePartialCommand(0x27aed, 0x2c, 0x27b03, 0x13);

            // fix incorrect voice clips for Rean in Alisa's bike scene
            bin.Position = 0x10150;
            bin.WriteUInt16(63276, EndianUtils.Endianness.LittleEndian);
            bin.Position = 0x10253;
            bin.WriteUInt16(63278, EndianUtils.Endianness.LittleEndian);

            // fix voice/text mismatches in Millium's bike scene
            patcher.ExtendPartialCommand(0x155cd, 0x4e, 0x15618, new byte[] { 0x20, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72 });
            patcher.ReplacePartialCommand(0x168a9, 0x2f, 0x168b1, 0x24, new byte[] { 0x57, 0x6f, 0x6f, 0x20, 0x68, 0x6f, 0x6f });

            return(new FileModResult[] { new FileModResult("data/scripts/scena/dat_us/c0100.dat", bin) });
        }
Example #2
0
        public IEnumerable <FileModResult> TryApply(FileStorage storage)
        {
            var s = storage.TryGetDuplicate(new HyoutaUtils.Checksum.SHA1(0x73fd289006017eabul, 0x8816636d998d21aaul, 0x8fb38d68u));

            if (s == null)
            {
                return(null);
            }
            MemoryStream bin = s.CopyToMemoryAndDispose();

            var patcher = new SenScriptPatcher(bin);

            patcher.RemovePartialCommand(0x3a67, 0x6f, 0x3ac4, 1);
            patcher.RemovePartialCommand(0x3e5f, 0x5f, 0x3e8c, 1);

            return(new FileModResult[] { new FileModResult("data/scripts/scena/dat_us/a0006.dat", bin) });
        }
        public IEnumerable <FileModResult> TryApply(FileStorage storage)
        {
            var s = storage.TryGetDuplicate(new HyoutaUtils.Checksum.SHA1(0x66a22b79517c7214ul, 0xb00b2a7a4ac898bcul, 0x5f231fd8u));

            if (s == null)
            {
                return(null);
            }
            MemoryStream bin = s.CopyToMemoryAndDispose();

            var patcher = new SenScriptPatcher(bin);

            // both double space and missing dot in this one...
            {
                bin.Position = 0xb5be;
                byte[] b = bin.ReadBytes(0x3f);
                for (int i = 0x23; i >= 0x11; --i)
                {
                    b[i] = b[i - 1];
                }
                bin.Position = 0xb5be;
                bin.Write(b);
            }

            // double spaces in various lines
            patcher.RemovePartialCommand(0xeb28, 0x49, 0xeb39, 1);
            patcher.RemovePartialCommand(0xeef6, 0xc0, 0xef20, 1);

            // broken alisa line (missing space/linebreak)
            bin.Position = 0x1f7a;
            bin.WriteUInt8(0x01);
            patcher.ExtendPartialCommand(0x1f5c, 0x3c, 0x1f83, new byte[] { 0x20 });

            // missing word
            patcher.ExtendPartialCommand(0x1c93, 0x93, 0x1cac, new byte[] { 0x69, 0x73, 0x20 });

            return(new FileModResult[] { new FileModResult("data/scripts/scena/dat_us/t0031.dat", bin) });
        }
        public IEnumerable <FileModResult> TryApply(FileStorage storage)
        {
            var s = storage.TryGetDuplicate(new HyoutaUtils.Checksum.SHA1(0x44c4abb3f8e01ddeul, 0x0e36ca1d11cd433ful, 0x37c10788u));

            if (s == null)
            {
                return(null);
            }
            MemoryStream bin = s.CopyToMemoryAndDispose();

            var patcher = new SenScriptPatcher(bin);

            patcher.RemovePartialCommand(0x25f91, 0x13f, 0x2606b, 1);

            return(new FileModResult[] { new FileModResult("data/scripts/scena/dat_us/t1010.dat", bin) });
        }
        public IEnumerable <FileModResult> TryApply(FileStorage storage)
        {
            var s = storage.TryGetDuplicate(new HyoutaUtils.Checksum.SHA1(0xb838141d25f707a7ul, 0xc95191db2f8c324aul, 0x3e0a34c0u));

            if (s == null)
            {
                return(null);
            }
            MemoryStream bin = s.CopyToMemoryAndDispose();

            var patcher = new SenScriptPatcher(bin);

            patcher.RemovePartialCommand(0x1312, 0x183, 0x1420, 1);

            return(new FileModResult[] { new FileModResult("data/scripts/talk/dat_us/tk_vandyck.dat", bin) });
        }
Example #6
0
        public IEnumerable <FileModResult> TryApply(FileStorage storage)
        {
            var s = storage.TryGetDuplicate(new HyoutaUtils.Checksum.SHA1(0x48d8e5ebfacb29feul, 0xd7c5c4e75c84e108ul, 0x277cb5feu));

            if (s == null)
            {
                return(null);
            }
            MemoryStream bin = s.CopyToMemoryAndDispose();

            var patcher = new SenScriptPatcher(bin);

            patcher.RemovePartialCommand(0xf877, 0x46, 0xf89c, 1);

            return(new FileModResult[] { new FileModResult("data/scripts/scena/dat_us/r0800.dat", bin) });
        }
Example #7
0
        public IEnumerable <FileModResult> TryApply(FileStorage storage)
        {
            var s = storage.TryGetDuplicate(new HyoutaUtils.Checksum.SHA1(0xd363fc2114ec8421ul, 0xc24b47c29a4a2badul, 0xed31cfb5u));

            if (s == null)
            {
                return(null);
            }
            MemoryStream bin = s.CopyToMemoryAndDispose();

            var patcher = new SenScriptPatcher(bin);

            patcher.RemovePartialCommand(0x11b02, 0x44, 0x11b10, 1);

            return(new FileModResult[] { new FileModResult("data/scripts/scena/dat_us/t0050.dat", bin) });
        }
Example #8
0
        public IEnumerable <FileModResult> TryApply(FileStorage storage)
        {
            var s = storage.TryGetDuplicate(new HyoutaUtils.Checksum.SHA1(0xd5805f2f25de668aul, 0x4ececc8f6cad0aaaul, 0xe64a3cf8u));

            if (s == null)
            {
                return(null);
            }
            MemoryStream bin = s.CopyToMemoryAndDispose();

            var patcher = new SenScriptPatcher(bin);

            patcher.RemovePartialCommand(0x1f278, 0x88, 0x1f2df, 1);

            return(new FileModResult[] { new FileModResult("data/scripts/scena/dat_us/t0080.dat", bin) });
        }
        public IEnumerable <FileModResult> TryApply(FileStorage storage)
        {
            var s = storage.TryGetDuplicate(new HyoutaUtils.Checksum.SHA1(0xdc5deaa30247aafaul, 0xf2a369da2268d408ul, 0x2ba310c5u));

            if (s == null)
            {
                return(null);
            }
            MemoryStream bin = s.CopyToMemoryAndDispose();

            var patcher = new SenScriptPatcher(bin);

            patcher.RemovePartialCommand(0x3179, 0x48, 0x31aa, 1);

            return(new FileModResult[] { new FileModResult("data/scripts/talk/dat_us/tk_edel.dat", bin) });
        }
Example #10
0
        public IEnumerable <FileModResult> TryApply(FileStorage storage)
        {
            var s = storage.TryGetDuplicate(new HyoutaUtils.Checksum.SHA1(0xf423fb1dfddde29dul, 0x3e26a40ceed87982ul, 0xb899cdcau));

            if (s == null)
            {
                return(null);
            }
            MemoryStream bin = s.CopyToMemoryAndDispose();

            var patcher = new SenScriptPatcher(bin);

            patcher.RemovePartialCommand(0x1881, 0x73, 0x18a7, 1);

            return(new FileModResult[] { new FileModResult("data/scripts/talk/dat_us/tk_laura.dat", bin) });
        }
        public IEnumerable <FileModResult> TryApply(FileStorage storage)
        {
            var s = storage.TryGetDuplicate(new HyoutaUtils.Checksum.SHA1(0x8a76ff88baf96b5eul, 0x72e675d0d5d3b75aul, 0x72cc3989u));

            if (s == null)
            {
                return(null);
            }
            MemoryStream bin = s.CopyToMemoryAndDispose();

            var patcher = new SenScriptPatcher(bin);

            patcher.RemovePartialCommand(0xfbbf, 0x53, 0xfbcf, 1);

            return(new FileModResult[] { new FileModResult("data/scripts/scena/dat_us/t0010.dat", bin) });
        }
        public IEnumerable <FileModResult> TryApply(FileStorage storage)
        {
            var s = storage.TryGetDuplicate(new HyoutaUtils.Checksum.SHA1(0x8bf43f6d4c7f0de5ul, 0xba13e4c14301da05ul, 0xbd1c919au));

            if (s == null)
            {
                return(null);
            }
            MemoryStream bin = s.CopyToMemoryAndDispose();

            var patcher = new SenScriptPatcher(bin);

            // extra word in voice but not text
            patcher.ExtendPartialCommand(0xcdd1, 0x8c, 0xce58, new byte[] { 0x2c, 0x20, 0x68, 0x75, 0x68 });

            // repeated voice clip where there shouldn't be one
            patcher.RemovePartialCommand(0xd1d1, 0x3d, 0xd1d4, 5);

            // extra word in voice but not text
            patcher.ExtendPartialCommand(0x1f46b, 0x10, 0x1f476, new byte[] { 0x4d, 0x6d, 0x2d, 0x68, 0x6d });

            return(new FileModResult[] { new FileModResult("data/scripts/scena/dat_us/t0000c.dat", bin) });
        }