I know that the question was approached already thousands of times but I wonder why we have not everything developer tools as to reach in object properties ... I does not say that the cheating current is nil but I asked myself the question I admit and I understands not why we have not this cheating ...
ps : sorry for bad english i am french...
cheat properties?
Moderator: NBJeff
-
- level0
- Posts: 5
- Joined: Fri Apr 22, 2016 6:48 pm
-
- level0
- Posts: 9
- Joined: Mon Oct 06, 2014 5:40 pm
- Location: javascript:location.href('#')
- Contact:
Re: cheat properties?
have no clue what you say. but I wrote a generic enumerate debug values for you
set whichever object you want in to and apply this to
it will list all data and the current value of the data, as long as the name of the value isn't "Unwanted_Object_1","Unwanted_Object_2","Unwanted_Object_3"
Edit 1: Add header to nested objects, Skip nil values
set whichever object you want in
Code: Select all
data/materials.txt
Code: Select all
Properties Scripted
Code: Select all
data/scripts/[FN].lua
it will list all data and the current value of the data, as long as the name of the value isn't "Unwanted_Object_1","Unwanted_Object_2","Unwanted_Object_3"
Code: Select all
function Create()
Interface.AddComponent( this, "objIdx", "Caption", this.Type.."-"..this.Id.u.."-"..this.Id.i)
Interface.AddComponent( this, "ListDebugVals", "Button", "List")
Interface.AddComponent( this, "StartDbgConsole", "Button", "Open Debug")
end
function StartDbgConsoleClicked()
Game.DebugOut("Intentional Error:")
local i=0
i=9/0
end
function ListDebugValsClicked()
DebugOutValues(_G)
end
function DebugOutValues(arr)
for item in next,arr
local obj=nil
if item and type(item)=="string" item~="Unwanted_Object_1" and item~="Unwanted_Object_2" and item~="Unwanted_Object_3" then
obj=arr[item]
end
if obj~=nil then
if type(obj)~="function" and type(obj)~="table" then Game.DebugOut(tostring(item)..": "..tostring(obj))
elseif type(obj)=="table" and (obj.i==nil or (type(obj.i)=="number" and obj.i>=0)) then Game.DebugOut(tostring(item)..":"); DebugOutValues(obj)
else
--not supported
end
end
end
end
Edit 1: Add header to nested objects, Skip nil values
Who is online
Users browsing this forum: No registered users and 15 guests