--- Setup-RPG-KP.tp2	Tue Feb 28 21:14:44 2006
+++ C:\BWP Patchstudio\patched files\Setup-RPG-KP.tp2	Sun Jan 10 12:37:30 2016
@@ -1,6 +1,6 @@
 BACKUP ~RPG-KP\backup~
 AUTHOR ~Olryx2@Yahoo.co.uk~
-
+VERSION ~v1.0 BWP Fix~
 ALWAYS
   AT_INTERACTIVE_EXIT ~VIEW RPG-KP/readme-RPGKP.chm~
 END
@@ -355,47 +355,47 @@
  BUT_ONLY_IF_IT_CHANGES
 
 COPY_EXISTING ~kit.ids~ ~override~
-REPLACE_TEXTUALLY ~.*\bTRUECLASS\b~              ~0x4000 TRUECLASS~
-REPLACE_TEXTUALLY ~.*\bBERSERKER\b~              ~0x4001 BERSERKER~
-REPLACE_TEXTUALLY ~.*\bWIZARDSLAYER\b~           ~0x4002 WIZARDSLAYER~
-REPLACE_TEXTUALLY ~.*\bKENSAI\b~                 ~0x4003 KENSAI~
-REPLACE_TEXTUALLY ~.*\bCAVALIER\b~               ~0x4004 CAVALIER~
-REPLACE_TEXTUALLY ~.*\bINQUISITOR\b~             ~0x4005 INQUISITOR~
-REPLACE_TEXTUALLY ~.*\bUNDEADHUNTER\b~           ~0x4006 UNDEADHUNTER~
-REPLACE_TEXTUALLY ~.*\bMAGESCHOOL_ABJURER\b~     ~0x0040 MAGESCHOOL_ABJURER~
-REPLACE_TEXTUALLY ~.*\bMAGESCHOOL_CONJURER\b~    ~0x0080 MAGESCHOOL_CONJURER~
-REPLACE_TEXTUALLY ~.*\bMAGESCHOOL_DIVINER\b~     ~0x0100 MAGESCHOOL_DIVINER~
-REPLACE_TEXTUALLY ~.*\bMAGESCHOOL_ENCHANTER\b~   ~0x0200 MAGESCHOOL_ENCHANTER~
-REPLACE_TEXTUALLY ~.*\bMAGESCHOOL_ILLUSIONIST\b~ ~0x0400 MAGESCHOOL_ILLUSIONIST~
-REPLACE_TEXTUALLY ~.*\bMAGESCHOOL_INVOKER\b~     ~0x0800 MAGESCHOOL_INVOKER~
-REPLACE_TEXTUALLY ~.*\bMAGESCHOOL_NECROMANCER\b~ ~0x1000 MAGESCHOOL_NECROMANCER~
-REPLACE_TEXTUALLY ~.*\bMAGESCHOOL_TRANSMUTER\b~  ~0x2000 MAGESCHOOL_TRANSMUTER~
-REPLACE_TEXTUALLY ~.*\bMAGESCHOOL_GENERALIST\b~  ~0x0000 WILDMAGE~
-REPLACE_TEXTUALLY ~.*\bFERALAN\b~                ~0x4007 FERALAN~
-REPLACE_TEXTUALLY ~.*\bSTALKER\b~                ~0x4008 STALKER~
-REPLACE_TEXTUALLY ~.*\bBEASTMASTER\b~            ~0x4009 BEASTMASTER~
-REPLACE_TEXTUALLY ~.*\bASSASIN\b~                ~0x400A ASSASIN~
-REPLACE_TEXTUALLY ~.*\bBOUNTYHUNTER\b~           ~0x400B BOUNTYHUNTER~
-REPLACE_TEXTUALLY ~.*\bSWASHBUCKLER\b~           ~0x400C SWASHBUCKLER~
-REPLACE_TEXTUALLY ~.*\bBLADE\b~                  ~0x400D BLADE~
-REPLACE_TEXTUALLY ~.*\bJESTER\b~                 ~0x400E JESTER~
-REPLACE_TEXTUALLY ~.*\bSKALD\b~                  ~0x400F SKALD~
-REPLACE_TEXTUALLY ~.*\bGODTALOS\b~               ~0x4013 GODTALOS~
-REPLACE_TEXTUALLY ~.*\bGODHELM\b~                ~0x4014 GODHELM~
-REPLACE_TEXTUALLY ~.*\bGODLATHANDER\b~           ~0x4015 GODLATHANDER~
-REPLACE_TEXTUALLY ~.*\bTOTEMIC\b~                ~0x4010 TOTEMIC~
-REPLACE_TEXTUALLY ~.*\bSHAPESHIFTER\b~           ~0x4011 SHAPESHIFTER~
-REPLACE_TEXTUALLY ~.*\bBEASTFRIEND\b~            ~0x4012 BEASTFRIEND~
-REPLACE_TEXTUALLY ~.*\bBARBARIAN\b~              ~0x0000 BARBARIAN~
-REPLACE_TEXTUALLY ~.*\bWILDMAGE\b~               ~0x0000 WILDMAGE~
+REPLACE_TEXTUALLY ~.*[ %TAB%]TRUECLASS[ %TAB%]*~              ~0x4000 TRUECLASS~
+REPLACE_TEXTUALLY ~.*[ %TAB%]BERSERKER[ %TAB%]*~              ~0x4001 BERSERKER~
+REPLACE_TEXTUALLY ~.*[ %TAB%]WIZARDSLAYER[ %TAB%]*~           ~0x4002 WIZARDSLAYER~
+REPLACE_TEXTUALLY ~.*[ %TAB%]KENSAI[ %TAB%]*~                 ~0x4003 KENSAI~
+REPLACE_TEXTUALLY ~.*[ %TAB%]CAVALIER[ %TAB%]*~               ~0x4004 CAVALIER~
+REPLACE_TEXTUALLY ~.*[ %TAB%]INQUISITOR[ %TAB%]*~             ~0x4005 INQUISITOR~
+REPLACE_TEXTUALLY ~.*[ %TAB%]UNDEADHUNTER[ %TAB%]*~           ~0x4006 UNDEADHUNTER~
+REPLACE_TEXTUALLY ~.*[ %TAB%]MAGESCHOOL_ABJURER[ %TAB%]*~     ~0x0040 MAGESCHOOL_ABJURER~
+REPLACE_TEXTUALLY ~.*[ %TAB%]MAGESCHOOL_CONJURER[ %TAB%]*~    ~0x0080 MAGESCHOOL_CONJURER~
+REPLACE_TEXTUALLY ~.*[ %TAB%]MAGESCHOOL_DIVINER[ %TAB%]*~     ~0x0100 MAGESCHOOL_DIVINER~
+REPLACE_TEXTUALLY ~.*[ %TAB%]MAGESCHOOL_ENCHANTER[ %TAB%]*~   ~0x0200 MAGESCHOOL_ENCHANTER~
+REPLACE_TEXTUALLY ~.*[ %TAB%]MAGESCHOOL_ILLUSIONIST[ %TAB%]*~ ~0x0400 MAGESCHOOL_ILLUSIONIST~
+REPLACE_TEXTUALLY ~.*[ %TAB%]MAGESCHOOL_INVOKER[ %TAB%]*~     ~0x0800 MAGESCHOOL_INVOKER~
+REPLACE_TEXTUALLY ~.*[ %TAB%]MAGESCHOOL_NECROMANCER[ %TAB%]*~ ~0x1000 MAGESCHOOL_NECROMANCER~
+REPLACE_TEXTUALLY ~.*[ %TAB%]MAGESCHOOL_TRANSMUTER[ %TAB%]*~  ~0x2000 MAGESCHOOL_TRANSMUTER~
+REPLACE_TEXTUALLY ~.*[ %TAB%]MAGESCHOOL_GENERALIST[ %TAB%]*~  ~0x4000 MAGESCHOOL_GENERALIST~
+REPLACE_TEXTUALLY ~.*[ %TAB%]FERALAN[ %TAB%]*~                ~0x4007 FERALAN~
+REPLACE_TEXTUALLY ~.*[ %TAB%]STALKER[ %TAB%]*~                ~0x4008 STALKER~
+REPLACE_TEXTUALLY ~.*[ %TAB%]BEASTMASTER[ %TAB%]*~            ~0x4009 BEASTMASTER~
+REPLACE_TEXTUALLY ~.*[ %TAB%]ASSASIN[ %TAB%]*~                ~0x400A ASSASIN~
+REPLACE_TEXTUALLY ~.*[ %TAB%]BOUNTYHUNTER[ %TAB%]*~           ~0x400B BOUNTYHUNTER~
+REPLACE_TEXTUALLY ~.*[ %TAB%]SWASHBUCKLER[ %TAB%]*~           ~0x400C SWASHBUCKLER~
+REPLACE_TEXTUALLY ~.*[ %TAB%]BLADE[ %TAB%]*~                  ~0x400D BLADE~
+REPLACE_TEXTUALLY ~.*[ %TAB%]JESTER[ %TAB%]*~                 ~0x400E JESTER~
+REPLACE_TEXTUALLY ~.*[ %TAB%]SKALD[ %TAB%]*~                  ~0x400F SKALD~
+REPLACE_TEXTUALLY ~.*[ %TAB%]GODTALOS[ %TAB%]*~               ~0x4013 GODTALOS~
+REPLACE_TEXTUALLY ~.*[ %TAB%]GODHELM[ %TAB%]*~                ~0x4014 GODHELM~
+REPLACE_TEXTUALLY ~.*[ %TAB%]GODLATHANDER[ %TAB%]*~           ~0x4015 GODLATHANDER~
+REPLACE_TEXTUALLY ~.*[ %TAB%]TOTEMIC[ %TAB%]*~                ~0x4010 TOTEMIC~
+REPLACE_TEXTUALLY ~.*[ %TAB%]SHAPESHIFTER[ %TAB%]*~           ~0x4011 SHAPESHIFTER~
+REPLACE_TEXTUALLY ~.*[ %TAB%]BEASTFRIEND[ %TAB%]*~            ~0x4012 BEASTFRIEND~
+REPLACE_TEXTUALLY ~.*[ %TAB%]BARBARIAN[ %TAB%]*~              ~0x40000000 BARBARIAN~
+REPLACE_TEXTUALLY ~.*[ %TAB%]WILDMAGE[ %TAB%]*~               ~0x80000000 WILDMAGE~
 BUT_ONLY_IF_IT_CHANGES
 
 APPEND ~kit.ids~ ~0x4000 TRUECLASS~
