Skip to content

AddonNamePlate, AtkTextNode TextFlags and ConfigModule - #1914

Merged
Haselnussbomber merged 6 commits into
aers:mainfrom
Zeffuro:stuff
Aug 9, 2026
Merged

AddonNamePlate, AtkTextNode TextFlags and ConfigModule#1914
Haselnussbomber merged 6 commits into
aers:mainfrom
Zeffuro:stuff

Conversation

@Zeffuro

@Zeffuro Zeffuro commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Some small AddonNamePlate changes.

Some tweaks to the TextFlags, FixedFontResolution was wrong, if you rather want I make it a breaking change let me know.

ffxiv_dx11_2026-08-08_16-11-40.mp4

OptionId in ConfigModule was wrong, that did give an opportunity to clean up GetName()
Added a CSV so you can see it working.

ConfigModuleDump_20260808_155416.csv

(I had it make a TSV earlier but GitHub does not like TSVs).

private static string WriteConfigModuleDump(ConfigModule* module, Framework* framework)
    {
        var directory = Service.PluginInterface.ConfigDirectory.FullName;
        Directory.CreateDirectory(directory);

        var path = Path.Combine(directory, $"ConfigModuleDump_{DateTime.Now:yyyyMMdd_HHmmss}.tsv");
        using var writer = new StreamWriter(path, false, new UTF8Encoding(false));

        writer.WriteLine("ConfigModule.Option entries");
        writer.WriteLine("EntryIndex\tConfigOptionId\tOldField0x10\tOldSystemGetName\tCurrentGetName\tCandidateNames\tCategoryMask0x04\tMaxValueIndex0x08\tBitIndex0x0C\tInvert0x0D\tWord0E\tQword00\tQword08\tQword10\tQword18\tCallback0x10\tCallbackContextOffset0x18\tMetadataDword1C\tRawBytes");

        for (var i = 0; i < ConfigModule.ConfigOptionCount; i++)
        {
            var option = (ConfigModule.Option*)((byte*)module + 0x300 + i * 0x20);
            var configOptionId = *(short*)option;
            var oldField = *(short*)((byte*)option + 0x10);
            var mask = *(uint*)((byte*)option + 0x04);
            var maxValueIndex = *(uint*)((byte*)option + 0x08);
            var bitIndex = *((byte*)option + 0x0C);
            var invert = *((byte*)option + 0x0D);
            var word0E = *(ushort*)((byte*)option + 0x0E);
            var qword00 = *(ulong*)((byte*)option + 0x00);
            var qword08 = *(ulong*)((byte*)option + 0x08);
            var qword10 = *(ulong*)((byte*)option + 0x10);
            var qword18 = *(ulong*)((byte*)option + 0x18);
            var callbackContextOffset = *(uint*)((byte*)option + 0x18);
            var metadataDword1C = *(uint*)((byte*)option + 0x1C);
            var oldName = oldField < 0 ? string.Empty : GetConfigName((ConfigBase*)&framework->SystemConfig, (uint)oldField);
            var currentName = option->GetName();
            var candidateNames = configOptionId < 0
                ? string.Empty
                : ResolveConfigName(framework, configOptionId, out _);

            writer.WriteLine(string.Join('\t',
                i.ToString(CultureInfo.InvariantCulture),
                configOptionId.ToString(CultureInfo.InvariantCulture),
                oldField.ToString(CultureInfo.InvariantCulture),
                Tsv(oldName),
                Tsv(currentName),
                Tsv(candidateNames),
                $"0x{mask:X}",
                maxValueIndex.ToString(CultureInfo.InvariantCulture),
                $"0x{bitIndex:X2}",
                $"0x{invert:X2}",
                $"0x{word0E:X4}",
                $"0x{qword00:X16}",
                $"0x{qword08:X16}",
                $"0x{qword10:X16}",
                $"0x{qword18:X16}",
                $"0x{qword10:X16}",
                $"0x{callbackContextOffset:X8}",
                $"0x{metadataDword1C:X8}",
                RawBytes((byte*)option, 0x20)));
        }

        writer.WriteLine();
        writer.WriteLine("ConfigBase entries");
        writer.WriteLine("Section\tIndex\tType\tName\tValue\tDefault\tMin\tMax");

        var systemConfig = &framework->SystemConfig;
        WriteConfigBaseDump(writer, "System", (ConfigBase*)systemConfig);
        WriteConfigBaseDump(writer, "UiConfig", &systemConfig->UiConfig);
        WriteConfigBaseDump(writer, "UiControl", &systemConfig->UiControlConfig);
        WriteConfigBaseDump(writer, "UiControlGamepad", &systemConfig->UiControlGamepadConfig);

        return path;
    }

@Haselnussbomber
Haselnussbomber merged commit 9f18fed into aers:main Aug 9, 2026
5 checks passed
@Zeffuro

Zeffuro commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the help and extra stuff Hasel <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants