Skip to content

Instantly share code, notes, and snippets.

@Lusamine
Last active December 15, 2025 05:35
Show Gist options
  • Select an option

  • Save Lusamine/34f6af2de7832985b05fdbf852797675 to your computer and use it in GitHub Desktop.

Select an option

Save Lusamine/34f6af2de7832985b05fdbf852797675 to your computer and use it in GitHub Desktop.

These are all from LZA 1.0.3, but I haven't seen any major changes compared to 1.0.0.
Symbols are mine or inspired by previous games such as BDSP.

pml_Capture_JudgeCapture.c - main function
pml_Capture_CalcCaptureIndicator.c
get_ball_capture_ratio - used for ball capture modifiers
In-game capture estimation - used for the carets when locking on to a Pokémon

Capture Config Flatbuffer Files
capture_ball_data.json - Timer, Heavy, Level, Quick ball modifiers. Overrides values in exefs.
capture_data.json - Various multipliers
capture_zarank_data.json

Most of the pseudocode was initially labeled by SciresM, which allowed me to test in-game to see that the game decides the modifiers in a completely different way than expected.
The config files were found by Kaphotics.


The following are changes since 2.0.0.

pml_Capture_JudgeCapture.c - main function now applies donut bonus
pml_Capture_PreCalcCaptureParams.c - donut bonus calculated from the in-game capture estimation

Comments are disabled for this gist.