/* ***************************
BG2-ToB Refinements Mod
Authors: T.G. Maestro, Littiz, the_bigg
WeiDU by Littiz, the_bigg
**************************** */


BACKUP ~refinements/backup~
AUTHOR ~http://forums.spellholdstudios.net/index.php?showforum=116~
NO_IF_EVAL_BUG

// MODDER setup_tra none

ASK_EVERY_COMPONENT
AUTO_TRA ~refinements/languages/english~
AUTO_TRA ~refinements/%s~

README ~Refinements/README-Refinements.htm~
VERSION ~Refinements v 3.31~

/* Language */
LANGUAGE ~English~ ~languages/english~ ~refinements/languages/english/setup.tra~
                                       ~refinements/languages/english/miscscripts.tra~
                                       ~refinements/languages/english/prompts.tra~

LANGUAGE ~French, by Sir Crapoilleau and Anomaly~ ~languages/french~   ~refinements/languages/english/setup.tra~
                                       ~refinements/languages/english/miscscripts.tra~
                                       ~refinements/languages/english/prompts.tra~
                                       ~refinements/languages/french/setup.tra~
                                       ~refinements/languages/french/miscscripts.tra~
                                       ~refinements/languages/french/prompts.tra~

LANGUAGE ~Japanese, by Kuroukome Veland~ ~languages/japanese~   ~refinements/languages/english/setup.tra~
                                       ~refinements/languages/english/miscscripts.tra~
                                       ~refinements/languages/english/prompts.tra~
                                       ~refinements/languages/japanese/setup.tra~
                                       ~refinements/languages/japanese/miscscripts.tra~
                                       ~refinements/languages/japanese/prompts.tra~

LANGUAGE ~Polish, by Yarpen and picollo~ ~languages/polish~   ~refinements/languages/english/setup.tra~
                                       ~refinements/languages/english/miscscripts.tra~
                                       ~refinements/languages/english/prompts.tra~
                                       ~refinements/languages/polish/setup.tra~
                                       ~refinements/languages/polish/miscscripts.tra~
                                       ~refinements/languages/polish/prompts.tra~

LANGUAGE ~Russian, by Aerie.ru, Prowler, Deneiris, Austin & Arcanecoast.ru~ ~languages/russian~   ~refinements/languages/english/setup.tra~
                                       ~refinements/languages/english/miscscripts.tra~
                                       ~refinements/languages/english/prompts.tra~
                                       ~refinements/languages/russian/setup.tra~
                                       ~refinements/languages/russian/miscscripts.tra~
                                       ~refinements/languages/russian/prompts.tra~


//////////////////////////////////////////////////////////////////////////////////
//Deprecated placeholders

// 0 - HLA
BEGIN @101
DEPRECATED @13
// 1 - Imoen
BEGIN @600
DEPRECATED @13
// 2 - Shapeshifting
BEGIN @700
DEPRECATED @13
// 3 - Robes
BEGIN @800
DEPRECATED @13
// 4 - Sword Angel
BEGIN @1001
DEPRECATED @13
// 5 - Armor Revision, in-house version
BEGIN @2000
DEPRECATED @13




//////////////////////////////////////////////////////////////////////////////////
//New HLAs

BEGIN @101
DESIGNATED 10
AT_INTERACTIVE_EXIT ~VIEW refinements/Docs/Revised_HLAs.txt~

INCLUDE ~refinements/lib/hlab.tpa~


/* COMMENTED OUT!!! This slot will be used in Version 3.
                t_b ----> Really hope not - that destroys component count.

////////////////////////////////////////////////////////////////////////////////////
//Revised Balthazar

BEGIN @550
AT_INTERACTIVE_EXIT ~VIEW refinements/Docs/Revised_Balthazar.txt~

COPY ~refinements/Hlab/Monk/balth~	  	 ~override~

*/






////////////////////////////////////////////////////////////////////////////////////
//Swashimoen, full revision.

