Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.ExtractText not parsing sheet macro codes #96

Open
rreminy opened this issue Oct 30, 2024 · 1 comment
Open

.ExtractText not parsing sheet macro codes #96

rreminy opened this issue Oct 30, 2024 · 1 comment

Comments

@rreminy
Copy link

rreminy commented Oct 30, 2024

For example:

  • Excel table Fate row Id 1873 in JP contains this: 不条理魚人「<sheet(BNpcName,13542,0)>」, however when extracting text with ReadOnlySeString.ExtractText() it results in 不条理魚人「」. In other words, the macro expands to an empty string.
@Haselnussbomber
Copy link
Contributor

Haselnussbomber commented Oct 31, 2024

ExtractText only extracts payloads of type Text.
If you want to process macro payloads you have to write your own evaluation function for that.
It’s complex and depends on the context of the client (language, time, global parameters).

I took this code from kizer and expanded it a bit to fit my needs. It’s what I use in my Dalamud plugin:
https://github.com/Haselnussbomber/HaselCommon/blob/c5ba6da/HaselCommon/Services/SeStringEvaluatorService.cs

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

No branches or pull requests

2 participants