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

Add explanation of STATIC_ASSERTS in pokemon.c #4294

Merged

Conversation

pkmnsnfrn
Copy link
Collaborator

Original discussion: https://discord.com/channels/419213663107416084/774393519569502268/1220032007225217046

I don't feel strongly about how this is worded, but I think an explanation is a good idea. If this turns out to be a common / bigger issue, we can circle back.

@pkmnsnfrn pkmnsnfrn changed the title Add explanation of STATIC_ASSETS in pokemon.c Add explanation of STATIC_ASSERTS in pokemon.c Mar 20, 2024
@mrgriffin
Copy link
Collaborator

I think it would be worth adding a brief note that unless there's unused data after your member, naively growing the member will likely break the save... and perhaps that a third alternative would be to repurpose some IDs that have never been used by your game?

I could imagine established projects choosing that third path. (There's also a fourth path of using a non-contiguous bit, and then combining them in GetMonData/separating them in SetMonData, but that's probably too wordy and fiddly to explain)

@pkmnsnfrn
Copy link
Collaborator Author

@mrgriffin could you clarify IDs that you think developers wouldn't use? I just want to make sure I understand it before giving an example (and yeah, I'm skipping path 4 lmao, if you're skilled enough to do that, you're not reading my comment at all)

@mrgriffin
Copy link
Collaborator

Probably the most common examples will be key items—e.g. Gold Teeth or Magma Emblem. But also potentially things like a developer going "well I never want Tera Shards", or "I don't have Giratina" and so not having Griseous Orb and/or Core.

Similarly, if they've decided to permanently turn off species then they might decide to repurpose those IDs.

Copy link
Collaborator

@mrgriffin mrgriffin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tysm!

@mrgriffin mrgriffin merged commit 4a102dc into rh-hideout:upcoming Apr 4, 2024
1 check passed
@pkmnsnfrn pkmnsnfrn deleted the substruct0_bits_warning branch April 20, 2024 04:12
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

Successfully merging this pull request may close these issues.

2 participants