I've been trying to do something similar and ran into a similar issue. I'm trying to remove all death animation frames from all the files in that folder but nothing happens if I run the script.
If I open an .act first and then run the script, it seems to work but doesn't save the files, then asks me to save the single .act I opened, which did get the frames removed correctly.
Anyone able to help?
var path = @"C:\sprite\test";
foreach (var actFile in Directory.GetFiles(path, "*.act")) {
var sprFile = actFile.ReplaceExtension(".spr");
var act2 = new Act(actFile, sprFile);
for (int aid = 32; aid < act.Actions.Count; aid++) {
for (int fid = act.Actions[aid].Frames.Count - 1; fid >= 1; fid--) {
act[aid].Frames.RemoveAt(fid);
}
}
act2.SaveWithSprite(actFile, sprFile);
}