// 1ppv3 Female dwarves
// finally
// .exe patching and relevant code courtesy of Mike1072 <3
// experimental IWD .exe patching to be blamed on me.

BACKUP ~1pp_female_dwarves/backup~
AUTHOR ~dotdot et Mike1072~

BEGIN ~Separate Avatars for Female Dwarves - Baldur's Gate II~
SUBCOMPONENT ~Separate Avatars for Female Dwarves~ (GAME_IS ~bg2 tob tutu tutu_totsc ca~)

// copy old files while custom ones are incomplete
ACTION_FOR_EACH prefix IN W C F T B BEGIN
  OUTER_SET $ani(~%prefix%~ ~length~) = 0
  
  COPY_EXISTING_REGEXP GLOB ~^CDM%prefix%.*\.BAM~ ~override~
    SET index = $ani(~%prefix%~ ~length~)
    INNER_PATCH_SAVE seq ~%SOURCE_RES%~ BEGIN
      REPLACE_TEXTUALLY ~^CDM%prefix%~ ~~
    END
    SPRINT $ani(~%prefix%~ ~%index%~) ~%seq%~ 
    SET $ani(~%prefix%~ ~length~) += 1
    BUT_ONLY
  
  OUTER_SET length = $ani(~%prefix%~ ~length~)
  OUTER_FOR (i = 0; i < length; i += 1) BEGIN
    OUTER_SPRINT seq $ani(~%prefix%~ ~%i%~)
    COPY_EXISTING ~CDM%prefix%%seq%.BAM~ ~override/CDF%prefix%%seq%.BAM~
  END
END

OUTER_SET fail = 0

ACTION_IF (~%WEIDU_OS%~ STRING_EQUAL_CASE ~win32~ || ~%WEIDU_OS%~ STRING_EQUAL_CASE ~unix~) BEGIN // don't have mac info yet
  // patch executable to write references to new avatars
  COPY ~bgmain.exe~ ~bgmain.exe~
    // determine which version of the game is used, and set the base offset accordingly
    PATCH_IF (SOURCE_SIZE == 7839790 || SOURCE_SIZE == 7843840) BEGIN // ToB v26498
      SET base_off = 0x7524e8
    END
    ELSE PATCH_IF (SOURCE_SIZE == 7843886) BEGIN // ToB v26499
      SET base_off = 0x7514e8
    END
    ELSE PATCH_IF (SOURCE_SIZE == 7417902) BEGIN // SoA v23037
      SET base_off = 0x6ecba4
    END
    ELSE BEGIN
      PATCH_PRINT ~Error: could not determine which version of BG2 you are using.  Please double check that you installed the v26498 patch (if you have ToB) or the v24037 patch (if you have SoA only).~
      SET fail = 1
    END
    
    // these are the values that should have been at the relative relative_offs previously
    SPRINT $old(~0x000~) ~CDMB~
    SPRINT $old(~0x0d8~) ~CDMB~
    SPRINT $old(~0x270~) ~CDMB~
    SPRINT $old(~0x1b0~) ~CDMW~
    SPRINT $old(~0x1c4~) ~CDMW~
    SPRINT $old(~0x1d4~) ~CDMW~
    
    // these are the new values we are assigning
    SPRINT $new(~0x000~) ~CDFB~ // female dwarf cleric
    SPRINT $new(~0x0d8~) ~CDFB~ // female dwarf fighter
    SPRINT $new(~0x270~) ~CDFB~ // female dwarf thief
    SPRINT $new(~0x1b0~) ~CDFW~ // female dwarf mage
    // SPRINT $new(~0x1c4~) ~CDMW~ // male gnome mage
    SPRINT $new(~0x1d4~) ~CDFW~ // female gnome mage
    
    // update values
    PATCH_PHP_EACH new AS relative_off => new_val BEGIN
      PATCH_IF (fail == 0) BEGIN
        SPRINT old_val $old(~%relative_off%~)
        SET actual_off = base_off + relative_off
        READ_ASCII actual_off cur_val (4)
        PATCH_IF (~%cur_val%~ STRING_EQUAL_CASE ~%old_val%~) BEGIN // ensures we don't write over wrong part of .exe
          WRITE_ASCIIE actual_off ~%new_val%~ #4
        END
        ELSE BEGIN
          PATCH_PRINT ~Error: the value we are trying to replace at offset %actual_off% (%cur_val%) in bgmain does not match what was expected (%old_val%).  Stopping installation for safety purposes.~
          SET fail = 1
        END
      END
    END
  END

ACTION_IF (fail == 1) BEGIN
  FAIL ~Could not patch bgmain successfully.~
END

// Installing the actual component content, yay

PRINT ~Copying new files for CDFB1 - unarmoured~

COPY		~1pp_female_dwarves/CDFB1/CDFB1A1.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1A2.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1A3.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1A4.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1A5.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1A6.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1A7.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1A8.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1A9.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1CA.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G1.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G11.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G12.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G13.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G14.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G15.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G16.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G17.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G18.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G19.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1SA.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1SS.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1SX.BAM~ ~override~
	
PRINT ~Copying new files for CDFB2 - leather armour~
	
COPY			~1pp_female_dwarves/CDFB2/CDFB2A1.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2A2.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2A3.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2A4.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2A5.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2A6.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2A7.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2A8.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2A9.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2CA.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G1.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G11.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G12.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G13.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G14.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G15.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G16.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G17.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G18.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G19.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2SA.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2SS.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2SX.BAM~ ~override~


PRINT ~Copying new files for CDFB3 - chain mail~
	
COPY			~1pp_female_dwarves/CDFB3/CDFB3A1.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3A2.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3A3.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3A4.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3A5.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3A6.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3A7.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3A8.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3A9.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3CA.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G1.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G11.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G12.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G13.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G14.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G15.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G16.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G17.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G18.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G19.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3SA.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3SS.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3SX.BAM~ ~override~

PRINT ~Copying new files for CDFC4 - cleric with plate mail~

COPY		~1pp_female_dwarves/CDFC4/CDFC4A1.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4A2.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4A3.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4A4.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4A5.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4A6.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4A7.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4A8.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4A9.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4CA.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G1.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G11.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G12.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G13.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G14.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G15.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G16.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G17.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G18.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G19.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4SA.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4SS.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4SX.BAM~ ~override~

PRINT ~Copying new files for CDFF4 - fighter with plate mail~

COPY		~1pp_female_dwarves/CDFF4/CDFF4A1.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4A2.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4A3.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4A4.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4A5.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4A6.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4A7.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4A8.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4A9.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4CA.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G1.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G11.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G12.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G13.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G14.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G15.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G16.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G17.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G18.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G19.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4SA.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4SS.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4SX.BAM~ ~override~
	
PRINT ~Copying new files for CDFT2 - thieves~

COPY		~1pp_female_dwarves/CDFT2/CDFT2A1.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2A2.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2A3.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2A4.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2A5.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2A6.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2A7.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2A8.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2A9.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2CA.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G1.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G11.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G12.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G13.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G14.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G15.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G16.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G17.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G18.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G19.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2SA.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2SS.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2SX.BAM~ ~override~
	
PRINT ~Copying new files for CDFW1 - unarmoured mage~
	
COPY			~1pp_female_dwarves/CDFW1/CDFW1A1.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1A2.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1A3.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1A4.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1A5.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1A6.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1A7.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1A8.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1A9.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1CA.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G1.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G11.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G12.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G13.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G14.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G15.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G16.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G17.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G18.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G19.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1SA.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1SS.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1SX.BAM~ ~override~
	
PRINT ~Copying new files for CDFW2 - mage with light robe~
	
