/* TP2 file by Cuv
   November 29, 2007
   WeiDU v1.99*/

BACKUP ~CVGhosts/Backup~

AUTHOR ~cuvieronius@aol.com~

/**********************************************************************
 *************************************************************************                                                                   **
**                         CVGhosts Installer                        **
**                 Composite slot for 9 animations                   **
**                          By Cuvieronius                           **                           **                                V1.0                               **                                   **                                                                   **
**                                                                   ** ***********************************************************************
 **********************************************************************/

BEGIN ~Cuv Animation Slots Part 1: Ghosts~

// TOB Check prior to installing
REQUIRE_FILE ~Data/25Dialog.bif~ ~You must have Throne of Bhaal Installed.~    

/********************************************************
 * Files are done in the following order:
 *
 * COPY DIRECTORY CONTENTS
 * COPY ITEMS WITH STRINGS
 * PATCHING EXISTING CREATURES WITH CORRECT ATTACK ITEM
 * COPY TEST CREATURES WITH STRINGS
 *
 ********************************************************/

/*******************************************************
 * COPY DIRECTORY CONTENTS
 *******************************************************/

PRINT ~ *** Copy directory contents *** ~

PRINT ~ Copying directory contents ~

COPY ~CVGhosts/bam~                   ~override~ 
     ~CVGhosts/ids~                   ~override~ 

/*******************************************************
 * COPY ITEMS WITH STRINGS
 *******************************************************/

PRINT ~ *** Patching existing items *** ~

// Wailing Virgin/Banshee - Axe - Patch item
COPY_EXISTING ~TELWRAI.itm~   ~override/CVGH0RTW.itm~
WRITE_ASCII 0x0022 ~AX~
WRITE_BYTE 0x001c 25
 
// Wailing Virgin/Banshee - Axe
COPY_EXISTING ~AX1H01.itm~   ~override/CVGH01.itm~

// MGHO Ghost IWD - Club
COPY_EXISTING ~BLUN01.itm~   ~override/CVGH02.itm~

// MSH1 Ghost/Shade IWD - Dagger
COPY_EXISTING ~DAGG01.itm~   ~override/CVGH03.itm~

// MSH2 Ghost/Shade IWD - Flail
COPY_EXISTING ~BLUN02.itm~   ~override/CVGH04.itm~

// Shadow PST - Halberd
COPY_EXISTING ~HALB01.itm~   ~override/CVGH05.itm~

// Greater Shadow PST - Mace
COPY_EXISTING ~BLUN04.itm~   ~override/CVGH06.itm~

// True Shadow PST - Quarterstaff
COPY_EXISTING ~STAF01.itm~   ~override/CVGH07.itm~

// Amel/Death NWN - Sword
COPY_EXISTING ~SW1H04.itm~   ~override/CVGH08.itm~

// Night Hag NWN - Warhammer
COPY_EXISTING ~HAMM01.itm~   ~override/CVGH09.itm~

/*******************************************************
 * PATCHING EXISTING CREATURES WITH CORRECT ATTACK ITEM
 *******************************************************/

PRINT ~ *** Patching existing creatures using this animation slot *** ~

// Reassures the user the mod will take a few minutes to install
PRINT ~Please relax, this will take 4 - 10 minutes...~

// Must be done BEFORE I make creatures with this animation, Duh!
// Catch-all item, does good damage for banshee and RTW tomb maidens
COPY_EXISTING_REGEXP ~.*\.cre~ ~override~
  READ_LONG  "0x0028" "animaionIDS"
  PATCH_IF ("%animaionIDS%" = 57586) BEGIN
    ADD_CRE_ITEM ~CVGH0RTW.itm~ #0 #0 #0 ~IDENTIFIED~ ~WEAPON1~ EQUIP
  END

/*******************************************************
 * COPY CREATURES WITH STRINGS
 *******************************************************/

COPY ~CVGhosts/cre/cvtest1.cre~ ~override/CVGH01.cre~
  SAY 0x8   ~Wailing Virgin~ // name
  SAY 0xc   ~Wailing Virgin~
  WRITE_ASCII 0x0280 ~CVGH01~
  WRITE_ASCII 0x04e0 ~CVGH01~
COPY ~CVGhosts/cre/cvtest2.cre~ ~override/CVGH02.cre~
  SAY 0x8   ~MGHO-Ghost~ // name
  SAY 0xc   ~MGHO-Ghost~
  WRITE_ASCII 0x0280 ~CVGH02~
  WRITE_ASCII 0x04e0 ~CVGH02~
COPY ~CVGhosts/cre/cvtest3.cre~ ~override/CVGH03.cre~
  SAY 0x8   ~MSH1-Ghost~ // name
  SAY 0xc   ~MSH1-Ghost~
  WRITE_ASCII 0x0280 ~CVGH03~
  WRITE_ASCII 0x04e0 ~CVGH03~
COPY ~CVGhosts/cre/cvtest4.cre~ ~override/CVGH04.cre~
  SAY 0x8   ~MSH2-Ghost~ // name
  SAY 0xc   ~MSH2-Ghost~
  WRITE_ASCII 0x0280 ~CVGH04~
  WRITE_ASCII 0x04e0 ~CVGH04~
COPY ~CVGhosts/cre/cvtest5.cre~ ~override/CVGH05.cre~
  SAY 0x8   ~SM1B Shadow~ // name
  SAY 0xc   ~SM1B Shadow~
  WRITE_ASCII 0x0280 ~CVGH05~
  WRITE_ASCII 0x04e0 ~CVGH05~
COPY ~CVGhosts/cre/cvtest6.cre~ ~override/CVGH06.cre~
  SAY 0x8   ~SM2B Greater Shadow~ // name
  SAY 0xc   ~SM2B Greater Shadow~
  WRITE_ASCII 0x0280 ~CVGH06~
  WRITE_ASCII 0x04e0 ~CVGH06~
COPY ~CVGhosts/cre/cvtest7.cre~ ~override/CVGH07.cre~
  SAY 0x8   ~SM3B True Shadow~ // name
  SAY 0xc   ~SM3B True Shadow~
  WRITE_ASCII 0x0280 ~CVGH07~
  WRITE_ASCII 0x04e0 ~CVGH07~
COPY ~CVGhosts/cre/cvtest8.cre~ ~override/CVGH08.cre~
  SAY 0x8   ~NWN Amel~ // name
  SAY 0xc   ~NWN Amel~
  WRITE_ASCII 0x0280 ~CVGH08~
  WRITE_ASCII 0x04e0 ~CVGH08~
COPY ~CVGhosts/cre/cvtest9.cre~ ~override/CVGH09.cre~
  SAY 0x8   ~NWN Night Hag~ // name
  SAY 0xc   ~NWN Night Hag~
  WRITE_ASCII 0x0280 ~CVGH09~
  WRITE_ASCII 0x04e0 ~CVGH09~
