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

Inconsistent sorting compared with other libraries #5

Open
Digote opened this issue Jul 22, 2023 · 5 comments
Open

Inconsistent sorting compared with other libraries #5

Digote opened this issue Jul 22, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@Digote
Copy link

Digote commented Jul 22, 2023

I don't think it's a bug, but rather a question about how the text extraction is organized.

In the file PouchContent.msbt, we have item descriptions and their names.

When we use a tool that has been around for some time, like (Kuriimu), these strings come organized as follows: item description, item name.

However, when we use the msbt_yml tool, it ends up organizing these strings differently, making it a bit more complicated to translate because we have to search for the corresponding description for each specific item.

Once the text passes through the msbt_yml tool, it will always be organized in that way.

I'll attach some screenshots of how the extraction looks before and after passing through msbt_yml."

Before
msbt_kuriimu

After
msbt_yml

Thanks a lot for the tool, it's been very useful to use the .yml files on a review site.

@ArchLeaders
Copy link
Member

ArchLeaders commented Jul 22, 2023

Labels are sorted using this hash algorithm: https://github.com/EPD-Libraries/msbt/blob/main/src/sections/label_section.cpp#L7-L14

Source is from CLMS (which iirc is based off official RE): https://github.com/Trippixyz/CLMS/blob/main/LMS.cs#L178-L191

@ArchLeaders
Copy link
Member

Although, it doesn't look like that sorts within groups, in which case it's not sorted at all and is just written in the same order as the yaml. Could be wrong though, it's been a while since I've looked at this code.

@Digote
Copy link
Author

Digote commented Jul 22, 2023

Since I still can't help you directly with the code, I'll share another example of a tool that seems to extract data in the same way as Kurrimu, but it's written in pure C.

https://github.com/AlgebraManiacABC/msbt2txt

@ArchLeaders
Copy link
Member

ArchLeaders commented Jul 22, 2023

As far as I can tell, that doesn't sort LBL either. Also it's read-only, so there won't be much difference there.

@ArchLeaders ArchLeaders changed the title Organization of the Text Extraction in PouchContent.msbt Inconsistent sorting compared with other libraries Jul 22, 2023
@ArchLeaders
Copy link
Member

When I have more time I'll try to look into this further.

@ArchLeaders ArchLeaders self-assigned this Jul 22, 2023
@ArchLeaders ArchLeaders added the bug Something isn't working label Jul 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants