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

Update catch curve for pokeballs #3685

Merged
merged 1 commit into from
Dec 12, 2023
Merged

Conversation

AreaZR
Copy link

@AreaZR AreaZR commented Dec 11, 2023

Since Gen 6, the capture rate curve was changed to make pokeballs more effective on lower level pokemon

It's by 65536 divided by 255 to the power of (1/5.33) and I did the work of translating that so a rough approximation can be done in integers, and so far, it seems to work close enough. I use this in my romhack for months now and it works fine.

Discord contact info

roseareazero

@AreaZR AreaZR force-pushed the catching branch 3 times, most recently from 1e87ff2 to 5968b94 Compare December 11, 2023 01:11
@AlexOn1ine
Copy link
Collaborator

Can you link a source?

@Bassoonian
Copy link
Collaborator

Can you stop with all the force pushing as previously asked? There is no need for a PR this simple to have all these force pushes in its history and it makes reviewing harder than it has to be.

@GraionDilach
Copy link

Can you link a source?

https://www.dragonflycave.com/mechanics/gen-vi-vii-capturing#throwing-a-ball sounds like the reason for this change.

@AreaZR
Copy link
Author

AreaZR commented Dec 11, 2023

Bulbapedia. However, because the power in question is a decimal value, I refactored it so that it's 65536/(a^(3/16)), which is a tiny modification of the method but it allows me to do sqrt 4 times a cubed, which has rounding errors sure but it's the best I could do without delving into floating point madness.

@AlexOn1ine
Copy link
Collaborator

Bulbapedia. However, because the power in question is a decimal value, I refactored it so that it's 65536/(a^(3/16)), which is a tiny modification of the method but it allows me to do sqrt 4 times a cubed, which has rounding errors sure but it's the best I could do without delving into floating point madness.

Where is 16581375 coming from in your refactor?

@AreaZR
Copy link
Author

AreaZR commented Dec 11, 2023

16581375

Wolfram alpha when I was making approximations.

@AlexOn1ine
Copy link
Collaborator

16581375

Wolfram alpha when I was making approximations.

But how though?

Since Gen 6, the capture rate curve was changed to make pokeballs more effective on lower level pokemon

It's by 65536 divided by 255 to the power of(1/5.33) and I did the work of translating that so a rough approximation can be done in integers, and so far, it seems to work close enough. I use this in my romhack for months now and it works fine.
Copy link
Collaborator

@AlexOn1ine AlexOn1ine left a comment

Choose a reason for hiding this comment

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

If you make a PR like that in the future please provide a source and explain your process.

@AlexOn1ine AlexOn1ine merged commit 929ec54 into rh-hideout:upcoming Dec 12, 2023
1 check passed
@AreaZR AreaZR deleted the catching branch December 12, 2023 15:58
AlexOn1ine added a commit to AlexOn1ine/pokeemerald-expansion-1 that referenced this pull request Jan 9, 2024
AsparagusEduardo pushed a commit that referenced this pull request Jan 10, 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.

5 participants