cheat properties?

General chit-chat and minor questions about just about anything

Moderator: NBJeff

thedarkiller123
level0
Posts: 5
Joined: Fri Apr 22, 2016 6:48 pm

cheat properties?

Postby thedarkiller123 » Mon Jul 03, 2017 1:00 pm

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...
K4jot7x
level0
Posts: 9
Joined: Mon Oct 06, 2014 5:40 pm
Location: javascript:location.href('#')
Contact:

Re: cheat properties?

Postby K4jot7x » Thu Jul 27, 2017 6:02 pm

have no clue what you say. but I wrote a generic enumerate debug values for you

set whichever object you want in

Code: Select all

data/materials.txt
to

Code: Select all

Properties Scripted
and apply this to

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

Return to “General”

Who is online

Users browsing this forum: No registered users and 3 guests