BACKUP ~Nathaniel/backup~

AUTHOR ~feuille_sakaki@spellholdstudios.net~

VERSION ~v4.3~

README ~Nathaniel/NathanielReadme.htm~

AUTO_TRA ~Nathaniel/%s~

LANGUAGE ~English~ ~English~ ~Nathaniel/English/Setup-Nathaniel.tra~

BEGIN @0

//Appends a custom state for dialogue validity - courtesy of the BG2 Fixpack
APPEND ~STATE.IDS~
  ~0x80101FEF CD_STATE_NOTVALID~
  UNLESS ~CD_STATE_NOTVALID~

//Sorting out broken ids and gametimes - thanks to the Fixpack
INCLUDE ~Nathaniel/lib/fhnids.tph~
INCLUDE ~Nathaniel/lib/fhntimes.tph~

//Giving Imoen a banter file, courtesy of the BG2 Fixpack

ACTION_IF NOT FILE_EXISTS_IN_GAME ~cdbehbla.pro~ //makes sure the fixpack isn't already installed

THEN BEGIN

ACTION_IF FILE_EXISTS_IN_GAME ~saradush.mve~ THEN BEGIN
  COPY_EXISTING ~interdia.2da~ ~override~
    SET_2DA_ENTRY 17 1 2 ~BIMOEN2~ // fixes ToB version
    BUT_ONLY_IF_IT_CHANGES
END ELSE BEGIN
  APPEND ~interdia.2da~ ~IMOEN       BIMOEN2~ // fixes SoA version
    UNLESS ~BIMOEN2~
END
END

//This goes before any Imoen banter files are compiled!

ACTION_IF NOT FILE_EXISTS_IN_GAME ~bimoen2.dlg~ THEN BEGIN
  COMPILE ~Nathaniel/lib/fhninitimoen.d~
END

//Copying the required items to the override folder//

COPY ~Nathaniel/items/fhioun.itm~ ~override/fhioun.itm~
SAY NAME1 @1
SAY NAME2 @1

SAY DESC @2

COPY ~Nathaniel/items/FHring.itm~ ~override/FHring.itm~
SAY NAME1 @3
SAY NAME2 @3
SAY UNIDENTIFIED_DESC @4
SAY DESC @4

COPY ~Nathaniel/items/FHsw1.itm~ ~override/FHsw1.itm~
SAY NAME1 @5
SAY NAME2 @5
SAY UNIDENTIFIED_DESC @6
SAY DESC @6

COPY ~Nathaniel/items/fhsw2.itm~ ~override/fhsw2.itm~
SAY NAME1 @7
SAY NAME2 @7
SAY UNIDENTIFIED_DESC @8
SAY DESC @8

COPY ~Nathaniel/items/fhcake.itm~ ~override/fhcake.itm~
SAY NAME1 @9
SAY NAME2 @9
SAY UNIDENTIFIED_DESC @10
SAY DESC @10

COPY ~Nathaniel/items/FHNOTE.itm~ ~override/FHNOTE.itm~
SAY NAME1 @11
SAY NAME2 @11
SAY UNIDENTIFIED_DESC @12
SAY DESC @12

COPY ~Nathaniel/items/FHBODY.itm~ ~override/FHBODY.itm~
SAY NAME1 @13
SAY NAME2 @13
SAY DESC @14


//Copying the cre files to override//

COPY ~Nathaniel/characters/nath07.cre~ ~override/nath07.cre~
SAY NAME1 @15
SAY NAME2 @15
SAY MORALE @16  
SAY LEADER @17  
SAY TIRED @18
SAY BORED @19  
SAY BATTLE_CRY1 @20
SAY BATTLE_CRY2 @21  
SAY BATTLE_CRY3 @22
SAY BATTLE_CRY4 @23
SAY BATTLE_CRY5 @24  
SAY DAMAGE ~~ 
SAY DYING ~~ [FHNDEA]
SAY HURT @27  
SAY AREA_FOREST @28  
SAY AREA_CITY @29  
SAY AREA_DUNGEON @30
SAY SELECT_COMMON1 @31  
SAY SELECT_COMMON2 @32  
SAY SELECT_COMMON3 @33  
SAY SELECT_COMMON4 @34  
SAY SELECT_COMMON5 @35  
SAY SELECT_COMMON6 @36  
SAY SELECT_ACTION1 @37  
SAY SELECT_ACTION2 @38  
SAY SELECT_ACTION3 @39  
SAY SELECT_ACTION4 @40  
SAY SELECT_ACTION5 @41  
SAY SELECT_ACTION6 @42  
SAY SELECT_ACTION7 @43
SAY SELECT_RARE1 @44  
SAY SELECT_RARE2 @45  
SAY CRITICAL_HIT @46  
SAY CRITICAL_MISS @47  
SAY TARGET_IMMUNE @48  
SAY INVENTORY_FULL @49  
SAY HAPPY @50  
SAY UNHAPPY_ANNOYED @51  
SAY UNHAPPY_SERIOUS @52  
SAY SPELL_DISRUPTED @53  
SAY SET_A_TRAP @54  
SAY HIDDEN_IN_SHADOWS @54  
SAY PICKED_POCKET @55  
SAY REACT_TO_DIE_GENERAL @56  
SAY BIO @57
ADD_CRE_ITEM ~FHSW1~ #0 #0 #0 ~IDENTIFIED~ ~WEAPON1~ EQUIP
ADD_CRE_ITEM ~FHSW2~ #0 #0 #0 ~IDENTIFIED~ ~SHIELD~  EQUIP
ADD_CRE_ITEM ~FHring~ #0 #0 #0 ~IDENTIFIED&UNDROPPABLE~ ~RRING~
ADD_CRE_ITEM ~POTN52~ #5 #0 #0 ~IDENTIFIED~ ~INV1~

COPY ~Nathaniel/characters/nath08.cre~ ~override/nath08.cre~
SAY NAME1 @15
SAY NAME2 @15
SAY INITIAL_MEETING @58
SAY MORALE @16  
SAY LEADER @17  
SAY TIRED @18  
SAY BORED @19  
SAY BATTLE_CRY1 @20
SAY BATTLE_CRY2 @21  
SAY BATTLE_CRY3 @22
SAY BATTLE_CRY4 @23
SAY BATTLE_CRY5 @24  
SAY DAMAGE ~~ 
SAY DYING ~~ [FHNDEA]
SAY HURT @27  
SAY AREA_FOREST @28  
SAY AREA_CITY @29  
SAY AREA_DUNGEON @30
SAY SELECT_COMMON1 @31  
SAY SELECT_COMMON2 @32  
SAY SELECT_COMMON3 @33  
SAY SELECT_COMMON4 @34  
SAY SELECT_COMMON5 @35  
SAY SELECT_COMMON6 @36  
SAY SELECT_ACTION1 @37  
SAY SELECT_ACTION2 @38  
SAY SELECT_ACTION3 @39  
SAY SELECT_ACTION4 @40  
SAY SELECT_ACTION5 @41  
SAY SELECT_ACTION6 @42  
SAY SELECT_ACTION7 @43
SAY SELECT_RARE1 @44  
SAY SELECT_RARE2 @45  
SAY CRITICAL_HIT @46  
SAY CRITICAL_MISS @47  
SAY TARGET_IMMUNE @48  
SAY INVENTORY_FULL @49  
SAY HAPPY @50  
SAY UNHAPPY_ANNOYED @51  
SAY UNHAPPY_SERIOUS @52  
SAY SPELL_DISRUPTED @53  
SAY SET_A_TRAP @54  
SAY HIDDEN_IN_SHADOWS @54  
SAY PICKED_POCKET @55  
SAY REACT_TO_DIE_GENERAL @56  
SAY BIO @57
ADD_CRE_ITEM ~FHSW1~ #0 #0 #0 ~IDENTIFIED~ ~WEAPON1~ EQUIP
ADD_CRE_ITEM ~FHSW2~ #0 #0 #0 ~IDENTIFIED~ ~SHIELD~  EQUIP
ADD_CRE_ITEM ~FHring~ #0 #0 #0 ~IDENTIFIED&UNDROPPABLE~ ~RRING~
ADD_CRE_ITEM ~POTN52~ #5 #0 #0 ~IDENTIFIED~ ~INV1~

