Small Improvements to Dumpers & Saveinstance

This commit is contained in:
phoriah
2024-05-22 23:33:40 +02:00
parent 1d744d33e6
commit 976fcb1121
9 changed files with 261 additions and 54 deletions

View File

@@ -1,51 +1,84 @@
AudioDeviceInput.Player {Player}
AudioDeviceOutput.Player {Player}
CoreGui.SelectionImageObject {GuiObject}
PlayerGui.SelectionImageObject {GuiObject}
Beam.Attachment0 {Attachment}
Beam.Attachment1 {Attachment}
RocketPropulsion.Target {BasePart}
Constraint.Attachment0 {Attachment}
Constraint.Attachment1 {Attachment}
ControllerManager.ActiveController {ControllerBase}
ControllerManager.ClimbSensor {ControllerSensor}
ControllerManager.GroundSensor {ControllerSensor}
ControllerManager.RootPart {BasePart}
GuiBase2d.RootLocalizationTable {LocalizationTable}
GuiObject.NextSelectionDown {GuiObject}
GuiObject.NextSelectionLeft {GuiObject}
GuiObject.NextSelectionRight {GuiObject}
GuiObject.NextSelectionUp {GuiObject}
GuiObject.SelectionImageObject {GuiObject}
FloorWire.From {BasePart}
FloorWire.To {BasePart}
PVAdornment.Adornee {PVInstance}
PartAdornment.Adornee {BasePart}
SelectionLasso.Humanoid {Humanoid}
SelectionPartLasso.Part {BasePart}
GuiService.SelectedObject {GuiObject}
JointInstance.Part0 {BasePart}
JointInstance.Part1 {BasePart}
VelocityMotor.Hole {Hole}
NoCollisionConstraint.Part0 {BasePart}
NoCollisionConstraint.Part1 {BasePart}
Model.PrimaryPart {BasePart}
Workspace.CurrentCamera {Camera}
PathfindingLink.Attachment0 {Attachment}
PathfindingLink.Attachment1 {Attachment}
Player.Character {Model}
Player.RespawnLocation {SpawnLocation}
Player.Team {Team}
ProximityPrompt.RootLocalizationTable {LocalizationTable}
ControllerPartSensor.SensedPart {BasePart}
Sound.SoundGroup {SoundGroup}
StyleDerive.StyleSheet {StyleSheet}
StyleLink.StyleSheet {StyleSheet}
ChatInputBarConfiguration.TargetTextChannel {TextChannel}
TextChatMessage.BubbleChatMessageProperties {BubbleChatMessageProperties}
TextChatMessage.TextChannel {TextChannel}
TextChatMessage.TextSource {TextSource}
Trail.Attachment0 {Attachment}
Trail.Attachment1 {Attachment}
WeldConstraint.Part0Internal {BasePart}
WeldConstraint.Part1Internal {BasePart}
WeldConstraint.Part1Internal {BasePart}

View File

@@ -10,25 +10,6 @@ local service = setmetatable({}, {
return Service
end,
})
local List
do
local mt
mt = {
__index = function(self, index)
local Category = rawget(self, index)
if not Category then
Category = setmetatable({}, mt)
self[index] = Category
end
return Category
end,
}
List = setmetatable({ Accessible = setmetatable({}, mt), Inaccessible = setmetatable({}, mt) }, {
__index = function(self, Accessible)
return Accessible and self.Accessible or self.Inaccessible
end,
})
end
service.HttpService.HttpEnabled = true

View File

@@ -0,0 +1,53 @@
import requests, os
def array_to_dictionary(table, hybrid_mode=None):
tmp = {}
if hybrid_mode == "adjust":
for key, value in table.items():
if isinstance(key, int):
tmp[value] = True
elif isinstance(value, dict):
tmp[key] = array_to_dictionary(value, "adjust")
else:
tmp[key] = value
else:
for value in table:
if isinstance(value, str):
tmp[value] = True
return tmp
s = "\n"
def fetch_api():
api_dump_url = "https://raw.githubusercontent.com/MaximumADHD/Roblox-Client-Tracker/roblox/Mini-API-Dump.json"
response = requests.get(api_dump_url)
api_classes = response.json()['Classes']
global s
for api_class in api_classes:
class_name = api_class['Name']
class_members = api_class['Members']
prevlen = len(s)
for member in class_members:
member_name = member['Name']
member_type = member['MemberType']
if member_type == "Property":
serialization = member['Serialization']
if serialization['CanLoad'] and serialization['CanSave']:
value_type = member['ValueType']
if value_type['Category'] == "Class" and value_type['Name'] != "Instance":
s += f"{class_name}.{member_name} {{{value_type['Name']}}}\n"
if prevlen != len(s):
s +="\n"
try:
fetch_api()
print(s)
script_dir = os.path.dirname(os.path.realpath(__file__))
output_file_path = os.path.join(script_dir, "Dump")
with open(output_file_path, "w") as file:
file.write(s)
except Exception as e:
print(f"Error: {e}")

View File

