Beispiel #1
0
 public RecordGroup(UnityBinaryReader r, string filePath, GameFormatId format, int recordLevel)
 {
     _r           = r;
     _filePath    = filePath;
     _formatId    = format;
     _recordLevel = recordLevel;
 }
        public DATVField DATA; // Data

        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 "STRV": DATA = r.ReadDATV(dataSize, 's'); return(true);

                case "INTV": DATA = r.ReadDATV(dataSize, 'i'); return(true);

                case "FLTV": DATA = r.ReadDATV(dataSize, 'f'); return(true);

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

            case "DATA": DATA = r.ReadDATV(dataSize, EDID.Value[0]); return(true);

            default: return(false);
            }
        }
        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);
            }
        }
Beispiel #4
0
        public DATAField DATA; // Data

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

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

                case "DESC": DESC = 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.ReadSTRV(dataSize); return(true);

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

            default: return(false);
            }
        }
        public TNAMField TNAM;                                  // Timing

        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 "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);
            }
        }
Beispiel #6
0
        public List <FMIDField <Record> > SPLOs = new List <FMIDField <Record> >(); // TES4: (points to a SPEL or LVSP record)

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

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

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

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

            case "NPCS": if (NPCSs == null)
                {
                    NPCSs = new List <STRVField>();
                }
                NPCSs.Add(r.ReadSTRV(dataSize)); return(true);

            default: return(false);
            }
        }
        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);
            }
        }
Beispiel #8
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);
            }
        }
            public uint Flags; // 1 = Playable 2 = Beast Race

            public DATAField(UnityBinaryReader r, int dataSize, GameFormatId format)
            {
                if (format == GameFormatId.TES3)
                {
                    for (var i = 0; i < SkillBoosts.Length; i++)
                    {
                        SkillBoosts[i] = new SkillBoost(r, 8, format);
                    }
                    Male.Strength     = (byte)r.ReadLEInt32(); Female.Strength = (byte)r.ReadLEInt32();
                    Male.Intelligence = (byte)r.ReadLEInt32(); Female.Intelligence = (byte)r.ReadLEInt32();
                    Male.Willpower    = (byte)r.ReadLEInt32(); Female.Willpower = (byte)r.ReadLEInt32();
                    Male.Agility      = (byte)r.ReadLEInt32(); Female.Agility = (byte)r.ReadLEInt32();
                    Male.Speed        = (byte)r.ReadLEInt32(); Female.Speed = (byte)r.ReadLEInt32();
                    Male.Endurance    = (byte)r.ReadLEInt32(); Female.Endurance = (byte)r.ReadLEInt32();
                    Male.Personality  = (byte)r.ReadLEInt32(); Female.Personality = (byte)r.ReadLEInt32();
                    Male.Luck         = (byte)r.ReadLEInt32(); Female.Luck = (byte)r.ReadLEInt32();
                    Male.Height       = r.ReadLESingle(); Female.Height = r.ReadLESingle();
                    Male.Weight       = r.ReadLESingle(); Female.Weight = r.ReadLESingle();
                    Flags             = r.ReadLEUInt32();
                    return;
                }
                for (var i = 0; i < SkillBoosts.Length; i++)
                {
                    SkillBoosts[i] = new SkillBoost(r, 2, format);
                }
                r.ReadLEInt16(); // padding
                Male.Height = r.ReadLESingle(); Female.Height = r.ReadLESingle();
                Male.Weight = r.ReadLESingle(); Female.Weight = r.ReadLESingle();
                Flags       = r.ReadLEUInt32();
            }
Beispiel #10
0
        public STRVField MNAM; // Master Text

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

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

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

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

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

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

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

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

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

            default: return(false);
            }
        }