BEGIN @600
DESIGNATED 20
SUBCOMPONENT @601

INCLUDE ~refinements/lib/swashimoen.tpa~







////////////////////////////////////////////////////////////////////////////////////
//Swashimoen, kit change only.

BEGIN @602
SUBCOMPONENT @601


// if TOB is not there (and there isn't an imoen15.cre) create it by copying from swashimoen213.cre
// (cheesy, but works  ;) )
ACTION_IF NOT FILE_EXISTS_IN_GAME ~imoen15.cre~ THEN
BEGIN
	COPY_EXISTING ~imoen213.cre~ ~override/imoen15.cre~
END

COPY_EXISTING ~imoen10.cre~ ~override~
			  ~imoen15.cre~ ~override~
			  ~imoen211.cre~ ~override~
			  ~imoen213.cre~ ~override~
	WRITE_SHORT   0x244 0    //needed to change the the kit
	WRITE_BYTE    0x246 12   //swashbuckler
	WRITE_BYTE    0x247 0x40 //needed to change the kit





////////////////////////////////////////////////////////////////////////////////////
//Swashimoen, Detect Illusions rather than Set Traps.

BEGIN @603
SUBCOMPONENT @601

INCLUDE ~refinements/lib/swashimoen.tpa~
COPY_EXISTING ~imoen10.cre~ ~override~
			  ~imoen15.cre~ ~override~
			  ~imoen211.cre~ ~override~
			  ~imoen213.cre~ ~override~
  WRITE_BYTE 0x64 60 // detect illusions
  WRITE_BYTE 0x65 0  // set traps







////////////////////////////////////////////////////////
//Shapeshifting fix


BEGIN @701
DESIGNATED 30
SUBCOMPONENT @700
COPY_EXISTING ~sw1h01.itm~ ~override/tb#shap_std.txt~
AT_INTERACTIVE_EXIT ~VIEW refinements/Docs/Shapefix.txt~
COPY ~refinements/shapefix/copy~	  	 ~override~



BEGIN @702
SUBCOMPONENT @700
FORBID_COMPONENT ~bg2fixpack.tp2~ 0 ~Already included in BG2 Fixpack~
COPY_EXISTING ~sw1h01.itm~ ~override/tb#shap_alt.txt~
AT_INTERACTIVE_EXIT ~VIEW refinements/Docs/Shapefix.txt~
COPY ~refinements/shapefix/alt/copy~	  	 ~override~
ACTION_IF FILE_EXISTS_IN_GAME ~tg#ussc.spl~ THEN BEGIN
  COPY ~refinements/shapefix/alt/LI#DRFIR.SPL~	 ~override/LI#DRFIR.SPL~
  SAY NAME1 @299
  SAY NAME2 @299
  COPY ~refinements/shapefix/alt/LI#DREAR.SPL~	 ~override/LI#DREAR.SPL~
  SAY NAME1 @298
  SAY NAME2 @298
  COPY ~refinements/shapefix/alt/LI#DRAIR.SPL~	 ~override/LI#DRAIR.SPL~
  SAY NAME1 @297
  SAY NAME2 @297
  COPY ~refinements/shapefix/alt/LI#DRWAT.SPL~	 ~override/LI#DRWAT.SPL~
  SAY NAME1 @296
  SAY NAME2 @296
END






////////////////////////////////////////////////////////
//Universal Robes


BEGIN @800
DESIGNATED 40

COPY_EXISTING ~CLCK09.ITM~	 ~override/CLCK09.ITM~
              ~CLCK10.ITM~	 ~override/CLCK10.ITM~
              ~CLCK11.ITM~	 ~override/CLCK11.ITM~
              ~CLCK12.ITM~	 ~override/CLCK12.ITM~
              ~CLCK13.ITM~	 ~override/CLCK13.ITM~
              ~CLCK14.ITM~	 ~override/CLCK14.ITM~
	READ_STRREF DESC desc
  SPRINT desc1 @807
	SAY_EVALUATED DESC ~%desc1%~
	WRITE_LONG 0x1e 0x40725ec0






