Skip to content

Commit 49f1eb2

Browse files
committed
AISpaceShipGlobals now works!
fixed some other minor little things...
1 parent e8cecb1 commit 49f1eb2

18 files changed

+596
-836
lines changed

MBINCompiler/MBINCompiler.csproj

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
<Compile Include="Models\Structs\GcAtlasDiscoveryMetadata.cs" />
5656
<Compile Include="Models\Structs\GcAtlasDiscoveryData.cs" />
5757
<Compile Include="Models\Structs\GcAtlasRecvVoxel.cs" />
58+
<Compile Include="Models\Structs\GcAtmosphereList.cs" />
5859
<Compile Include="Models\Structs\GcCreatureLegIKComponentData.cs" />
5960
<Compile Include="Models\Structs\GcGalaxyCameraData.cs" />
6061
<Compile Include="Models\Structs\GcInteractionBufferType.cs" />
@@ -70,6 +71,9 @@
7071
<Compile Include="Models\Structs\GcPersistentBBObjectData.cs" />
7172
<Compile Include="Models\Structs\GcPersistentBaseEntry.cs" />
7273
<Compile Include="Models\Structs\GcBaseBuildingTriggerAction.cs" />
74+
<Compile Include="Models\Structs\GcSolarSystemEventWarpPlayer.cs" />
75+
<Compile Include="Models\Structs\GcSolarSystemEventWarpOut.cs" />
76+
<Compile Include="Models\Structs\GcSolarSystemEventWarpIn.cs" />
7377
<Compile Include="Models\Structs\GcSpaceshipGlobals.cs" />
7478
<Compile Include="Models\Structs\GcTeleportEndpoint.cs" />
7579
<Compile Include="Models\Structs\GcBuildingDistribution.cs" />
@@ -664,7 +668,9 @@
664668
<Compile Include="Models\Structs\GcGalaxyStarAnomaly.cs" />
665669
<Compile Include="Models\Structs\GcCameraAerialViewData.cs" />
666670
<Compile Include="Models\Structs\Unused\GcPlayerSpaceshipAim.cs" />
667-
<Compile Include="Models\Structs\Unused\GcPlayerSpaceshipWarpData.cs" />
671+
<Compile Include="Models\Structs\GcPlayerSpaceshipWarpData.cs" />
672+
<Compile Include="Models\Structs\Unused\GcPlayerStickData.cs" />
673+
<Compile Include="Models\Structs\Unused\GcSpaceshipTravelData.cs" />
668674
<Compile Include="Models\Structs\VariableSizeString.cs" />
669675
<Compile Include="Models\Structs\Vector2f.cs" />
670676
<Compile Include="Models\Structs\Vector3i.cs" />

