--- infinityanimations\setup-infinityanimations.tp2	Wed May 12 20:49:14 2010
+++ C:\BWP Patchstudio\patched files\infinityanimations\setup-infinityanimations.tp2	Fri Oct 07 18:41:52 2016
@@ -1,6 +1,6 @@
 BACKUP ~infinityanimations/backup~
 AUTHOR ~www.shsforums.net/forum/594-infinity-animations/~
-VERSION ~v5~
+VERSION ~v5 BWP Fix~
 README ~infinityanimations/documentation/infinityanimations.html~
 
 //! Platform variables //////////////////////////////////////////////////////
@@ -293,92 +293,183 @@
 
   ACTION_IF ((FILE_EXISTS_IN_GAME ~bpdrifm1.cre~) OR (FILE_EXISTS_IN_GAME ~cbbgbera.cre~) OR (FILE_EXISTS_IN_GAME ~f_bel.cre~) OR (FILE_EXISTS_IN_GAME ~brefr1.cre~) OR (FILE_EXISTS_IN_GAME ~cbssyeti.cre~) OR (FILE_EXISTS_IN_GAME ~purang.cre~)) BEGIN //BP, CtB, Drizzt Saga, RoT, SOS, TS
 
-    ACTION_IF FILE_EXISTS_IN_GAME ~mgh2a4.bam~ BEGIN //ghoul_iwd
-      DISABLE_FROM_KEY ~mgh2a4.bam~
+    ACTION_FOR_EACH bm IN ~mgh2a3~ ~mgh2a4~ ~mgh2ca~ ~mgh2sp~ BEGIN //ghoul_iwd
+      ACTION_IF FILE_EXISTS_IN_GAME ~%bm%.bam~ BEGIN
+       ACTION_IF FILE_EXISTS ~override/%bm%.bam~ BEGIN
+          DELETE ~override/%bm%.bam~
+        END
+        DISABLE_FROM_KEY ~%bm%.bam~
+      END
     END
 
-    ACTION_IF FILE_EXISTS_IN_GAME ~mgh2a4e.bam~ BEGIN
-      DISABLE_FROM_KEY ~mgh2a4e.bam~
+    ACTION_FOR_EACH bm IN ~mgh2a3e~ ~mgh2a4e~ ~mgh2cae~ ~mgh2spe~ BEGIN
+      ACTION_IF FILE_EXISTS_IN_GAME ~%bm%.bam~ BEGIN
+       ACTION_IF FILE_EXISTS ~override/%bm%.bam~ BEGIN
+          DELETE ~override/%bm%.bam~
+        END
+        DISABLE_FROM_KEY ~%bm%.bam~
+      END
     END
 
     ACTION_IF FILE_EXISTS_IN_GAME ~mgh3a4.bam~ BEGIN //ghast_iwd
+      ACTION_IF FILE_EXISTS ~override/mgh3a4.bam~ BEGIN
+        DELETE ~override/mgh3a4.bam~
+      END
       DISABLE_FROM_KEY ~mgh3a4.bam~
     END
 
     ACTION_IF FILE_EXISTS_IN_GAME ~mgh3a4e.bam~ BEGIN
+      ACTION_IF FILE_EXISTS ~override/mgh3a4e.bam~ BEGIN
+        DELETE ~override/mgh3a4e.bam~
+      END
       DISABLE_FROM_KEY ~mgh3a4e.bam~
     END
 
     ACTION_FOR_EACH bm IN ~mgo4a2~ ~mgo4ca~ ~mgo4sp~ BEGIN //goblinelite_bow
       ACTION_IF FILE_EXISTS_IN_GAME ~%bm%.bam~ BEGIN
+        ACTION_IF FILE_EXISTS ~override/%bm%.bam~ BEGIN
+          DELETE ~override/%bm%.bam~
+        END
         DISABLE_FROM_KEY ~%bm%.bam~
       END
     END
 
     ACTION_FOR_EACH bm IN ~mgo4a2e~ ~mgo4cae~ ~mgo4spe~ BEGIN
       ACTION_IF FILE_EXISTS_IN_GAME ~%bm%.bam~ BEGIN