Beispiel #11
0
            public int    Flags; // 0 = ?, 1 = Ignore Normal Weapon Resistance?

            public DATAField(UnityBinaryReader r, int dataSize, GameFormatId format)
            {
                if (format == GameFormatId.TES3)
                {
                    Weight    = r.ReadLESingle();
                    Value     = r.ReadLEInt32();
                    Type      = r.ReadLEUInt16();
                    Health    = r.ReadLEInt16();
                    Speed     = r.ReadLESingle();
                    Reach     = r.ReadLESingle();
                    Damage    = r.ReadLEInt16();
                    ChopMin   = r.ReadByte();
                    ChopMax   = r.ReadByte();
                    SlashMin  = r.ReadByte();
                    SlashMax  = r.ReadByte();
                    ThrustMin = r.ReadByte();
                    ThrustMax = r.ReadByte();
                    Flags     = r.ReadLEInt32();
                    return;
                }
                Type    = (ushort)r.ReadLEUInt32();
                Speed   = r.ReadLESingle();
                Reach   = r.ReadLESingle();
                Flags   = r.ReadLEInt32();
                Value   = r.ReadLEInt32();
                Health  = (short)r.ReadLEInt32();
                Weight  = r.ReadLESingle();
                Damage  = r.ReadLEInt16();
                ChopMin = ChopMax = SlashMin = SlashMax = ThrustMin = ThrustMax = 0;
            }
        public BYTVField?XRGD;                    // Ragdoll Data (optional)

        public override bool CreateField(UnityBinaryReader r, GameFormatId 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);
            }
        }
Beispiel #13
0
        public BYTVField?XRGD;              // Ragdoll Data (optional)

        public override bool CreateField(UnityBinaryReader r, GameFormatId 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);
            }
        }
Beispiel #14
0
        public List <SNAMField> SNAMs = new List <SNAMField>(); // Sounds

        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 "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);
            }
        }
Beispiel #15
0
 public SPITField(UnityBinaryReader r, int dataSize, GameFormatId format)
 {
     Type       = r.ReadLEUInt32();
     SpellCost  = r.ReadLEInt32();
     SpellLevel = format != GameFormatId.TES3 ? r.ReadLEInt32() : 0;
     Flags      = r.ReadLEUInt32();
 }
        public FMIDField <SOUNRecord> QNAM; // Close sound

        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 "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);
            }
        }
Beispiel #17
0
 public DATAField(UnityBinaryReader r, int dataSize, GameFormatId format)
 {
     if (format == GameFormatId.TES3)
     {
         Weight          = r.ReadLESingle();
         Value           = r.ReadLEInt32();
         Time            = r.ReadLEInt32();
         Radius          = r.ReadLEInt32();
         LightColor      = r.ReadT <ColorRef4>(4);
         Flags           = r.ReadLEInt32();
         FalloffExponent = 1;
         FOV             = 90;
         return;
     }
     Time       = r.ReadLEInt32();
     Radius     = r.ReadLEInt32();
     LightColor = r.ReadT <ColorRef4>(4);
     Flags      = r.ReadLEInt32();
     if (dataSize == 32)
     {
         FalloffExponent = r.ReadLESingle();
         FOV             = r.ReadLESingle();
     }
     else
     {
         FalloffExponent = 1;
         FOV             = 90;
     }
     Value  = r.ReadLEInt32();
     Weight = r.ReadLESingle();
 }
Beispiel #18
0
        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 "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);
            }
        }
Beispiel #19
0
            public int    Parameter2; // Parameter #2

            public CTDAField(UnityBinaryReader r, int dataSize, GameFormatId format)
            {
                if (format == GameFormatId.TES3)
                {
                    Index           = r.ReadByte();
                    Type            = r.ReadByte();
                    FunctionId      = r.ReadASCIIString(2);
                    CompareOp       = (byte)(r.ReadByte() << 1);
                    Name            = r.ReadASCIIString(dataSize - 5);
                    ComparisonValue = Parameter1 = Parameter2 = 0;
                    return;
                }
                CompareOp = r.ReadByte();
                r.SkipBytes(3); // Unused
                ComparisonValue = r.ReadLESingle();
                FunctionId      = r.ReadASCIIString(4);
                Parameter1      = r.ReadLEInt32();
                Parameter2      = r.ReadLEInt32();
                if (dataSize != 24)
                {
                    r.SkipBytes(4); // Unused
                }
                Index = Type = 0;
                Name  = null;
            }