////////////////////////////////////////////////////////////////////////////////////
//New Kit Installation

BEGIN @1001
DESIGNATED 50
REQUIRE_FILE ~Data/25Dialog.bif~ @10
AT_INTERACTIVE_EXIT ~VIEW refinements/Docs/Sword_Angel.txt~

INCLUDE ~refinements/lib/swang.tpa~







// these are placeholders
BEGIN @2010
DESIGNATED 60
DEPRECATED @2010

BEGIN @2010
DEPRECATED @2010

BEGIN @2010
DEPRECATED @2010

BEGIN @2010
DEPRECATED @2010

////////////////////////////////////////////////////////////////////////////////////
//Revised Armors & Shields : description updater, only local language.

BEGIN @2003
SUBCOMPONENT @2000
DESIGNATED 70
REQUIRE_PREDICATE !(~%LANGUAGE%~ STRING_EQUAL_CASE ~languages/english~) @2005
FORBID_COMPONENT ~item_rev.tp2~ 0 @2012
COPY_EXISTING ~sw1h01.itm~ ~override/tb#localdescriptionsforarmor.txt~
INCLUDE ~refinements/lib/armor.tpa~

////////////////////////////////////////////////////////////////////////////////////
//Revised Armors & Shields : description updater, local language or English.

BEGIN @2004
SUBCOMPONENT @2000
REQUIRE_PREDICATE !(~%LANGUAGE%~ STRING_EQUAL_CASE ~languages/english~) @2005
FORBID_COMPONENT ~item_rev.tp2~ 0 @2012
COPY_EXISTING ~sw1h01.itm~ ~override/tb#generdescriptionsforarmor.txt~
INCLUDE ~refinements/lib/armor.tpa~

////////////////////////////////////////////////////////////////////////////////////
//Revised Armors & Shields : no description updater.

BEGIN @2007
SUBCOMPONENT @2000
REQUIRE_PREDICATE !(~%LANGUAGE%~ STRING_EQUAL_CASE ~languages/english~) @2005
FORBID_COMPONENT ~item_rev.tp2~ 0 @2012
INCLUDE ~refinements/lib/armor.tpa~

////////////////////////////////////////////////////////////////////////////////////
//Revised Armors & Shields : description updater, language = English.

BEGIN @2008
SUBCOMPONENT @2009
REQUIRE_PREDICATE (~%LANGUAGE%~ STRING_EQUAL_CASE ~languages/english~) @2006
FORBID_COMPONENT ~item_rev.tp2~ 0 @2012
COPY_EXISTING ~sw1h01.itm~ ~override/tb#generdescriptionsforarmor.txt~
INCLUDE ~refinements/lib/armor.tpa~

////////////////////////////////////////////////////////////////////////////////////
//Revised Armors & Shields : no description updater, language = English.

BEGIN @2007
SUBCOMPONENT @2009
REQUIRE_PREDICATE (~%LANGUAGE%~ STRING_EQUAL_CASE ~languages/english~) @2006
FORBID_COMPONENT ~item_rev.tp2~ 0 @2012
INCLUDE ~refinements/lib/armor.tpa~

////////////////////////////////////////////////////////////////////////////////////
//Revised Armors & Shields : no description updater, language = English.

BEGIN @2011
SUBCOMPONENT @2009
REQUIRE_PREDICATE (~%LANGUAGE%~ STRING_EQUAL_CASE ~languages/english~) @2006
FORBID_COMPONENT ~item_rev.tp2~ 0 @2012
COPY_EXISTING ~sw1h01.itm~ ~override/tb#nomovementratepenalties.txt~
COPY_EXISTING ~sw1h01.itm~ ~override/tb#generdescriptionsforarmor.txt~
INCLUDE ~refinements/lib/armor.tpa~
