huderlem / porymap

Map editor for pokeemerald, pokefirered, and pokeruby
https://huderlem.github.io/porymap/
GNU Lesser General Public License v3.0
466 stars 93 forks source link

Event elevation defaults to 0 #643

Open GriffinRichards opened 2 days ago

GriffinRichards commented 2 days ago

Should investigate the games to see if it makes more sense to use the standard default elevation (3) or to use the elevation of the underlying map space the event is created on (or even update the elevation as it's moved?).

In either case the code is a little misleading, we set the default elevation to the elevation from the new map fill settings, but this is never actually used because all of the Event classes override setDefaultValues

EDIT: After checking how the games handles this, it looks like the order of preference for defaults should roughly be elevation of map space they're positioned on > 0 > 3. In general the games will override the elevation in the event data with the elevation of the map space, but it could be possible to get a situation where the event's elevation disagrees with the map space (which -- with exception to bridges -- it probably shouldn't).