COPY ~Nathaniel/characters/nath10.cre~ ~override/nath10.cre~
SAY NAME1 @15
SAY NAME2 @15
SAY MORALE @16  
SAY LEADER @17  
SAY TIRED @18  
SAY BORED @19  
SAY BATTLE_CRY1 @20
SAY BATTLE_CRY2 @21  
SAY BATTLE_CRY3 @22
SAY BATTLE_CRY4 @23
SAY BATTLE_CRY5 @24  
SAY DAMAGE ~~ 
SAY DYING ~~ [FHNDEA]
SAY HURT @27  
SAY AREA_FOREST @28  
SAY AREA_CITY @29  
SAY AREA_DUNGEON @30
SAY SELECT_COMMON1 @31  
SAY SELECT_COMMON2 @32  
SAY SELECT_COMMON3 @33  
SAY SELECT_COMMON4 @34  
SAY SELECT_COMMON5 @35  
SAY SELECT_COMMON6 @36  
SAY SELECT_ACTION1 @37  
SAY SELECT_ACTION2 @38  
SAY SELECT_ACTION3 @39  
SAY SELECT_ACTION4 @40  
SAY SELECT_ACTION5 @41  
SAY SELECT_ACTION6 @42  
SAY SELECT_ACTION7 @43
SAY SELECT_RARE1 @44  
SAY SELECT_RARE2 @45  
SAY CRITICAL_HIT @46  
SAY CRITICAL_MISS @47  
SAY TARGET_IMMUNE @48  
SAY INVENTORY_FULL @49  
SAY HAPPY @50  
SAY UNHAPPY_ANNOYED @51  
SAY UNHAPPY_SERIOUS @52  
SAY SPELL_DISRUPTED @53  
SAY SET_A_TRAP @54  
SAY HIDDEN_IN_SHADOWS @54  
SAY PICKED_POCKET @55  
SAY REACT_TO_DIE_GENERAL @56  
SAY BIO @57
ADD_CRE_ITEM ~FHSW1~ #0 #0 #0 ~IDENTIFIED~ ~WEAPON1~ EQUIP
ADD_CRE_ITEM ~FHSW2~ #0 #0 #0 ~IDENTIFIED~ ~SHIELD~ EQUIP
ADD_CRE_ITEM ~FHring~ #0 #0 #0 ~IDENTIFIED&UNDROPPABLE~ ~RRING~
ADD_CRE_ITEM ~POTN52~ #5 #0 #0 ~IDENTIFIED~ ~INV1~

COPY ~Nathaniel/characters/FHTERL.cre~ ~override/FHTERL.cre~
SAY NAME1 @59
SAY NAME2 @59
ADD_CRE_ITEM ~CHAN04~ #0 #0 #0 ~IDENTIFIED~ ~ARMOR~
ADD_CRE_ITEM ~BOW03~ #0 #0 #0 ~IDENTIFIED~ ~WEAPON1~
ADD_CRE_ITEM ~SW1H04~ #0 #0 #0 ~IDENTIFIED~ ~WEAPON2~
ADD_CRE_ITEM ~AROW01~ #20 #0 #0 ~IDENTIFIED~ ~QUIVER1~

COPY ~Nathaniel/characters/FHAVERY.cre~ ~override/FHAVERY.cre~
SAY NAME1 @60
SAY NAME2 @60
ADD_CRE_ITEM ~HELM08~ #0 #0 #0 ~IDENTIFIED~ ~HELMET~
ADD_CRE_ITEM ~CHAN04~ #0 #0 #0 ~IDENTIFIED~ ~ARMOR~

COPY ~Nathaniel/characters/FHASALIE.cre~ ~override/FHASALIE.cre~
SAY NAME1 @61
SAY NAME2 @61
SAY SELECT_COMMON1 @62  

COPY ~Nathaniel/characters/FHBRYCE.cre~ ~override/FHBRYCE.cre~
SAY NAME1 @63
SAY NAME2 @63
ADD_CRE_ITEM ~LEAT04~ #0 #0 #0 ~IDENTIFIED~ ~ARMOR~
ADD_CRE_ITEM ~DAGG01~ #0 #0 #0 ~IDENTIFIED~ ~WEAPON1~

COPY ~Nathaniel/characters/FHMAYON.cre~ ~override/FHMAYON.cre~
SAY NAME1 @64
SAY NAME2 @64
SAY SELECT_COMMON1 @65  
SAY SELECT_COMMON2 @66  

