Updated Expanding The Metatile Count (markdown)

Team Aqua's Hideout 2024-10-04 20:31:21 -04:00
parent f464d8b8c7
commit 7c2832ec66

@ -2,14 +2,14 @@ Here in this tutorial we will increase the cap for metatiles from 1024 to 4096 b
[Link to Code Changes (branch of TAH pokeemerald fork)](https://github.com/pret/pokeemerald/compare/master...TeamAquasHideout:pokeemerald:expanded_metatiles)
Some context for the changes:
### Context For the Changes:
There are a handful of constants that need to be changed in the fieldmap header files. The bit masks have to be changed so that the metatile id goes from 10 to 12 bits. This is what allows the game to register ids up to 4096. The collision section is reduced to 1 bit because thats all that is ever used. The elevation mask is reduced by 1 bit as well to gain more space. This one isn't required if you're okay with 2048 metatiles, but other changes will be required as well. The other changes found in the link are to change the metatile count constants to 2048 for primary and 4096 for total count, and then to change a couple of values in event_object_movement.c from 15 to 7 which is the new elevation max. This needs to be done so that the crossed arrows elevation used for bridges is now updated to the new max, which is now 7.
![image](https://github.com/user-attachments/assets/9accabbf-7a4b-4a4f-a9f8-6edd4e8d5051)
![image](https://github.com/user-attachments/assets/f13dd752-50f3-4636-bfbb-fddaba946734)
![image](https://github.com/user-attachments/assets/cab4dae1-3e59-4c49-bfdb-891253235570)
There are a handful of constants that need to be changed in the fieldmap header files. The bit masks have to be changed so that the metatile id goes from 10 to 12 bits. This is what allows the game to register ids up to 4096. The collision section is reduced to 1 bit because thats all that is ever used. The elevation mask is reduced by 1 bit as well to gain more space. This one isn't required if you're okay with 2048 metatiles, but other changes will be required as well. The other changes found in the link are to change the metatile count constants to 2048 for primary and 4096 for total count, and then to change a couple of values in event_object_movement.c from 15 to 7 which is the new elevation max. This needs to be done so that the crossed arrows elevation used for bridges is now updated to the new max, which is now 7.
![collisions](https://github.com/user-attachments/assets/1013baec-85aa-4b24-be54-cadce6aafd00)