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 Hatch_*_STEPS constants #1121

Closed
wants to merge 4 commits into from

Conversation

etdv-thevoid
Copy link
Contributor

@etdv-thevoid etdv-thevoid commented May 10, 2024

Adds HATCH_*_STEPS constants for the various hatch step cycle count values. Updates all data/pokemon/base_stats/* files to use the appropriate constant as well as the odd eggs in data/events/odd_eggs.asm.

Copy link
Member

@Rangi42 Rangi42 left a comment

Choose a reason for hiding this comment

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

Sorry, I don't think this change is a good idea. "Steps taken to hatch" is a meaningfully numeric quantity, just like "base stat values" or "PP" or so on. "This Pokemon takes a 'slower' number of steps to hatch" is not informative.

Contrast that with the growth rate constants, which are sequential identifiers for formulas in a lookup table. Or the gender constants, which are also numeric data, but are named after it (so GENDER_F25 is 63, aka 25 percent female). (And even for the gender constants, I could see just using raw percentage values, except GENDER_UNKNOWN would still be special.)

Anyway. I could maybe see having self-explanatory constants, like DEF HATCH_1280 EQU 5, DEF HATCH_2560 EQU 10, etc (since one step cycle is 256 steps). But I also think just having the raw numbers is okay.

@mid-kid
Copy link
Member

mid-kid commented May 10, 2024

Thank you for your first contribution! We really appreciate people making a conscious effort to not only spot wrinkles in code style/names/etc but also fix them.

That said, with any sort of constants the question is: does the value make more sense as a number, or does that numer have some kind of hidden meaning? In this case, an "egg cycle" is a multiple of 256 steps, and I think the numbers make sense on their own. The GENDER_F constants were introduced to clarify that the percentage represents the female, but I don't inmediately see any similar reason to this change. Do these hatch cycle constants reflect any common official or fan names for them? Do they map to other values in other games?

I'll leave this up for others to opine on, but to me it looks a bit unnecessary.

EDIT: whoops, didn't see rangi's comment before submitting.

@etdv-thevoid
Copy link
Contributor Author

etdv-thevoid commented May 10, 2024

Thanks for the feedback, both of you.

I went ahead and renamed the constants to how many steps they equal and added some comments to clarify intent.

@etdv-thevoid etdv-thevoid requested a review from Rangi42 May 10, 2024 15:46
@etdv-thevoid etdv-thevoid changed the title Add Hatch_* Constants Add Hatch_*_STEPS constants May 10, 2024
@Idain
Copy link
Contributor

Idain commented May 10, 2024

I feel constants here are limiting, because I could make a Pokémon hatch in, let's say, 14 cycles, and that's a value a lot of romhackers would want to change for existing or even some fakemon.

@Rangi42 Rangi42 closed this May 22, 2024
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.

4 participants