Blockland Forums > Modification Help

Finding Dynamic Fields on SimObject

(1/2) > >>

Quartz:
Hello modders,

I'd like to retrieve all the "dynamic fields" from a SimObject, similar to how the GuiGroup -> InspectDlg -> InspectTitle -> InspectFields (class: GuiInspector) functions.
Now the functionality of the tree inspector is written in the C++ TGE source code and the functionality to retrieve fields appears exclusively accessible to the C++ interface.

The only solution I can think of is logging the console when doing a .dump() (bad-dum-ts), and then just use the data before you reach the Methods: line.

That solution seems a bit silly, it would work, but I'd like to know, if there might better solution. Has anyone encountered this problem before?

DurkaDude:
I'm curious as to what you're using this for. Checking for lines in the console is a bad idea. It would be much easier to .save() the object and read the file.

Quartz:
It could be saved and read, that's true. That's probably better, since I just realised the ConsoleLogger saves to path as well, so there's no point in using .dump() when I do not require information on methods.

Greek2me:
Tagged fields? Sorry, it's been forever since I've worked with these.


--- Code: ---%index = 0;
while((%field = %object.getTaggedField(%index)) !$= "")
{
//do stuff here
%index ++;
}
--- End code ---

Quartz:

--- Quote from: Greek2me on August 28, 2018, 09:47:06 PM ---Tagged fields? Sorry, it's been forever since I've worked with these.


--- Code: ---%index = 0;
while((%field = %object.getTaggedField(%index)) !$= "")
{
//do stuff here
%index ++;
}
--- End code ---

--- End quote ---
Thank you.

Navigation

[0] Message Index

[#] Next page

Go to full version