HUBOL ‐ Level Caps - haven1433/HexManiacAdvance GitHub Wiki
Click here for HUBOL's main page. HUBOL is short for "Haven's Unofficial Build of Leon's dynamic Pokémon expansion."
Credits: Defa, DontJoelMe - OceanBlue, and YeahPotato
Tutorial
[HUBOL] Level caps
The attached .hma
file below adds the level caps feature.
This also works when using the Rare Candy, with double wild encounters, with scaled wild encounters (CFRU flag 0x90D), with the daycare, and with the DexNav.
This adds some anchors, all found in data.levelcaps
. You do not need to edit anything, except for data.levelcaps.variable
.
I made it so it is based off a variable instead of the badges; this way, you can set the exact level cap in the variable anywhere during the story of your ROM hack instead of being it automatic based on the badges number as it would be by default.
After you apply the .hma
file, you will be at data.levelcaps.variable
with the number 4041. This is the variable assigned to the level cap. 0x4041 is the first unused variable, so you probably already used it for something else; thus, change it to an unused variable.
The variable value is the current level cap: it means that if you put, for example, setvar 0x4041 25
in a script, the current level cap will be 25. To disable level caps, set the variable value to 100 (max level); to disable leveling for all Pokémon, set the variable value to 0; disabling it temporarily can be useful if you have, for example, a flashback scene or a scene where you use another character. You may also want to use copyvar
to copy the current level cap in another variable and then restore it.
If you want to set each level cap after getting a badge, you just need to use setvar
or addvar
in the script where the player receives the badge. If your game is open-world or has at least one point where different paths can be taken and the Gym order or story progression is not linear, use addvar
to increment the current level cap no matter what path the player takes.
Yes, you can also use subvar
. If you have, for example, a quest where the player can choose a good option or an evil option, you can use subvar
to punish the player and reduce the current level cap.
Remember to set the variable to the first level cap after getting the starter Pokémon; otherwise, the level cap will be 0!
Download
The .hma
script is currently available on Discord here.