Пример #1
0
        public BYTEField SLCP;              // Soul gem maximum capacity

        public override bool CreateField(BinaryFileReader r, GameFormat format, string type, int dataSize)
        {
            switch (type)
            {
            case "EDID": EDID = r.ReadSTRV(dataSize); return(true);

            case "MODL": MODL = new MODLGroup(r, dataSize); return(true);

            case "MODB": MODL.MODBField(r, dataSize); return(true);

            case "MODT": MODL.MODTField(r, dataSize); return(true);

            case "FULL": FULL = r.ReadSTRV(dataSize); return(true);

            case "SCRI": SCRI = new FMIDField <SCPTRecord>(r, dataSize); return(true);

            case "DATA": DATA = new DATAField(r, dataSize); return(true);

            case "ICON": ICON = r.ReadFILE(dataSize); return(true);

            case "SOUL": SOUL = r.ReadT <BYTEField>(dataSize); return(true);

            case "SLCP": SLCP = r.ReadT <BYTEField>(dataSize); return(true);

            default: return(false);
            }
        }
Пример #2
0
        public DATAField DATA;              // Ammo Data

        public override bool CreateField(BinaryFileReader r, GameFormat format, string type, int dataSize)
        {
            switch (type)
            {
            case "EDID": EDID = r.ReadSTRV(dataSize); return(true);

            case "MODL": MODL = new MODLGroup(r, dataSize); return(true);

            case "MODB": MODL.MODBField(r, dataSize); return(true);

            case "MODT": MODL.MODTField(r, dataSize); return(true);

            case "FULL": FULL = r.ReadSTRV(dataSize); return(true);

            case "ICON": ICON = r.ReadFILE(dataSize); return(true);

            case "ENAM": ENAM = new FMIDField <ENCHRecord>(r, dataSize); return(true);

            case "ANAM": ANAM = r.ReadT <IN16Field>(dataSize); return(true);

            case "DATA": DATA = new DATAField(r, dataSize); return(true);

            default: return(false);
            }
        }
Пример #3
0
        public List <RNAMField> RNAMs = new List <RNAMField>(); // Large References

        public override bool CreateField(UnityBinaryReader r, GameFormatId format, string type, int dataSize)
        {
            switch (type)
            {
            case "EDID": EDID = r.ReadSTRV(dataSize); return(true);

            case "FULL": FULL = r.ReadSTRV(dataSize); return(true);

            case "WNAM": WNAM = new FMIDField <WRLDRecord>(r, dataSize); return(true);

            case "CNAM": CNAM = new FMIDField <CLMTRecord>(r, dataSize); return(true);

            case "NAM2": NAM2 = new FMIDField <WATRRecord>(r, dataSize); return(true);

            case "ICON": ICON = r.ReadFILE(dataSize); return(true);

            case "MNAM": MNAM = r.ReadT <MNAMField>(dataSize); return(true);

            case "DATA": DATA = r.ReadT <BYTEField>(dataSize); return(true);

            case "NAM0": NAM0 = new NAM0Field(r, dataSize); return(true);

            case "NAM9": NAM0.NAM9Field(r, dataSize); return(true);

            case "SNAM": SNAM = r.ReadT <UI32Field>(dataSize); return(true);

            case "OFST": r.SkipBytes(dataSize); return(true);

            // TES5
            case "RNAM": RNAMs.Add(new RNAMField(r, dataSize)); return(true);

            default: return(false);
            }
        }
        public BYTVField?XRGD;              // Ragdoll Data (optional)

        public override bool CreateField(BinaryFileReader r, GameFormat format, string type, int dataSize)
        {
            switch (type)
            {
            case "EDID": EDID = r.ReadSTRV(dataSize); return(true);

            case "NAME": NAME = new FMIDField <Record>(r, dataSize); return(true);

            case "DATA": DATA = new REFRRecord.DATAField(r, dataSize); return(true);

            case "XPCI": XPCI = new FMIDField <CELLRecord>(r, dataSize); return(true);

            case "FULL": XPCI.Value.AddName(r.ReadASCIIString(dataSize)); return(true);

            case "XLOD": XLOD = r.ReadBYTV(dataSize); return(true);

            case "XESP": XESP = new REFRRecord.XESPField(r, dataSize); return(true);

            case "XMRC": XMRC = new FMIDField <REFRRecord>(r, dataSize); return(true);

            case "XHRS": XHRS = new FMIDField <ACRERecord>(r, dataSize); return(true);

            case "XSCL": XSCL = r.ReadT <FLTVField>(dataSize); return(true);

            case "XRGD": XRGD = r.ReadBYTV(dataSize); return(true);

            default: return(false);
            }
        }
