roccodev / bdat-rs

A library to read and write BDAT tables from all Xenoblade games
Apache License 2.0
9 stars 4 forks source link

--hashes <HASHES> #7

Closed wandersonareis closed 9 months ago

wandersonareis commented 9 months ago

What would be the file format for hashes? I tried a CSV with hashes, and it didn't work. I also didn't see any examples in the code.

XC3 Hashes

roccodev commented 9 months ago

Hi, you just need the plain names. From that CSV file, you can just copy the second column and put one entry per line, i.e.

gimmickAffordance
gimmickEnemyAff
...
wandersonareis commented 9 months ago

I used this and it didn't work. Some keys and values ​​remained as hashes. Incomplete table name? example.zip

roccodev commented 9 months ago

Unfortunately it doesn't seem like those four tables have known names for their hashes. I think the CSV you sent is kept in sync with this index, the unnamed hashes you see here don't have a known name.

I think the CSV exports data from https://github.com/vaxherd/xb3tool, which has crowdsourced names, as well as some basic bruteforced names.

wandersonareis commented 9 months ago

Perhaps the fields cannot be converted. In this file, Label is still in hash format, and Name is the corresponding text. To prepare the files for localization, I need to have a standard for the files. Being in hash format is better than a mix of hash and non-hash.

Thank you for your time. no label name

roccodev commented 9 months ago

That's right, the tool currently only converts hashes for column and table names. Hashed fields are IDs and are mostly uncharted territory, though we do have a version of the game (1.3.0) which had some plain names left over. (example)

If you only care about changing the string values for localization, I suppose it's fair to leave everything hashed, conversion in both directions will still work.

wandersonareis commented 9 months ago

Leaving XC3 with Label and Name helps to standardize with other games. This way I only need one struct in Go. It avoids a conditional just to handle hashed names.