COPY ~Nathaniel/characters/VAMPNATH.cre~ ~override/VAMPNATH.cre~
SAY NAME1 @15
SAY NAME2 @15
ADD_CRE_ITEM ~VAMPREG~ #0 #0 #0 ~IDENTIFIED~ ~LRING~
ADD_CRE_ITEM ~FHBODY~ #0 #0 #0 ~IDENTIFIED~ ~QITEM1~

COPY ~Nathaniel/BAMs/FHIOUN.bam~ ~override/FHIOUN.bam~

COMPILE ~Nathaniel/dialogues/SoA~
        ~Nathaniel/script/SoA/CutNathKidnapped.baf~
        ~Nathaniel/script/SoA/FHASALIE.baf~
        ~Nathaniel/script/SoA/FHAVERY.baf~
        ~Nathaniel/script/SoA/FHBRYCE.baf~
        ~Nathaniel/script/SoA/FHKidnap.baf~
        ~Nathaniel/script/SoA/FHNAT.baf~
        ~Nathaniel/script/SoA/FHNATD.baf~
        ~Nathaniel/script/SoA/FHNFIX.baf~
        ~Nathaniel/script/SoA/FHNATX.baf~
        ~Nathaniel/script/SoA/FHTERL.baf~
        ~Nathaniel/script/SoA/VAMPNATH.baf~

EXTEND_BOTTOM ~AR0300.bcs~ ~Nathaniel/script/SoA/FHAR0300.baf~
EXTEND_BOTTOM ~AR0700.bcs~ ~Nathaniel/script/SoA/FHAR0700.baf~
EXTEND_BOTTOM ~AR0809.bcs~ ~Nathaniel/script/SoA/FHAR0809.baf~
EXTEND_BOTTOM ~AR2000.bcs~ ~Nathaniel/script/SoA/FHAR2000.baf~
EXTEND_BOTTOM ~BALDUR.bcs~ ~Nathaniel/script/SoA/FHBALDUR.baf~
EXTEND_TOP ~VAMPAMB.bcs~ ~Nathaniel/script/SoA/FHVAMPAM.baf~
EXTEND_TOP ~BODHIAMB.bcs~ ~Nathaniel/script/SoA/FHBODHIA.baf~
EXTEND_TOP ~CLEANSE.bcs~ ~Nathaniel/script/SoA/FHCLEANS.baf~
EXTEND_TOP ~ANOMEN.bcs~ ~Nathaniel/script/SoA/FHAno.baf~