Пример #5
0
        public FMIDField <SOUNRecord> QNAM; // Close sound

        public override bool CreateField(BinaryFileReader r, GameFormat format, string type, int dataSize)
        {
            switch (type)
            {
            case "EDID":
            case "NAME": EDID = r.ReadSTRV(dataSize); return(true);

            case "MODL": MODL = new MODLGroup(r, dataSize); return(true);

            case "MODB": MODL.MODBField(r, dataSize); return(true);

            case "MODT": MODL.MODTField(r, dataSize); return(true);

            case "FULL":
            case "FNAM": FULL = r.ReadSTRV(dataSize); return(true);

            case "DATA":
            case "CNDT": DATA = new DATAField(r, dataSize, format); return(true);

            case "FLAG": DATA.FLAGField(r, dataSize); return(true);

            case "CNTO":
            case "NPCO": CNTOs.Add(new CNTOField(r, dataSize, format)); return(true);

            case "SCRI": SCRI = new FMIDField <SCPTRecord>(r, dataSize); return(true);

            case "SNAM": SNAM = new FMIDField <SOUNRecord>(r, dataSize); return(true);

            case "QNAM": QNAM = new FMIDField <SOUNRecord>(r, dataSize); return(true);

            default: return(false);
            }
        }
Пример #6
0
        public List <FMIDField <Record> > SCROs = new List <FMIDField <Record> >(); // Global variable reference

        public override bool CreateField(UnityBinaryReader r, GameFormatId format, string type, int dataSize)
        {
            switch (type)
            {
            case "EDID": EDID = r.ReadSTRV(dataSize); return(true);

            case "FULL": FULL = r.ReadSTRV(dataSize); return(true);

            case "ICON": ICON = r.ReadFILE(dataSize); return(true);

            case "DATA": DATA = new DATAField(r, dataSize); return(true);

            case "SCRI": SCRI = new FMIDField <SCPTRecord>(r, dataSize); return(true);

            case "CTDA": r.SkipBytes(dataSize); return(true);

            case "INDX": r.SkipBytes(dataSize); return(true);

            case "QSDT": r.SkipBytes(dataSize); return(true);

            case "CNAM": r.SkipBytes(dataSize); return(true);

            case "QSTA": r.SkipBytes(dataSize); return(true);

            case "SCHR": SCHR = new SCPTRecord.SCHRField(r, dataSize); return(true);

            case "SCDA": SCDA = r.ReadBYTV(dataSize); return(true);

            case "SCTX": SCTX = r.ReadSTRV(dataSize); return(true);

            case "SCRO": SCROs.Add(new FMIDField <Record>(r, dataSize)); return(true);

            default: return(false);
            }
        }
Пример #7
0
        public BYTVField?XRGD;                    // Ragdoll Data (optional)

        public override bool CreateField(BinaryFileReader r, GameFormat format, string type, int dataSize)
        {
            switch (type)
            {
            case "EDID": EDID = r.ReadSTRV(dataSize); return(true);

            case "NAME": NAME = new FMIDField <Record>(r, dataSize); return(true);

            case "DATA": DATA = new REFRRecord.DATAField(r, dataSize); return(true);

            case "XOWN": if (XOWNs == null)
                {
                    XOWNs = new List <CELLRecord.XOWNGroup>();
                }
                XOWNs.Add(new CELLRecord.XOWNGroup {
                    XOWN = new FMIDField <Record>(r, dataSize)
                }); return(true);

            case "XRNK": XOWNs.Last().XRNK = r.ReadT <IN32Field>(dataSize); return(true);

            case "XGLB": XOWNs.Last().XGLB = new FMIDField <Record>(r, dataSize); return(true);

            case "XESP": XESP = new REFRRecord.XESPField(r, dataSize); return(true);

            case "XSCL": XSCL = r.ReadT <FLTVField>(dataSize); return(true);

            case "XRGD": XRGD = r.ReadBYTV(dataSize); return(true);

            default: return(false);
            }
        }
