You could create a combo which represents each status effect (combo so it can have whatever animation).
Then, in a global script, loop through each NPC, and use DrawCombo (or FastCombo) to draw it at a position above the enemy.
If you have a custom status effect system, you would simply check for each status, and draw the combo if the status is present.
As for script setup, I'd probably create a function for the status drawing; something like this
const int COMBO_STUNNED = 0;
const int CSET_STUNNED = 0;
const int STATUSFX_LAYER = 5;
void drawStatus(npc n)
{
if(n->Stun)
{
Screen->FastCombo(STATUSFX_LAYER, n->X, n->Y-8, COMBO_STUNNED, CSET_STUNNED, OP_OPAQUE);
}
//Add other `if` checks for other statuses here
}
Then to loop, do
for(int q = 1; q <= Screen->NumNPCs(); ++q)
{
npc n = Screen->LoadNPC(q);
drawStatus(n);
//Anything else you need to do globally for every NPC can be done here
}
Or, in 2.55, you could call it as part of an npc script instead of using a global loop. For any existing NPC script, you'd need to add `drawStatus(this)` calls- for any npcs without scripts, you'd need to give them a script which calls `drawStatus` each frame.
(Note: script thrown together quickly and not compile-tested, may contain typos)