dao::data
The game’s data tree, the named values its interface reads and writes.
Declared in dao/Data.h.
Classes
| Class | |
|---|---|
| Attribute | An attribute in the data tree. |
Functions
Find()
Attribute * Find(std::wstring_view path)
Finds the attribute at a dotted path, such as GUI.SelectedChar.
Returns the attribute, or null if there is nothing at the path
MemberCount()
std::optional<std::size_t> MemberCount(std::wstring_view path)
Returns how many members the list or object at a path has, or nullopt if there is nothing at the path.
MemberNames()
std::vector<std::wstring> MemberNames(std::wstring_view path)
Returns the member names of the list or object at a path.
A list’s member names are its indices. Returns an empty vector if there is nothing at the path.
Members()
std::vector<std::wstring> Members(std::wstring_view path)
Returns the full path of each member of the list or object at a path: the path followed by “.\<name\>”.
Each member can be read the same way, so you can walk a list of objects as a screen does. Only paths that Find can reach are returned. Returns an empty vector if there is nothing at the path.
for (const std::wstring &chain : dao::data::Members(L"CharGenCreature.Stats.TalentChains"))
for (const std::wstring &ability : dao::data::Members(chain))
dao::data::Number(ability + L".DisplayState");
Number()
std::optional<double> Number(std::wstring_view path)
Returns the value at a path as a number, or nullopt if there is nothing at the path.
Text()
std::optional<std::wstring> Text(std::wstring_view path)
Returns the value at a path as text, or nullopt if there is nothing at the path.