Пример #8
0
        public FMIDField <ENCHRecord> ENAM; // enchantment ID

        public override bool CreateField(UnityBinaryReader r, GameFormatId format, string type, int dataSize)
        {
            switch (type)
            {
            case "EDID":
            case "NAME": EDID = r.ReadSTRV(dataSize); return(true);

            case "MODL": MODL = new MODLGroup(r, dataSize); return(true);

            case "MODB": MODL.MODBField(r, dataSize); return(true);

            case "MODT": MODL.MODTField(r, dataSize); return(true);

            case "FULL":
            case "FNAM": FULL = r.ReadSTRV(dataSize); return(true);

            case "DATA":
            case "MCDT": DATA = new DATAField(r, dataSize, format); return(true);

            case "ICON":
            case "ITEX": ICON = r.ReadFILE(dataSize); return(true);

            case "ENAM": ENAM = new FMIDField <ENCHRecord>(r, dataSize); return(true);

            case "SCRI": SCRI = new FMIDField <SCPTRecord>(r, dataSize); return(true);

            default: return(false);
            }
        }
        public override bool CreateField(BinaryFileReader r, GameFormat format, string type, int dataSize)
        {
            switch (type)
            {
            case "EDID": EDID = r.ReadSTRV(dataSize); return(true);

            case "MODL": MODL = new MODLGroup(r, dataSize); return(true);

            case "MODB": MODL.MODBField(r, dataSize); return(true);

            case "CTDA":
            case "CTDT": CTDAs.Add(new SCPTRecord.CTDAField(r, dataSize, format)); return(true);

            case "ANAM": ANAM = r.ReadT <BYTEField>(dataSize); return(true);

            case "DATA":
                DATAs = new FMIDField <IDLERecord> [dataSize >> 2];
                for (var i = 0; i < DATAs.Length; i++)
                {
                    DATAs[i] = new FMIDField <IDLERecord>(r, 4);
                }
                return(true);

            default: return(false);
            }
        }
        public FMIDField <SCPTRecord>?SCRI;                     // Unknown

        public override bool CreateField(BinaryFileReader r, GameFormat format, string type, int dataSize)
        {
            switch (type)
            {
            case "EDID":
            case "NAME": EDID = r.ReadSTRV(dataSize); return(true);

            case "FULL":
            case "FNAM": FULL = r.ReadSTRV(dataSize); return(true);

            case "MODL": MODL = new MODLGroup(r, dataSize); return(true);

            case "MODB": MODL.MODBField(r, dataSize); return(true);

            case "RNAM": RNAM = r.ReadSTRV(dataSize); return(true);

            case "ANAM": ANAM = r.ReadSTRV(dataSize); return(true);

            case "BNAM": BNAM = r.ReadSTRV(dataSize); return(true);

            case "CNAM": CNAM = r.ReadSTRV(dataSize); return(true);

            case "KNAM": KNAM = r.ReadSTRV(dataSize); return(true);

            case "NPDT": NPDT = new NPDTField(r, dataSize); return(true);

            case "FLAG": FLAG = r.ReadINTV(dataSize); return(true);

            case "NPCO": NPCOs.Add(new CNTOField(r, dataSize, format)); return(true);

            case "NPCS": NPCSs.Add(r.ReadSTRV(dataSize, ASCIIFormat.ZeroPadded)); return(true);

            case "AIDT": AIDT = new CREARecord.AIDTField(r, dataSize); return(true);

            case "AI_W": AI_W = new CREARecord.AI_WField(r, dataSize); return(true);

            case "AI_T": AI_T = new CREARecord.AI_TField(r, dataSize); return(true);

            case "AI_F": AI_F = new CREARecord.AI_FField(r, dataSize); return(true);

            case "AI_E": AI_E = new CREARecord.AI_FField(r, dataSize); return(true);

            case "CNDT": CNDT = r.ReadSTRV(dataSize); return(true);

            case "AI_A": AI_A = new CREARecord.AI_AField(r, dataSize); return(true);

            case "DODT": DODT = new DODTField(r, dataSize); return(true);

            case "DNAM": DNAM = r.ReadSTRV(dataSize); return(true);

            case "XSCL": XSCL = r.ReadT <FLTVField>(dataSize); return(true);

            case "SCRI": SCRI = new FMIDField <SCPTRecord>(r, dataSize); return(true);

            default: return(false);
            }
        }
Пример #11
0
        public GNAMField GNAM; // GNAM

        public override bool CreateField(BinaryFileReader r, GameFormat format, string type, int dataSize)
        {
            switch (type)
            {
                case "EDID": EDID = r.ReadSTRV(dataSize); return true;
                case "TNAM": TNAM = r.ReadSTRV(dataSize); return true;
                case "ANAM": ANAM = r.ReadT<BYTEField>(dataSize); return true;
                case "FNAM": FNAM = r.ReadT<BYTEField>(dataSize); return true;
                case "MNAM": MNAM = r.ReadSTRV(dataSize); return true;
                case "SNAM": SNAM = new FMIDField<SOUNRecord>(r, dataSize); return true;
                case "DATA": DATA = new DATAField(r, dataSize); return true;
                case "GNAM": GNAM = new GNAMField(r, dataSize); return true;
                default: return false;
            }
        }
Пример #12
0
        public FMIDField <IDLERecord> DATA; // IDLE animation

        public override bool CreateField(UnityBinaryReader r, GameFormatId format, string type, int dataSize)
        {
            switch (type)
            {
            case "EDID": EDID = r.ReadSTRV(dataSize); return(true);

            case "MODL": MODL = new MODLGroup(r, dataSize); return(true);

            case "MODB": MODL.MODBField(r, dataSize); return(true);

            case "DATA": DATA = new FMIDField <IDLERecord>(r, dataSize); return(true);

            default: return(false);
            }
        }