Beispiel #20
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 "SCHD": SCHD = new SCHDField(r, dataSize); return(true);

            case "SCVR": if (format != GameFormatId.TES3)
                {
                    SLSDs.Last().SCVRField(r, dataSize);
                }
                else
                {
                    SCHD.SCVRField(r, dataSize);
                } return(true);

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

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

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

            case "SLSD": SLSDs.Add(new SLSDField(r, dataSize)); return(true);

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

            case "SCRV": var idx = r.ReadLEUInt32(); SCRVs.Add(SLSDs.Single(x => x.Idx == idx)); return(true);

            default: return(false);
            }
        }
Beispiel #21
0
        public List <SCITField> SCITs = new List <SCITField>(); // Script effect data

        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 "FULL": if (SCITs.Count == 0)
                {
                    FULL = r.ReadSTRV(dataSize);
                }
                else
                {
                    SCITs.Last().FULLField(r, dataSize);
                } return(true);

            case "ENIT":
            case "ENDT": ENIT = new ENITField(r, dataSize, format); return(true);

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

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

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

            default: return(false);
            }
        }
Beispiel #22
0
        }                                   // Editor ID

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

            default: return(false);
            }
        }
Beispiel #23
0
            public int Flags; //: AutoCalc

            public DATAField(UnityBinaryReader r, int dataSize, GameFormatId format)
            {
                Weight = r.ReadLESingle();
                if (format == GameFormatId.TES3)
                {
                    Value = r.ReadLEInt32();
                    Flags = r.ReadLEInt32();
                }
            }
        public FMIDField <SCPTRecord>?SCRI;                     // Unknown

        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 "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);
            }
        }
 public DATAField(UnityBinaryReader r, int dataSize, GameFormatId format)
 {
     if (format == GameFormatId.TES3)
     {
         Weight = r.ReadLESingle();
         return;
     }
     Flags  = r.ReadByte();
     Weight = r.ReadLESingle();
 }
Beispiel #26
0
 public VTEXField(UnityBinaryReader r, int dataSize, GameFormatId format)
 {
     if (format == GameFormatId.TES3)
     {
         TextureIndicesT3 = r.ReadTArray <ushort>(dataSize, dataSize >> 1);
         TextureIndicesT4 = null;
         return;
     }
     TextureIndicesT3 = null;
     TextureIndicesT4 = r.ReadTArray <uint>(dataSize, dataSize >> 2);
 }
Beispiel #27
0
        public FormId <Record> Item;      // The ID of the item

        public CNTOField(UnityBinaryReader r, int dataSize, GameFormatId format)
        {
            if (format == GameFormatId.TES3)
            {
                ItemCount = r.ReadLEUInt32();
                Item      = new FormId <Record>(r.ReadASCIIString(32, ASCIIFormat.ZeroPadded));
                return;
            }
            Item      = new FormId <Record>(r.ReadLEUInt32());
            ItemCount = r.ReadLEUInt32();
        }
Beispiel #28
0
            public float[] UseValue;       // The use types for each skill are hard-coded.

            public DATAField(UnityBinaryReader r, int dataSize, GameFormatId format)
            {
                Action         = format == GameFormatId.TES3 ? 0 : r.ReadLEInt32();
                Attribute      = r.ReadLEInt32();
                Specialization = r.ReadLEUInt32();
                UseValue       = new float[format == GameFormatId.TES3 ? 4 : 2];
                for (var i = 0; i < UseValue.Length; i++)
                {
                    UseValue[i] = r.ReadLESingle();
                }
            }
 public SkillBoost(UnityBinaryReader r, int dataSize, GameFormatId format)
 {
     if (format == GameFormatId.TES3)
     {
         SkillId = (byte)r.ReadLEInt32();
         Bonus   = (sbyte)r.ReadLEInt32();
         return;
     }
     SkillId = r.ReadByte();
     Bonus   = r.ReadSByte();
 }
 public DATAField(UnityBinaryReader r, int dataSize, GameFormatId format)
 {
     if (format == GameFormatId.TES3)
     {
         Weight  = r.ReadLESingle();
         Value   = r.ReadLEUInt32();
         Unknown = r.ReadLEUInt32();
         return;
     }
     Value   = r.ReadLEUInt32();
     Weight  = r.ReadLESingle();
     Unknown = 0;
 }