The code is already scanning all files and keeping track of the missing ones; also, duplicate entries in SAV files cannot be loaded (at least in the BG2 engine). I was suggesting this, however (hopefully it'll compile and work correctly):
diff --git a/src/tppatch.ml b/src/tppatch.ml
index 7a607f1..0ac272a 100755
--- a/src/tppatch.ml
+++ b/src/tppatch.ml
@@ -1644,9 +1644,12 @@ let rec process_patch2_real process_action tp patch_filename game buff p =
List.iter (fun file ->
let file = String.uppercase(eval_pe_str file) in
Var.set_string "SAV_FILE" file;
+ let a, b = split filename in
+ let new_buff, path =
+ Load.load_resource "INNER_PATCH_FILE" game true a b in
let result = List.fold_left (fun acc elt ->
process_patch2 patch_filename game acc elt)
- "" pl in
+ new_buff pl in
Queue.push {Sav.filename = file;
Sav.contents = result} nsav;
) !files;