Пример #13
0
        public List <ENCHRecord.SCITField> SCITs = new List <ENCHRecord.SCITField>(); // Script Effect Data

        public override bool CreateField(BinaryFileReader r, GameFormat format, string type, int dataSize)
        {
            switch (type)
            {
            case "EDID":
            case "NAME": EDID = r.ReadSTRV(dataSize); return(true);

            case "MODL": MODL = new MODLGroup(r, dataSize); return(true);

            case "MODB": MODL.MODBField(r, dataSize); return(true);

            case "MODT": MODL.MODTField(r, dataSize); return(true);

            case "FULL": if (SCITs.Count == 0)
                {
                    FULL = r.ReadSTRV(dataSize);
                }
                else
                {
                    SCITs.Last().FULLField(r, dataSize);
                } return(true);

            case "FNAM": FULL = r.ReadSTRV(dataSize); return(true);

            case "DATA":
            case "ALDT": DATA = new DATAField(r, dataSize, format); return(true);

            case "ENAM": ENAM = new ENAMField(r, dataSize); return(true);

            case "ICON":
            case "TEXT": ICON = r.ReadFILE(dataSize); return(true);

            case "SCRI": SCRI = new FMIDField <SCPTRecord>(r, dataSize); return(true);

            //
            case "ENIT": DATA.ENITField(r, dataSize); return(true);

            case "EFID": r.Skip(dataSize); return(true);

            case "EFIT": EFITs.Add(new ENCHRecord.EFITField(r, dataSize, format)); return(true);

            case "SCIT": SCITs.Add(new ENCHRecord.SCITField(r, dataSize)); return(true);

            default: return(false);
            }
        }
Пример #14
0
        public override bool CreateField(UnityBinaryReader r, GameFormatId format, string type, int dataSize)
        {
            switch (type)
            {
            case "EDID": EDID = r.ReadSTRV(dataSize); return(true);

            case "LVLD": LVLD = r.ReadT <BYTEField>(dataSize); return(true);

            case "LVLF": LVLF = r.ReadT <BYTEField>(dataSize); return(true);

            case "SCRI": SCRI = new FMIDField <SCPTRecord>(r, dataSize); return(true);

            case "TNAM": TNAM = new FMIDField <CREARecord>(r, dataSize); return(true);

            case "LVLO": LVLOs.Add(new LVLIRecord.LVLOField(r, dataSize)); return(true);

            default: return(false);
            }
        }
Пример #15
0
        public override bool CreateField(UnityBinaryReader r, GameFormatId format, string type, int dataSize)
        {
            if (format == GameFormatId.TES3)
            {
                switch (type)
                {
                case "NAME": EDID = r.ReadSTRV(dataSize); return(true);

                case "MODL": MODL = new MODLGroup(r, dataSize); return(true);

                case "FNAM": FNAM = r.ReadSTRV(dataSize); return(true);

                case "NPDT": NPDT = new NPDTField(r, dataSize); return(true);

                case "FLAG": FLAG = r.ReadT <IN32Field>(dataSize); return(true);

                case "SCRI": SCRI = new FMIDField <SCPTRecord>(r, dataSize); return(true);

                case "NPCO": NPCO = new CNTOField(r, dataSize, format); return(true);

                case "AIDT": AIDT = new AIDTField(r, dataSize); return(true);

                case "AI_W": AI_W = new AI_WField(r, dataSize); return(true);

                case "AI_T": AI_T = new AI_TField(r, dataSize); return(true);

                case "AI_F": AI_F = new AI_FField(r, dataSize); return(true);

                case "AI_E": AI_E = new AI_FField(r, dataSize); return(true);

                case "AI_A": AI_A = new AI_AField(r, dataSize); return(true);

                case "XSCL": XSCL = r.ReadT <FLTVField>(dataSize); return(true);

                case "CNAM": CNAM = r.ReadSTRV(dataSize); return(true);

                case "NPCS": NPCSs.Add(r.ReadSTRV(dataSize, ASCIIFormat.ZeroPadded)); return(true);

                default: return(false);
                }
            }
            return(false);
        }
Пример #16
0
        public IN32Field MNAM;              // Active marker flags, required. A bit field with a bit value of 1 indicating that the matching marker position in the NIF file is active.

        public override bool CreateField(UnityBinaryReader r, GameFormatId format, string type, int dataSize)
        {
            switch (type)
            {
            case "EDID": EDID = r.ReadSTRV(dataSize); return(true);

            case "MODL": MODL = new MODLGroup(r, dataSize); return(true);

            case "MODB": MODL.MODBField(r, dataSize); return(true);

            case "MODT": MODL.MODTField(r, dataSize); return(true);

            case "FULL": FULL = r.ReadSTRV(dataSize); return(true);

            case "SCRI": SCRI = new FMIDField <SCPTRecord>(r, dataSize); return(true);

            case "MNAM": MNAM = r.ReadT <IN32Field>(dataSize); return(true);

            default: return(false);
            }
        }
Пример #17
0
        public FMIDField <SOUNRecord> SNAM; // Sound FormId (optional)

        public override bool CreateField(BinaryFileReader r, GameFormat format, string type, int dataSize)
        {
            switch (type)
            {
            case "EDID":
            case "NAME": EDID = r.ReadSTRV(dataSize); return(true);

            case "FULL": FULL = r.ReadSTRV(dataSize); return(true);

            case "FNAM": if (format != GameFormat.TES3)
                {
                    FNAM = r.ReadT <FLTVField>(dataSize);
                }
                else
                {
                    FULL = r.ReadSTRV(dataSize);
                } return(true);

            case "DATA":
            case "LHDT": DATA = new DATAField(r, dataSize, format); return(true);

            case "SCPT": SCPT = r.ReadSTRV(dataSize); return(true);

            case "SCRI": SCRI = new FMIDField <SCPTRecord>(r, dataSize); return(true);

            case "ICON":
            case "ITEX": ICON = r.ReadFILE(dataSize); return(true);

            case "MODL": MODL = new MODLGroup(r, dataSize); return(true);

            case "MODB": MODL.MODBField(r, dataSize); return(true);

            case "MODT": MODL.MODTField(r, dataSize); return(true);

            case "SNAM": SNAM = new FMIDField <SOUNRecord>(r, dataSize); return(true);

            default: return(false);
            }
        }
