diff --git a/CodeWalker.Core/GameFiles/MetaTypes/MetaTypes.cs b/CodeWalker.Core/GameFiles/MetaTypes/MetaTypes.cs index c0448f2..e06c931 100644 --- a/CodeWalker.Core/GameFiles/MetaTypes/MetaTypes.cs +++ b/CodeWalker.Core/GameFiles/MetaTypes/MetaTypes.cs @@ -375,8 +375,8 @@ namespace CodeWalker.GameFiles new MetaStructureEntryInfo_s(MetaName.EntityType, 16, MetaStructureEntryDataType.Hash, 0, 0, 0), new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CExtensionDefSpawnPoint), new MetaStructureEntryInfo_s(MetaName.ScenarioPoints, 24, MetaStructureEntryDataType.Array, 0, 2, 0), - new MetaStructureEntryInfo_s((MetaName)538733109, 64, MetaStructureEntryDataType.Boolean, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)1035513142, 65, MetaStructureEntryDataType.Boolean, 0, 0, 0) + new MetaStructureEntryInfo_s(MetaName.EntityMayNotAlwaysExist, 64, MetaStructureEntryDataType.Boolean, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.SpecificallyPreventArtPoints, 65, MetaStructureEntryDataType.Boolean, 0, 0, 0) ); case MetaName.CExtensionDefSpawnPoint: return new MetaStructureInfo(MetaName.CExtensionDefSpawnPoint, 3077340721, 1024, 96, @@ -956,7 +956,7 @@ namespace CodeWalker.GameFiles new MetaStructureEntryInfo_s(MetaName.bottom, 32, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), new MetaStructureEntryInfo_s(MetaName.top, 48, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), new MetaStructureEntryInfo_s(MetaName.normal, 64, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.materialType, 80, MetaStructureEntryDataType.IntEnum, 0, 0, (MetaName)1294270217), + new MetaStructureEntryInfo_s(MetaName.materialType, 80, MetaStructureEntryDataType.IntEnum, 0, 0, MetaName.CExtensionDefLadderMaterialType), new MetaStructureEntryInfo_s(MetaName.template, 84, MetaStructureEntryDataType.Hash, 0, 0, 0), new MetaStructureEntryInfo_s(MetaName.canGetOffAtTop, 88, MetaStructureEntryDataType.Boolean, 0, 0, 0), new MetaStructureEntryInfo_s(MetaName.canGetOffAtBottom, 89, MetaStructureEntryDataType.Boolean, 0, 0, 0) @@ -996,8 +996,8 @@ namespace CodeWalker.GameFiles new MetaStructureEntryInfo_s(MetaName.intensity, 148, MetaStructureEntryDataType.Float, 0, 0, 0), new MetaStructureEntryInfo_s(MetaName.flashiness, 152, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), new MetaStructureEntryInfo_s(MetaName.flags, 156, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.densityType, 160, MetaStructureEntryDataType.IntEnum, 0, 0, (MetaName)1931949281), - new MetaStructureEntryInfo_s(MetaName.volumeType, 164, MetaStructureEntryDataType.IntEnum, 0, 0, (MetaName)2266515059), + new MetaStructureEntryInfo_s(MetaName.densityType, 160, MetaStructureEntryDataType.IntEnum, 0, 0, MetaName.CExtensionDefLightShaftDensityType), + new MetaStructureEntryInfo_s(MetaName.volumeType, 164, MetaStructureEntryDataType.IntEnum, 0, 0, MetaName.CExtensionDefLightShaftVolumeType), new MetaStructureEntryInfo_s(MetaName.softness, 168, MetaStructureEntryDataType.Float, 0, 0, 0), new MetaStructureEntryInfo_s(MetaName.scaleBySunIntensity, 172, MetaStructureEntryDataType.Boolean, 0, 0, 0) ); @@ -1038,8 +1038,8 @@ namespace CodeWalker.GameFiles new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CPVDrawblData), new MetaStructureEntryInfo_s(MetaName.aDrawblData3, 8, MetaStructureEntryDataType.Array, 0, 1, 0) ); - case (MetaName)2236980467: - return new MetaStructureInfo((MetaName)2236980467, 508935687, 0, 24, + case MetaName.CPVDrawblData__CPVClothComponentData: + return new MetaStructureInfo(MetaName.CPVDrawblData__CPVClothComponentData, 508935687, 0, 24, new MetaStructureEntryInfo_s(MetaName.ownsCloth, 0, MetaStructureEntryDataType.Boolean, 0, 0, 0) ); case MetaName.CPVDrawblData: @@ -1048,7 +1048,7 @@ namespace CodeWalker.GameFiles new MetaStructureEntryInfo_s(MetaName.numAlternatives, 1, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CPVTextureData), new MetaStructureEntryInfo_s(MetaName.aTexData, 8, MetaStructureEntryDataType.Array, 0, 2, 0), - new MetaStructureEntryInfo_s(MetaName.clothData, 24, MetaStructureEntryDataType.Structure, 0, 0, (MetaName)2236980467) + new MetaStructureEntryInfo_s(MetaName.clothData, 24, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CPVDrawblData__CPVClothComponentData) ); case MetaName.CPVTextureData: return new MetaStructureInfo(MetaName.CPVTextureData, 4272717794, 0, 3, @@ -1220,11 +1220,11 @@ namespace CodeWalker.GameFiles case MetaName.rage__phVerletClothCustomBounds: return new MetaStructureInfo(MetaName.rage__phVerletClothCustomBounds, 2075461750, 768, 32, new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, (MetaName)1701774085), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.rage__phCapsuleBoundDef), new MetaStructureEntryInfo_s(MetaName.CollisionData, 16, MetaStructureEntryDataType.Array, 0, 1, 0) ); - case (MetaName)1701774085:/*.SectionUNKNOWN1*/ - return new MetaStructureInfo((MetaName)1701774085, 2859775340, 1024, 96, + case MetaName.rage__phCapsuleBoundDef: + return new MetaStructureInfo(MetaName.rage__phCapsuleBoundDef, 2859775340, 1024, 96, new MetaStructureEntryInfo_s(MetaName.OwnerName, 0, MetaStructureEntryDataType.CharPointer, 0, 0, 0), new MetaStructureEntryInfo_s(MetaName.Rotation, 16, MetaStructureEntryDataType.Float_XYZW, 0, 0, 0), new MetaStructureEntryInfo_s(MetaName.Position, 32, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), @@ -1233,7 +1233,7 @@ namespace CodeWalker.GameFiles new MetaStructureEntryInfo_s(MetaName.CapsuleLen, 68, MetaStructureEntryDataType.Float, 0, 0, 0), new MetaStructureEntryInfo_s(MetaName.CapsuleHalfHeight, 72, MetaStructureEntryDataType.Float, 0, 0, 0), new MetaStructureEntryInfo_s(MetaName.CapsuleHalfWidth, 76, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.Flags, 80, MetaStructureEntryDataType.IntFlags2, 0, 32, (MetaName)3044470860) + new MetaStructureEntryInfo_s(MetaName.Flags, 80, MetaStructureEntryDataType.IntFlags2, 0, 32, MetaName.rage__phCapsuleBoundDef__enCollisionBoundDef) ); default: @@ -1341,14 +1341,14 @@ namespace CodeWalker.GameFiles new MetaEnumEntryInfo_s(MetaName.PRI_OPTIONAL_MEDIUM, 2), new MetaEnumEntryInfo_s(MetaName.PRI_OPTIONAL_LOW, 3) ); - case (MetaName)1294270217: - return new MetaEnumInfo((MetaName)1294270217, 3514570158, + case MetaName.CExtensionDefLadderMaterialType: + return new MetaEnumInfo(MetaName.CExtensionDefLadderMaterialType, 3514570158, new MetaEnumEntryInfo_s(MetaName.METAL_SOLID_LADDER, 0), new MetaEnumEntryInfo_s(MetaName.METAL_LIGHT_LADDER, 1), - new MetaEnumEntryInfo_s((MetaName)3202617440, 2) + new MetaEnumEntryInfo_s(MetaName.WOODEN_LADDER, 2) ); - case (MetaName)1931949281: - return new MetaEnumInfo((MetaName)1931949281, 3539601182, + case MetaName.CExtensionDefLightShaftDensityType: + return new MetaEnumInfo(MetaName.CExtensionDefLightShaftDensityType, 3539601182, new MetaEnumEntryInfo_s(MetaName.LIGHTSHAFT_DENSITYTYPE_CONSTANT, 0), new MetaEnumEntryInfo_s(MetaName.LIGHTSHAFT_DENSITYTYPE_SOFT, 1), new MetaEnumEntryInfo_s(MetaName.LIGHTSHAFT_DENSITYTYPE_SOFT_SHADOW, 2), @@ -1358,9 +1358,9 @@ namespace CodeWalker.GameFiles new MetaEnumEntryInfo_s(MetaName.LIGHTSHAFT_DENSITYTYPE_QUADRATIC, 6), new MetaEnumEntryInfo_s(MetaName.LIGHTSHAFT_DENSITYTYPE_QUADRATIC_GRADIENT, 7) ); - case (MetaName)2266515059: - return new MetaEnumInfo((MetaName)2266515059, 4287472345, - new MetaEnumEntryInfo_s((MetaName)665241531, 0), + case MetaName.CExtensionDefLightShaftVolumeType: + return new MetaEnumInfo(MetaName.CExtensionDefLightShaftVolumeType, 4287472345, + new MetaEnumEntryInfo_s(MetaName.LIGHTSHAFT_VOLUMETYPE_SHAFT, 0), new MetaEnumEntryInfo_s(MetaName.LIGHTSHAFT_VOLUMETYPE_CYLINDER, 1) ); case MetaName.ePedVarComp: @@ -1403,9 +1403,9 @@ namespace CodeWalker.GameFiles new MetaEnumEntryInfo_s(MetaName.ANCHOR_PH_R_HAND, 12), new MetaEnumEntryInfo_s(MetaName.NUM_ANCHORS, 13) ); - case (MetaName)3044470860: - return new MetaEnumInfo((MetaName)3044470860, 1585854303, - new MetaEnumEntryInfo_s((MetaName)997866013, 0) + case MetaName.rage__phCapsuleBoundDef__enCollisionBoundDef: + return new MetaEnumInfo(MetaName.rage__phCapsuleBoundDef__enCollisionBoundDef, 1585854303, + new MetaEnumEntryInfo_s(MetaName.BOUND_DEF_IS_PLANE, 0) ); default: @@ -2063,9 +2063,8 @@ namespace CodeWalker.GameFiles public enum MetaTypeName : uint { - //SectionUNKNOWN1 = 1701774085, //cloth CollisionData (child of rage__phVerletClothCustomBounds) - VECTOR4 = 0x33, //(was SectionUNKNOWN12) + VECTOR4 = 0x33, HASH = 0x4a, STRING = 0x10, POINTER = 0x7, @@ -2206,15 +2205,15 @@ namespace CodeWalker.GameFiles PRI_OPTIONAL_LOW = 3, //329627604 } - public enum Unk_1294270217 //archetype CExtensionDefLadder materialType + public enum CExtensionDefLadderMaterialType //archetype CExtensionDefLadder materialType : int //Key:3514570158 { - METAL_SOLID_LADDER = 0, //Unk_1101797524 = 0, + METAL_SOLID_LADDER = 0, METAL_LIGHT_LADDER = 1, - Unk_3202617440 = 2, + WOODEN_LADDER = 2, } - public enum Unk_1931949281 //archetype CExtensionDefLightShaft densityType + public enum CExtensionDefLightShaftDensityType //archetype CExtensionDefLightShaft densityType : int //Key:3539601182 { LIGHTSHAFT_DENSITYTYPE_CONSTANT = 0, @@ -2227,10 +2226,10 @@ namespace CodeWalker.GameFiles LIGHTSHAFT_DENSITYTYPE_QUADRATIC_GRADIENT = 7, } - public enum Unk_2266515059 //archetype CExtensionDefLightShaft volumeType + public enum CExtensionDefLightShaftVolumeType //archetype CExtensionDefLightShaft volumeType : int //Key:4287472345 { - Unk_665241531 = 0, + LIGHTSHAFT_VOLUMETYPE_SHAFT = 0, LIGHTSHAFT_VOLUMETYPE_CYLINDER = 1, } @@ -2280,10 +2279,10 @@ namespace CodeWalker.GameFiles NUM_ANCHORS = 13, } - public enum Unk_3044470860 //cloth collision data SectionUNKNOWN1/1701774085 Flags + public enum rage__phCapsuleBoundDef__enCollisionBoundDef //cloth collision data - rage__phCapsuleBoundDef Flags : int //Key:1585854303 { - Unk_997866013 = 0, + BOUND_DEF_IS_PLANE = 0, } @@ -3363,10 +3362,10 @@ namespace CodeWalker.GameFiles public float Unused5 { get; set; }//60 public Vector3 normal { get; set; } //64 64: Float_XYZ: 0: normal public float Unused6 { get; set; }//76 - public Unk_1294270217 materialType { get; set; } //80 80: IntEnum: 1294270217: materialType//932754174 + public CExtensionDefLadderMaterialType materialType { get; set; } //80 80: IntEnum: CExtensionDefLadderMaterialType: materialType public MetaHash template { get; set; } //84 84: Hash: 0: template - public byte canGetOffAtTop { get; set; } //88 88: Boolean: 0: canGetOffAtTop//564839673 - public byte canGetOffAtBottom { get; set; } //89 89: Boolean: 0: canGetOffAtBottom//923729576 + public byte canGetOffAtTop { get; set; } //88 88: Boolean: 0: canGetOffAtTop + public byte canGetOffAtBottom { get; set; } //89 89: Boolean: 0: canGetOffAtBottom public ushort Unused7 { get; set; }//90 public uint Unused8 { get; set; }//92 @@ -3387,7 +3386,7 @@ namespace CodeWalker.GameFiles public override MetaPOINTER Save(MetaBuilder mb) { - mb.AddEnumInfo((MetaName)1294270217); + mb.AddEnumInfo(MetaName.CExtensionDefLadderMaterialType); mb.AddStructureInfo(MetaName.CExtensionDefLadder); return mb.AddItemPtr(MetaName.CExtensionDefLadder, _Data); } @@ -3508,17 +3507,17 @@ namespace CodeWalker.GameFiles public uint Unused02 { get; set; }//12 public Vector3 offsetPosition { get; set; } //16 16: Float_XYZ: 0: offsetPosition public float Unused03 { get; set; }//28 - public Vector3 cornerA { get; set; } //32 32: Float_XYZ: 0: 3302595027 + public Vector3 cornerA { get; set; } //32 32: Float_XYZ: 0: cornerA public float Unused04 { get; set; }//44 - public Vector3 cornerB { get; set; } //48 48: Float_XYZ: 0: 2393877884 + public Vector3 cornerB { get; set; } //48 48: Float_XYZ: 0: cornerB public float Unused05 { get; set; }//60 - public Vector3 cornerC { get; set; } //64 64: Float_XYZ: 0: 2692731164 + public Vector3 cornerC { get; set; } //64 64: Float_XYZ: 0: cornerC public float Unused06 { get; set; }//76 - public Vector3 cornerD { get; set; } //80 80: Float_XYZ: 0: 4250372814 + public Vector3 cornerD { get; set; } //80 80: Float_XYZ: 0: cornerD public float Unused07 { get; set; }//92 public Vector3 direction { get; set; } //96 96: Float_XYZ: 0: direction public float Unused08 { get; set; }//108 - public float directionAmount { get; set; } //112 112: Float: 0: 1441249296 + public float directionAmount { get; set; } //112 112: Float: 0: directionAmount public float length { get; set; } //116 116: Float: 0: length public float fadeInTimeStart { get; set; } //120 120: Float: 0: fadeInTimeStart public float fadeInTimeEnd { get; set; } //124 124: Float: 0: fadeInTimeEnd @@ -3528,13 +3527,13 @@ namespace CodeWalker.GameFiles public float fadeDistanceEnd { get; set; } //140 140: Float: 0: fadeDistanceEnd public uint color { get; set; } //144 144: UnsignedInt: 0: color public float intensity { get; set; } //148 148: Float: 0: intensity - public byte flashiness { get; set; } //152 152: UnsignedByte: 0: 3829693202 + public byte flashiness { get; set; } //152 152: UnsignedByte: 0: flashiness public byte Unused09 { get; set; }//153 public ushort Unused10 { get; set; }//154 public uint flags { get; set; } //156 156: UnsignedInt: 0: flags - public Unk_1931949281 densityType { get; set; } //160 160: IntEnum: 1931949281: densityType//235100599 - public Unk_2266515059 volumeType { get; set; } //164 164: IntEnum: 2266515059: volumeType//4021175589 - public float softness { get; set; } //168 168: Float: 0: softness//187712958 + public CExtensionDefLightShaftDensityType densityType { get; set; } //160 160: IntEnum: CExtensionDefLightShaftDensityType: densityType + public CExtensionDefLightShaftVolumeType volumeType { get; set; } //164 164: IntEnum: CExtensionDefLightShaftVolumeType: volumeType + public float softness { get; set; } //168 168: Float: 0: softness public byte scaleBySunIntensity { get; set; } //172 172: Boolean: 0: scaleBySunIntensity public byte Unused11 { get; set; }//173 public ushort Unused12 { get; set; }//174 @@ -3556,8 +3555,8 @@ namespace CodeWalker.GameFiles public override MetaPOINTER Save(MetaBuilder mb) { - mb.AddEnumInfo((MetaName)1931949281); - mb.AddEnumInfo((MetaName)2266515059); + mb.AddEnumInfo(MetaName.CExtensionDefLightShaftDensityType); + mb.AddEnumInfo(MetaName.CExtensionDefLightShaftVolumeType); mb.AddStructureInfo(MetaName.CExtensionDefLightShaft); return mb.AddItemPtr(MetaName.CExtensionDefLightShaft, _Data); } @@ -3914,19 +3913,19 @@ namespace CodeWalker.GameFiles public rage__phVerletClothCustomBounds _Data; public rage__phVerletClothCustomBounds Data { get { return _Data; } } - public MUnk_1701774085[] CollisionData { get; set; } + public Mrage__phCapsuleBoundDef[] CollisionData { get; set; } public override void Load(Meta meta, MetaPOINTER ptr) { _Data = MetaTypes.GetData(meta, ptr); - var cdata = MetaTypes.ConvertDataArray(meta, (MetaName)1701774085/*.SectionUNKNOWN1*/, _Data.CollisionData); + var cdata = MetaTypes.ConvertDataArray(meta, MetaName.rage__phCapsuleBoundDef, _Data.CollisionData); if (cdata != null) { - CollisionData = new MUnk_1701774085[cdata.Length]; + CollisionData = new Mrage__phCapsuleBoundDef[cdata.Length]; for (int i = 0; i < cdata.Length; i++) { - CollisionData[i] = new MUnk_1701774085(meta, cdata[i]); + CollisionData[i] = new Mrage__phCapsuleBoundDef(meta, cdata[i]); } } } @@ -3948,7 +3947,7 @@ namespace CodeWalker.GameFiles } } - [TC(typeof(EXP))] public struct Unk_1701774085 //96 bytes, Key:2859775340 //dexy: cloth CollisionData (child of rage__phVerletClothCustomBounds) ... eg josh house // Tom: explosions? + [TC(typeof(EXP))] public struct rage__phCapsuleBoundDef //96 bytes, Key:2859775340 //dexy: cloth CollisionData (child of rage__phVerletClothCustomBounds) ... eg josh house // Tom: explosions? { public CharPointer OwnerName { get; set; } //0 0: CharPointer: 0: OwnerName public Vector4 Rotation { get; set; } //16 16: Float_XYZW: 0: Rotation @@ -3960,27 +3959,27 @@ namespace CodeWalker.GameFiles public float CapsuleLen { get; set; } //68 68: Float: 0: CapsuleLen public float CapsuleHalfHeight { get; set; } //72 72: Float: 0: CapsuleHalfHeight public float CapsuleHalfWidth { get; set; } //76 76: Float: 0: CapsuleHalfWidth - public Unk_3044470860 Flags { get; set; } //80 80: IntFlags2: 3044470860: Flags + public rage__phCapsuleBoundDef__enCollisionBoundDef Flags { get; set; } //80 80: IntFlags2: rage__phCapsuleBoundDef__enCollisionBoundDef: Flags public uint Unused2 { get; set; }//84 public uint Unused3 { get; set; }//88 public uint Unused4 { get; set; }//92 } - [TC(typeof(EXP))] public class MUnk_1701774085 : MetaWrapper + [TC(typeof(EXP))] public class Mrage__phCapsuleBoundDef : MetaWrapper { - public Unk_1701774085 _Data; - public Unk_1701774085 Data { get { return _Data; } } + public rage__phCapsuleBoundDef _Data; + public rage__phCapsuleBoundDef Data { get { return _Data; } } public string OwnerName { get; set; } - public MUnk_1701774085() { } - public MUnk_1701774085(Meta meta, Unk_1701774085 s) + public Mrage__phCapsuleBoundDef() { } + public Mrage__phCapsuleBoundDef(Meta meta, rage__phCapsuleBoundDef s) { _Data = s; OwnerName = MetaTypes.GetString(meta, _Data.OwnerName); } public override void Load(Meta meta, MetaPOINTER ptr) { - _Data = MetaTypes.GetData(meta, ptr); + _Data = MetaTypes.GetData(meta, ptr); OwnerName = MetaTypes.GetString(meta, _Data.OwnerName); } @@ -3991,14 +3990,14 @@ namespace CodeWalker.GameFiles _Data.OwnerName = mb.AddStringPtr(OwnerName); } - mb.AddEnumInfo((MetaName)3044470860); - mb.AddStructureInfo((MetaName)1701774085/*.SectionUNKNOWN1*/); - return mb.AddItemPtr((MetaName)1701774085/*.SectionUNKNOWN1*/, _Data); + mb.AddEnumInfo(MetaName.rage__phCapsuleBoundDef__enCollisionBoundDef); + mb.AddStructureInfo(MetaName.rage__phCapsuleBoundDef); + return mb.AddItemPtr(MetaName.rage__phCapsuleBoundDef, _Data); } public override string ToString() { - return "Unk_1701774085 - " + OwnerName; + return "rage__phCapsuleBoundDef - " + OwnerName; } } @@ -4840,8 +4839,8 @@ namespace CodeWalker.GameFiles public uint Unused05 { get; set; }//52 public uint Unused06 { get; set; }//56 public uint Unused07 { get; set; }//60 - public byte Unk_538733109 { get; set; } //64 64: Boolean: 0: 538733109 - public byte Unk_1035513142 { get; set; } //65 65: Boolean: 0: 1035513142 + public byte EntityMayNotAlwaysExist { get; set; } //64 64: Boolean: 0: EntityMayNotAlwaysExist + public byte SpecificallyPreventArtPoints { get; set; } //65 65: Boolean: 0: SpecificallyPreventArtPoints public ushort Unused08 { get; set; }//66 public uint Unused09 { get; set; }//68 public uint Unused10 { get; set; }//72 @@ -4863,8 +4862,8 @@ namespace CodeWalker.GameFiles public Vector3 Position { get { return _Data.EntityPosition; } set { _Data.EntityPosition = value; } } public MetaHash TypeName { get { return _Data.EntityType; } set { _Data.EntityType = value; } } - public byte Unk1 { get { return _Data.Unk_538733109; } set { _Data.Unk_538733109 = value; } } - public byte Unk2 { get { return _Data.Unk_1035513142; } set { _Data.Unk_1035513142 = value; } } + public bool EntityMayNotAlwaysExist { get { return _Data.EntityMayNotAlwaysExist == 1; } set { _Data.EntityMayNotAlwaysExist = (byte)(value ? 1 : 0); } } + public bool SpecificallyPreventArtPoints { get { return _Data.SpecificallyPreventArtPoints == 1; } set { _Data.SpecificallyPreventArtPoints = (byte)(value ? 1 : 0); } } public MCExtensionDefSpawnPoint[] ScenarioPoints { get; set; } @@ -6197,7 +6196,7 @@ namespace CodeWalker.GameFiles public ushort Unused0 { get; set; }//2 public uint Unused1 { get; set; }//4 public Array_Structure aTexData { get; set; } //8 8: Array: 0: aTexData {0: Structure: CPVTextureData: 256} - public Unk_2236980467 clothData { get; set; } //24 24: Structure: 2236980467: clothData + public CPVDrawblData__CPVClothComponentData clothData { get; set; } //24 24: Structure: CPVDrawblData__CPVClothComponentData: clothData } [TC(typeof(EXP))] public class MCPVDrawblData : MetaWrapper { @@ -6328,7 +6327,7 @@ namespace CodeWalker.GameFiles public byte Unused0 { get; set; }//2 } - [TC(typeof(EXP))] public struct Unk_2236980467 //24 bytes, Key:508935687 //COMPONENT PEDS clothData + [TC(typeof(EXP))] public struct CPVDrawblData__CPVClothComponentData //24 bytes, Key:508935687 //COMPONENT PEDS clothData { public byte ownsCloth { get; set; } //0 0: Boolean: 0: ownsCloth public byte Unused0 { get; set; }//1 diff --git a/CodeWalker.Core/GameFiles/MetaTypes/PsoTypes.cs b/CodeWalker.Core/GameFiles/MetaTypes/PsoTypes.cs index 9e7d107..f309a7a 100644 --- a/CodeWalker.Core/GameFiles/MetaTypes/PsoTypes.cs +++ b/CodeWalker.Core/GameFiles/MetaTypes/PsoTypes.cs @@ -13247,10 +13247,10 @@ namespace CodeWalker.GameFiles new PsoStructureEntryInfo(MetaName.numAlternatives, PsoDataType.UByte, 1, 0, 0), new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CPVTextureData), new PsoStructureEntryInfo(MetaName.aTexData, PsoDataType.Array, 8, 0, (MetaName)2), - new PsoStructureEntryInfo(MetaName.clothData, PsoDataType.Structure, 24, 0, (MetaName)2236980467) + new PsoStructureEntryInfo(MetaName.clothData, PsoDataType.Structure, 24, 0, MetaName.CPVDrawblData__CPVClothComponentData) ); - case (MetaName)2236980467: - return new PsoStructureInfo((MetaName)2236980467, 0, 0, 24, + case MetaName.CPVDrawblData__CPVClothComponentData: + return new PsoStructureInfo(MetaName.CPVDrawblData__CPVClothComponentData, 0, 0, 24, new PsoStructureEntryInfo(MetaName.ownsCloth, PsoDataType.Bool, 0, 0, 0) ); case MetaName.CPVTextureData: diff --git a/CodeWalker/Project/Panels/EditScenarioNodePanel.Designer.cs b/CodeWalker/Project/Panels/EditScenarioNodePanel.Designer.cs index a2f7dd0..1227bc8 100644 --- a/CodeWalker/Project/Panels/EditScenarioNodePanel.Designer.cs +++ b/CodeWalker/Project/Panels/EditScenarioNodePanel.Designer.cs @@ -76,10 +76,6 @@ this.label161 = new System.Windows.Forms.Label(); this.ScenarioEntityPointsListBox = new System.Windows.Forms.ListBox(); this.ScenarioEntityInfoLabel = new System.Windows.Forms.Label(); - this.label114 = new System.Windows.Forms.Label(); - this.ScenarioEntityUnk2UpDown = new System.Windows.Forms.NumericUpDown(); - this.label113 = new System.Windows.Forms.Label(); - this.ScenarioEntityUnk1UpDown = new System.Windows.Forms.NumericUpDown(); this.ScenarioEntityTypeHashLabel = new System.Windows.Forms.Label(); this.ScenarioEntityTypeTextBox = new System.Windows.Forms.TextBox(); this.label112 = new System.Windows.Forms.Label(); @@ -91,6 +87,7 @@ this.ScenarioEntityPointDeleteButton = new System.Windows.Forms.Button(); this.ScenarioEntityPointAddToProjectButton = new System.Windows.Forms.Button(); this.ScenarioEntityPointPanel = new System.Windows.Forms.Panel(); + this.ScenarioEntityPointRotationQuatBox = new CodeWalker.WinForms.QuaternionBox(); this.ScenarioEntityPointNameHashLabel = new System.Windows.Forms.Label(); this.ScenarioEntityPointNameTextBox = new System.Windows.Forms.TextBox(); this.ScenarioEntityPointFlagsCheckedListBox = new System.Windows.Forms.CheckedListBox(); @@ -223,7 +220,8 @@ this.label154 = new System.Windows.Forms.Label(); this.ScenarioClusterPointTypeComboBox = new System.Windows.Forms.ComboBox(); this.label155 = new System.Windows.Forms.Label(); - this.ScenarioEntityPointRotationQuatBox = new CodeWalker.WinForms.QuaternionBox(); + this.ScenarioEntityMayNotAlwaysExistCheckBox = new System.Windows.Forms.CheckBox(); + this.ScenarioEntitySpecificallyPreventArtPointsCheckBox = new System.Windows.Forms.CheckBox(); this.ScenarioTabControl.SuspendLayout(); this.ScenarioPointTabPage.SuspendLayout(); this.ScenarioPointOuterPanel.SuspendLayout(); @@ -237,8 +235,6 @@ ((System.ComponentModel.ISupportInitialize)(this.ScenarioPointTimeStartUpDown)).BeginInit(); this.ScenarioEntityTabPage.SuspendLayout(); this.ScenarioEntityPanel.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioEntityUnk2UpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioEntityUnk1UpDown)).BeginInit(); this.ScenarioEntityPointTabPage.SuspendLayout(); this.ScenarioEntityPointPanel.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.ScenarioEntityPointFlagsUpDown)).BeginInit(); @@ -785,15 +781,13 @@ this.ScenarioEntityPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); + this.ScenarioEntityPanel.Controls.Add(this.ScenarioEntitySpecificallyPreventArtPointsCheckBox); + this.ScenarioEntityPanel.Controls.Add(this.ScenarioEntityMayNotAlwaysExistCheckBox); this.ScenarioEntityPanel.Controls.Add(this.label160); this.ScenarioEntityPanel.Controls.Add(this.ScenarioEntityAddPointButton); this.ScenarioEntityPanel.Controls.Add(this.label161); this.ScenarioEntityPanel.Controls.Add(this.ScenarioEntityPointsListBox); this.ScenarioEntityPanel.Controls.Add(this.ScenarioEntityInfoLabel); - this.ScenarioEntityPanel.Controls.Add(this.label114); - this.ScenarioEntityPanel.Controls.Add(this.ScenarioEntityUnk2UpDown); - this.ScenarioEntityPanel.Controls.Add(this.label113); - this.ScenarioEntityPanel.Controls.Add(this.ScenarioEntityUnk1UpDown); this.ScenarioEntityPanel.Controls.Add(this.ScenarioEntityTypeHashLabel); this.ScenarioEntityPanel.Controls.Add(this.ScenarioEntityTypeTextBox); this.ScenarioEntityPanel.Controls.Add(this.label112); @@ -856,50 +850,6 @@ this.ScenarioEntityInfoLabel.TabIndex = 14; this.ScenarioEntityInfoLabel.Text = "0 override points"; // - // label114 - // - this.label114.AutoSize = true; - this.label114.Location = new System.Drawing.Point(46, 83); - this.label114.Name = "label114"; - this.label114.Size = new System.Drawing.Size(39, 13); - this.label114.TabIndex = 12; - this.label114.Text = "Unk 2:"; - // - // ScenarioEntityUnk2UpDown - // - this.ScenarioEntityUnk2UpDown.Location = new System.Drawing.Point(91, 81); - this.ScenarioEntityUnk2UpDown.Maximum = new decimal(new int[] { - 255, - 0, - 0, - 0}); - this.ScenarioEntityUnk2UpDown.Name = "ScenarioEntityUnk2UpDown"; - this.ScenarioEntityUnk2UpDown.Size = new System.Drawing.Size(57, 20); - this.ScenarioEntityUnk2UpDown.TabIndex = 13; - this.ScenarioEntityUnk2UpDown.ValueChanged += new System.EventHandler(this.ScenarioEntityUnk2UpDown_ValueChanged); - // - // label113 - // - this.label113.AutoSize = true; - this.label113.Location = new System.Drawing.Point(46, 57); - this.label113.Name = "label113"; - this.label113.Size = new System.Drawing.Size(39, 13); - this.label113.TabIndex = 10; - this.label113.Text = "Unk 1:"; - // - // ScenarioEntityUnk1UpDown - // - this.ScenarioEntityUnk1UpDown.Location = new System.Drawing.Point(91, 55); - this.ScenarioEntityUnk1UpDown.Maximum = new decimal(new int[] { - 255, - 0, - 0, - 0}); - this.ScenarioEntityUnk1UpDown.Name = "ScenarioEntityUnk1UpDown"; - this.ScenarioEntityUnk1UpDown.Size = new System.Drawing.Size(57, 20); - this.ScenarioEntityUnk1UpDown.TabIndex = 11; - this.ScenarioEntityUnk1UpDown.ValueChanged += new System.EventHandler(this.ScenarioEntityUnk1UpDown_ValueChanged); - // // ScenarioEntityTypeHashLabel // this.ScenarioEntityTypeHashLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); @@ -1058,6 +1008,17 @@ this.ScenarioEntityPointPanel.Size = new System.Drawing.Size(551, 414); this.ScenarioEntityPointPanel.TabIndex = 4; // + // ScenarioEntityPointRotationQuatBox + // + this.ScenarioEntityPointRotationQuatBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.ScenarioEntityPointRotationQuatBox.Location = new System.Drawing.Point(109, 25); + this.ScenarioEntityPointRotationQuatBox.Margin = new System.Windows.Forms.Padding(0); + this.ScenarioEntityPointRotationQuatBox.Name = "ScenarioEntityPointRotationQuatBox"; + this.ScenarioEntityPointRotationQuatBox.Size = new System.Drawing.Size(387, 24); + this.ScenarioEntityPointRotationQuatBox.TabIndex = 9; + this.ScenarioEntityPointRotationQuatBox.ValueChanged += new System.EventHandler(this.ScenarioEntityPointRotationQuatBox_ValueChanged); + // // ScenarioEntityPointNameHashLabel // this.ScenarioEntityPointNameHashLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); @@ -2574,16 +2535,27 @@ this.label155.TabIndex = 10; this.label155.Text = "Type:"; // - // ScenarioEntityPointRotationQuatBox + // ScenarioEntityMayNotAlwaysExistCheckBox // - this.ScenarioEntityPointRotationQuatBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioEntityPointRotationQuatBox.Location = new System.Drawing.Point(109, 25); - this.ScenarioEntityPointRotationQuatBox.Margin = new System.Windows.Forms.Padding(0); - this.ScenarioEntityPointRotationQuatBox.Name = "ScenarioEntityPointRotationQuatBox"; - this.ScenarioEntityPointRotationQuatBox.Size = new System.Drawing.Size(387, 24); - this.ScenarioEntityPointRotationQuatBox.TabIndex = 9; - this.ScenarioEntityPointRotationQuatBox.ValueChanged += new System.EventHandler(this.ScenarioEntityPointRotationQuatBox_ValueChanged); + this.ScenarioEntityMayNotAlwaysExistCheckBox.AutoSize = true; + this.ScenarioEntityMayNotAlwaysExistCheckBox.Location = new System.Drawing.Point(91, 60); + this.ScenarioEntityMayNotAlwaysExistCheckBox.Name = "ScenarioEntityMayNotAlwaysExistCheckBox"; + this.ScenarioEntityMayNotAlwaysExistCheckBox.Size = new System.Drawing.Size(156, 17); + this.ScenarioEntityMayNotAlwaysExistCheckBox.TabIndex = 11; + this.ScenarioEntityMayNotAlwaysExistCheckBox.Text = "Entity May Not Always Exist"; + this.ScenarioEntityMayNotAlwaysExistCheckBox.UseVisualStyleBackColor = true; + this.ScenarioEntityMayNotAlwaysExistCheckBox.CheckedChanged += new System.EventHandler(this.ScenarioEntityMayNotAlwaysExistCheckBox_CheckedChanged); + // + // ScenarioEntitySpecificallyPreventArtPointsCheckBox + // + this.ScenarioEntitySpecificallyPreventArtPointsCheckBox.AutoSize = true; + this.ScenarioEntitySpecificallyPreventArtPointsCheckBox.Location = new System.Drawing.Point(91, 84); + this.ScenarioEntitySpecificallyPreventArtPointsCheckBox.Name = "ScenarioEntitySpecificallyPreventArtPointsCheckBox"; + this.ScenarioEntitySpecificallyPreventArtPointsCheckBox.Size = new System.Drawing.Size(167, 17); + this.ScenarioEntitySpecificallyPreventArtPointsCheckBox.TabIndex = 13; + this.ScenarioEntitySpecificallyPreventArtPointsCheckBox.Text = "Specifically Prevent Art Points"; + this.ScenarioEntitySpecificallyPreventArtPointsCheckBox.UseVisualStyleBackColor = true; + this.ScenarioEntitySpecificallyPreventArtPointsCheckBox.CheckedChanged += new System.EventHandler(this.ScenarioEntitySpecificallyPreventArtPointsCheckBox_CheckedChanged); // // EditScenarioNodePanel // @@ -2609,8 +2581,6 @@ this.ScenarioEntityTabPage.ResumeLayout(false); this.ScenarioEntityPanel.ResumeLayout(false); this.ScenarioEntityPanel.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioEntityUnk2UpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioEntityUnk1UpDown)).EndInit(); this.ScenarioEntityPointTabPage.ResumeLayout(false); this.ScenarioEntityPointPanel.ResumeLayout(false); this.ScenarioEntityPointPanel.PerformLayout(); @@ -2697,10 +2667,6 @@ private System.Windows.Forms.Label label161; private System.Windows.Forms.ListBox ScenarioEntityPointsListBox; private System.Windows.Forms.Label ScenarioEntityInfoLabel; - private System.Windows.Forms.Label label114; - private System.Windows.Forms.NumericUpDown ScenarioEntityUnk2UpDown; - private System.Windows.Forms.Label label113; - private System.Windows.Forms.NumericUpDown ScenarioEntityUnk1UpDown; private System.Windows.Forms.Label ScenarioEntityTypeHashLabel; private System.Windows.Forms.TextBox ScenarioEntityTypeTextBox; private System.Windows.Forms.Label label112; @@ -2845,5 +2811,7 @@ private System.Windows.Forms.ComboBox ScenarioClusterPointTypeComboBox; private System.Windows.Forms.Label label155; private WinForms.QuaternionBox ScenarioEntityPointRotationQuatBox; + private System.Windows.Forms.CheckBox ScenarioEntityMayNotAlwaysExistCheckBox; + private System.Windows.Forms.CheckBox ScenarioEntitySpecificallyPreventArtPointsCheckBox; } } \ No newline at end of file diff --git a/CodeWalker/Project/Panels/EditScenarioNodePanel.cs b/CodeWalker/Project/Panels/EditScenarioNodePanel.cs index ac57436..dbb63a4 100644 --- a/CodeWalker/Project/Panels/EditScenarioNodePanel.cs +++ b/CodeWalker/Project/Panels/EditScenarioNodePanel.cs @@ -279,8 +279,8 @@ namespace CodeWalker.Project.Panels ScenarioEntityPositionTextBox.Text = ""; ScenarioEntityTypeTextBox.Text = ""; ScenarioEntityTypeHashLabel.Text = "Hash: 0"; - ScenarioEntityUnk1UpDown.Value = 0; - ScenarioEntityUnk2UpDown.Value = 0; + ScenarioEntityMayNotAlwaysExistCheckBox.Checked = false; + ScenarioEntitySpecificallyPreventArtPointsCheckBox.Checked = false; ScenarioEntityInfoLabel.Text = "0 override points"; ScenarioEntityPointsListBox.Items.Clear(); ScenarioEntityAddPointButton.Enabled = false; @@ -294,8 +294,8 @@ namespace CodeWalker.Project.Panels ScenarioEntityPositionTextBox.Text = FloatUtil.GetVector3String(e.Position); ScenarioEntityTypeTextBox.Text = e.TypeName.ToString(); ScenarioEntityTypeHashLabel.Text = "Hash: " + e.TypeName.Hash.ToString(); - ScenarioEntityUnk1UpDown.Value = e.Unk1; - ScenarioEntityUnk2UpDown.Value = e.Unk2; + ScenarioEntityMayNotAlwaysExistCheckBox.Checked = e.EntityMayNotAlwaysExist; + ScenarioEntitySpecificallyPreventArtPointsCheckBox.Checked = e.SpecificallyPreventArtPoints; var pc = e.ScenarioPoints?.Length ?? 0; ScenarioEntityInfoLabel.Text = pc.ToString() + " override point" + ((pc != 1) ? "s" : ""); ScenarioEntityPointsListBox.Items.Clear(); @@ -1157,33 +1157,33 @@ namespace CodeWalker.Project.Panels ProjectForm.ProjectExplorer?.UpdateScenarioNodeTreeNode(CurrentScenarioNode); } - private void ScenarioEntityUnk1UpDown_ValueChanged(object sender, EventArgs e) + private void ScenarioEntityMayNotAlwaysExistCheckBox_CheckedChanged(object sender, EventArgs e) { if (populatingui) return; if (CurrentScenarioNode == null) return; if (CurrentScenarioNode.Entity == null) return; - byte v = (byte)ScenarioEntityUnk1UpDown.Value; + bool v = ScenarioEntityMayNotAlwaysExistCheckBox.Checked; lock (ProjectForm.ProjectSyncRoot) { - if (CurrentScenarioNode.Entity.Unk1 != v) + if (CurrentScenarioNode.Entity.EntityMayNotAlwaysExist != v) { - CurrentScenarioNode.Entity.Unk1 = v; + CurrentScenarioNode.Entity.EntityMayNotAlwaysExist = v; ProjectForm.SetScenarioHasChanged(true); } } } - private void ScenarioEntityUnk2UpDown_ValueChanged(object sender, EventArgs e) + private void ScenarioEntitySpecificallyPreventArtPointsCheckBox_CheckedChanged(object sender, EventArgs e) { if (populatingui) return; if (CurrentScenarioNode == null) return; if (CurrentScenarioNode.Entity == null) return; - byte v = (byte)ScenarioEntityUnk2UpDown.Value; + bool v = ScenarioEntitySpecificallyPreventArtPointsCheckBox.Checked; lock (ProjectForm.ProjectSyncRoot) { - if (CurrentScenarioNode.Entity.Unk2 != v) + if (CurrentScenarioNode.Entity.SpecificallyPreventArtPoints != v) { - CurrentScenarioNode.Entity.Unk2 = v; + CurrentScenarioNode.Entity.SpecificallyPreventArtPoints = v; ProjectForm.SetScenarioHasChanged(true); } } @@ -2394,5 +2394,6 @@ namespace CodeWalker.Project.Panels } } } + } }