COPY			~1pp_female_dwarves/CDFW2/CDFW2A1.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2A2.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2A3.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2A4.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2A5.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2A6.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2A7.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2A8.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2A9.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2CA.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G1.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G11.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G12.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G13.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G14.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G15.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G16.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G17.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G18.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G19.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2SA.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2SS.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2SX.BAM~ ~override~
	
	PRINT ~Copying new files for CDFW3 - mage with medium robe~
	
COPY			~1pp_female_dwarves/CDFW3/CDFW3A1.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3A2.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3A3.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3A4.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3A5.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3A6.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3A7.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3A8.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3A9.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3CA.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G1.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G11.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G12.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G13.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G14.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G15.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G16.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G17.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G18.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G19.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3SA.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3SS.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3SX.BAM~ ~override~
	
	PRINT ~Copying new files for CDFW4 - mage with heavy robe~
	
COPY			~1pp_female_dwarves/CDFW4/CDFW4A1.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4A2.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4A3.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4A4.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4A5.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4A6.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4A7.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4A8.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4A9.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4CA.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G1.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G11.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G12.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G13.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G14.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G15.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G16.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G17.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G18.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G19.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4SA.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4SS.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4SX.BAM~ ~override~
	
	
PRINT ~Updating paperdolls~

COPY		~1pp_female_dwarves/INV/CDFC1INV.BAM~ ~override~
	~1pp_female_dwarves/INV/CDFC1INV.PLT~ ~override~
	~1pp_female_dwarves/INV/CDFC2INV.BAM~ ~override~
	~1pp_female_dwarves/INV/CDFC2INV.PLT~ ~override~
	~1pp_female_dwarves/INV/CDFC3INV.BAM~ ~override~
	~1pp_female_dwarves/INV/CDFC3INV.PLT~ ~override~
	~1pp_female_dwarves/INV/CDFC4INV.BAM~ ~override~
	~1pp_female_dwarves/INV/CDFC4INV.PLT~ ~override~
	~1pp_female_dwarves/INV/CDFF1INV.BAM~ ~override~
	~1pp_female_dwarves/INV/CDFF1INV.PLT~ ~override~
	~1pp_female_dwarves/INV/CDFF2INV.BAM~ ~override~
	~1pp_female_dwarves/INV/CDFF2INV.PLT~ ~override~
	~1pp_female_dwarves/INV/CDFF3INV.BAM~ ~override~
	~1pp_female_dwarves/INV/CDFF3INV.PLT~ ~override~
	~1pp_female_dwarves/INV/CDFF4INV.BAM~ ~override~
	~1pp_female_dwarves/INV/CDFF4INV.PLT~ ~override~
	~1pp_female_dwarves/INV/CDFT1INV.BAM~ ~override~
	~1pp_female_dwarves/INV/CDFT1INV.PLT~ ~override~
	~1pp_female_dwarves/INV/CDFT2INV.BAM~ ~override~
	~1pp_female_dwarves/INV/CDFT2INV.PLT~ ~override~
	~1pp_female_dwarves/INV/CDFW1INV.BAM~ ~override~
	~1pp_female_dwarves/INV/CDFW1INV.PLT~ ~override~
	~1pp_female_dwarves/INV/CDFW2INV.BAM~ ~override~
	~1pp_female_dwarves/INV/CDFW2INV.PLT~ ~override~
	~1pp_female_dwarves/INV/CDFW3INV.BAM~ ~override~
	~1pp_female_dwarves/INV/CDFW3INV.PLT~ ~override~
	~1pp_female_dwarves/INV/CDFW4INV.BAM~ ~override~
	~1pp_female_dwarves/INV/CDFW4INV.PLT~ ~override~
	~1pp_female_dwarves/INV/CGFW1INV.BAM~ ~override~
	~1pp_female_dwarves/INV/CGFW1INV.PLT~ ~override~
	~1pp_female_dwarves/INV/CGFW2INV.BAM~ ~override~
	~1pp_female_dwarves/INV/CGFW2INV.PLT~ ~override~
	~1pp_female_dwarves/INV/CGFW3INV.BAM~ ~override~
	~1pp_female_dwarves/INV/CGFW3INV.PLT~ ~override~
	~1pp_female_dwarves/INV/CGFW4INV.BAM~ ~override~
	~1pp_female_dwarves/INV/CGFW4INV.PLT~ ~override~



//ENDCOMPONENT

BEGIN ~Separate Avatars for Female Dwarves - Icewind Dale II~
SUBCOMPONENT ~Separate Avatars for Female Dwarves~ (GAME_IS ~iwd2~)

// copy old files while custom ones are incomplete

ACTION_FOR_EACH prefix IN W C F T B BEGIN
  OUTER_SET $ani(~%prefix%~ ~length~) = 0
  
  COPY_EXISTING_REGEXP GLOB ~^CDM%prefix%.*\.BAM~ ~override~
    SET index = $ani(~%prefix%~ ~length~)
    INNER_PATCH_SAVE seq ~%SOURCE_RES%~ BEGIN
      REPLACE_TEXTUALLY ~^CDM%prefix%~ ~~
    END
    SPRINT $ani(~%prefix%~ ~%index%~) ~%seq%~ 
    SET $ani(~%prefix%~ ~length~) += 1
    BUT_ONLY
  
  OUTER_SET length = $ani(~%prefix%~ ~length~)
  OUTER_FOR (i = 0; i < length; i += 1) BEGIN
    OUTER_SPRINT seq $ani(~%prefix%~ ~%i%~)
    COPY_EXISTING ~CDM%prefix%%seq%.BAM~ ~override/CDF%prefix%%seq%.BAM~
  END
END

OUTER_SET fail = 0

ACTION_IF (~%WEIDU_OS%~ STRING_EQUAL_CASE ~win32~ || ~%WEIDU_OS%~ STRING_EQUAL_CASE ~unix~) BEGIN // don't have mac info yet