+        ACTION_IF FILE_EXISTS ~override/%bm%.bam~ BEGIN
+          DELETE ~override/%bm%.bam~
+        END
         DISABLE_FROM_KEY ~%bm%.bam~
       END
     END
 
     ACTION_FOR_EACH bm IN ~mhisa4~ ~mhisca~ ~mhissp~ BEGIN //histachii
       ACTION_IF FILE_EXISTS_IN_GAME ~%bm%.bam~ BEGIN
+        ACTION_IF FILE_EXISTS ~override/%bm%.bam~ BEGIN
+          DELETE ~override/%bm%.bam~
+        END
         DISABLE_FROM_KEY ~%bm%.bam~
       END
     END
 
     ACTION_FOR_EACH bm IN ~mhisa4e~ ~mhiscae~ ~mhisspe~ BEGIN
       ACTION_IF FILE_EXISTS_IN_GAME ~%bm%.bam~ BEGIN
+        ACTION_IF FILE_EXISTS ~override/%bm%.bam~ BEGIN
+          DELETE ~override/%bm%.bam~
+        END
         DISABLE_FROM_KEY ~%bm%.bam~
       END
     END
 
     ACTION_FOR_EACH bm IN ~mlica3~ ~mlica4~ BEGIN //lich_iwd
       ACTION_IF FILE_EXISTS_IN_GAME ~%bm%.bam~ BEGIN
+        ACTION_IF FILE_EXISTS ~override/%bm%.bam~ BEGIN
+          DELETE ~override/%bm%.bam~
+        END
         DISABLE_FROM_KEY ~%bm%.bam~
       END
     END
 
     ACTION_FOR_EACH bm IN ~mlica3e~ ~mlica4e~ BEGIN
       ACTION_IF FILE_EXISTS_IN_GAME ~%bm%.bam~ BEGIN
+        ACTION_IF FILE_EXISTS ~override/%bm%.bam~ BEGIN
+          DELETE ~override/%bm%.bam~
+        END
         DISABLE_FROM_KEY ~%bm%.bam~
       END
     END
 
     ACTION_FOR_EACH bm IN ~mtica4~ ~mticca~ ~mticsp~ BEGIN //troll_ice
       ACTION_IF FILE_EXISTS_IN_GAME ~%bm%.bam~ BEGIN
+        ACTION_IF FILE_EXISTS ~override/%bm%.bam~ BEGIN
+          DELETE ~override/%bm%.bam~
+        END
         DISABLE_FROM_KEY ~%bm%.bam~
       END
     END
 
     ACTION_FOR_EACH bm IN ~mtica4e~ ~mticcae~ ~mticspe~ BEGIN
       ACTION_IF FILE_EXISTS_IN_GAME ~%bm%.bam~ BEGIN