Пример #18
0
        public BYTVField PFPC;              // Spring, Summer, Fall, Winter Ingredient Production (byte)

        public override bool CreateField(BinaryFileReader r, GameFormat format, string type, int dataSize)
        {
            switch (type)
            {
            case "EDID": EDID = r.ReadSTRV(dataSize); return(true);

            case "MODL": MODL = new MODLGroup(r, dataSize); return(true);

            case "MODB": MODL.MODBField(r, dataSize); return(true);

            case "MODT": MODL.MODTField(r, dataSize); return(true);

            case "FULL": FULL = r.ReadSTRV(dataSize); return(true);

            case "SCRI": SCRI = new FMIDField <SCPTRecord>(r, dataSize); return(true);

            case "PFIG": PFIG = new FMIDField <INGRRecord>(r, dataSize); return(true);

            case "PFPC": PFPC = r.ReadBYTV(dataSize); return(true);

            default: return(false);
            }
        }
Пример #19
0
        public FMIDField <SCPTRecord> SCRI; // Script Name

        public override bool CreateField(BinaryFileReader r, GameFormat format, string type, int dataSize)
        {
            if (format == GameFormat.TES3)
            {
                switch (type)
                {
                case "NAME": EDID = r.ReadSTRV(dataSize); return(true);

                case "MODL": MODL = new MODLGroup(r, dataSize); return(true);

                case "FNAM": FNAM = r.ReadSTRV(dataSize); return(true);

                case "PBDT": PBDT = new PBDTField(r, dataSize); return(true);

                case "ITEX": ICON = r.ReadFILE(dataSize); return(true);

                case "SCRI": SCRI = new FMIDField <SCPTRecord>(r, dataSize); return(true);

                default: return(false);
                }
            }
            return(false);
        }
Пример #20
0
        public FMIDField <Record> TNAM;     // Random teleport destination

        public override bool CreateField(BinaryFileReader r, GameFormat format, string type, int dataSize)
        {
            switch (type)
            {
            case "EDID":
            case "NAME": EDID = r.ReadSTRV(dataSize); return(true);

            case "FULL": FULL = r.ReadSTRV(dataSize); return(true);

            case "FNAM": if (format != GameFormat.TES3)
                {
                    FNAM = r.ReadT <BYTEField>(dataSize);
                }
                else
                {
                    FULL = r.ReadSTRV(dataSize);
                } return(true);

            case "MODL": MODL = new MODLGroup(r, dataSize); return(true);

            case "MODB": MODL.MODBField(r, dataSize); return(true);

            case "MODT": MODL.MODTField(r, dataSize); return(true);

            case "SCRI": SCRI = new FMIDField <SCPTRecord>(r, dataSize); return(true);

            case "SNAM": SNAM = new FMIDField <SOUNRecord>(r, dataSize); return(true);

            case "ANAM": ANAM = new FMIDField <SOUNRecord>(r, dataSize); return(true);

            case "BNAM": ANAM = new FMIDField <SOUNRecord>(r, dataSize); return(true);

            case "TNAM": TNAM = new FMIDField <Record>(r, dataSize); return(true);

            default: return(false);
            }
        }
