Skip to content

Commit cb668c9

Browse files
committed
Update for 14109135
1 parent b48a6b9 commit cb668c9

File tree

1,244 files changed

+18091
-18088
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,244 files changed

+18091
-18088
lines changed

Tools/auto_extract/extractor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ def __init__(self, data: bytes, nms_mem):
258258
self._field_name_is_duplicate = False
259259
self.field_size = struct.unpack_from('<I', data, offset=0x24)[0]
260260
self._array_size = struct.unpack_from('<I', data, offset=0x28)[0]
261-
self._field_offset = struct.unpack_from('<I', data, offset=0x2C)[0]
261+
self._field_offset = int(struct.unpack_from('<I', data, offset=0x2C)[0])
262262

263263
# Sort out the requirements for this field.
264264
self.required_using: set = set()
@@ -533,6 +533,7 @@ def add_fields(self, fields: list[Field]):
533533
# This is a little hacky and could be done a bit better but this does
534534
# work...
535535
self.fields = fields
536+
self.fields.sort(key=lambda x: x._field_offset)
536537
max_offset_width = 1
537538
# For each field find if it requires something and add it to the
538539
# required usings.

Tools/auto_extract/templates/default/static_templates/TkAnimNodeFrameData.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ namespace libMBIN.NMS.Toolkit
1010
[NMS(GUID = 0xC4C8B7669C8C9D44, NameHash = 0x270204EDCEE4DB62)]
1111
public class TkAnimNodeFrameData : NMSTemplate
1212
{
13-
/* 0x00 */ public List<Quaternion> Rotations;
14-
/* 0x10 */ public List<Vector3f> Translations;
15-
/* 0x20 */ public List<Vector3f> Scales;
13+
/* 0x00 */ public List<ushort> Rotations;
14+
/* 0x10 */ public List<Vector3f> Scales;
15+
/* 0x20 */ public List<Vector3f> Translations;
1616

1717

1818
public override object CustomDeserialize(BinaryReader reader, Type field, NMSAttribute settings, FieldInfo fieldInfo) {

Tools/auto_extract/templates/default/static_templates/TkAnimNodeFrameHalfData.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ namespace libMBIN.NMS.Toolkit
1111
public class TkAnimNodeFrameHalfData : NMSTemplate
1212
{
1313
/* 0x00 */ public List<Quaternion> Rotations;
14-
/* 0x10 */ public List<Vector3f> Translations;
15-
/* 0x20 */ public List<Vector3f> Scales;
14+
/* 0x10 */ public List<Vector3f> Scales;
15+
/* 0x20 */ public List<Vector3f> Translations;
1616

1717
public override object CustomDeserialize(BinaryReader reader, Type field, NMSAttribute settings, FieldInfo fieldInfo) {
1818
var fieldName = fieldInfo.Name;

Tools/auto_extract/templates/default/static_templates/TkGeometryData.cs

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,27 @@ namespace libMBIN.NMS.Toolkit
99
[NMS(GUID = 0x3705D946A3B218D4, NameHash = 0xA74EA06001E7577E)]
1010
public class TkGeometryData : NMSTemplate
1111
{
12-
/* 0x000 */ public int VertexCount;
13-
/* 0x004 */ public int IndexCount;
14-
/* 0x008 */ public int Indices16Bit;
15-
/* 0x00C */ public int CollisionIndexCount;
16-
/* 0x010 */ public List<TkJointBindingData> JointBindings;
17-
/* 0x020 */ public List<TkJointExtentData> JointExtents;
18-
/* 0x030 */ public List<int> JointMirrorPairs;
19-
/* 0x040 */ public List<TkJointMirrorAxis> JointMirrorAxes;
20-
/* 0x050 */ public List<int> SkinMatrixLayout;
21-
/* 0x060 */ public List<int> MeshVertRStart;
22-
/* 0x070 */ public List<int> MeshVertREnd;
23-
/* 0x080 */ public List<int> BoundHullVertSt;
24-
/* 0x090 */ public List<int> BoundHullVertEd;
25-
/* 0x0A0 */ public List<int> MeshBaseSkinMat;
26-
/* 0x0B0 */ public List<Vector4f> MeshAABBMin;
12+
/* 0x000 */ public TkVertexLayout SmallVertexLayout;
13+
/* 0x020 */ public TkVertexLayout VertexLayout;
14+
/* 0x040 */ public List<int> BoundHullVertEd;
15+
/* 0x050 */ public List<Vector4f> BoundHullVerts;
16+
/* 0x060 */ public List<int> BoundHullVertSt;
17+
/* 0x070 */ public List<int> IndexBuffer;
18+
/* 0x080 */ public List<TkJointBindingData> JointBindings;
19+
/* 0x090 */ public List<TkJointExtentData> JointExtents;
20+
/* 0x0A0 */ public List<TkJointMirrorAxis> JointMirrorAxes;
21+
/* 0x0B0 */ public List<int> JointMirrorPairs;
2722
/* 0x0C0 */ public List<Vector4f> MeshAABBMax;
28-
/* 0x0D0 */ public List<Vector4f> BoundHullVerts;
29-
/* 0x0E0 */ public TkVertexLayout VertexLayout;
30-
/* 0x100 */ public TkVertexLayout SmallVertexLayout;
31-
/* 0x120 */ public List<int> IndexBuffer;
32-
/* 0x130 */ public List<TkMeshMetaData> StreamMetaDataArray;
23+
/* 0x0D0 */ public List<Vector4f> MeshAABBMin;
24+
/* 0x0E0 */ public List<int> MeshBaseSkinMat;
25+
/* 0x0F0 */ public List<int> MeshVertREnd;
26+
/* 0x100 */ public List<int> MeshVertRStart;
27+
/* 0x110 */ public List<int> SkinMatrixLayout;
28+
/* 0x120 */ public List<TkMeshMetaData> StreamMetaDataArray;
29+
/* 0x130 */ public int CollisionIndexCount;
30+
/* 0x134 */ public int IndexCount;
31+
/* 0x138 */ public int Indices16Bit;
32+
/* 0x13C */ public int VertexCount;
3333

3434
// TODO: add the list ending to this??
3535
public override bool CustomSerialize(BinaryWriter writer, Type field, object fieldData, NMSAttribute settings, FieldInfo fieldInfo, ref List<Tuple<long, object>> additionalData, ref int addtDataIndex) {

Tools/auto_extract/templates/default/static_templates/TkMeshData.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ namespace libMBIN.NMS.Toolkit
1111
[NMS(GUID = 0xD3AC8F6F7A4D55FC, NameHash = 0xF671716161E708E3)]
1212
public class TkMeshData : NMSTemplate
1313
{
14+
/* 0x00 */ public byte[] MeshDataStream;
15+
/* 0x10 */ public ulong Hash;
16+
/* 0x18 */ public int IndexDataSize;
17+
/* 0x1C */ public int VertexDataSize;
1418
[NMS(Size = 0x80, Padding = 0xFE)]
15-
/* 0x00 */ public string IdString;
16-
/* 0x80 */ public ulong Hash;
17-
/* 0x88 */ public int VertexDataSize;
18-
/* 0x8C */ public int IndexDataSize;
19-
/* 0x90 */ public byte[] MeshDataStream;
19+
/* 0x20 */ public NMSString0x80 IdString;
2020

2121
public override object CustomDeserialize( BinaryReader reader, Type field, NMSAttribute settings, FieldInfo fieldInfo ) {
2222
var fieldName = fieldInfo.Name;

Tools/auto_extract/templates/default/static_templates/TkSceneNodeData.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ namespace libMBIN.NMS.Toolkit
1010
[NMS(GUID = 0x1DCCBBEBB4547EB4, NameHash = 0x2C1B6B0E807F7193)]
1111
public class TkSceneNodeData : NMSTemplate
1212
{
13-
/* 0x00 */ public NMSString0x80 Name;
14-
/* 0x80 */ public uint NameHash;
15-
/* 0x88 */ public NMSString0x10 Type;
16-
/* 0x98 */ public TkTransformData Transform;
17-
/* 0xC0 */ public List<TkSceneNodeAttributeData> Attributes;
18-
/* 0xD0 */ public List<TkSceneNodeData> Children;
13+
/* 0x00 */ public List<TkSceneNodeAttributeData> Attributes;
14+
/* 0x10 */ public List<TkSceneNodeData> Children;
15+
/* 0x20 */ public NMSString0x10 Type;
16+
/* 0x30 */ public TkTransformData Transform;
17+
/* 0x54 */ public uint NameHash;
18+
/* 0x58 */ public NMSString0x80 Name;
1919

2020
public override object CustomDeserialize( BinaryReader reader, Type field, NMSAttribute settings, FieldInfo fieldInfo ) {
2121
var fieldName = fieldInfo.Name;

libMBIN/Source/NMS/GameComponents/AxisSpecification.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ namespace libMBIN.NMS.GameComponents
33
[NMS(GUID = 0xE064B06A0D53FBE6, NameHash = 0xE46A33ECA1AA62F7)]
44
public class AxisSpecification : NMSTemplate
55
{
6+
/* 0x00 */ public Vector3f CustomAxis;
67
// size: 0x7
78
public enum AxisEnum : uint {
89
X,
@@ -13,7 +14,6 @@ public enum AxisEnum : uint {
1314
NegativeZ,
1415
CustomAxis,
1516
}
16-
/* 0x00 */ public AxisEnum Axis;
17-
/* 0x10 */ public Vector3f CustomAxis;
17+
/* 0x10 */ public AxisEnum Axis;
1818
}
1919
}

libMBIN/Source/NMS/GameComponents/GcAIShipDebugSpawnData.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ namespace libMBIN.NMS.GameComponents
33
[NMS(GUID = 0xD616A0433497617, NameHash = 0xDFA8A7A9DD3ACC08)]
44
public class GcAIShipDebugSpawnData : NMSTemplate
55
{
6-
/* 0x00 */ public Vector3f Position;
7-
/* 0x10 */ public Vector3f Facing;
8-
/* 0x20 */ public Vector3f Up;
9-
/* 0x30 */ public Vector3f FlightDir;
10-
/* 0x40 */ public float Speed;
11-
/* 0x44 */ public float IgnitionDelay;
12-
/* 0x48 */ public float TakeOffDelay;
13-
/* 0x4C */ public float HoverTime;
6+
/* 0x00 */ public Vector3f Facing;
7+
/* 0x10 */ public Vector3f FlightDir;
8+
/* 0x20 */ public Vector3f Position;
9+
/* 0x30 */ public Vector3f Up;
10+
/* 0x40 */ public GcSeed Seed;
1411
/* 0x50 */ public float HoverHeight;
15-
/* 0x54 */ public float WarpOutTime;
16-
/* 0x58 */ public bool Wingman;
17-
/* 0x59 */ public NMSString0x80 SpecificModel;
18-
/* 0xE0 */ public GcSeed Seed;
12+
/* 0x54 */ public float HoverTime;
13+
/* 0x58 */ public float IgnitionDelay;
14+
/* 0x5C */ public float Speed;
15+
/* 0x60 */ public float TakeOffDelay;
16+
/* 0x64 */ public float WarpOutTime;
17+
/* 0x68 */ public NMSString0x80 SpecificModel;
18+
/* 0xE8 */ public bool Wingman;
1919
}
2020
}

libMBIN/Source/NMS/GameComponents/GcAIShipSpawnData.cs

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,31 @@ namespace libMBIN.NMS.GameComponents
77
[NMS(GUID = 0xBEFE1C3015A6B9AA, NameHash = 0x35C91009067A6431)]
88
public class GcAIShipSpawnData : NMSTemplate
99
{
10-
/* 0x000 */ public NMSString0x20A Message;
11-
/* 0x020 */ public NMSString0x20A CombatMessage;
12-
/* 0x040 */ public NMSString0x20A OSDMessage;
13-
/* 0x060 */ public TkInputEnum Shortcut;
14-
/* 0x064 */ public bool WarpIn;
15-
/* 0x068 */ public GcAISpaceshipRoles Role;
16-
/* 0x06C */ public float MinRange;
17-
/* 0x070 */ public Vector2f Scale;
18-
/* 0x078 */ public NMSString0x10 Reward;
19-
/* 0x088 */ public NMSString0x20A RewardMessage;
20-
/* 0x0A8 */ public GcAIShipSpawnMarkerData MarkerData;
21-
/* 0x168 */ public bool AttackFreighter;
22-
/* 0x170 */ public NMSString0x10 AttackDefinition;
23-
/* 0x180 */ public Vector2f Spread;
24-
/* 0x190 */ public Vector3f OffsetSphereOffset;
25-
/* 0x1A0 */ public Vector2f Count;
26-
/* 0x1A8 */ public Vector2f StartTime;
10+
/* 0x000 */ public Vector3f OffsetSphereOffset;
11+
/* 0x010 */ public GcAIShipSpawnMarkerData MarkerData;
12+
/* 0x0C8 */ public NMSString0x20A CombatMessage;
13+
/* 0x0E8 */ public NMSString0x20A Message;
14+
/* 0x108 */ public NMSString0x20A OSDMessage;
15+
/* 0x128 */ public NMSString0x20A RewardMessage;
16+
/* 0x148 */ public NMSString0x10 AttackDefinition;
17+
/* 0x158 */ public List<GcAIShipSpawnData> ChildSpawns;
18+
/* 0x168 */ public GcShipAIPerformanceArray Performances;
19+
/* 0x178 */ public NMSString0x10 Reward;
20+
/* 0x188 */ public Vector2f Count;
21+
/* 0x190 */ public Vector2f Scale;
22+
/* 0x198 */ public Vector2f Spread;
23+
/* 0x1A0 */ public Vector2f StartTime;
24+
/* 0x1A8 */ public float MinRange;
25+
/* 0x1AC */ public GcAISpaceshipRoles Role;
26+
/* 0x1B0 */ public TkInputEnum Shortcut;
2727
// size: 0x3
2828
public enum SpawnShapeEnum : uint {
2929
Sphere,
3030
Cone,
3131
OffsetSphere,
3232
}
33-
/* 0x1B0 */ public SpawnShapeEnum SpawnShape;
34-
/* 0x1B8 */ public GcShipAIPerformanceArray Performances;
35-
/* 0x1C8 */ public List<GcAIShipSpawnData> ChildSpawns;
33+
/* 0x1B4 */ public SpawnShapeEnum SpawnShape;
34+
/* 0x1B8 */ public bool AttackFreighter;
35+
/* 0x1B9 */ public bool WarpIn;
3636
}
3737
}

libMBIN/Source/NMS/GameComponents/GcAIShipSpawnMarkerData.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ namespace libMBIN.NMS.GameComponents
55
[NMS(GUID = 0x103B4E1E1547DE0E, NameHash = 0xDB40771B3EB38336)]
66
public class GcAIShipSpawnMarkerData : NMSTemplate
77
{
8-
/* 0x00 */ public TkTextureResource MarkerIcon;
9-
/* 0x88 */ public NMSString0x20A MarkerLabel;
10-
/* 0xA8 */ public bool HideDuringCombat;
8+
/* 0x00 */ public NMSString0x20A MarkerLabel;
9+
/* 0x20 */ public TkTextureResource MarkerIcon;
10+
/* 0xA4 */ public float MaxVisibleRange;
11+
/* 0xA8 */ public float MinAngleVisible;
1112
/* 0xAC */ public float MinVisibleRange;
12-
/* 0xB0 */ public float MaxVisibleRange;
13-
/* 0xB4 */ public float MinAngleVisible;
1413
// size: 0x3
1514
public enum ShipsToMarkEnum : uint {
1615
None,
1716
Leader,
1817
All,
1918
}
20-
/* 0xB8 */ public ShipsToMarkEnum ShipsToMark;
19+
/* 0xB0 */ public ShipsToMarkEnum ShipsToMark;
20+
/* 0xB4 */ public bool HideDuringCombat;
2121
}
2222
}

0 commit comments

Comments
 (0)