So I'm poking around with FFHackster, and while in the map editor I noticed something slightly unexpected. As anyone familiar with FF knows, there are some treasure chests that just don't contain anything. I'd assumed that there were map tiles devoted specifically to empty chests. However, I'm finding that that is not the case; the empty chests are actually "normal" treasure tiles (in Marsh Cave B3 they're Iron armors, while in Marsh Cave B2 they're Short swords). Apparently, they're only empty because the "already been opened" condition is already applied to them before the player attempts to open them.
Now here's where I started wondering about stuff. How does the game determine whether or not a given chest starts out empty? And how can one change this variable for a given treasure chest? I can't seem to find anything pertaining to it in Hackster. This could potentially be a bit troublesome for me, because I want to replace one of the empty chests with a chest that contains something, but how could I ensure that the new chest will not also start out empty?