Пример #21
0
        public List <RPLIField> RPLIs = new List <RPLIField>(); // Region Areas

        public override bool CreateField(UnityBinaryReader r, GameFormatId format, string type, int dataSize)
        {
            switch (type)
            {
            case "EDID":
            case "NAME": EDID = r.ReadSTRV(dataSize); return(true);

            case "WNAM":
            case "FNAM": WNAM = new FMIDField <WRLDRecord>(r, dataSize); return(true);

            case "WEAT": WEAT = new WEATField(r, dataSize); return(true);    //: TES3

            case "ICON":
            case "BNAM": ICON = r.ReadSTRV(dataSize); return(true);

            case "RCLR":
            case "CNAM": RCLR = r.ReadT <CREFField>(dataSize); return(true);

            case "SNAM": RDATs.Add(new RDATField {
                    RDSDs = new[] { new RDSDField(r, dataSize, format) }
                }); return(true);

            case "RPLI": RPLIs.Add(new RPLIField(r, dataSize)); return(true);

            case "RPLD": RPLIs.Last().RPLDField(r, dataSize); return(true);

            case "RDAT": RDATs.Add(new RDATField(r, dataSize)); return(true);

            case "RDOT":
                var rdot = RDATs.Last().RDOTs = new RDOTField[dataSize / 52];
                for (var i = 0; i < rdot.Length; i++)
                {
                    rdot[i] = new RDOTField(r, dataSize);
                }
                return(true);

            case "RDMP": RDATs.Last().RDMP = r.ReadSTRV(dataSize); return(true);

            case "RDGS":
                var rdgs = RDATs.Last().RDGSs = new RDGSField[dataSize / 8];
                for (var i = 0; i < rdgs.Length; i++)
                {
                    rdgs[i] = new RDGSField(r, dataSize);
                }
                return(true);

            case "RDMD": RDATs.Last().RDMD = r.ReadT <UI32Field>(dataSize); return(true);

            case "RDSD":
                var rdsd = RDATs.Last().RDSDs = new RDSDField[dataSize / 12];
                for (var i = 0; i < rdsd.Length; i++)
                {
                    rdsd[i] = new RDSDField(r, dataSize, format);
                }
                return(true);

            case "RDWT":
                var rdwt = RDATs.Last().RDWTs = new RDWTField[dataSize / RDWTField.SizeOf(format)];
                for (var i = 0; i < rdwt.Length; i++)
                {
                    rdwt[i] = new RDWTField(r, dataSize, format);
                }
                return(true);

            default: return(false);
            }
        }
Пример #22
0
        public IN16Field?ANAM;                                            // Enchantment points (optional)

        public override bool CreateField(BinaryFileReader r, GameFormat format, string type, int dataSize)
        {
            switch (type)
            {
            case "EDID":
            case "NAME": EDID = r.ReadSTRV(dataSize); return(true);

            case "MODL": MODL = new MODLGroup(r, dataSize); return(true);

            case "MODB": MODL.MODBField(r, dataSize); return(true);

            case "MODT": MODL.MODTField(r, dataSize); return(true);

            case "FULL":
            case "FNAM": FULL = r.ReadSTRV(dataSize); return(true);

            case "DATA":
            case "CTDT": DATA = new DATAField(r, dataSize, format); return(true);

            case "ICON":
            case "ITEX": ICON = r.ReadFILE(dataSize); return(true);

            case "INDX": INDXs.Add(new INDXFieldGroup {
                    INDX = r.ReadINTV(dataSize)
                }); return(true);

            case "BNAM": INDXs.Last().BNAM = r.ReadSTRV(dataSize); return(true);

            case "CNAM": INDXs.Last().CNAM = r.ReadSTRV(dataSize); return(true);

            case "ENAM": ENAM = r.ReadSTRV(dataSize); return(true);

            case "SCRI": SCRI = new FMIDField <SCPTRecord>(r, dataSize); return(true);

            case "BMDT": BMDT = r.ReadT <UI32Field>(dataSize); return(true);

            case "MOD2": MOD2 = new MODLGroup(r, dataSize); return(true);

            case "MO2B": MOD2.MODBField(r, dataSize); return(true);

            case "MO2T": MOD2.MODTField(r, dataSize); return(true);

            case "MOD3": MOD3 = new MODLGroup(r, dataSize); return(true);

            case "MO3B": MOD3.MODBField(r, dataSize); return(true);

            case "MO3T": MOD3.MODTField(r, dataSize); return(true);

            case "MOD4": MOD4 = new MODLGroup(r, dataSize); return(true);

            case "MO4B": MOD4.MODBField(r, dataSize); return(true);

            case "MO4T": MOD4.MODTField(r, dataSize); return(true);

            case "ICO2": ICO2 = r.ReadFILE(dataSize); return(true);

            case "ANAM": ANAM = r.ReadT <IN16Field>(dataSize); return(true);

            default: return(false);
            }
        }
        public override bool CreateField(BinaryFileReader r, GameFormat format, string type, int dataSize)
        {
            if (format == GameFormat.TES3)
            {
                switch (type)
                {
                case "INAM": EDID = r.ReadSTRV(dataSize); DIALRecord.LastRecord?.INFOs.Add(this); return(true);

                case "PNAM": PNAM = new FMIDField <INFORecord>(r, dataSize); return(true);

                case "NNAM": TES3.NNAM = r.ReadSTRV(dataSize); return(true);

                case "DATA": TES3.DATA = new DATA3Field(r, dataSize); return(true);

                case "ONAM": TES3.ONAM = r.ReadSTRV(dataSize); return(true);

                case "RNAM": TES3.RNAM = r.ReadSTRV(dataSize); return(true);

                case "CNAM": TES3.CNAM = r.ReadSTRV(dataSize); return(true);

                case "FNAM": TES3.FNAM = r.ReadSTRV(dataSize); return(true);

                case "ANAM": TES3.ANAM = r.ReadSTRV(dataSize); return(true);

                case "DNAM": TES3.DNAM = r.ReadSTRV(dataSize); return(true);

                case "NAME": TES3.NAME = r.ReadSTRV(dataSize); return(true);

                case "SNAM": TES3.SNAM = r.ReadFILE(dataSize); return(true);

                case "QSTN": TES3.QSTN = r.ReadT <BYTEField>(dataSize); return(true);

                case "QSTF": TES3.QSTF = r.ReadT <BYTEField>(dataSize); return(true);

                case "QSTR": TES3.QSTR = r.ReadT <BYTEField>(dataSize); return(true);

                case "SCVR": TES3.SCVR = new SCPTRecord.CTDAField(r, dataSize, format); return(true);

                case "INTV": TES3.INTV = r.ReadUNKN(dataSize); return(true);

                case "FLTV": TES3.FLTV = r.ReadUNKN(dataSize); return(true);

                case "BNAM": TES3.BNAM = r.ReadSTRV(dataSize); return(true);

                default: return(false);
                }
            }
            switch (type)
            {
            case "DATA": TES4.DATA = new DATA4Field(r, dataSize); return(true);

            case "QSTI": TES4.QSTI = new FMIDField <QUSTRecord>(r, dataSize); return(true);

            case "TPIC": TES4.TPIC = new FMIDField <DIALRecord>(r, dataSize); return(true);

            case "NAME": TES4.NAMEs.Add(new FMIDField <DIALRecord>(r, dataSize)); return(true);

            case "TRDT": TES4.TRDTs.Add(new TRDTField(r, dataSize)); return(true);

            case "NAM1": TES4.TRDTs.Last().NAM1Field(r, dataSize); return(true);

            case "NAM2": TES4.TRDTs.Last().NAM2Field(r, dataSize); return(true);

            case "CTDA":
            case "CTDT": TES4.CTDAs.Add(new SCPTRecord.CTDAField(r, dataSize, format)); return(true);

            case "TCLT": TES4.TCLTs.Add(new FMIDField <DIALRecord>(r, dataSize)); return(true);

            case "TCLF": TES4.TCLFs.Add(new FMIDField <DIALRecord>(r, dataSize)); return(true);

            case "SCHR":
            case "SCHD": TES4.SCHR = new SCPTRecord.SCHRField(r, dataSize); return(true);

            case "SCDA": TES4.SCDA = r.ReadBYTV(dataSize); return(true);

            case "SCTX": TES4.SCTX = r.ReadSTRV(dataSize); return(true);

            case "SCRO": TES4.SCROs.Add(new FMIDField <Record>(r, dataSize)); return(true);

            default: return(false);
            }
        }