-UNLESS ~\bTRUECLASS\b~
-APPEND ~kit.ids~ ~0x0000 BARBARIAN~
-UNLESS ~\bBARBARIAN\b~
-APPEND ~kit.ids~ ~0x0000 WILDMAGE~
-UNLESS ~\bWILDMAGE\b~
+UNLESS ~[ %TAB%]TRUECLASS[ %TAB%]*~
+APPEND ~kit.ids~ ~0x40000000 BARBARIAN~
+UNLESS ~[ %TAB%]BARBARIAN[ %TAB%]*~
+APPEND ~kit.ids~ ~0x80000000  WILDMAGE~
+UNLESS ~[ %TAB%]WILDMAGE[ %TAB%]*~
 
 ACTION_IF FILE_EXISTS ~override/w#ssword.2da~
 THEN BEGIN
@@ -1899,7 +1899,7 @@
 BEGIN ~Kitpack Component - Dual-wielding for thrown weapons tweak~
 
 COPY ~RPG-KP/dualthrown/copy~ ~override~
-ACTION_IF FILE_EXISTS ~override/c2ax1h01.itm~
+ACTION_IF MOD_IS_INSTALLED setup-itemupgrade.tp2 0
 THEN BEGIN
 COPY_EXISTING ~c2ax1h01.itm~ ~override/c2ax1h01.itm~
      READ_LONG NAME2 ~azurname~
@@ -1911,7 +1911,7 @@
      WRITE_LONG NAME2 ~%azurname%~
      WRITE_LONG IDENTIFIED_DESC ~%azurdesc%~
 COMPILE ~RPG-KP/dualthrown/dtsoa.d~
-ACTION_IF FILE_EXISTS ~Data/25Dialog.bif~
+ACTION_IF MOD_IS_INSTALLED setup-itemupgrade.tp2 1
 THEN BEGIN
 COMPILE ~RPG-KP/dualthrown/dttob.d~
 END
