0.513.0.5130420 + UniqueId

Caught up with latest API changes and implemented UniqueId.
This commit is contained in:
Max 2022-02-10 15:22:44 -06:00
parent c4f0953858
commit 034799a4de
9 changed files with 856 additions and 258 deletions

View File

@ -652,6 +652,16 @@ namespace RobloxFiles.BinaryFormat.Chunks
break; break;
} }
case PropertyType.UniqueId:
{
readProperties(i =>
{
var buffer = reader.ReadBytes(16);
return new Guid(buffer);
});
break;
}
default: default:
{ {
RobloxFile.LogError($"Unhandled property type: {Type} in {this}!"); RobloxFile.LogError($"Unhandled property type: {Type} in {this}!");
@ -1262,6 +1272,17 @@ namespace RobloxFiles.BinaryFormat.Chunks
break; break;
} }
case PropertyType.UniqueId:
{
props.ForEach(prop =>
{
var guid = prop.CastValue<Guid>();
byte[] buffer = guid.ToByteArray();
writer.Write(buffer);
});
break;
}
default: default:
{ {
RobloxFile.LogError($"Unhandled property type: {Type} in {this}!"); RobloxFile.LogError($"Unhandled property type: {Type} in {this}!");

View File

@ -1,5 +1,5 @@
// Auto-generated list of creatable Roblox classes. // Auto-generated list of creatable Roblox classes.
// Updated as of 0.504.0.5040410 // Updated as of 0.513.0.5130420
using System; using System;
@ -88,6 +88,22 @@ namespace RobloxFiles
{ {
} }
public class AnimationFromVideoCreatorService : Instance
{
public AnimationFromVideoCreatorService()
{
IsService = true;
}
}
public class AnimationFromVideoCreatorStudioService : Instance
{
public AnimationFromVideoCreatorStudioService()
{
IsService = true;
}
}
public class AnimationRigData : Instance public class AnimationRigData : Instance
{ {
} }
@ -104,6 +120,14 @@ namespace RobloxFiles
} }
} }
public class AssetCounterService : Instance
{
public AssetCounterService()
{
IsService = true;
}
}
public class AssetImportService : Instance public class AssetImportService : Instance
{ {
public AssetImportService() public AssetImportService()
@ -235,6 +259,7 @@ namespace RobloxFiles
{ {
public Content CageMeshId = ""; public Content CageMeshId = "";
public CFrame CageOrigin = new CFrame(); public CFrame CageOrigin = new CFrame();
public Content HSRAssetId = "";
public CFrame ImportOrigin = new CFrame(); public CFrame ImportOrigin = new CFrame();
} }
@ -732,7 +757,6 @@ namespace RobloxFiles
public class RigidConstraint : Constraint public class RigidConstraint : Constraint
{ {
public bool Broken;
public bool DestructionEnabled; public bool DestructionEnabled;
public float DestructionForce = float.MaxValue; public float DestructionForce = float.MaxValue;
public float DestructionTorque = float.MaxValue; public float DestructionTorque = float.MaxValue;
@ -1072,6 +1096,7 @@ namespace RobloxFiles
public float DestroyJointRadiusPercent = 1; public float DestroyJointRadiusPercent = 1;
public ExplosionType ExplosionType = ExplosionType.Craters; public ExplosionType ExplosionType = ExplosionType.Craters;
public Vector3 Position = new Vector3(); public Vector3 Position = new Vector3();
public float TimeScale = 1;
public bool Visible = true; public bool Visible = true;
} }
@ -1142,6 +1167,7 @@ namespace RobloxFiles
set => size_xml = value; set => size_xml = value;
} }
public float TimeScale = 1;
public float heat_xml = 9; public float heat_xml = 9;
[Obsolete] [Obsolete]
@ -1219,6 +1245,8 @@ namespace RobloxFiles
{ {
IsService = true; IsService = true;
} }
public bool GamepadCursorEnabled;
} }
public class Geometry : Instance public class Geometry : Instance
@ -1311,7 +1339,7 @@ namespace RobloxFiles
public class CanvasGroup : GuiObject public class CanvasGroup : GuiObject
{ {
public Color3 GroupColor = new Color3(1, 1, 1); public Color3 GroupColor = new Color3(1, 1, 1);
public float Transparency; public float GroupTransparency;
} }
public class Frame : GuiObject public class Frame : GuiObject
@ -1804,8 +1832,13 @@ namespace RobloxFiles
} }
} }
public class HiddenSurfaceRemovalAsset : Instance
{
}
public class Highlight : Instance public class Highlight : Instance
{ {
public Instance Adornee;
public HighlightDepthMode DepthMode = HighlightDepthMode.AlwaysOnTop; public HighlightDepthMode DepthMode = HighlightDepthMode.AlwaysOnTop;
public bool Enabled = true; public bool Enabled = true;
public Color3 FillColor = new Color3(1, 0, 0); public Color3 FillColor = new Color3(1, 0, 0);
@ -2065,6 +2098,14 @@ namespace RobloxFiles
} }
} }
public class LSPService : Instance
{
public LSPService()
{
IsService = true;
}
}
public class LanguageService : Instance public class LanguageService : Instance
{ {
public LanguageService() public LanguageService()
@ -2262,6 +2303,28 @@ namespace RobloxFiles
public MaterialVariant Sand; public MaterialVariant Sand;
public MaterialVariant Slate; public MaterialVariant Slate;
public MaterialVariant SmoothPlastic; public MaterialVariant SmoothPlastic;
public MaterialVariant TerrainAsphalt;
public MaterialVariant TerrainBasalt;
public MaterialVariant TerrainBrick;
public MaterialVariant TerrainCobblestone;
public MaterialVariant TerrainConcrete;
public MaterialVariant TerrainCrackedLava;
public MaterialVariant TerrainGlacier;
public MaterialVariant TerrainGrass;
public MaterialVariant TerrainGround;
public MaterialVariant TerrainIce;
public MaterialVariant TerrainLeafyGrass;
public MaterialVariant TerrainLimestone;
public MaterialVariant TerrainMud;
public MaterialVariant TerrainPavement;
public MaterialVariant TerrainRock;
public MaterialVariant TerrainSalt;
public MaterialVariant TerrainSand;
public MaterialVariant TerrainSandstone;
public MaterialVariant TerrainSlate;
public MaterialVariant TerrainSnow;
public MaterialVariant TerrainWoodPlanks;
public bool Use2022Materials;
public MaterialVariant Wood; public MaterialVariant Wood;
public MaterialVariant WoodPlanks; public MaterialVariant WoodPlanks;
} }
@ -2270,6 +2333,7 @@ namespace RobloxFiles
{ {
public Material BaseMaterial = Material.Plastic; public Material BaseMaterial = Material.Plastic;
public Content ColorMap = ""; public Content ColorMap = "";
public MaterialPattern MaterialPattern = MaterialPattern.Regular;
public Content MetalnessMap = ""; public Content MetalnessMap = "";
public Content NormalMap = ""; public Content NormalMap = "";
public Content RoughnessMap = ""; public Content RoughnessMap = "";
@ -2679,11 +2743,13 @@ namespace RobloxFiles
public double DistributedGameTime; public double DistributedGameTime;
public bool ExplicitAutoJoints = true; public bool ExplicitAutoJoints = true;
public float FallenPartsDestroyHeight = -500; public float FallenPartsDestroyHeight = -500;
public Vector3 GlobalWind = new Vector3();
public float Gravity = 196.2f; public float Gravity = 196.2f;
public HumanoidOnlySetCollisionsOnStateChange HumanoidOnlySetCollisionsOnStateChange = HumanoidOnlySetCollisionsOnStateChange.Default; public HumanoidOnlySetCollisionsOnStateChange HumanoidOnlySetCollisionsOnStateChange = HumanoidOnlySetCollisionsOnStateChange.Default;
public InterpolationThrottlingMode InterpolationThrottling = InterpolationThrottlingMode.Default; public InterpolationThrottlingMode InterpolationThrottling = InterpolationThrottlingMode.Default;
public MeshPartHeadsAndAccessories MeshPartHeadsAndAccessories = MeshPartHeadsAndAccessories.Default; public MeshPartHeadsAndAccessories MeshPartHeadsAndAccessories = MeshPartHeadsAndAccessories.Default;
public PhysicsSteppingMethod PhysicsSteppingMethod = PhysicsSteppingMethod.Default; public PhysicsSteppingMethod PhysicsSteppingMethod = PhysicsSteppingMethod.Default;
public ReplicateInstanceDestroySetting ReplicateInstanceDestroySetting = ReplicateInstanceDestroySetting.Default;
public AnimatorRetargetingMode Retargeting = AnimatorRetargetingMode.Default; public AnimatorRetargetingMode Retargeting = AnimatorRetargetingMode.Default;
public SignalBehavior SignalBehavior = SignalBehavior.Default; public SignalBehavior SignalBehavior = SignalBehavior.Default;
public StreamOutBehavior StreamOutBehavior = StreamOutBehavior.Default; public StreamOutBehavior StreamOutBehavior = StreamOutBehavior.Default;
@ -2736,6 +2802,11 @@ namespace RobloxFiles
public float Drag; public float Drag;
public NormalId EmissionDirection = NormalId.Top; public NormalId EmissionDirection = NormalId.Top;
public bool Enabled = true; public bool Enabled = true;
public NumberRange FlipbookFramerate = new NumberRange(1);
public string FlipbookIncompatible = "Particle texture must be 1024 by 1024 to use flipbooks.";
public ParticleFlipbookLayout FlipbookLayout = ParticleFlipbookLayout.None;
public ParticleFlipbookMode FlipbookMode = ParticleFlipbookMode.Loop;
public bool FlipbookStartRandom;
public NumberRange Lifetime = new NumberRange(5, 10); public NumberRange Lifetime = new NumberRange(5, 10);
public float LightEmission; public float LightEmission;
public float LightInfluence; public float LightInfluence;
@ -2772,12 +2843,12 @@ namespace RobloxFiles
public Attachment Attachment0; public Attachment Attachment0;
public Attachment Attachment1; public Attachment Attachment1;
public bool IsBidirectional = true; public bool IsBidirectional = true;
public string ModifierId = ""; public string Label = "";
} }
public class PathfindingModifier : Instance public class PathfindingModifier : Instance
{ {
public string ModifierId = ""; public string Label = "";
public bool PassThrough; public bool PassThrough;
} }
@ -3249,6 +3320,7 @@ namespace RobloxFiles
set => size_xml = value; set => size_xml = value;
} }
public float TimeScale = 1;
public float opacity_xml = 0.5f; public float opacity_xml = 0.5f;
public float riseVelocity_xml = 1; public float riseVelocity_xml = 1;
public float size_xml = 1; public float size_xml = 1;
@ -3409,6 +3481,7 @@ namespace RobloxFiles
public bool Enabled = true; public bool Enabled = true;
public Color3 SparkleColor = Color3.FromRGB(144, 25, 255); public Color3 SparkleColor = Color3.FromRGB(144, 25, 255);
public float TimeScale = 1;
} }
public class SpawnerService : Instance public class SpawnerService : Instance
@ -3485,6 +3558,7 @@ namespace RobloxFiles
public NumberRange GameSettingsScaleRangeWidth = new NumberRange(0.7f, 1); public NumberRange GameSettingsScaleRangeWidth = new NumberRange(0.7f, 1);
public float HealthDisplayDistance = 100; public float HealthDisplayDistance = 100;
public bool LoadCharacterAppearance = true; public bool LoadCharacterAppearance = true;
public LoadCharacterLayeredClothing LoadCharacterLayeredClothing = LoadCharacterLayeredClothing.Default;
public float NameDisplayDistance = 100; public float NameDisplayDistance = 100;
public bool UserEmotesEnabled = true; public bool UserEmotesEnabled = true;
} }
@ -3537,6 +3611,22 @@ namespace RobloxFiles
} }
} }
public class StudioHighDpiService : Instance
{
public StudioHighDpiService()
{
IsService = true;
}
}
public class StudioPublishService : Instance
{
public StudioPublishService()
{
IsService = true;
}
}
public class StudioService : Instance public class StudioService : Instance
{ {
public StudioService() public StudioService()
@ -3628,10 +3718,22 @@ namespace RobloxFiles
public double Timeout = 10; public double Timeout = 10;
} }
public class TextBoxService : Instance
{
public TextBoxService()
{
IsService = true;
}
}
public class TextChannel : Instance public class TextChannel : Instance
{ {
} }
public class TextChatMessageProperties : Instance
{
}
public class TextChatService : Instance public class TextChatService : Instance
{ {
public TextChatService() public TextChatService()
@ -4033,6 +4135,8 @@ namespace RobloxFiles
{ {
IsService = true; IsService = true;
} }
public bool GenerateDefaultChannel = true;
} }
public class WeldConstraint : Instance public class WeldConstraint : Instance

