With this update, I think I can say it is v21 compatible (at least partially). I did some basic testing, nothing too thorough though. I've likely missed something, so just let me know of anything that seems wrong and I'll tackle it!
Change Log
New feature: Added function pbBerryGetNaturalGift to check a Berry's Natural Gift data directly.
New feature: Added a paramter to pbChooseBerryMultiple to allow showing different labels when selecting a Berry. For example, you can show things like the Berry's color, size, or Natural Gift type.
Started the process of being fully v21 compatible.
Note: Compiling PBS files is not yet converted. I added a bit of code to suppress the warning that appears every compile in the meantime.
Made some changes to pbChooseBerryMultiple to have text that fits the count of berries.
New feature: Berrydex Battle page. This page will show information pertaining to battles, like the Fling power, Natural Gift type and Power, and effect when used in battle. By default, the item description for the berry will show as the "effect when used in battle" portion. However, not all descriptions would fit this. You can customize what description to show here by including a BattleDescription for the berry in the berry_data.txt to show that, instead.
Added the option to show a berry's color in the Tag Page of the Berrydex.
Fixed an issue where the wrong color could be shown in the scene where you choose multiple berries.
Fixed crashes in the Berrydex when you turn off BERRYDEX_MUTATIONS_PAGE.
Fixed an issue where BERRYDEX_SHOW_NUMBER wasn't respected in the Berrydex entries.
Added a new setting BERRYDEX_SHOW_ENTIRE_LIST. Setting this to true will show the entire list of potential berries from the start, instead of only showing up through a berry that is registered. For instance, if you have 60 berries defined in the dex, but you only have berry #2 registered, instead of showing #1 as unregistered and #2 as registered, it would show all 60 in the list, with unregistered berries still appearing unregistered.
Note/QoL change: This also makes it so the player can view the Berrydex without having any berries registered! It will just show an empty list.
Added new function pbUnregisterBerry
Updated BerryColorData to use Color.new instead of the rgbToColor function in order to futureproof it.
New feature: pbChooseBerryMultiple, a command with a custom scene to choose multiple berries at once. See the Setup and Documentation document for more info.
Added infrastructure for Preferred Zones (which comes with Berry Planting Improvements).
Added handling to prevent a crash when opening the Berrydex in a save file created from before plugin installation.