COPY ~IWD2.exe~ ~IWD2.exe~
PATCH_IF (SOURCE_SIZE == 5029888) BEGIN // is IWD2
READ_BYTE "0x2C4463" "check_r"
PATCH_IF ("%check_r%" = 0x68) BEGIN
WRITE_BYTE 0x2C4463 0xE9
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2C4463 (%check_r%) does not match what was expected (68).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2c4464" "check_r"
PATCH_IF ("%check_r%" = 0xCC) BEGIN
WRITE_BYTE 0x2c4464 0xB9
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2c4464 (%check_r%) does not match what was expected (CC).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2c4465" "check_r"
PATCH_IF ("%check_r%" = 0x6A) BEGIN
WRITE_BYTE 0x2c4465 0x24
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2c4465 (%check_r%) does not match what was expected (6A).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2c4466" "check_r"
PATCH_IF ("%check_r%" = 0x8B) BEGIN
WRITE_BYTE 0x2c4466 0x18
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2c4466 (%check_r%) does not match what was expected (8B).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2C44C3" "check_r"
PATCH_IF ("%check_r%" = 0x68) BEGIN
WRITE_BYTE 0x2C44C3 0xE9
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2C44C3 (%check_r%) does not match what was expected (68).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2c44c4" "check_r"
PATCH_IF ("%check_r%" = 0xCC) BEGIN
WRITE_BYTE 0x2c44c4 0x7D
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2c44c4 (%check_r%) does not match what was expected (CC).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2c44c5" "check_r"
PATCH_IF ("%check_r%" = 0x6A) BEGIN
WRITE_BYTE 0x2c44c5 0x24
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2c44c5 (%check_r%) does not match what was expected (6A).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2c44c6" "check_r"
PATCH_IF ("%check_r%" = 0x8B) BEGIN
WRITE_BYTE 0x2c44c6 0x18
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2c44c6 (%check_r%) does not match what was expected (8B).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2C45E9" "check_r"
PATCH_IF ("%check_r%" = 0x98) BEGIN
WRITE_BYTE 0x2C45E9 0x90
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2C45E9 (%check_r%) does not match what was expected (98).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2C475C" "check_r"
PATCH_IF ("%check_r%" = 0x98) BEGIN
WRITE_BYTE 0x2C475C 0x90
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2C475C (%check_r%) does not match what was expected (98).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2C48CA" "check_r"
PATCH_IF ("%check_r%" = 0x74) BEGIN
WRITE_BYTE 0x2C48CA 0x40
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2C48CA (%check_r%) does not match what was expected (74).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2c48cb" "check_r"
PATCH_IF ("%check_r%" = 0x6A) BEGIN
WRITE_BYTE 0x2c48cb 0x6C
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2c48cb (%check_r%) does not match what was expected (6A).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2C497E" "check_r"
PATCH_IF ("%check_r%" = 0x74) BEGIN
WRITE_BYTE 0x2C497E 0x40
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2C497E (%check_r%) does not match what was expected (74).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2c497f" "check_r"
PATCH_IF ("%check_r%" = 0x6A) BEGIN
WRITE_BYTE 0x2c497f 0x6C
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2c497f (%check_r%) does not match what was expected (6A).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2D0C71" "check_r"
PATCH_IF ("%check_r%" = 0x68) BEGIN
WRITE_BYTE 0x2D0C71 0xE9
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2D0C71 (%check_r%) does not match what was expected (68).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2d0c72" "check_r"
PATCH_IF ("%check_r%" = 0xCC) BEGIN
WRITE_BYTE 0x2d0c72 0x84
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2d0c72 (%check_r%) does not match what was expected (CC).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2d0c73" "check_r"
PATCH_IF ("%check_r%" = 0x6A) BEGIN
WRITE_BYTE 0x2d0c73 0x5C
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2d0c73 (%check_r%) does not match what was expected (6A).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2d0c74" "check_r"
PATCH_IF ("%check_r%" = 0x8B) BEGIN
WRITE_BYTE 0x2d0c74 0x17
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2d0c74 (%check_r%) does not match what was expected (8B).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x4468FA" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x4468FA 0xF6
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x4468FA (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x4468fb" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x4468fb 0xC3
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x4468fb (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x4468fc" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x4468fc 0xF0
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x4468fc (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x4468fd" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x4468fd 0x75
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x4468fd (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x4468fe" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x4468fe 0x11
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x4468fe (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x4468ff" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x4468ff 0x68
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x4468ff (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446900" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446900 0xCC
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446900 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446901" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446901 0x6A
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446901 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446902" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446902 0x8B
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446902 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446904" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446904 0x8D
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446904 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446905" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446905 0x8E
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446905 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446906" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446906 0xFE
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446906 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446907" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446907 0x03
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446907 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44690A" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44690A 0xE9
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44690A (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44690b" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44690b 0x70
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44690b (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44690c" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44690c 0xA3
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44690c (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44690d" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44690d 0xE8
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44690d (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44690e" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44690e 0xFF
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44690e (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44690f" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44690f 0x90
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44690f (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446910" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446910 0x68
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446910 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446911" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446911 0xD0
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446911 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446912" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446912 0x6C
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446912 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446913" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446913 0x8B
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446913 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446915" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446915 0x8D
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446915 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446916" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446916 0x8E
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446916 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446917" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446917 0xFE
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446917 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446918" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446918 0x03
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446918 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44691B" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44691B 0xE9
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44691B (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44691c" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44691c 0x5F
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44691c (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44691d" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44691d 0xA3
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44691d (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44691e" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44691e 0xE8
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44691e (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44691f" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44691f 0xFF
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44691f (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446920" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446920 0x90
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446920 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446921" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446921 0x75
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446921 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446922" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446922 0x11
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446922 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446923" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446923 0x68
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446923 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446924" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446924 0xCC
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446924 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446925" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446925 0x6A
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446925 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446926" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446926 0x8B
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446926 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446928" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446928 0x8D
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446928 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446929" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446929 0x8E
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446929 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44692a" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44692a 0x02
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44692a (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44692b" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44692b 0x04
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44692b (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44692E" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44692E 0xE9
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44692E (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44692f" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44692f 0x3D
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44692f (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446930" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446930 0xDB
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446930 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446931" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446931 0xE7
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446931 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446932" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446932 0xFF
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446932 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446933" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446933 0x90
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446933 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446934" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446934 0x68
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446934 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446935" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446935 0xD0
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446935 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446936" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446936 0x6C
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446936 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446937" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446937 0x8B
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446937 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446939" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446939 0x8D
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446939 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44693a" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44693a 0x8E
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44693a (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44693b" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44693b 0x02
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44693b (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44693c" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44693c 0x04
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44693c (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44693F" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44693F 0xE9
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44693F (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446940" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446940 0x2C
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446940 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446941" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446941 0xDB
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446941 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446942" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446942 0xE7
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446942 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446943" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446943 0xFF
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446943 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446944" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446944 0x90
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446944 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446945" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446945 0x75
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446945 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446946" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446946 0x11
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446946 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446947" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446947 0x68
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446947 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446948" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446948 0xCC
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446948 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446949" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446949 0x6A
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446949 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44694a" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44694a 0x8B
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44694a (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44694C" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44694C 0x8D
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44694C (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44694d" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44694d 0x8E
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44694d (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44694e" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44694e 0x02
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44694e (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44694f" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44694f 0x04
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44694f (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446952" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446952 0xE9
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446952 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446953" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446953 0x19
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446953 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446954" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446954 0xDB
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446954 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446955" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446955 0xE7
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446955 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446956" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446956 0xFF
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446956 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446957" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446957 0x90
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446957 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446958" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446958 0x68
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446958 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446959" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446959 0xD0
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446959 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44695a" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44695a 0x6C
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44695a (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44695b" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44695b 0x8B
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44695b (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44695D" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44695D 0x8D
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44695D (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44695e" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44695e 0x8E
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44695e (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44695f" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44695f 0x02
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44695f (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446960" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446960 0x04
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446960 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446963" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446963 0xE9
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446963 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446964" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446964 0x08
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446964 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446965" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446965 0xDB
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446965 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446966" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446966 0xE7
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446966 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446967" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446967 0xFF
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446967 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
END
ELSE BEGIN
PATCH_PRINT ~Error: the source size does not seem to match.  Stopping installation for safety purposes.~
SET fail = 1
END
END  // end to Action If
ACTION_IF (fail = 1) BEGIN
FAIL ~Could not patch successfully. Make sure you are using the component for the right version!~
END



// Installing the actual component content, yay

PRINT ~Copying new files for CDFB1 - unarmoured~

COPY		~1pp_female_dwarves/CDFB1/CDFB1A1.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1A2.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1A3.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1A4.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1A5.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1A6.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1A7.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1A8.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1A9.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1CA.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G1.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G11.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G12.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G13.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G14.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G15.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G16.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G17.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G18.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G19.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1SA.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1SS.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1SX.BAM~ ~override~
	
PRINT ~Copying new files for CDFB2 - leather armour~
	
COPY			~1pp_female_dwarves/CDFB2/CDFB2A1.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2A2.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2A3.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2A4.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2A5.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2A6.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2A7.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2A8.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2A9.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2CA.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G1.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G11.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G12.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G13.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G14.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G15.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G16.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G17.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G18.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G19.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2SA.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2SS.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2SX.BAM~ ~override~


PRINT ~Copying new files for CDFB3 - chain mail~
	
COPY			~1pp_female_dwarves/CDFB3/CDFB3A1.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3A2.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3A3.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3A4.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3A5.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3A6.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3A7.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3A8.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3A9.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3CA.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G1.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G11.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G12.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G13.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G14.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G15.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G16.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G17.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G18.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G19.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3SA.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3SS.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3SX.BAM~ ~override~

PRINT ~Copying new files for CDFC4 - cleric with plate mail~

COPY		~1pp_female_dwarves/CDFC4/CDFC4A1.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4A2.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4A3.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4A4.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4A5.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4A6.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4A7.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4A8.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4A9.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4CA.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G1.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G11.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G12.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G13.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G14.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G15.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G16.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G17.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G18.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G19.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4SA.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4SS.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4SX.BAM~ ~override~

PRINT ~Copying new files for CDFF4 - fighter with plate mail~

COPY		~1pp_female_dwarves/CDFF4/CDFF4A1.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4A2.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4A3.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4A4.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4A5.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4A6.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4A7.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4A8.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4A9.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4CA.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G1.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G11.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G12.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G13.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G14.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G15.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G16.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G17.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G18.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G19.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4SA.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4SS.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4SX.BAM~ ~override~
	
PRINT ~Copying new files for CDFT2 - thieves~

COPY		~1pp_female_dwarves/CDFT2/CDFT2A1.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2A2.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2A3.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2A4.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2A5.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2A6.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2A7.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2A8.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2A9.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2CA.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G1.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G11.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G12.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G13.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G14.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G15.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G16.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G17.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G18.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G19.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2SA.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2SS.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2SX.BAM~ ~override~
	
	
PRINT ~Copying new files for CDFW1 - unarmoured mage~
	
COPY			~1pp_female_dwarves/CDFW1/CDFW1A1.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1A2.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1A3.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1A4.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1A5.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1A6.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1A7.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1A8.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1A9.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1CA.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G1.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G11.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G12.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G13.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G14.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G15.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G16.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G17.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G18.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G19.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1SA.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1SS.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1SX.BAM~ ~override~
	
PRINT ~Copying new files for CDFW2 - mage with light robe~
	
COPY			~1pp_female_dwarves/CDFW2/CDFW2A1.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2A2.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2A3.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2A4.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2A5.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2A6.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2A7.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2A8.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2A9.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2CA.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G1.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G11.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G12.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G13.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G14.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G15.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G16.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G17.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G18.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G19.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2SA.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2SS.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2SX.BAM~ ~override~
	
	PRINT ~Copying new files for CDFW3 - mage with medium robe~
	
COPY			~1pp_female_dwarves/CDFW3/CDFW3A1.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3A2.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3A3.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3A4.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3A5.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3A6.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3A7.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3A8.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3A9.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3CA.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G1.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G11.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G12.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G13.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G14.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G15.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G16.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G17.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G18.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G19.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3SA.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3SS.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3SX.BAM~ ~override~
	
	PRINT ~Copying new files for CDFW4 - mage with heavy robe~
	
COPY			~1pp_female_dwarves/CDFW4/CDFW4A1.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4A2.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4A3.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4A4.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4A5.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4A6.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4A7.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4A8.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4A9.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4CA.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G1.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G11.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G12.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G13.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G14.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G15.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G16.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G17.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G18.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G19.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4SA.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4SS.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4SX.BAM~ ~override~
	
	
	
//ENDCOMPONENT


BEGIN ~Separate Avatars for Female Dwarves - Icewind Dale II EU~
SUBCOMPONENT ~Separate Avatars for Female Dwarves~ (GAME_IS ~iwd2~)

// copy old files while custom ones are incomplete

ACTION_FOR_EACH prefix IN W C F T B BEGIN
  OUTER_SET $ani(~%prefix%~ ~length~) = 0
  
  COPY_EXISTING_REGEXP GLOB ~^CDM%prefix%.*\.BAM~ ~override~
    SET index = $ani(~%prefix%~ ~length~)
    INNER_PATCH_SAVE seq ~%SOURCE_RES%~ BEGIN
      REPLACE_TEXTUALLY ~^CDM%prefix%~ ~~
    END
    SPRINT $ani(~%prefix%~ ~%index%~) ~%seq%~ 
    SET $ani(~%prefix%~ ~length~) += 1
    BUT_ONLY
  
  OUTER_SET length = $ani(~%prefix%~ ~length~)
  OUTER_FOR (i = 0; i < length; i += 1) BEGIN
    OUTER_SPRINT seq $ani(~%prefix%~ ~%i%~)
    COPY_EXISTING ~CDM%prefix%%seq%.BAM~ ~override/CDF%prefix%%seq%.BAM~
  END
END

OUTER_SET fail = 0

ACTION_IF (~%WEIDU_OS%~ STRING_EQUAL_CASE ~win32~ || ~%WEIDU_OS%~ STRING_EQUAL_CASE ~unix~) BEGIN // don't have mac info yet
COPY ~IWD2.exe~ ~IWD2.exe~
PATCH_IF (SOURCE_SIZE == 5029888) BEGIN // is IWD2
READ_BYTE "0x2c42e3" "check_r"
PATCH_IF ("%check_r%" = 0x68) BEGIN
WRITE_BYTE 0x2c42e3 0xe9
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2c42e3 (%check_r%) does not match what was expected (68).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2c42e4" "check_r"
PATCH_IF ("%check_r%" = 0xa4) BEGIN
WRITE_BYTE 0x2c42e4 0x44
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2c42e4 (%check_r%) does not match what was expected (a4).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2c42e5" "check_r"
PATCH_IF ("%check_r%" = 0x6a) BEGIN
WRITE_BYTE 0x2c42e5 0x23
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2c42e5 (%check_r%) does not match what was expected (6a).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2c42e6" "check_r"
PATCH_IF ("%check_r%" = 0x8b) BEGIN
WRITE_BYTE 0x2c42e6 0x18
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2c42e6 (%check_r%) does not match what was expected (8b).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2C4343" "check_r"
PATCH_IF ("%check_r%" = 0x68) BEGIN
WRITE_BYTE 0x2C4343 0xE9
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2C4343 (%check_r%) does not match what was expected (68).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2c4344" "check_r"
PATCH_IF ("%check_r%" = 0xA4) BEGIN
WRITE_BYTE 0x2c4344 0x13
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2c4344 (%check_r%) does not match what was expected (A4).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2c4345" "check_r"
PATCH_IF ("%check_r%" = 0x6A) BEGIN
WRITE_BYTE 0x2c4345 0x23
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2c4345 (%check_r%) does not match what was expected (6A).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2c4346" "check_r"
PATCH_IF ("%check_r%" = 0x8B) BEGIN
WRITE_BYTE 0x2c4346 0x18
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2c4346 (%check_r%) does not match what was expected (8B).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2C4469" "check_r"
PATCH_IF ("%check_r%" = 0x70) BEGIN
WRITE_BYTE 0x2C4469 0x68
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2C4469 (%check_r%) does not match what was expected (70).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2C45DC" "check_r"
PATCH_IF ("%check_r%" = 0x70) BEGIN
WRITE_BYTE 0x2C45DC 0x68
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2C45DC (%check_r%) does not match what was expected (70).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2C474A" "check_r"
PATCH_IF ("%check_r%" = 0x4C) BEGIN
WRITE_BYTE 0x2C474A 0x18
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2C474A (%check_r%) does not match what was expected (4C).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2c474b" "check_r"
PATCH_IF ("%check_r%" = 0x6A) BEGIN
WRITE_BYTE 0x2c474b 0x6C
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2c474b (%check_r%) does not match what was expected (6A).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2C47FE" "check_r"
PATCH_IF ("%check_r%" = 0x4C) BEGIN
WRITE_BYTE 0x2C47FE 0x18
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2C47FE (%check_r%) does not match what was expected (4C).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2c47ff" "check_r"
PATCH_IF ("%check_r%" = 0x6A) BEGIN
WRITE_BYTE 0x2c47ff 0x6C
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2c47ff (%check_r%) does not match what was expected (6A).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2D0AF1" "check_r"
PATCH_IF ("%check_r%" = 0x68) BEGIN
WRITE_BYTE 0x2D0AF1 0xE9
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2D0AF1 (%check_r%) does not match what was expected (68).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2d0af2" "check_r"
PATCH_IF ("%check_r%" = 0xA4) BEGIN
WRITE_BYTE 0x2d0af2 0x09
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2d0af2 (%check_r%) does not match what was expected (A4).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2d0af3" "check_r"
PATCH_IF ("%check_r%" = 0x6A) BEGIN
WRITE_BYTE 0x2d0af3 0x5B
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2d0af3 (%check_r%) does not match what was expected (6A).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2d0af4" "check_r"
PATCH_IF ("%check_r%" = 0x8B) BEGIN
WRITE_BYTE 0x2d0af4 0x17
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2d0af4 (%check_r%) does not match what was expected (8B).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2D0AF6" "check_r"
PATCH_IF ("%check_r%" = 0x8D) BEGIN
WRITE_BYTE 0x2D0AF6 0xE9
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2D0AF6 (%check_r%) does not match what was expected (8D).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2d0af7" "check_r"
PATCH_IF ("%check_r%" = 0x8E) BEGIN
WRITE_BYTE 0x2d0af7 0x04
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2d0af7 (%check_r%) does not match what was expected (8E).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2d0af8" "check_r"
PATCH_IF ("%check_r%" = 0xFE) BEGIN
WRITE_BYTE 0x2d0af8 0x5B
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2d0af8 (%check_r%) does not match what was expected (FE).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2d0af9" "check_r"
PATCH_IF ("%check_r%" = 0x03) BEGIN
WRITE_BYTE 0x2d0af9 0x17
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2d0af9 (%check_r%) does not match what was expected (03).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x2D0AFB" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x2D0AFB 0x90
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x2D0AFB (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x4465FF" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x4465FF 0xF6
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x4465FF (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446600" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446600 0xC3
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446600 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446601" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446601 0xF0
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446601 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446602" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446602 0x75
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446602 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446603" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446603 0x13
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446603 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446604" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446604 0x68
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446604 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446605" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446605 0xA4
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446605 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446606" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446606 0x6A
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446606 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446607" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446607 0x8B
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446607 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446609" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446609 0x8D
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446609 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44660a" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44660a 0x8E
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44660a (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44660b" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44660b 0xFE
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44660b (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44660c" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44660c 0x03
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44660c (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44660F" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44660F 0xE9
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44660F (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446610" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446610 0xEB
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446610 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446611" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446611 0xA4
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446611 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446612" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446612 0xE8
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446612 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446613" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446613 0xFF
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446613 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446614" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446614 0x90
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446614 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446615" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446615 0x90
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446615 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446616" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446616 0x90
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446616 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446617" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446617 0x68
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446617 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446618" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446618 0xF4
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446618 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446619" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446619 0xF6
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446619 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44661a" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44661a 0x8A
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44661a (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44661C" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44661C 0x8D
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44661C (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44661d" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44661d 0x8E
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44661d (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44661e" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44661e 0xFE
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44661e (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44661f" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44661f 0x03
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44661f (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446622" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446622 0xE9
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446622 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446623" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446623 0xD8
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446623 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446624" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446624 0xA4
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446624 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446625" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446625 0xE8
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446625 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446626" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446626 0xFF
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446626 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44662C" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44662C 0x75
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44662C (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44662d" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44662d 0x17
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44662d (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44662e" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44662e 0x68
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44662e (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44662f" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44662f 0xA4
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44662f (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446630" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446630 0x6A
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446630 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446631" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446631 0x8B
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446631 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446633" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446633 0x8D
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446633 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446634" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446634 0x8E
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446634 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446635" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446635 0x02
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446635 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446636" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446636 0x04
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446636 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446639" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446639 0xE9
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446639 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44663a" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44663a 0xB2
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44663a (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44663b" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44663b 0xDC
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44663b (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44663c" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44663c 0xE7
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44663c (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44663d" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44663d 0xFF
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44663d (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446645" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446645 0x68
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446645 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446646" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446646 0xF4
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446646 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446647" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446647 0xF6
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446647 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446648" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446648 0x8A
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446648 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44664A" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44664A 0x8D
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44664A (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44664b" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44664b 0x8E
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44664b (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44664c" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44664c 0x02
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44664c (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44664d" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44664d 0x04
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44664d (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446650" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446650 0xE9
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446650 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446651" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446651 0x9B
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446651 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446652" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446652 0xDC
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446652 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446653" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446653 0xE7
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446653 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446654" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446654 0xFF
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446654 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44665B" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44665B 0x75
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44665B (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44665c" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44665c 0x13
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44665c (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44665d" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44665d 0x68
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44665d (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44665e" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44665e 0xA4
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44665e (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44665f" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44665f 0x6A
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44665f (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446660" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446660 0x8B
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446660 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446662" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446662 0x8D
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446662 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446663" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446663 0x8E
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446663 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446664" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446664 0x02
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446664 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446665" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446665 0x04
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446665 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446668" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446668 0xE9
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446668 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446669" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446669 0x83
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446669 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44666a" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44666a 0xDC
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44666a (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44666b" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44666b 0xE7
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44666b (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44666c" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44666c 0xFF
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44666c (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446670" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446670 0x68
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446670 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446671" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446671 0xF4
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446671 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446672" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446672 0xF6
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446672 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446673" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446673 0x8A
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446673 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446675" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446675 0x8D
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446675 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446676" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446676 0x8E
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446676 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446677" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446677 0x02
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446677 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x446678" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x446678 0x04
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x446678 (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44667B" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44667B 0xE9
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44667B (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44667c" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44667c 0x70
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44667c (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44667d" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44667d 0xDC
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44667d (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44667e" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44667e 0xE7
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44667e (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x44667f" "check_r"
PATCH_IF ("%check_r%" = 0x00) BEGIN
WRITE_BYTE 0x44667f 0xFF
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x44667f (%check_r%) does not match what was expected (00).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x4AF6F0" "check_r"
PATCH_IF ("%check_r%" = 0x49) BEGIN
WRITE_BYTE 0x4AF6F0 0x00
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x4AF6F0 (%check_r%) does not match what was expected (49).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x4af6f1" "check_r"
PATCH_IF ("%check_r%" = 0x20) BEGIN
WRITE_BYTE 0x4af6f1 0x00
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x4af6f1 (%check_r%) does not match what was expected (20).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x4af6f2" "check_r"
PATCH_IF ("%check_r%" = 0x64) BEGIN
WRITE_BYTE 0x4af6f2 0x00
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x4af6f2 (%check_r%) does not match what was expected (64).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x4af6f3" "check_r"
PATCH_IF ("%check_r%" = 0x6F) BEGIN
WRITE_BYTE 0x4af6f3 0x00
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x4af6f3 (%check_r%) does not match what was expected (6F).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x4af6f4" "check_r"
PATCH_IF ("%check_r%" = 0x6E) BEGIN
WRITE_BYTE 0x4af6f4 0x43
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x4af6f4 (%check_r%) does not match what was expected (6E).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x4af6f5" "check_r"
PATCH_IF ("%check_r%" = 0x27) BEGIN
WRITE_BYTE 0x4af6f5 0x44
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x4af6f5 (%check_r%) does not match what was expected (27).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x4af6f6" "check_r"
PATCH_IF ("%check_r%" = 0x74) BEGIN
WRITE_BYTE 0x4af6f6 0x46
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x4af6f6 (%check_r%) does not match what was expected (74).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x4af6f7" "check_r"
PATCH_IF ("%check_r%" = 0x20) BEGIN
WRITE_BYTE 0x4af6f7 0x57
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x4af6f7 (%check_r%) does not match what was expected (20).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x4af6f8" "check_r"
PATCH_IF ("%check_r%" = 0x6B) BEGIN
WRITE_BYTE 0x4af6f8 0x00
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x4af6f8 (%check_r%) does not match what was expected (6B).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x4af6f9" "check_r"
PATCH_IF ("%check_r%" = 0x6E) BEGIN
WRITE_BYTE 0x4af6f9 0x00
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x4af6f9 (%check_r%) does not match what was expected (6E).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x4af6fa" "check_r"
PATCH_IF ("%check_r%" = 0x6F) BEGIN
WRITE_BYTE 0x4af6fa 0x00
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x4af6fa (%check_r%) does not match what was expected (6F).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x4af6fb" "check_r"
PATCH_IF ("%check_r%" = 0x77) BEGIN
WRITE_BYTE 0x4af6fb 0x00
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x4af6fb (%check_r%) does not match what was expected (77).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x4af6fc" "check_r"
PATCH_IF ("%check_r%" = 0x20) BEGIN
WRITE_BYTE 0x4af6fc 0x00
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x4af6fc (%check_r%) does not match what was expected (20).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x4af6fd" "check_r"
PATCH_IF ("%check_r%" = 0x68) BEGIN
WRITE_BYTE 0x4af6fd 0x00
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x4af6fd (%check_r%) does not match what was expected (68).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x4af6fe" "check_r"
PATCH_IF ("%check_r%" = 0x6F) BEGIN
WRITE_BYTE 0x4af6fe 0x00
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x4af6fe (%check_r%) does not match what was expected (6F).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x4af6ff" "check_r"
PATCH_IF ("%check_r%" = 0x77) BEGIN
WRITE_BYTE 0x4af6ff 0x00
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x4af6ff (%check_r%) does not match what was expected (77).  Stopping installation.~
SET fail = 1
END
END
ELSE BEGIN
PATCH_PRINT ~Error: the source size does not seem to match.  Stopping installation for safety purposes.~
SET fail = 1
END
END  // end to Action If
ACTION_IF (fail = 1) BEGIN
FAIL ~Could not patch successfully. Make sure you are using the component for the right version!~
END



// Installing the actual component content, yay

PRINT ~Copying new files for CDFB1 - unarmoured~

COPY		~1pp_female_dwarves/CDFB1/CDFB1A1.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1A2.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1A3.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1A4.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1A5.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1A6.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1A7.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1A8.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1A9.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1CA.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G1.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G11.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G12.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G13.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G14.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G15.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G16.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G17.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G18.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G19.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1SA.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1SS.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1SX.BAM~ ~override~
	
PRINT ~Copying new files for CDFB2 - leather armour~
	
COPY			~1pp_female_dwarves/CDFB2/CDFB2A1.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2A2.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2A3.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2A4.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2A5.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2A6.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2A7.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2A8.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2A9.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2CA.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G1.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G11.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G12.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G13.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G14.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G15.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G16.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G17.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G18.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G19.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2SA.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2SS.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2SX.BAM~ ~override~


PRINT ~Copying new files for CDFB3 - chain mail~
	
COPY			~1pp_female_dwarves/CDFB3/CDFB3A1.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3A2.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3A3.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3A4.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3A5.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3A6.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3A7.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3A8.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3A9.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3CA.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G1.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G11.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G12.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G13.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G14.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G15.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G16.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G17.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G18.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G19.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3SA.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3SS.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3SX.BAM~ ~override~

PRINT ~Copying new files for CDFC4 - cleric with plate mail~

COPY		~1pp_female_dwarves/CDFC4/CDFC4A1.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4A2.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4A3.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4A4.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4A5.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4A6.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4A7.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4A8.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4A9.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4CA.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G1.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G11.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G12.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G13.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G14.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G15.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G16.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G17.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G18.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G19.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4SA.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4SS.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4SX.BAM~ ~override~

PRINT ~Copying new files for CDFF4 - fighter with plate mail~

COPY		~1pp_female_dwarves/CDFF4/CDFF4A1.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4A2.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4A3.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4A4.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4A5.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4A6.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4A7.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4A8.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4A9.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4CA.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G1.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G11.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G12.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G13.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G14.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G15.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G16.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G17.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G18.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G19.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4SA.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4SS.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4SX.BAM~ ~override~
	
PRINT ~Copying new files for CDFT2 - thieves~

COPY		~1pp_female_dwarves/CDFT2/CDFT2A1.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2A2.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2A3.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2A4.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2A5.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2A6.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2A7.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2A8.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2A9.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2CA.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G1.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G11.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G12.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G13.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G14.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G15.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G16.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G17.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G18.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G19.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2SA.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2SS.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2SX.BAM~ ~override~
	
	
PRINT ~Copying new files for CDFW1 - unarmoured mage~
	
COPY			~1pp_female_dwarves/CDFW1/CDFW1A1.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1A2.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1A3.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1A4.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1A5.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1A6.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1A7.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1A8.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1A9.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1CA.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G1.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G11.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G12.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G13.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G14.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G15.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G16.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G17.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G18.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G19.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1SA.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1SS.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1SX.BAM~ ~override~
	
PRINT ~Copying new files for CDFW2 - mage with light robe~
	
COPY			~1pp_female_dwarves/CDFW2/CDFW2A1.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2A2.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2A3.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2A4.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2A5.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2A6.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2A7.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2A8.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2A9.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2CA.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G1.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G11.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G12.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G13.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G14.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G15.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G16.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G17.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G18.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G19.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2SA.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2SS.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2SX.BAM~ ~override~
	
	PRINT ~Copying new files for CDFW3 - mage with medium robe~
	
COPY			~1pp_female_dwarves/CDFW3/CDFW3A1.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3A2.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3A3.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3A4.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3A5.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3A6.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3A7.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3A8.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3A9.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3CA.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G1.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G11.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G12.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G13.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G14.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G15.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G16.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G17.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G18.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G19.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3SA.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3SS.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3SX.BAM~ ~override~
	
	PRINT ~Copying new files for CDFW4 - mage with heavy robe~
	
COPY			~1pp_female_dwarves/CDFW4/CDFW4A1.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4A2.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4A3.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4A4.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4A5.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4A6.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4A7.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4A8.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4A9.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4CA.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G1.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G11.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G12.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G13.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G14.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G15.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G16.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G17.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G18.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G19.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4SA.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4SS.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4SX.BAM~ ~override~
	
	
	
//ENDCOMPONENT


BEGIN ~Separate Avatars for Female Dwarves - Icewind Dale I HoW~
SUBCOMPONENT ~Separate Avatars for Female Dwarves~ (GAME_IS ~totlm how~)

// copy old files while custom ones are incomplete

ACTION_FOR_EACH prefix IN W C F T B BEGIN
  OUTER_SET $ani(~%prefix%~ ~length~) = 0
  
  COPY_EXISTING_REGEXP GLOB ~^CDM%prefix%.*\.BAM~ ~override~
    SET index = $ani(~%prefix%~ ~length~)
    INNER_PATCH_SAVE seq ~%SOURCE_RES%~ BEGIN
      REPLACE_TEXTUALLY ~^CDM%prefix%~ ~~
    END
    SPRINT $ani(~%prefix%~ ~%index%~) ~%seq%~ 
    SET $ani(~%prefix%~ ~length~) += 1
    BUT_ONLY
  
  OUTER_SET length = $ani(~%prefix%~ ~length~)
  OUTER_FOR (i = 0; i < length; i += 1) BEGIN
    OUTER_SPRINT seq $ani(~%prefix%~ ~%i%~)
    COPY_EXISTING ~CDM%prefix%%seq%.BAM~ ~override/CDF%prefix%%seq%.BAM~
  END
END

OUTER_SET fail = 0
OUTER_SET found = 0

ACTION_IF (~%WEIDU_OS%~ STRING_EQUAL_CASE ~win32~ || ~%WEIDU_OS%~ STRING_EQUAL_CASE ~unix~) BEGIN

COPY ~IDMain.exe~ ~IDMain.exe~
PATCH_IF (SOURCE_SIZE == 6873088) BEGIN // is IDMain 142
PATCH_PRINT ~Icewind Dale 1.4.2 found (TotL)~
SET found = 1
READ_BYTE "0x3D152A" "check_r"
PATCH_IF ("%check_r%" = 0x88) BEGIN
WRITE_BYTE 0x3D152A 0x30
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x3D152A (%check_r%) does not match what was expected (88).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x3d152b" "check_r"
PATCH_IF ("%check_r%" = 0x85) BEGIN
WRITE_BYTE 0x3d152b 0x87
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x3d152b (%check_r%) does not match what was expected (85).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x3D5D29" "check_r"
PATCH_IF ("%check_r%" = 0x4C) BEGIN
WRITE_BYTE 0x3D5D29 0x44
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x3D5D29 (%check_r%) does not match what was expected (4C).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x3D5E55" "check_r"
PATCH_IF ("%check_r%" = 0x4C) BEGIN
WRITE_BYTE 0x3D5E55 0x44
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x3D5E55 (%check_r%) does not match what was expected (4C).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x3D60DB" "check_r"
PATCH_IF ("%check_r%" = 0x4C) BEGIN
WRITE_BYTE 0x3D60DB 0x44
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x3D60DB (%check_r%) does not match what was expected (4C).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x3D621B" "check_r"
PATCH_IF ("%check_r%" = 0x4C) BEGIN
WRITE_BYTE 0x3D621B 0x44
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x3D621B (%check_r%) does not match what was expected (4C).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x3D64AE" "check_r"
PATCH_IF ("%check_r%" = 0x88) BEGIN
WRITE_BYTE 0x3D64AE 0x30
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x3D64AE (%check_r%) does not match what was expected (88).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x3d64af" "check_r"
PATCH_IF ("%check_r%" = 0x85) BEGIN
WRITE_BYTE 0x3d64af 0x87
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x3d64af (%check_r%) does not match what was expected (85).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x3D6546" "check_r"
PATCH_IF ("%check_r%" = 0x88) BEGIN
WRITE_BYTE 0x3D6546 0x30
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x3D6546 (%check_r%) does not match what was expected (88).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x3d6547" "check_r"
PATCH_IF ("%check_r%" = 0x85) BEGIN
WRITE_BYTE 0x3d6547 0x87
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x3d6547 (%check_r%) does not match what was expected (85).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x3D67E9" "check_r"
PATCH_IF ("%check_r%" = 0x50) BEGIN
WRITE_BYTE 0x3D67E9 0x28
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x3D67E9 (%check_r%) does not match what was expected (50).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x3d67ea" "check_r"
PATCH_IF ("%check_r%" = 0x85) BEGIN
WRITE_BYTE 0x3d67ea 0x87
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x3d67ea (%check_r%) does not match what was expected (85).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x3D690F" "check_r"
PATCH_IF ("%check_r%" = 0x50) BEGIN
WRITE_BYTE 0x3D690F 0x28
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x3D690F (%check_r%) does not match what was expected (50).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x3d6910" "check_r"
PATCH_IF ("%check_r%" = 0x85) BEGIN
WRITE_BYTE 0x3d6910 0x87
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x3d6910 (%check_r%) does not match what was expected (85).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x3EBF49" "check_r"
PATCH_IF ("%check_r%" = 0x88) BEGIN
WRITE_BYTE 0x3EBF49 0x30
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x3EBF49 (%check_r%) does not match what was expected (88).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x3ebf4a" "check_r"
PATCH_IF ("%check_r%" = 0x85) BEGIN
WRITE_BYTE 0x3ebf4a 0x87
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x3ebf4a (%check_r%) does not match what was expected (85).  Stopping installation.~
SET fail = 1
END
END
ELSE BEGIN
PATCH_PRINT ~Warning: Icewind Dale is not patched to 1.4.2; trying 1.4.1~
END

COPY ~IDMain.exe~ ~IDMain.exe~
PATCH_IF (SOURCE_SIZE == 6840320) BEGIN // is IDMain 141
PATCH_PRINT ~Icewind Dale 1.4.1 found (HoW only)~
SET found = 1
READ_BYTE "0x3CA71C" "check_r"
PATCH_IF ("%check_r%" = 0xE4) BEGIN
WRITE_BYTE 0x3CA71C 0x8C
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x3CA71C (%check_r%) does not match what was expected (E4).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x3ca71d" "check_r"
PATCH_IF ("%check_r%" = 0x03) BEGIN
WRITE_BYTE 0x3ca71d 0x05
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x3ca71d (%check_r%) does not match what was expected (03).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x3CEF1B" "check_r"
PATCH_IF ("%check_r%" = 0xA8) BEGIN
WRITE_BYTE 0x3CEF1B 0xA0
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x3CEF1B (%check_r%) does not match what was expected (A8).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x3CF047" "check_r"
PATCH_IF ("%check_r%" = 0xA8) BEGIN
WRITE_BYTE 0x3CF047 0xA0
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x3CF047 (%check_r%) does not match what was expected (A8).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x3CF2CD" "check_r"
PATCH_IF ("%check_r%" = 0xA8) BEGIN
WRITE_BYTE 0x3CF2CD 0xA0
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x3CF2CD (%check_r%) does not match what was expected (A8).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x3CF40D" "check_r"
PATCH_IF ("%check_r%" = 0xA8) BEGIN
WRITE_BYTE 0x3CF40D 0xA0
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x3CF40D (%check_r%) does not match what was expected (A8).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x3CF6A0" "check_r"
PATCH_IF ("%check_r%" = 0xE4) BEGIN
WRITE_BYTE 0x3CF6A0 0x8C
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x3CF6A0 (%check_r%) does not match what was expected (E4).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x3cf6a1" "check_r"
PATCH_IF ("%check_r%" = 0x03) BEGIN
WRITE_BYTE 0x3cf6a1 0x05
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x3cf6a1 (%check_r%) does not match what was expected (03).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x3CF738" "check_r"
PATCH_IF ("%check_r%" = 0xE4) BEGIN
WRITE_BYTE 0x3CF738 0x8C
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x3CF738 (%check_r%) does not match what was expected (E4).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x3cf739" "check_r"
PATCH_IF ("%check_r%" = 0x03) BEGIN
WRITE_BYTE 0x3cf739 0x05
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x3cf739 (%check_r%) does not match what was expected (03).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x3CF9DB" "check_r"
PATCH_IF ("%check_r%" = 0xAC) BEGIN
WRITE_BYTE 0x3CF9DB 0x84
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x3CF9DB (%check_r%) does not match what was expected (AC).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x3cf9dc" "check_r"
PATCH_IF ("%check_r%" = 0x03) BEGIN
WRITE_BYTE 0x3cf9dc 0x05
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x3cf9dc (%check_r%) does not match what was expected (03).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x3CFB01" "check_r"
PATCH_IF ("%check_r%" = 0xAC) BEGIN
WRITE_BYTE 0x3CFB01 0x84
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x3CFB01 (%check_r%) does not match what was expected (AC).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x3cfb02" "check_r"
PATCH_IF ("%check_r%" = 0x03) BEGIN
WRITE_BYTE 0x3cfb02 0x05
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x3cfb02 (%check_r%) does not match what was expected (03).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x3E513B" "check_r"
PATCH_IF ("%check_r%" = 0xE4) BEGIN
WRITE_BYTE 0x3E513B 0x8C
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x3E513B (%check_r%) does not match what was expected (E4).  Stopping installation.~
SET fail = 1
END
READ_BYTE "0x3e513c" "check_r"
PATCH_IF ("%check_r%" = 0x03) BEGIN
WRITE_BYTE 0x3e513c 0x05
END
ELSE BEGIN
PATCH_PRINT ~Error: the value we are trying to replace at offset 0x3e513c (%check_r%) does not match what was expected (03).  Stopping installation.~
SET fail = 1
END
END
ELSE BEGIN
PATCH_PRINT ~Game is not 1.4.1~
END

ACTION_IF (fail = 1) BEGIN
FAIL ~Could not patch successfully.~
END

ACTION_IF (found != 1) BEGIN
FAIL ~Type of executable is unknown. Make sure your game is patched to 1.4.1 (HoW) or 1.4.2 (TotL).~
END

END // from Act If

// Installing the actual component content, yay

PRINT ~Copying new files for CDFB1 - unarmoured~

COPY		~1pp_female_dwarves/CDFB1/CDFB1A1.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1A2.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1A3.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1A4.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1A5.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1A6.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1A7.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1A8.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1A9.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1CA.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G1.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G11.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G12.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G13.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G14.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G15.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G16.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G17.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G18.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1G19.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1SA.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1SS.BAM~ ~override~
	~1pp_female_dwarves/CDFB1/CDFB1SX.BAM~ ~override~
	
PRINT ~Copying new files for CDFB2 - leather armour~
	
COPY			~1pp_female_dwarves/CDFB2/CDFB2A1.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2A2.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2A3.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2A4.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2A5.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2A6.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2A7.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2A8.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2A9.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2CA.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G1.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G11.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G12.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G13.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G14.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G15.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G16.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G17.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G18.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2G19.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2SA.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2SS.BAM~ ~override~
	~1pp_female_dwarves/CDFB2/CDFB2SX.BAM~ ~override~


PRINT ~Copying new files for CDFB3 - chain mail~
	
COPY			~1pp_female_dwarves/CDFB3/CDFB3A1.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3A2.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3A3.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3A4.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3A5.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3A6.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3A7.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3A8.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3A9.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3CA.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G1.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G11.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G12.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G13.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G14.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G15.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G16.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G17.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G18.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3G19.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3SA.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3SS.BAM~ ~override~
	~1pp_female_dwarves/CDFB3/CDFB3SX.BAM~ ~override~

PRINT ~Copying new files for CDFC4 - cleric with plate mail~

COPY		~1pp_female_dwarves/CDFC4/CDFC4A1.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4A2.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4A3.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4A4.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4A5.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4A6.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4A7.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4A8.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4A9.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4CA.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G1.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G11.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G12.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G13.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G14.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G15.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G16.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G17.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G18.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4G19.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4SA.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4SS.BAM~ ~override~
	~1pp_female_dwarves/CDFC4/CDFC4SX.BAM~ ~override~
	
PRINT ~Copying new files for CDFF4 - fighter with plate mail~

COPY		~1pp_female_dwarves/CDFF4/CDFF4A1.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4A2.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4A3.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4A4.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4A5.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4A6.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4A7.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4A8.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4A9.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4CA.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G1.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G11.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G12.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G13.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G14.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G15.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G16.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G17.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G18.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4G19.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4SA.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4SS.BAM~ ~override~
	~1pp_female_dwarves/CDFF4/CDFF4SX.BAM~ ~override~

PRINT ~Copying new files for CDFT2 - thieves~

COPY		~1pp_female_dwarves/CDFT2/CDFT2A1.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2A2.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2A3.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2A4.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2A5.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2A6.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2A7.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2A8.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2A9.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2CA.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G1.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G11.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G12.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G13.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G14.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G15.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G16.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G17.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G18.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2G19.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2SA.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2SS.BAM~ ~override~
	~1pp_female_dwarves/CDFT2/CDFT2SX.BAM~ ~override~

PRINT ~Copying new files for CDFW1 - unarmoured mage~
	
COPY			~1pp_female_dwarves/CDFW1/CDFW1A1.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1A2.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1A3.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1A4.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1A5.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1A6.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1A7.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1A8.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1A9.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1CA.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G1.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G11.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G12.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G13.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G14.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G15.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G16.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G17.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G18.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1G19.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1SA.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1SS.BAM~ ~override~
	~1pp_female_dwarves/CDFW1/CDFW1SX.BAM~ ~override~
	
PRINT ~Copying new files for CDFW2 - mage with light robe~
	
COPY			~1pp_female_dwarves/CDFW2/CDFW2A1.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2A2.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2A3.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2A4.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2A5.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2A6.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2A7.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2A8.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2A9.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2CA.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G1.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G11.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G12.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G13.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G14.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G15.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G16.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G17.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G18.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2G19.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2SA.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2SS.BAM~ ~override~
	~1pp_female_dwarves/CDFW2/CDFW2SX.BAM~ ~override~
	
	PRINT ~Copying new files for CDFW3 - mage with medium robe~
	
COPY			~1pp_female_dwarves/CDFW3/CDFW3A1.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3A2.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3A3.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3A4.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3A5.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3A6.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3A7.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3A8.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3A9.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3CA.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G1.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G11.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G12.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G13.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G14.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G15.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G16.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G17.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G18.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3G19.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3SA.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3SS.BAM~ ~override~
	~1pp_female_dwarves/CDFW3/CDFW3SX.BAM~ ~override~
	
	PRINT ~Copying new files for CDFW4 - mage with heavy robe~
	
COPY			~1pp_female_dwarves/CDFW4/CDFW4A1.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4A2.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4A3.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4A4.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4A5.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4A6.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4A7.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4A8.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4A9.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4CA.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G1.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G11.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G12.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G13.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G14.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G15.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G16.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G17.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G18.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4G19.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4SA.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4SS.BAM~ ~override~
	~1pp_female_dwarves/CDFW4/CDFW4SX.BAM~ ~override~

	
PRINT ~Updating paperdolls~

COPY		~1pp_female_dwarves/INV/CDFC1INV.BAM~ ~override~
	~1pp_female_dwarves/INV/CDFC2INV.BAM~ ~override~
	~1pp_female_dwarves/INV/CDFC3INV.BAM~ ~override~
	~1pp_female_dwarves/INV/CDFC4INV.BAM~ ~override~
	~1pp_female_dwarves/INV/CDFF1INV.BAM~ ~override~
	~1pp_female_dwarves/INV/CDFF2INV.BAM~ ~override~
	~1pp_female_dwarves/INV/CDFF3INV.BAM~ ~override~
	~1pp_female_dwarves/INV/CDFF4INV.BAM~ ~override~
	~1pp_female_dwarves/INV/CDFT1INV.BAM~ ~override~
	~1pp_female_dwarves/INV/CDFT2INV.BAM~ ~override~
	~1pp_female_dwarves/INV/CDFW1INV.BAM~ ~override~
	~1pp_female_dwarves/INV/CDFW2INV.BAM~ ~override~
	~1pp_female_dwarves/INV/CDFW3INV.BAM~ ~override~
	~1pp_female_dwarves/INV/CDFW4INV.BAM~ ~override~
	~1pp_female_dwarves/INV/CGFW1INV.BAM~ ~override~
	~1pp_female_dwarves/INV/CGFW2INV.BAM~ ~override~
	~1pp_female_dwarves/INV/CGFW3INV.BAM~ ~override~
	~1pp_female_dwarves/INV/CGFW4INV.BAM~ ~override~
	
	
//ENDCOMPONENT