MBINCompiler/Models/NMSTemplate.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public static NMSTemplate DeserializeBinaryTemplate(BinaryReader reader, string
196196
NMSAttribute settings = field.GetCustomAttribute<NMSAttribute>();
197197
field.SetValue(obj, DeserializeValue(reader, field.FieldType, settings, templatePosition, field, obj));
198198
//Console.WriteLine("Gk Hack: " + templateName + " Deserialized Value: " + field.Name + " value: " + field.GetValue(obj));
199-
//Console.WriteLine($"{templateName} position: 0x{templatePosition:X}");
199+
//Console.WriteLine($"{templateName} position: 0x{reader.BaseStream.Position:X}");
200200
//using (System.IO.StreamWriter file =
201201
// new System.IO.StreamWriter(@"T:\mbincompiler_debug.txt", true))
202202
//{
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
using System.Collections.Generic;
2+
3+
namespace MBINCompiler.Models.Structs
4+
{
5+
public class GcAtmosphereList : NMSTemplate
6+
{
7+
public List<NMSString0x80> Atmospheres;
8+
}
9+
}
Lines changed: 39 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,44 @@
11
namespace MBINCompiler.Models.Structs
22
{
3-
public class GcShipAIAttackData : NMSTemplate
3+
public class GcShipAIAttackData : NMSTemplate // size: 0x98
44
{
5-
public float AttackWeaponRange;
6-
public float AttackAngle;
7-
public float AttackShootWaitTime;
8-
public float AttackShootTimeMin;
9-
public float AttackShootTimeMax;
10-
public float AttackReadyTime;
11-
public float AttackMaxTime;
12-
public float AttackApproachOffset;
13-
public float AttackApproachMinRange;
14-
public float AttackApproachMaxRange;
15-
public float AttackTooCloseRange;
16-
public float AttackFlybyOffset;
17-
public float AttackBoostTimeToRange;
18-
public float AttackBoostRange;
19-
public float AttackBoostAngle;
20-
public float AttackTurnMultiplier;
21-
public float AttackFacingAimReducer;
22-
public float AttackMaxPlanetHeight;
23-
public int NumHitsBeforeBail;
24-
public int NumHitsBeforeReposition;
25-
public float FleeBrake;
26-
public float FleeBoost;
27-
public float FleeBrakeTime;
28-
public float FleeRepositionTime;
29-
public float FleeRepositionAngleMin;
30-
public float FleeRepositionAngleMax;
31-
public float FleeRepositionBoostTime;
32-
public float FleeRange;
33-
public float FleeMinTime;
34-
public float FleeMaxTime;
35-
public float AttackTargetMinRange;
36-
public float AttackTargetMaxRange;
37-
public float AttackTargetOffsetMin;
38-
public float AttackTargetOffsetMax;
39-
public float AttackTargetSwitchTargetTime;
5+
/* 0x00 */ public float AttackWeaponRange;
6+
/* 0x04 */ public float AttackAngle;
7+
/* 0x08 */ public float AttackShootWaitTime;
8+
/* 0x0C */ public float AttackShootTimeMin;
9+
/* 0x10 */ public float AttackShootTimeMax;
10+
/* 0x14 */ public float AttackReadyTime;
11+
/* 0x18 */ public float AttackMaxTime;
12+
/* 0x1C */ public float AttackApproachOffset;
13+
/* 0x20 */ public float AttackApproachMinRange;
14+
/* 0x24 */ public float AttackApproachMaxRange;
15+
/* 0x28 */ public float AttackTooCloseRange;
16+
/* 0x2C */ public float AttackFlybyOffset;
17+
/* 0x30 */ public float AttackBoostTimeToRange;
18+
/* 0x34 */ public float AttackBoostRange;
19+
/* 0x38 */ public float AttackBoostAngle;
20+
/* 0x3C */ public float AttackTurnMultiplier;
21+
/* 0x40 */ public float AttackFacingAimReducer;
22+
/* 0x44 */ public float AttackMaxPlanetHeight;
23+
/* 0x48 */ public float AttackTurnMultiplierMax;
24+
/* 0x4C */ public float AttackTurnMaxMinTime;
25+
/* 0x50 */ public float AttackTurnMaxTimeRange;
26+
/* 0x54 */ public int NumHitsBeforeBail;
27+
/* 0x58 */ public int NumHitsBeforeReposition;
28+
/* 0x5C */ public float FleeBrake;
29+
/* 0x60 */ public float FleeBoost;
30+
/* 0x64 */ public float FleeBrakeTime;
31+
/* 0x68 */ public float FleeRepositionTime;
32+
/* 0x6C */ public float FleeRepositionAngleMin;
33+
/* 0x70 */ public float FleeRepositionAngleMax;
34+
/* 0x74 */ public float FleeRepositionBoostTime;
35+
/* 0x78 */ public float FleeRange;
36+
/* 0x7C */ public float FleeMinTime;
37+
/* 0x80 */ public float FleeMaxTime;
38+
/* 0x84 */ public float AttackTargetMinRange;
39+
/* 0x88 */ public float AttackTargetMaxRange;
40+
/* 0x8C */ public float AttackTargetOffsetMin;
41+
/* 0x90 */ public float AttackTargetOffsetMax;
42+
/* 0x94 */ public float AttackTargetSwitchTargetTime;
4043
}
4144
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
using System.Collections.Generic;
2+
3+
namespace MBINCompiler.Models.Structs
4+
{
5+
public class GcSolarSystemEventWarpIn : NMSTemplate
6+
{
7+
/* 0x00 */ public GcSolarSystemLocatorChoice Locator;
8+
/* 0x2C */ public float Time;
9+
/* 0x30 */ public int Repeat;
10+
/* 0x34 */ public Vector2f RepeatIntervalRange;
11+
/* 0x3C */ public bool InvertDirection;
12+
/* 0x3D */ public bool InstantWarpIn;
13+
[NMS(Size = 0x20)]
14+
/* 0x3E */ public string SquadName;
15+
[NMS(Size = 0x2, Ignore = true)]
16+
/* 0x60 */ public GcSeed Seed;
17+
/* 0x70 */ public GcRealityCommonFactions Faction;
18+
/* 0x74 */ public GcAISpaceshipRoles ShipRole;
19+
/* 0x78 */ public List<int> ShipChoiceSequence; // maybe float list.
20+
/* 0x88 */ public Vector2f ShipCountRange;
21+
/* 0x90 */ public Vector2f WarpIntervalRange;
22+
/* 0x98 */ public Vector2f SpeedRange;
23+
}
24+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using System.Collections.Generic;
2+
3+
namespace MBINCompiler.Models.Structs
4+
{
5+
public class GcSolarSystemEventWarpOut : NMSTemplate
6+
{
7+
/* 0x00 */ public float Time;
8+
[NMS(Size = 0x20)]
9+
/* 0x04 */ public string SquadName;
10+
/* 0x24 */ public Vector2f WarpIntervalRange;
11+
}
12+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using System.Collections.Generic;
2+
3+
namespace MBINCompiler.Models.Structs
4+
{
5+
public class GcSolarSystemEventWarpPlayer : NMSTemplate
6+
{
7+
/* 0x00 */ public GcSolarSystemLocatorChoice Locator;
8+
/* 0x2C */ public float Time;
9+
}
10+
}

0 commit comments

Comments
 (0)