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

Gen IV wondercard flag not set correctly #17

Closed
BernardoGiordano opened this issue Sep 10, 2016 · 4 comments
Closed

Gen IV wondercard flag not set correctly #17

BernardoGiordano opened this issue Sep 10, 2016 · 4 comments

Comments

@BernardoGiordano
Copy link
Collaborator

There's something weird in this line

@kwsch
Copy link

kwsch commented Sep 11, 2016

Gen 4 stores two save files; I don't think having a const offset would work as intended. Gotta detect which save file is active based on the incremental Counters in the footer to get the actual offset! If you write to the wrong save file, you won't see the changes made in-game.

Also, be careful to not set a flag with a value higher than the bitflag array length. Eon Ticket (2048) is 0x800, which would overflow to the lowest bit of Card 1's ID. Wouldn't be a noticeable problem, but if users have a hacked card with an invalid ID it'd toggle a bit beyond the intended range :)

@BernardoGiordano
Copy link
Collaborator Author

Good to know!! Thanks so much, you're really awesome

@BernardoGiordano
Copy link
Collaborator Author

Made a few modifications basing upon PKHeX source. Does general block and storage block have to be calculated every time I do an operation, or only at save loading? I'm currently calculating it only at save loading and passing these values to every function that needs them, but still no modifications appear in game

@BernardoGiordano
Copy link
Collaborator Author

immagine
EDIT: Modifications made on Pearl worked, PKHeX recognizes them. It did not work for HG, but since it worked on Pearl, and the algorhitm is the same, I presume it's only a corrupted save of mine. Will leave this open until more testes are done

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