@@ -1,3 +1,4 @@
Instance.Parent {CanLoad Only}
Instance.archivable {CanLoad Only}
Instance.archivable {Deprecated}
@@ -467,4 +468,5 @@ WeldConstraint.Enabled {CanLoad Only}
WeldConstraint.Part0 {CanLoad Only}
WeldConstraint.Part1 {CanLoad Only}
Wire.Connected {CanSave Only}
Wire.Connected {CanSave Only}

View File

@@ -0,0 +1,89 @@
import requests
import os
def array_to_dictionary(table, hybrid_mode=None):
tmp = {}
if hybrid_mode == "adjust":
for key, value in table.items():
if isinstance(key, int):
tmp[value] = True
elif isinstance(value, dict):
tmp[key] = array_to_dictionary(value, "adjust")
else:
tmp[key] = value
else:
for value in table:
if isinstance(value, str):
tmp[value] = True
return tmp
s = "\n"
def fetch_api():
api_dump_url = "https://raw.githubusercontent.com/MaximumADHD/Roblox-Client-Tracker/roblox/Mini-API-Dump.json"
response = requests.get(api_dump_url)
api_classes = response.json()['Classes']
global s
class_list = {}
for api_class in api_classes:
class_name = api_class['Name']
class_members = api_class['Members']
class_tags = api_class.get('Tags')
if class_tags:
print(class_tags)
class_tags = array_to_dictionary(class_tags)
class_info = {
'Tags': class_tags,
'Superclass': api_class['Superclass'],
'Properties': {}
}
prev_len = len(s)
for member in class_members:
if member['MemberType'] == "Property":
property_name = member['Name']
ignored = False # Placeholder for actual ignored properties
if not ignored:
member_tags = member.get('Tags')
if member_tags:
member_tags = array_to_dictionary(member_tags)
serialization = member['Serialization']
if serialization['CanLoad']:
if not serialization['CanSave']:
s += f"{class_name}.{property_name} {{CanLoad Only}}\n"
if member_tags and member_tags.get('Deprecated'):
s += f"{class_name}.{property_name} {{Deprecated}} { ' {CanSave}' if serialization['CanSave'] else ''}\n"
elif serialization['CanSave']:
s += f"{class_name}.{property_name} {{CanSave Only}}\n"
if len(s) != prev_len:
s += "\n"
class_list[class_name] = class_info
return class_list
try:
fetch_api()
print(s)
script_dir = os.path.dirname(os.path.realpath(__file__))
output_file_path = os.path.join(script_dir, "Dump")
with open(output_file_path, "w") as file:
file.write(s)
except Exception as e:
print(f"Error: {e}")

View File

@@ -1,3 +1,4 @@
Instance.AttributesSerialize {BinaryString}
Instance.Capabilities
Instance.DefinesCapabilities
Instance.HistoryId
@@ -181,6 +182,7 @@ Workspace.PhysicsSteppingMethod
Workspace.PlayerCharacterDestroyBehavior
Workspace.PrimalPhysicsSolver
Workspace.RejectCharacterDeletions
Workspace.RenderingCacheOptimizations
Workspace.ReplicateInstanceDestroySetting
Workspace.SignalBehavior2
Workspace.StreamOutBehavior
@@ -253,4 +255,5 @@ IntConstrainedValue.value
WeldConstraint.CFrame0
WeldConstraint.Part0Internal
WeldConstraint.Part1Internal
WeldConstraint.State
WeldConstraint.State

View File

