Lenophis: Thanks for that RAM tip, that seems to be working like a charm! Before I had to do some wonky checks so this is much nicer
Anyway, I've been racking my brain trying to figure out how to tell when there's a menu on top of the enemy name box or not - here's an example:https://www.youtube.com/watch?v=6EGY9uJ_WCs#t=960
As you can see, I still have it print the enemy names even when other menus are on top of the names in the game - I'd like to be able to hide the names when the names are obscured. I've tried messing with the VRAM stuff to check when tiles are covered up, but it doesn't work the way I expected it. Instead, it looks like some sort of literal layering is happening, although not on the normal BG1/BG2/BG3/BG4 type of level. I'm not sure how the battle menu display system works, and I've tried fiddling with the data in $8991 but it seems unrelated to what I'm going for. I would think the relevant data would be nearby though.
If anyone can help, I'd be super grateful! I also need to share some of my own RAM findings sometime.