Skip to content

How to read UI Nodes

Leontopodium Nivale edited this page Jul 22, 2024 · 10 revisions

This is ultimately a very simple procedure, but there's a lot of pitfalls to avoid. Please bear with us for this long explanation!

Getting the text contents of a single node

1: Make sure you have SimpleTweaks installed. It has a debugger that you can access with the following command:

/tweaks Debug

THIS IS CASE SENSITIVE! Do not type /tweaks debug, because it will not work! This is the voice of experience and frustration talking.

(An alternative way to view the same information is to use /xldata ai, which is built into Dalamud itself. This page uses screenshots from SimpleTweaks, because it's more user-friendly and has other purposes like logging addon calls for writing pcall statements.)

3: On the left bar, click on "UI Debugging". This section has a LOT of information, but we'll be focusing on two main subsections, Loaded Units and Focused Units.

Loaded Units shows all the UI elements that exist in the game. The ones currently active are colored green. For example, if you go from having no target to targeting an enemy, you'll see _TargetInfo turn from grey to green:

image image

Focused Units shows whichever UI element is currently "active". This is whatever you last clicked on or opened with keys or in any way interacted with.

image

image

4: For this example, we'll go under Focused Units and click ContentsFinder to expand it.

When you select a UI window in the middle column, dropdowns will appear on the right. The one to focus on is the blue dropdown named "Node List": image (Do not be tricked by the green one above it. That will give you the wrong ID!)

The subnodes of this node list also turn green to indicate that they are currently visible. Hovering your mouse over one of these green nodes will pop up a green box surrounding the visual element that node corresponds to:

image

If you want to output this directly to echo chat, this command:

yield("/echo Get Node Text: " .. GetNodeText("ContentsFinder", 46))

will create the output:

Get Node Text: Reaper

image

You can also assign this to a value to a variable and reuse it later:

VariableNameHere = GetNodeText("ContentsFinder", 46)
yield("/echo Get Node Text: " .. VariableNameHere)

Nested Node Text

Lets say that there is a text that's hidden with a node (in this case, it's node 21, and it's reading the description of the quest)

image

To access this text, you need to scroll down to the blue text "Node List" and click it to expand its contents:

image

This node right here, whenever you hover over it, is the text node that corresponds with the subtext under "Reunited at Last"

If you want to save this text as a variable and echo it out to chat, you would use:

VariableNameHere = GetNodeText("_ToDoList", 21, 3)

yield("/echo Get Node Text: " .. VariableNameHere)