Team-Magmas-Regions / pokeemerald-expansion-regions

Feature branches for the pokeemerald decompilation focused around adding multiregion support. See the wiki for more info.
0 stars 0 forks source link

Add default collision attribute to Metatile Attributes #9

Open traeighsea opened 2 months ago

traeighsea commented 2 months ago

Description

Motivation

Most if not all metatiles should have the same collision every time they're used. But instead the mapgrid actually stores the collision instead of with the attribute from the metatiles. So ideally we could have a "default" collision that gets grabbed each time the metatile is placed, and automatically fills in the mapgrid/block data collision.

Design

Add a mask to the metatile attributes that add a default collision. And then within porymap implement something to pull from the metatile attribute to set the default collision when placing a tile.

This will require adding a default collision to every metatile attribute, which we should be able to script. A script could be made to look at the primary and secondary tileset, and create map each use of each metatile, then iterate through every map and identify the number of times each collision is used in the mapgrid for each metatile, and then take the most used collision as the default collision to set for the attribute metatile.

*Note: This will require changes to porymap to work. **Must be done after: https://github.com/traeighsea/pokeemerald-expansion-regions/issues/14

Discord contact info

@Traeighsea