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

Metanet Maps labels maps with the wrong level code #7

Open
blakeplusplus opened this issue May 31, 2024 · 1 comment
Open

Metanet Maps labels maps with the wrong level code #7

blakeplusplus opened this issue May 31, 2024 · 1 comment

Comments

@blakeplusplus
Copy link

For instance, S-B-17-04 "manifest" is labelled as S-C-14-04 in the program. Unsure why this is the case.

@blakeplusplus blakeplusplus changed the title Metanet Maps under Maps tab labels maps with the wrong level code Metanet Maps labels maps with the wrong level code May 31, 2024
@edelkas
Copy link

edelkas commented Aug 31, 2024

The culprit is the code that translates numerical IDs to in-game IDs, e.g., 2637 ---> SU-C-09-02. It's done in a very simplistic (and incorrect) way:

NPlusPlusAssistant/Form1.cs

Lines 1387 to 1389 in 8ca91d5

string rowchar = ((char)(65 + row)).ToString();
if (row == 5) rowchar = "X";
string idname = "[" + shortname + rowchar + "-" + col.ToString().PadLeft(2, '0') + "-" + (counter).ToString().PadLeft(2, '0') + "] ";

Leading to levels simply being ordered column-wise, A through X:
image
In reality, of course, it's significantly more complex:

  • X-row levels are laid out at the very end, after all A-E levels.
  • Secret levels have a different numbering altogether.
  • Some tabs are split into multiple files (C, CL, R, RL), and they each have their own X-row bit at the end, so they must be staggered.

So a fully general converter requires more thought. I should know, I had to implement it for outte and it was a pain to get all right:
https://github.com/edelkas/inne/blob/e5df40ef2d83487f6e4255ada9c55aaf0fc97a48/src/utils.rb#L1396
At least here the type can be ignored (i.e., episodes and stories are not required).

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