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);
            }
        }
Пример #2
0
        public FMIDField <ENCHRecord> ENAM; // enchantment ID

        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 "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);
            }
        }
Пример #3
0
        public TNAMField TNAM;                                  // Timing

        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 "FNAM": FNAM = r.ReadFILE(dataSize); return(true);

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

            case "WLST": for (var i = 0; i < dataSize >> 3; i++)
                {
                    WLSTs.Add(new WLSTField(r, dataSize));
                }
                return(true);

            case "TNAM": TNAM = new TNAMField(r, dataSize); return(true);

            default: return(false);
            }
        }
Пример #4
0
        public List <SNAMField> SNAMs = new List <SNAMField>(); // Sounds

        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 "CNAM": CNAM = r.ReadFILE(dataSize); return(true);

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

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

            case "FNAM": FNAM = new FNAMField(r, dataSize); return(true);

            case "HNAM": HNAM = new HNAMField(r, dataSize); return(true);

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

            case "SNAM": SNAMs.Add(new SNAMField(r, 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 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);
            }
        }
Пример #7
0
        public FMIDField <IDLERecord> DATA; // IDLE animation

        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 "DATA": DATA = new FMIDField <IDLERecord>(r, dataSize); return(true);

            default: return(false);
            }
        }
Пример #8
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);
            }
        }
Пример #9
0
        public BYTEField DATA; // Playable, Not Male, Not Female, Fixed

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

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

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

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

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

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

            default: return(false);
            }
        }
Пример #10
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(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 "MNAM": MNAM = r.ReadT <IN32Field>(dataSize); return(true);

            default: return(false);
            }
        }
Пример #11
0
        public BNAMField BNAM; // Billboard Dimensions

        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 "ICON": ICON = r.ReadFILE(dataSize); return(true);

            case "SNAM": SNAM = new SNAMField(r, dataSize); return(true);

            case "CNAM": CNAM = new CNAMField(r, dataSize); return(true);

            case "BNAM": BNAM = new BNAMField(r, dataSize); return(true);

            default: return(false);
            }
        }
Пример #12
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);
            }
        }
Пример #13
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 "INDX": INDX = r.ReadINTV(dataSize); return(true);

                case "MEDT": MEDT = new MEDTField(r, dataSize); return(true);

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

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

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

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

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

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

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

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

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

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

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

                default: return(false);
                }
            }
            switch (type)
            {
            case "EDID": EDID = r.ReadSTRV(dataSize); return(true);

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

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

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

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

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

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

            case "ESCE":
                ESCEs = new STRVField[dataSize >> 2];
                for (var i = 0; i < ESCEs.Length; i++)
                {
                    ESCEs[i] = r.ReadSTRV(4);
                }
                return(true);

            default: return(false);
            }
        }