ADD_JOURNAL EXISTING TITLE (#74337) @6 @69 @75 USING ~Nathaniel/%LANGUAGE%/vampnath.tra~ ~Nathaniel/%LANGUAGE%/fhnatp.tra~

//Introduce Mute song 0

COPY_EXISTING ~songlist.2da~ ~override~
REPLACE_TEXTUALLY
~0       No_music        ****~
~0       FHNBLANK        FHNBLANK.MUS~

COPY ~Nathaniel/FHNBLANK.mus~ ~music/FHNBLANK.mus~

ACTION_IF FILE_EXISTS_IN_GAME ~mel01.cre~ THEN
BEGIN

COMPILE ~Nathaniel/dialogues/ToB~
        ~Nathaniel/script/ToB/FH218.baf~
        ~Nathaniel/script/ToB/FHBOY.baf~
        ~Nathaniel/script/ToB/FHCut218.baf~
        ~Nathaniel/script/ToB/FHN25.baf~
        ~Nathaniel/script/ToB/FHN25D.baf~

COPY ~Nathaniel/items/fhsw3.itm~ ~override/fhsw3.itm~
SAY NAME1 @5
SAY NAME2 @5
SAY UNIDENTIFIED_DESC @67

COPY ~Nathaniel/items/FHAMUL.itm~ ~override/FHAMUL.itm~
SAY NAME1 @68
SAY NAME2 @68
SAY UNIDENTIFIED_DESC @69
SAY DESC @69

COPY ~Nathaniel/characters/nath25.cre~ ~override/nath25.cre~
SAY NAME1 @15
SAY NAME2 @15
SAY MORALE @16  
SAY LEADER @17  
SAY TIRED @18  
SAY BORED @19  
SAY BATTLE_CRY1 @20
SAY BATTLE_CRY2 @21  
SAY BATTLE_CRY3 @22
SAY BATTLE_CRY4 @23
SAY BATTLE_CRY5 @24  
SAY DAMAGE @70  
SAY HURT @27  
SAY AREA_FOREST @28  
SAY AREA_CITY @29  
SAY AREA_DUNGEON @30
SAY SELECT_COMMON1 @31  
SAY SELECT_COMMON2 @32  
SAY SELECT_COMMON3 @33  
SAY SELECT_COMMON4 @34  
SAY SELECT_COMMON5 @35  
SAY SELECT_COMMON6 @36  
SAY SELECT_ACTION1 @37  
SAY SELECT_ACTION2 @38  
SAY SELECT_ACTION3 @39  
SAY SELECT_ACTION4 @40  
SAY SELECT_ACTION5 @41  
SAY SELECT_ACTION6 @42  
SAY SELECT_ACTION7 @71
SAY SELECT_RARE1 @44  
SAY SELECT_RARE2 @45  
SAY CRITICAL_HIT @46  
SAY CRITICAL_MISS @47  
SAY TARGET_IMMUNE @48  
SAY INVENTORY_FULL @49  
SAY HAPPY @50  
SAY UNHAPPY_ANNOYED @51  
SAY UNHAPPY_SERIOUS @52  
SAY SPELL_DISRUPTED @53  
SAY SET_A_TRAP @54  
SAY HIDDEN_IN_SHADOWS @54  
SAY PICKED_POCKET @55  
SAY REACT_TO_DIE_GENERAL @56 
SAY BIO @57
WRITE_ASCII 0x248 ~FHN25~ #8 // override
WRITE_ASCII 0x2cc ~FHN25~ #8 // dialogue
WRITE_ASCII 0x280 ~NATH~ #32 //DV
ADD_CRE_ITEM ~FHSW1~ #0 #0 #0 ~IDENTIFIED~ ~WEAPON1~
ADD_CRE_ITEM ~FHSW2~ #0 #0 #0 ~IDENTIFIED~ ~SHIELD~
ADD_CRE_ITEM ~RING06~ #0 #0 #0 ~IDENTIFIED~ ~LRING~
ADD_CRE_ITEM ~POTN52~ #5 #0 #0 ~IDENTIFIED~ ~QITEM1~

COPY ~Nathaniel/characters/fhboy.cre~ ~override/fhboy.cre~
SAY NAME1 @72
SAY NAME2 @72
ADD_CRE_ITEM ~MINHP1~ #0 #0 #0 ~IDENTIFIED~ ~INV1~

COPY ~Nathaniel/characters/fhlove6.cre~ ~override/fhlove6.cre~
SAY NAME1 @60
SAY NAME2 @60

EXTEND_TOP ~AR6200.bcs~ ~Nathaniel/script/ToB/FHAR6200.baf~
EXTEND_BOTTOM ~AR4500.bcs~ ~Nathaniel/script/ToB/FHAR4500.baf~
EXTEND_BOTTOM ~AR5000.bcs~ ~Nathaniel/script/ToB/FHAR5000.baf~
EXTEND_BOTTOM ~BALDUR25.bcs~ ~Nathaniel/script/ToB/BALDUR25.baf~
EXTEND_TOP ~CUT218G.bcs~ ~Nathaniel/script/ToB/FH218.baf~

COPY ~Nathaniel/epilogues/FHNATep.2da~ ~override/FHNATH01.2da~
  REPLACE ~99999~ @73

COPY ~Nathaniel/epilogues/FHNATep.2da~ ~override/FHNATH02.2da~
  REPLACE ~99999~ @74

COPY ~Nathaniel/epilogues/FHNATep.2da~ ~override/FHNATH03.2da~
  REPLACE ~99999~ @75

COPY ~Nathaniel/epilogues/FHNATep.2da~ ~override/FHNATH04.2da~
  REPLACE ~99999~ @76
  
COPY ~Nathaniel/epilogues/FHNATep.2da~ ~override/FHNATH05.2da~
  REPLACE ~99999~ @77
  
COPY ~Nathaniel/epilogues/FHNATep.2da~ ~override/FHNATH06.2da~
  REPLACE ~99999~ @78
  
COPY ~Nathaniel/epilogues/FHNATep.2da~ ~override/FHNATH07.2da~
  REPLACE ~99999~ @79

COPY ~Nathaniel/epilogues/FHNATep.2da~ ~override/FHNATH08.2da~
  REPLACE ~99999~ @80
  
COPY ~Nathaniel/epilogues/FHNATep.2da~ ~override/FHNATH09.2da~
  REPLACE ~99999~ @81

END

APPEND ~interdia.2da~ ~NATH     BFHNAT      BFHN25~
UNLESS ~NATH~

APPEND ~pdialog.2da~ ~NATH      FHNATP           FHNATJ          FHNATD       FHN25P           FHN25J              FHN25D              FHN25~
UNLESS ~NATH~

LAF HANDLE_AUDIO END

BEGIN @83
FORCED_SUBCOMPONENT @84
REQUIRE_FILE ~override/nath07.cre~ @85
ACTION_IF GAME_IS ~bg2ee~ BEGIN
COPY ~Nathaniel/portraits/ee/NATH1L.bmp~ ~override/NATHL.bmp~ ~Nathaniel/portraits/ee/NATH1M.bmp~ ~override/NATHM.bmp~ ~Nathaniel/portraits/ee/NATH1S.bmp~ ~override/NATHS.bmp~
END ELSE BEGIN
COPY ~Nathaniel/portraits/bg2/NATH1L.bmp~ ~override/NATHL.bmp~ ~Nathaniel/portraits/bg2/NATH1M.bmp~ ~override/NATHM.bmp~ ~Nathaniel/portraits/bg2/NATH1S.bmp~ ~override/NATHS.bmp~
END


BEGIN @86
FORCED_SUBCOMPONENT @84
REQUIRE_FILE ~override/nath07.cre~ @85
ACTION_IF GAME_IS ~bg2ee~ BEGIN
COPY ~Nathaniel/portraits/ee/NATH2L.bmp~ ~override/NATHL.bmp~ ~Nathaniel/portraits/ee/NATH2M.bmp~ ~override/NATHM.bmp~ ~Nathaniel/portraits/ee/NATH2S.bmp~ ~override/NATHS.bmp~
END ELSE BEGIN
COPY ~Nathaniel/portraits/bg2/NATH2L.bmp~ ~override/NATHL.bmp~ ~Nathaniel/portraits/bg2/NATH2M.bmp~ ~override/NATHM.bmp~ ~Nathaniel/portraits/bg2/NATH2S.bmp~ ~override/NATHS.bmp~
END


BEGIN @87
FORCED_SUBCOMPONENT @84
REQUIRE_FILE ~override/nath07.cre~ @85
ACTION_IF GAME_IS ~bg2ee~ BEGIN
COPY ~Nathaniel/portraits/ee/NATH3L.bmp~ ~override/NATHL.bmp~ ~Nathaniel/portraits/ee/NATH3M.bmp~ ~override/NATHM.bmp~ ~Nathaniel/portraits/ee/NATH3S.bmp~ ~override/NATHS.bmp~
END ELSE BEGIN
COPY ~Nathaniel/portraits/bg2/NATH3L.bmp~ ~override/NATHL.bmp~ ~Nathaniel/portraits/bg2/NATH3M.bmp~ ~override/NATHM.bmp~ ~Nathaniel/portraits/bg2/NATH3S.bmp~ ~override/NATHS.bmp~
END


//Nathaniel/Solaufein Conflict

BEGIN @88
REQUIRE_FILE ~override/sola.dlg~ @89

COMPILE ~Nathaniel/crossmod/FHSolaConflict.d~

EXTEND_TOP ~FHNAT.bcs~ ~Nathaniel/crossmod/FHSolaConflict.baf~

ACTION_IF FILE_EXISTS ~data/25dialog.bif~ THEN BEGIN

COMPILE ~Nathaniel/crossmod/FHSolaConflictToB.d~
EXTEND_TOP ~FHN25.bcs~ ~Nathaniel/crossmod/FHSolaConflict.baf~
END

//Nathaniel/Kelsey dialogue

BEGIN @90
REQUIRE_FILE ~override/j#klsy.dlg~ @91

COMPILE ~Nathaniel/crossmod/FHklsy.d~