@@ -10,35 +10,16 @@ local service = setmetatable({}, {
return Service
end,
})
local List
do
local mt
mt = {
__index = function(self, index)
local Category = rawget(self, index)
if not Category then
Category = setmetatable({}, mt)
self[index] = Category
end
return Category
end,
}
List = setmetatable({ Accessible = setmetatable({}, mt), Inaccessible = setmetatable({}, mt) }, {
__index = function(self, Accessible)
return Accessible and self.Accessible or self.Inaccessible
end,
})
end
service.HttpService.HttpEnabled = true
local function ArrayToDictionary(Table, HybridMode)
local tmp = table.create(#Table)
local function ArrayToDictionary(Table, HybridMode, ValueOverride)
local tmp = {}
if HybridMode == "adjust" then
for Some1, Some2 in Table do
if type(Some1) == "number" then
tmp[Some2] = true
tmp[Some2] = ValueOverride or true
elseif type(Some2) == "table" then
tmp[Some1] = ArrayToDictionary(Some2, "adjust") -- Some1 is Class, Some2 is Name
else
@@ -47,7 +28,9 @@ local function ArrayToDictionary(Table, HybridMode)
end
else
for _, Key in Table do
tmp[Key] = true
if type(Key) == "string" then
tmp[Key] = true
end
end
end
@@ -64,7 +47,7 @@ do
local API_Class = API_Classes[_index_0]
local ClassName = API_Class.Name
local ClassMembers = API_Class.Members
local prevsiz = #s
for _index_1 = 1, #ClassMembers do
local Member = ClassMembers[_index_1]
@@ -78,7 +61,6 @@ do
if MemberTags then
MemberTags = ArrayToDictionary(MemberTags)
Special = MemberTags.NotScriptable
end
if Serialization.CanLoad and Serialization.CanSave and Special then
@@ -91,7 +73,6 @@ do
s ..= "\n"
end
end
end
local ok, result = pcall(FetchAPI)

View File

@@ -0,0 +1,64 @@
import requests
import os
def array_to_dictionary(table, hybrid_mode=None):
tmp = {}
if hybrid_mode == "adjust":
for key, value in table.items():
if isinstance(key, int):
tmp[value] = True
elif isinstance(value, dict):
tmp[key] = array_to_dictionary(value, "adjust")
else:
tmp[key] = value
else:
for value in table:
if isinstance(value, str):
tmp[value] = True
return tmp
s = "\n"
def fetch_api():
api_dump_url = "https://raw.githubusercontent.com/MaximumADHD/Roblox-Client-Tracker/roblox/Mini-API-Dump.json"
response = requests.get(api_dump_url)
api_classes = response.json()['Classes']
global s
for api_class in api_classes:
class_name = api_class['Name']
class_members = api_class['Members']
prev_len = len(s)
for member in class_members:
member_name = member['Name']
member_type = member['MemberType']
if member_type == "Property":
serialization = member['Serialization']
member_tags = member.get('Tags')
special = False
if member_tags:
member_tags = array_to_dictionary(member_tags)
special = member_tags.get('NotScriptable')
if serialization['CanLoad'] and serialization['CanSave'] and special:
value_type = member['ValueType']['Name']
if value_type == "BinaryString":
s += f"{class_name}.{member_name} {{BinaryString}}\n"
else:
s += f"{class_name}.{member_name}\n"
if len(s) != prev_len:
s += "\n"
try:
fetch_api()
print(s)
script_dir = os.path.dirname(os.path.realpath(__file__))
output_file_path = os.path.join(script_dir, "Dump")
with open(output_file_path, "w") as file:
file.write(s)
except Exception as e:
print(f"Error: {e}")

View File

@@ -55,7 +55,7 @@ do
getspecialinfo = 'string.find(...,"get",nil,true) and string.find(...,"spec",nil,true)',
hash = 'local a={...}local b=a[1]local function c(a,b)return string.find(a,b,nil,true)end;return c(b,"hash")and c(string.lower(tostring(a[2])),"crypt")',
protectgui = 'string.find(...,"protect",nil,true) and string.find(...,"ui",nil,true) and not string.find(...,"un",nil,true)',
request = 'string.find(...,"request",nil,true) and not string.find(...,"internal",nil,true)',
-- request = 'string.find(...,"request",nil,true) and not string.find(...,"internal",nil,true)',
sethiddenproperty = 'string.find(...,"set",nil,true) and string.find(...,"h",nil,true) and string.find(...,"prop",nil,true) and string.sub(...,#...) ~= "s"',
writefile = 'string.find(...,"file",nil,true) and string.find(...,"write",nil,true)',
}, true, 10)
@@ -65,7 +65,6 @@ local gethiddenproperty = globalcontainer.gethiddenproperty
local sethiddenproperty = globalcontainer.sethiddenproperty
local writefile = globalcontainer.writefile
local request = globalcontainer.request
local getscriptbytecode = globalcontainer.getscriptbytecode
local base64encode = globalcontainer.base64encode
local hash = globalcontainer.hash
@@ -135,7 +134,7 @@ end
local custom_decompiler, load_decompiler -- TODO Temporary
if request and getscriptbytecode then
if getscriptbytecode then
-- Credits @w-a-e
local decompiler_source =
game:HttpGet("https://raw.githubusercontent.com/w-a-e/Advanced-Decompiler-V3/main/init.lua", true)
@@ -152,7 +151,7 @@ if request and getscriptbytecode then
local SHOW_INSTRUCTION_LINES = false
local SHOW_REFERENCES = true
local SHOW_OPERATION_NAMES = false
local SHOW_MISC_OPERATIONS = true
local SHOW_MISC_OPERATIONS = false
local LIST_USED_GLOBALS = true
local RETURN_ELAPSED_TIME = false
]]
@@ -566,7 +565,9 @@ local function ArrayToDictionary(Table, HybridMode, ValueOverride)
end
else
for _, Key in Table do
tmp[Key] = true
if type(Key) == "string" then
tmp[Key] = true
end
end
end
@@ -1976,7 +1977,7 @@ local function synsaveinstance(CustomOptions, CustomOptions2)
If you didn't save in Binary - we recommended to save the game right away to take advantage of the binary format & to preserve values of certain properties if you used IgnoreDefaultProperties setting (as they might change in the future).
You can do that by going to FILE -> Save to File As -> Make sure File Name ends with .rbxl -> Save
If your player cannot spawn into the game, please move the scripts in StarterPlayeelsewhere (This is done by default).
If your player cannot spawn into the game, please move the scripts in StarterPlayer elsewhere.
If the chat system does not work, please use the explorer and delete everything inside the TextChatService/Chat service(s).