kxcrl / foundryvtt-retro

MIT License
0 stars 0 forks source link

Set token base independently of TILE_SIZE and allow image overflow #18

Closed kxcrl closed 10 months ago

kxcrl commented 10 months ago

Context

This is for sprites that use the Final Fantasy or Chrono Trigger style, rather than the classic Rogue style. While these still have a defined base (usually 1x1), the image overflows upward onto the tile above. The contents of the above tile sit behind the sprite, giving the illusion of depth.

Feature

Assume that sprite sheets that are multiples of TILE_SIZE greater than 4 have offsets. Use the bottom tile as the base and overflow everything else upward.

tilePosition should more or less make this trivial, since it can just be set to a larger multiple of TILE_SIZE (instead of the current * 0, * -1, etc)

kxcrl commented 10 months ago

It turns out it's not actually possible to infer this directly, since a sprite could technically be 1x4 and intended to only face straight forward. This will have to be a separate setting in the prototype token config.