The MakeSailDmg (chr_idx, dmg) function does not require BattleInterface to be present on the screen because the BattleInterface.c script is a core include file. But, it does require that the ship be loaded to sea, in the current scene to work. If you want to emulate that, without the ship currently loaded at sea, it functions like the following:
MakeSailDmg calls message SendMessage(&objSail,"lslf", MSG_SAIL_SCRIPT_PROCESSING,"RandomSailsDmg", chrIdx,dmg);
The objSail ("sail" class from engine) will execute RandomSailsDmg routine.
RandomSailsDmg iterates all the ship's sails to determine where to add holes for new damage.
RandomSailsDmg then calls event "evntRandomSailDmg" which is processed by script function ProcessRandomSailDmg().
So if you send "evntRandomSailDmg" directly, you can probably achieve what you want:
Event("evntRandomSailDmg", "lslfflll", chrIdx, nodeName, groupNum, fDmg, fSPow, newHoleCount, maxHole, hdat_new);
hdat_new is a bit mask of the hole count for the sail. Here is the c++ function: { DWORD v = 0, t = 1; for (int i = 0; i < 12; i++, t <<= 1)if (ss.hole[i])v |= t; return v; }