Пример #24
0
        public override bool CreateField(BinaryFileReader r, GameFormat format, string type, int dataSize)
        {
            //Console.WriteLine($"   {type}");
            if (!InFRMR && type == "FRMR")
            {
                InFRMR = true;
            }
            if (!InFRMR)
            {
                switch (type)
                {
                case "EDID":
                case "NAME": EDID = r.ReadSTRV(dataSize); return(true);

                case "FULL":
                case "RGNN": FULL = r.ReadSTRV(dataSize); return(true);

                case "DATA": DATA = r.ReadINTV(format == GameFormat.TES3 ? 4 : dataSize).ToUI16Field(); if (format == GameFormat.TES3)
                    {
                        goto case "XCLC";
                    }
                    return(true);

                case "XCLC": XCLC = r.ReadT <XCLCField>(format == GameFormat.TES3 ? 8 : dataSize); return(true);

                case "XCLL":
                case "AMBI": XCLL = r.ReadT <XCLLField>(dataSize); return(true);

                case "XCLW":
                case "WHGT": XCLW = r.ReadT <FLTVField>(dataSize); return(true);

                // TES3
                case "NAM0": NAM0 = r.ReadT <UI32Field>(dataSize); return(true);

                case "INTV": INTV = r.ReadINTV(dataSize); return(true);

                case "NAM5": NAM5 = r.ReadT <CREFField>(dataSize); return(true);

                // TES4
                case "XCLR":
                    XCLRs = new FMIDField <REGNRecord> [dataSize >> 2];
                    for (var i = 0; i < XCLRs.Length; i++)
                    {
                        XCLRs[i] = new FMIDField <REGNRecord>(r, 4);
                    }
                    return(true);

                case "XCMT": XCMT = r.ReadT <BYTEField>(dataSize); return(true);

                case "XCCM": XCCM = new FMIDField <CLMTRecord>(r, dataSize); return(true);

                case "XCWT": XCWT = new FMIDField <WATRRecord>(r, dataSize); return(true);

                case "XOWN": XOWNs.Add(new XOWNGroup {
                        XOWN = new FMIDField <Record>(r, dataSize)
                    }); return(true);

                case "XRNK": XOWNs.Last().XRNK = r.ReadT <IN32Field>(dataSize); return(true);

                case "XGLB": XOWNs.Last().XGLB = new FMIDField <Record>(r, dataSize); return(true);

                default: return(false);
                }
            }
            // Referenced Object Data Grouping
            else
            {
                switch (type)
                {
                // RefObjDataGroup sub-records
                case "FRMR":
                    _lastRef      = new RefObj(); RefObjs.Add(_lastRef);
                    _lastRef.FRMR = r.ReadT <UI32Field>(dataSize); return(true);

                case "NAME": _lastRef.EDID = r.ReadSTRV(dataSize); return(true);

                case "XSCL": _lastRef.XSCL = r.ReadT <FLTVField>(dataSize); return(true);

                case "DODT": _lastRef.DODT = r.ReadT <RefObj.XYZAField>(dataSize); return(true);

                case "DNAM": _lastRef.DNAM = r.ReadSTRV(dataSize); return(true);

                case "FLTV": _lastRef.FLTV = r.ReadT <FLTVField>(dataSize); return(true);

                case "KNAM": _lastRef.KNAM = r.ReadSTRV(dataSize); return(true);

                case "TNAM": _lastRef.TNAM = r.ReadSTRV(dataSize); return(true);

                case "UNAM": _lastRef.UNAM = r.ReadT <BYTEField>(dataSize); return(true);

                case "ANAM": _lastRef.ANAM = r.ReadSTRV(dataSize); return(true);

                case "BNAM": _lastRef.BNAM = r.ReadSTRV(dataSize); return(true);

                case "INTV": _lastRef.INTV = r.ReadT <IN32Field>(dataSize); return(true);

                case "NAM9": _lastRef.NAM9 = r.ReadT <UI32Field>(dataSize); return(true);

                case "XSOL": _lastRef.XSOL = r.ReadSTRV(dataSize); return(true);

                case "DATA": _lastRef.DATA = r.ReadT <RefObj.XYZAField>(dataSize); return(true);

                //
                case "CNAM": _lastRef.CNAM = r.ReadSTRV(dataSize); return(true);

                case "NAM0": _lastRef.NAM0 = r.ReadT <UI32Field>(dataSize); return(true);

                case "XCHG": _lastRef.XCHG = r.ReadT <IN32Field>(dataSize); return(true);

                case "INDX": _lastRef.INDX = r.ReadT <IN32Field>(dataSize); return(true);

                default: return(false);
                }
            }
        }
        public override bool CreateField(BinaryFileReader r, GameFormat format, string type, int dataSize)
        {
            switch (type)
            {
            case "EDID": EDID = r.ReadSTRV(dataSize); return(true);

            case "NAME": NAME = new FMIDField <Record>(r, dataSize); return(true);

            case "XTEL": XTEL = new XTELField(r, dataSize); return(true);

            case "DATA": DATA = new DATAField(r, dataSize); return(true);

            case "XLOC": XLOC = new XLOCField(r, dataSize); return(true);

            case "XOWN": if (XOWNs == null)
                {
                    XOWNs = new List <CELLRecord.XOWNGroup>();
                }
                XOWNs.Add(new CELLRecord.XOWNGroup {
                    XOWN = new FMIDField <Record>(r, dataSize)
                }); return(true);

            case "XRNK": XOWNs.Last().XRNK = r.ReadT <IN32Field>(dataSize); return(true);

            case "XGLB": XOWNs.Last().XGLB = new FMIDField <Record>(r, dataSize); return(true);

            case "XESP": XESP = new XESPField(r, dataSize); return(true);

            case "XTRG": XTRG = new FMIDField <Record>(r, dataSize); return(true);

            case "XSED": XSED = new XSEDField(r, dataSize); return(true);

            case "XLOD": XLOD = r.ReadBYTV(dataSize); return(true);

            case "XCHG": XCHG = r.ReadT <FLTVField>(dataSize); return(true);

            case "XHLT": XCHG = r.ReadT <FLTVField>(dataSize); return(true);

            case "XPCI": XPCI = new FMIDField <CELLRecord>(r, dataSize); _nextFull = 1; return(true);

            case "FULL":
                if (_nextFull == 1)
                {
                    XPCI.Value.AddName(r.ReadASCIIString(dataSize));
                }
                else if (_nextFull == 2)
                {
                    XMRKs.Last().FULL = r.ReadSTRV(dataSize);
                }
                _nextFull = 0;
                return(true);

            case "XLCM": XLCM = r.ReadT <IN32Field>(dataSize); return(true);

            case "XRTM": XRTM = new FMIDField <REFRRecord>(r, dataSize); return(true);

            case "XACT": XACT = r.ReadT <UI32Field>(dataSize); return(true);

            case "XCNT": XCNT = r.ReadT <IN32Field>(dataSize); return(true);

            case "XMRK": if (XMRKs == null)
                {
                    XMRKs = new List <XMRKGroup>();
                }
                XMRKs.Add(new XMRKGroup()); _nextFull = 2; return(true);

            case "FNAM": XMRKs.Last().FNAM = r.ReadT <BYTEField>(dataSize); return(true);

            case "TNAM": XMRKs.Last().TNAM = r.ReadT <BYTEField>(dataSize); r.ReadByte(); return(true);

            case "ONAM": return(true);

            case "XRGD": XRGD = r.ReadBYTV(dataSize); return(true);

            case "XSCL": XSCL = r.ReadT <FLTVField>(dataSize); return(true);

            case "XSOL": XSOL = r.ReadT <BYTEField>(dataSize); return(true);

            default: return(false);
            }
        }