+        ACTION_IF FILE_EXISTS ~override/%bm%.bam~ BEGIN
+          DELETE ~override/%bm%.bam~
+        END
+        DISABLE_FROM_KEY ~%bm%.bam~
+      END
+    END
+
+    ACTION_FOR_EACH bm IN ~µdba1~ ~µdba2~ ~µdbca~ ~µdbde~ ~µdbgh~ ~µdbgu~ ~µdbsc~ ~µdbsd~ ~µdbsl~ ~µdbsp~ ~µdbtw~ ~µdbwk~ BEGIN //umber_hulks_iwd
+      ACTION_IF FILE_EXISTS_IN_GAME ~%bm%.bam~ BEGIN
+       ACTION_IF FILE_EXISTS ~override/%bm%.bam~ BEGIN
+          DELETE ~override/%bm%.bam~
+        END
+        DISABLE_FROM_KEY ~%bm%.bam~
+      END
+    END
+
+    ACTION_FOR_EACH bm IN ~µdba1e~ ~µdba2e~ ~µdbcae~ ~µdbdee~ ~µdbghe~ ~µdbgue~ ~µdbsce~ ~µdbsde~ ~µdbsle~ ~µdbspe~ ~µdbtwe~ ~µdbwke~ BEGIN
+      ACTION_IF FILE_EXISTS_IN_GAME ~%bm%.bam~ BEGIN
+       ACTION_IF FILE_EXISTS ~override/%bm%.bam~ BEGIN
+          DELETE ~override/%bm%.bam~
+        END
+        DISABLE_FROM_KEY ~%bm%.bam~
+      END
+    END
+
+    ACTION_FOR_EACH bm IN ~mumba3~ BEGIN //umber_hulks_iwd
+      ACTION_IF FILE_EXISTS_IN_GAME ~%bm%.bam~ BEGIN
+       ACTION_IF FILE_EXISTS ~override/%bm%.bam~ BEGIN
+          DELETE ~override/%bm%.bam~
+        END
+        DISABLE_FROM_KEY ~%bm%.bam~
+      END
+    END
+
+    ACTION_FOR_EACH bm IN ~mumba3e~ BEGIN
+      ACTION_IF FILE_EXISTS_IN_GAME ~%bm%.bam~ BEGIN
+       ACTION_IF FILE_EXISTS ~override/%bm%.bam~ BEGIN
+          DELETE ~override/%bm%.bam~
+        END
         DISABLE_FROM_KEY ~%bm%.bam~
       END
     END
 
     ACTION_IF FILE_EXISTS_IN_GAME ~mwiga4.bam~ BEGIN //wight
+      ACTION_IF FILE_EXISTS ~override/mwiga4.bam~ BEGIN
+        DELETE ~override/mwiga4.bam~
+      END
       DISABLE_FROM_KEY ~mwiga4.bam~
     END
 
     ACTION_IF FILE_EXISTS_IN_GAME ~mwiga4e.bam~ BEGIN
+      ACTION_IF FILE_EXISTS ~override/mwiga4e.bam~ BEGIN
+        DELETE ~override/mwiga4e.bam~
+      END
       DISABLE_FROM_KEY ~mwiga4e.bam~
     END
 
     ACTION_FOR_EACH bm IN ~mzo2a3~ ~mzo2a4~ ~mzo2ca~ ~mzo2sp~ BEGIN //zombie_yellow
       ACTION_IF FILE_EXISTS_IN_GAME ~%bm%.bam~ BEGIN
+        ACTION_IF FILE_EXISTS ~override/%bm%.bam~ BEGIN
+          DELETE ~override/%bm%.bam~
+        END
         DISABLE_FROM_KEY ~%bm%.bam~
       END
     END
 
     ACTION_FOR_EACH bm IN ~mzo2a3e~ ~mzo2a4e~ ~mzo2cae~ ~mzo2spe~ BEGIN
       ACTION_IF FILE_EXISTS_IN_GAME ~%bm%.bam~ BEGIN