View File

@ -1,5 +1,5 @@
// Auto-generated list of Roblox enums. // Auto-generated list of Roblox enums.
// Updated as of 0.504.0.5040410 // Updated as of 0.513.0.5130420
namespace RobloxFiles.Enums namespace RobloxFiles.Enums
{ {
@ -380,7 +380,7 @@ namespace RobloxFiles.Enums
public enum HighlightDepthMode public enum HighlightDepthMode
{ {
AlwaysOnTop, AlwaysOnTop,
Default Occluded
} }
public enum HorizontalAlignment public enum HorizontalAlignment
@ -723,6 +723,13 @@ namespace RobloxFiles.Enums
Miter Miter
} }
public enum LoadCharacterLayeredClothing
{
Default,
Disabled,
Enabled
}
public enum Material public enum Material
{ {
Plastic = 256, Plastic = 256,
@ -764,6 +771,12 @@ namespace RobloxFiles.Enums
Water = 2048 Water = 2048
} }
public enum MaterialPattern
{
Regular,
Organic
}
public enum MeshPartHeadsAndAccessories public enum MeshPartHeadsAndAccessories
{ {
Default, Default,
@ -859,6 +872,22 @@ namespace RobloxFiles.Enums
Surface Surface
} }
public enum ParticleFlipbookLayout
{
None,
TwoByTwo,
FourByFour,
EightByEight
}
public enum ParticleFlipbookMode
{
Loop,
OneShot,
PingPong,
Random
}
public enum ParticleOrientation public enum ParticleOrientation
{ {
FacingCamera, FacingCamera,
@ -928,6 +957,13 @@ namespace RobloxFiles.Enums
diff diff
} }
public enum ReplicateInstanceDestroySetting
{
Default,
Disabled,
Enabled
}
public enum ResamplerMode public enum ResamplerMode
{ {
Default, Default,

View File

@ -5,7 +5,7 @@
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{19400E0B-6CA3-4171-9644-657E9858275C}</ProjectGuid> <ProjectGuid>{CF50C0E2-23A7-4DC1-B4B2-E60CDE716253}</ProjectGuid>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>RobloxFiles</RootNamespace> <RootNamespace>RobloxFiles</RootNamespace>
@ -129,6 +129,7 @@
<Compile Include="Tokens\String.cs" /> <Compile Include="Tokens\String.cs" />
<Compile Include="Tokens\UDim.cs" /> <Compile Include="Tokens\UDim.cs" />
<Compile Include="Tokens\UDim2.cs" /> <Compile Include="Tokens\UDim2.cs" />
<Compile Include="Tokens\UniqueId.cs" />
<Compile Include="Tokens\Vector2.cs" /> <Compile Include="Tokens\Vector2.cs" />
<Compile Include="Tokens\Vector3.cs" /> <Compile Include="Tokens\Vector3.cs" />
<Compile Include="Tokens\Vector3int16.cs" /> <Compile Include="Tokens\Vector3int16.cs" />

29
Tokens/UniqueId.cs Normal file
View File

@ -0,0 +1,29 @@
using System;
using System.Xml;
namespace RobloxFiles.Tokens
{
public class UniqueId : IXmlPropertyToken
{
public string XmlPropertyToken => "UniqueId";
public bool ReadProperty(Property prop, XmlNode token)
{
string hex = token.InnerText;
if (Guid.TryParse(hex, out var guid))
{
prop.Value = guid;
return true;
}
return false;
}
public void WriteProperty(Property prop, XmlDocument doc, XmlNode node)
{
var guid = prop.CastValue<Guid>();
node.InnerText = guid.ToString("N");
}
}
}

View File

@ -42,11 +42,14 @@ namespace RobloxFiles
/// <summary>The source AssetId this instance was created in.</summary> /// <summary>The source AssetId this instance was created in.</summary>
public long SourceAssetId = -1; public long SourceAssetId = -1;
/// <summary>A unique identifier declared for this instance.</summary>
public Guid UniqueId = Guid.NewGuid();
/// <summary>The name of this Instance, if a Name property is defined.</summary> /// <summary>The name of this Instance, if a Name property is defined.</summary>
public override string ToString() => Name; public override string ToString() => Name;
/// <summary>A unique identifier for this instance when being serialized.</summary> /// <summary>A context-dependent unique identifier for this instance when being serialized.</summary>
public string Referent { get; set; } public string Referent { get; set; }
/// <summary>Indicates whether the parent of this object is locked.</summary> /// <summary>Indicates whether the parent of this object is locked.</summary>

View File

@ -40,7 +40,8 @@ namespace RobloxFiles
Int64, Int64,
SharedString, SharedString,
ProtectedString, ProtectedString,
OptionalCFrame OptionalCFrame,
UniqueId
} }
public class Property public class Property

Binary file not shown.

File diff suppressed because it is too large Load Diff