+        ACTION_IF FILE_EXISTS ~override/%bm%.bam~ BEGIN
+          DELETE ~override/%bm%.bam~
+        END
         DISABLE_FROM_KEY ~%bm%.bam~
       END
     END
 
     ACTION_FOR_EACH bm IN ~mgh2aa1~ ~mgh2aa1e~ ~mgh2aa2~ ~mgh2aa2e~ ~mgh2agh~ ~mgh2aghe~ ~mgh2agu~ ~mgh2ague~ ~mgh2asc~ ~mgh2asce~ ~mgh2asd~ ~mgh2asde~ ~mgh2asl~ ~mgh2asle~ ~mgh2awk~ ~mgh2awke~ ~mgh2ma1~ ~mgh2ma1e~ ~mgh2ma2~ ~mgh2ma2e~ ~mgh2mgh~ ~mgh2mghe~ ~mgh2mgu~ ~mgh2mgue~ ~mgh2msc~ ~mgh2msce~ ~mgh2msd~ ~mgh2msde~ ~mgh2msl~ ~mgh2msle~ ~mgh2mwk~ ~mgh2mwke~ ~mgh2sa1~ ~mgh2sa1e~ ~mgh2sa2~ ~mgh2sa2e~ ~mgh2sgh~ ~mgh2sghe~ ~mgh2sgu~ ~mgh2sgue~ ~mgh2ssc~ ~mgh2ssce~ ~mgh2ssd~ ~mgh2ssde~ ~mgh2ssl~ ~mgh2ssle~ ~mgh2swk~ ~mgh2swke~ ~mgh3aa1~ ~mgh3aa1e~ ~mgh3aa2~ ~mgh3aa2e~ ~mgh3agh~ ~mgh3aghe~ ~mgh3agu~ ~mgh3ague~ ~mgh3asc~ ~mgh3asce~ ~mgh3asd~ ~mgh3asde~ ~mgh3asl~ ~mgh3asle~ ~mgh3awk~ ~mgh3awke~ ~mgh3sa1~ ~m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~mwigaa1e~ ~mwigaa2~ ~mwigaa2e~ ~mwigaa4~ ~mwigaa4e~ ~mwigaca~ ~mwigacae~ ~mwigagh~ ~mwigaghe~ ~mwigagu~ ~mwigague~ ~mwigasc~ ~mwigasce~ ~mwigasd~ ~mwigasde~ ~mwigasl~ ~mwigasle~ ~mwigasp~ ~mwigaspe~ ~mwigawk~ ~mwigawke~ ~mwigma1~ ~mwigma1e~ ~mwigma2~ ~mwigma2e~ ~mwigma4~ ~mwigma4e~ ~mwigmca~ ~mwigmcae~ ~mwigmgh~ ~mwigmghe~ ~mwigmgu~ ~mwigmgue~ ~mwigmsc~ ~mwigmsce~ ~mwigmsd~ ~mwigmsde~ ~mwigmsl~ ~mwigmsle~ ~mwigmsp~ ~mwigmspe~ ~mwigmwk~ ~mwigmwke~ ~mwigsa1~ ~mwigsa1e~ ~mwigsa2~ ~mwigsa2e~ ~mwigsa4~ ~mwigsa4e~ ~mwigsca~ ~mwigscae~ ~mwigsgh~ ~mwigsghe~ ~mwigsgu~ ~mwigsgue~ ~mwigssc~ ~mwigssce~ ~mwigssd~ ~mwigssde~ ~mwigssl~ ~mwigssle~ ~mwigssp~ ~mwigsspe~ ~mwigswk~ ~mwigswke~ BEGIN //stacked slots
       ACTION_IF FILE_EXISTS_IN_GAME ~%bm%.bam~ BEGIN
+        ACTION_IF FILE_EXISTS ~override/%bm%.bam~ BEGIN
+          DELETE ~override/%bm%.bam~
+        END
         DISABLE_FROM_KEY ~%bm%.bam~
       END
     END
@@ -958,7 +1049,7 @@
   END
 END
 
-ACTION_FOR_EACH nb IN ~abishai1.cre~ ~babi.cre~ ~duegabis.cre~ ~godabis1.cre~ ~godabis2.cre~ ~grenabi1.cre~ ~nsabish.cre~ ~psbaat02.cre~ ~psbaat2a.cre~ ~rabi.cre~ ~redabi01.cre~ ~remorhaz.cre~ ~remorle.cre~ ~wardabi1.cre~ ~wardabi2.cre~ BEGIN
+ACTION_FOR_EACH nb IN ~abishai1~ ~babi~ ~duegabis~ ~godabis1~ ~godabis2~ ~grenabi1~ ~nsabish~ ~psbaat02~ ~psbaat2a~ ~rabi~ ~redabi01~ ~remorhaz~ ~remorle~ ~wardabi1~ ~wardabi2~ BEGIN
   ACTION_IF FILE_EXISTS_IN_GAME ~%nb%.cre~ BEGIN //Abishai
     COPY_EXISTING ~%nb%.cre~ ~override~
       PATCH_INCLUDE ~infinityanimations/lib/fj_cre_validity.tpp~
@@ -1282,7 +1373,7 @@
   END
 END
 
-ACTION_FOR_EACH t-bcre IN ~%tsu%cuchol.cre~ ~dreself1~ ~dreself3~ ~dreself5~ ~dreself7~ ~z_2bibli~ BEGIN
+ACTION_FOR_EACH t-bcre IN ~%tsu%cuchol~ ~dreself1~ ~dreself3~ ~dreself5~ ~dreself7~ ~z_2bibli~ BEGIN
   ACTION_IF FILE_EXISTS_IN_GAME ~%t-bcre%.cre~ BEGIN //Male Elf Mages
     COPY_EXISTING ~%t-bcre%.cre~ ~override~
       PATCH_INCLUDE ~infinityanimations/lib/fj_cre_validity.tpp~
@@ -2061,7 +2152,7 @@
   BUT_ONLY
 END
 
-ACTION_FOR_EACH nb IN ~demmau01~ ~gortan6~ ~obsdem04.cre~ BEGIN
+ACTION_FOR_EACH nb IN ~demmau01~ ~gortan6~ ~obsdem04~ BEGIN
   ACTION_IF FILE_EXISTS_IN_GAME ~%nb%.cre~ BEGIN //Maurezhi
     COPY_EXISTING ~%nb%.cre~ ~override~
       PATCH_INCLUDE ~infinityanimations/lib/fj_cre_validity.tpp~
@@ -2404,7 +2495,7 @@
   END
 END
 
-ACTION_FOR_EACH nb IN ~bhghoul2~ ~%tsu%ghast~ ~ghast01~ ~%tsu%ghastd~ ~%tsu%ghasts~ ~ghastsu~ ~gmayor~ ~%tsu%grael~ ~gron~ ~nevm3~ ~%tsu%sewerf3~ ~xghast1~ BEGIN
+ACTION_FOR_EACH nb IN ~bhghoul2~ ~%tsu%ghast~ ~ghast01~ ~%tsu%ghastd~ ~%tsu%ghasts~ ~gmayor~ ~%tsu%grael~ ~gron~ ~nevm3~ ~%tsu%sewerf3~ ~xghast1~ BEGIN
   ACTION_IF FILE_EXISTS_IN_GAME ~%nb%.cre~ BEGIN //Ghasts
     COPY_EXISTING ~%nb%.cre~ ~override~
       PATCH_INCLUDE ~infinityanimations/lib/fj_cre_validity.tpp~
@@ -2476,7 +2567,7 @@
       PATCH_INCLUDE ~infinityanimations/lib/fj_cre_validity.tpp~
       PATCH_IF vl BEGIN
         PATCH_INCLUDE ~infinityanimations/lib/fj_cre_reindex.tpp~
-        WRITE_SHORT 0x28 0xe310 //Animation (ghoul)
+        WRITE_SHORT 0x28 0x7700 //Animation (ghoul)
         WRITE_BYTE 0x271 4 //General (undead)
         WRITE_BYTE 0x272 108 //Race (ghoul)
         WRITE_BYTE 0x273 116 //Class (ghoul)
@@ -3300,7 +3391,7 @@
       PATCH_INCLUDE ~infinityanimations/lib/fj_cre_validity.tpp~
       PATCH_IF vl BEGIN
         PATCH_INCLUDE ~infinityanimations/lib/fj_cre_reindex.tpp~
-        WRITE_SHORT 0x28 0xe0d0 //Animation (umberhulk_iwd)
+        WRITE_SHORT 0x28 0x7f11 //Animation (umberhulk_iwd)
         WRITE_BYTE 0x237 1 //male
         READ_BYTE 0x275 gd //Gender
         PATCH_IF gd != 6 BEGIN //If not summoned
