-------------------------------------------------
---               Transitions                 ---
---                by Lauriel                 ---
-------------------------------------------------

------------------------------------------------------------------------
GENERAL
------------------------------------------------------------------------
This mod requires EET, BGEE, or BG2EE.

The Transitions mod's main purpose is to provide seemless transitions between campaigns in EET.  It will  provide a mechanism to remain in the BGEE "world" after Sarevok is defeated and BG2EE "world" after Irenicus is defeated.  For EET, it also allows for skipping ahead to BG2EE, skipping all or the remainder of SoD, as suits the player.

Progressing through to SoD or BGII areas of the game is accomplished by using a custom item provided by Duke Belt after the clean-up quests are finished or skipped.  Progressing through to ToB is accomplished by using the Amulet of Selderine provided by Queen Ellesmine.

After Sarevok has been defeated, the protagonist can take up residence at the Ducal Palace, thanks to Duke Belt.  If the protagonist rescued Duke Eltan, he will show his appreciation by awarding the keys to a home.  There is also the possibility for a number of new clean-up quests, depending upon which of Sarevok's followers have been previously eliminated.  BGEE and TotSC quests can be finished after Sarevok's death, giving the player control over the order of events.

In order to plug the plot hole dealing with Sarevok's sword, he can be given his equipment, either equipped or just in his inventory, so that it can be looted and confiscated after his death.  If you choose to equip his items, the final fight with him might be slightly more difficult.

There is an option for a new bhaal-spawn ability that will be added during the first rest period after defeating Sarevok.  The protagonist will receive either Mind Shield or Charm Creature, depending upon their reaction bonus.

------------------------------------------------------------------------
DESCRIPTION
------------------------------------------------------------------------

------------------------------------------------------------------------
Main Component - required for most, but not all, content
------------------------------------------------------------------------
Prevents the end of game transition to SoD after Sarevok's death  
Prevents the end of game transition to ToB after Irenicus's death  
Allows access to Duke Belt in the Ducal Palace for game advancement  
To remain consistent with SoD, the protagonist is offered the room on the 3rd floor, which may be turned down
Also to remain consistent with SoD, after Sarevok is defeated Liia offers to recruit Imoen for magic training, the timing of which is up to the player
If SoD is installed, the Korlasz dungeon quest will be a regular skippable clean-up quest, with no tour-guide Imoen, and allowing you to come and go as you please
NOTE: Your party will not be given a key ring when doing the Korlasz quest.  If you want one, you can buy one at various merchants in Baldur's Gate when SoD is present
If SoD is installed, Duke Belt's item allows for skipping all or the remainder of SoD at almost any time during the campaign (there is a point of no escape toward the end)

------------------------------------------------------------------------
New Bhaal-spawn power
------------------------------------------------------------------------
Requires Main Component and BGEE or EET
Use the "Sarevok died" movie as a dream sequence and award new bhaal-spawn power at the first rest

------------------------------------------------------------------------
Sarevok's Equipment
------------------------------------------------------------------------
Requires Main Component and BGEE or EET
Give Sarevok his sword so we can better explain its movement between games  
Add Sarevok's custom armor and helm from Tantalus
NOTE: the sword will be confiscated by the Flaming Fist so it can in turn be stolen from the Ducal Palace as per SoD, however the PC will be compensated for the loss by Duke Belt  

Option 1: Sarevok's equipment is equipped - this may make the final fight slightly more difficult  
Option 2: Sarevok's equipment is just in his inventory - final fight will not be affected  
Option 3: When Endless BGEE is installed, use how that mod handles Sarevok's equipment, otherwise use option 2

------------------------------------------------------------------------
Add Clean Up Quests
------------------------------------------------------------------------
Requires Main Component and BGEE or EET
Add quests to bring in Sarevok's remaining supporters depending upon who hasn't already been dispatched  
The Korlasz dungeon quest will be offered whether or not this component is installed.  
Any and all clean-up quests, including Korlasz's Dungeon crawl if SoD is installed, can be skipped.  To skip all of them without being asked about the next and the next, ad nauseum, just reply that you're not a bounty hunter and that Belt will need to hire someone else.  
NOTE: Tamoko's quest involves suicide-by-Flaming-Fist.  It may be triggering for some players.  

Option 1: Have survivors of the final battle with Sarevok immediately flee the area when Sarevok dies (to give more clean-up quests)  
Option 2: Behavior of the Sarevok's supporters in the final BGEE battle is unchanged  
Option 3: Option 1 and gentler version of Tamoko's quest  
Option 4: Option 2 and gentler version of Tamoko's quest  

------------------------------------------------------------------------
Close quests that cannot be continued
------------------------------------------------------------------------
Requires Main Component and BGEE or EET
Closes quests that may remain open after Sarevok is defeated and makes sure pub rumors don't reopen old quests.

------------------------------------------------------------------------
Clean up townsfolk chatter with reference to Sarevok
------------------------------------------------------------------------
Requires Main Component and BGEE or EET
An import from Endless BGEE of changes to various townsfolk.  
Will use EBG1's version if available

------------------------------------------------------------------------
Clean up the wounded from the thieves maze
------------------------------------------------------------------------
Requires Main Component and BGEE or EET
Remove Winski and Voleta from the thieves' maze and have Denkod inform the group of their whereabouts  
If someone in the group wears Sarevok's armor or helm, Denkod will provide some comedic relief  
NOTE: If you installed the clean-up quests component, Winski will disappear from the thieves' maze even if you don't install this component  
This will overwrite EBG1 changes to Denkod if they are installed  

------------------------------------------------------------------------
Have Elminster make an appearance outside the Ducal Palace
------------------------------------------------------------------------
Requires Main Component and BGEE or EET
Adds back unused original dialogue from BGEE  
Will use EBG1's version if available

------------------------------------------------------------------------
Duke Eltan's reward - House in front of Palace
------------------------------------------------------------------------
Requires Main Component and BGEE or EET
NOTE: Duke Eltan will only show up if he was safely delivered to the Harbor Master.  The reward for saving his life is a (one - no matter how many are installed as options) home the protagonist can call their own.  

Once a house is selected in-game as the reward, it will be locked, the PC will be given a key, and any actors inside the house will be moved to another location.  The house's contents will remain the same.  If you sell the key, you in essence sell the house and all possessions inside.  If EET is installed, the key will be among your possessions that are placed in Chateau Irenicus in BG2EE for you to find if you didn't sell it previously.  

This component prepares the 2nd house to the left of the Ducal Palace as one of the reward options.  

------------------------------------------------------------------------
Duke Eltan's reward - Cabin in High Hedge
------------------------------------------------------------------------
Requires Main Component and BGEE or EET
See note in component "House in front of Palace"

This component adds the cabin in High Hedge as one of the reward options from Duke Eltan.  This house is used in various other mods (Ascalon's Questpack and Glam's NPC Pack), so you may want to not select it in-game as your reward if those mods are installed and still using it.  Installing it, however, shouldn't affect those mods.

------------------------------------------------------------------------
Duke Eltan's reward - House in Beregost
------------------------------------------------------------------------
Requires Main Component and BGEE or EET
See note in component "House in front of Palace"

This component adds the large gray house in the upper west side of Beregost as one of the reward options from Duke Eltan.  

------------------------------------------------------------------------
Duke Eltan's reward - House in front of Flaming Fist headquarters
------------------------------------------------------------------------
Requires Main Component and BGEE or EET
See note in component "House in front of Palace"

This component adds the house across from the Flaming Fist compound as one of the reward options from Duke Eltan.

------------------------------------------------------------------------
Add waves of refugees to Baldur's Gate
------------------------------------------------------------------------
Requires Main Component and BGEE or EET
Refugees will start arriving in front of the palace in waves, seven game-days apart starting a week after the death of Sarevok.  Each wave will increase the number of refugees, but all are in front of the palace so overall, this is more of a cosmetic thing and will by no means swamp the city with refugees as it is in SoD.  This is a slightly modified import from EBG1.
Will use EBG1's version if available

------------------------------------------------------------------------
Use abbreviated capture scene leading to BG2EE
------------------------------------------------------------------------
Requires Main Component and SoD
Cut out the long fight scene leading to capture prior to BG2EE (EET onlly) and just show a brief cut-scene. It's not For non-EET games, the ending is actually a little longer, showing the final brief cut-scene with the parties captors.

------------------------------------------------------------------------
Use Irenicus in hell movie to restore Bhaal-spawn powers when he is defeated
------------------------------------------------------------------------
Requires BG2EE or EET
While recuperating in Suldanessellar, the Irenicus in hell movie will be shown as a dream and all Bhaal-spawn powers will be restored.  

------------------------------------------------------------------------
COMPATIBILITY NOTES
------------------------------------------------------------------------
When SoD is present, Transition isn't compatible with EndlessBG1's Korlasz in BG1 component so that component will be removed if SoD is present. Also, Transitions will override EBG1's handling of Fenster.

------------------------------------------------------------------------
INSTALLATION
------------------------------------------------------------------------
If installing EBG1 (https://www.gibberlings3.net/forums/forum/217-endless-BGEE/), do so before Transitions.  
Install before BG1RE (https://www.gibberlings3.net/forums/forum/131-romantic-encounters-bg2/) in order to complete Scar Returns quest after Sarevok is defeated.  
Transitions should be installed before NPC mods.  

Installation using Project Infinity (https://forums.beamdog.com/discussion/74335/project-infinity-mod-manager-for-baldurs-gate-icewind-dale-planescape-torment-and-eet) will ensure this and other mods are installed in the correct order.

NOTE: If you've previously installed the mod, remove it before extracting a new version. To do this, uninstall all previously installed components and delete the mod folder and executables. 

When installing or uninstalling, do not close the DOS window by clicking on the X button! Instead, press the Enter key when instructed to do so.

IMPORTANT FOR EET INSTALLATIONS: EET_End will need to be (re)installed after installing this mod.
 
General (Windows, Mac OS X, and Linux)

Extract the contents of the mod archive to your game's main directory. 

Windows
On successful extraction, there should be a transitions folder and a setup-transitions.exe file in your game folder. To install, simply double-click setup-transitions.exe and follow the instructions on screen.
Run setup-transitions.exe in your game folder to reinstall, uninstall or otherwise change components.

Mac OS X
The mod is packaged and installed with WeiDU. To install, extract the mod archive, then copy of the contents of the folder into your game folder (the folder which contains the CHITIN.KEY file). If properly extracted, you should have a "transitions" folder, setup-transitions, and setup-transitions.command in your game folder. To install, simply double-click setup-transitions.command and follow the instructions on screen.

Linux
Extract the contents of the mod to the folder of the game you wish to modify. Download the latest version of WeiDU for Linux from https://github.com/WeiDUorg/weidu/releases and copy WeiDU and WeInstall to /usr/bin. Following that, open a terminal and cd to your EET installation directory, run 'tolower' and answer Y to both queries. You can avoid running the second option (linux.ini) if you've already run it once in the same directory. If you're unsure, running tolower and choosing both options is the safest bet.
Run WeInstall transitions in your game folder to install the mod. Then run wine BGMain.exe and start playing. 

If you have installation problems or encounter any bugs, please post your bug report in the forum thread: https://www.gibberlings3.net/forums/forum/227-transitions/.

------------------------------------------------------------------------
CREDITS
------------------------------------------------------------------------
* BeamDog / Overhaul Games: for the Infinity Engine and inspiring this mod
* K4thos: for giving us the awesome playground (EET) in which to mod
* DavidW: for the lovely macros included in alter_script.tpa as well as for guidance on encapsulation and immutability
* Gwendolyne: for the very handy clone regions tool in GW_Cartes.tpa and a shoulder to cry on while I updated WED files
* G3 guest Gob Oafenplug: for the new code for change_door_name.tpa 
* Grammarsalad, subtledoctor, grodrigues, Mike1072, and jastey: for the ideas, guidance and help on the tool that provides proper and upper case player1 pronouns (cases.tpa)
* Tantalus: BAMs of Sarevok unique items. The BAMs where taken out of Tantalus' Mod "Sarevok Recovery Mod", licensed under "Creative Commons" von Nicolas Peters. Lizenz: CC BY-NC-SA 3.0 ( https://creativecommons.org/licenses/by-nc-sa/3.0/ )
* jastey: Thank you for all the incredible help and the permission to use your Endless BGI mod code:
	- modified version of Sarevok's custom items from Tantalus
	- modified version of Flaming Fist Healers after the Sarevok fight
	- modified version of Denkod
	- import of town chatter component
	- modified version of Elminster's appearance at Ducal palace
	- modified version of servant who welcomes PC to their room
	- modified version of guards in front of the palace
	- modified version of refugees 
* Bubb and CamDawg for helping me get through a cut-scene/override fiasco, arrays syntax, and showing me that EVAL EVAL is an actual thing (who'd a thunk!) - LOVE YOU FOREVER!!!
* Bubb again for showing me how to fix TriggerOverride. Thank you thank you thank you!!!
* Gwendolyne, Bartimaeus and kjeron for the help on my first custom innate spell
* Sam. for getting me over the hurdle on swapping out TIS tiles and for his amazing ps_tileset_lib
* Mike1072 for help with the legal stuff
* Baptor for the idea of allowing the transition to the end of SoD even when EET isn't loaded
* Thank you beta testers and proofreaders!: jastey and igi :)
* The folks at The Gibberlings Three forums: for never failing to answer my many many questions

------------------------------------------------------------------------
NOTES ON THE CLEAN-UP QUESTS
------------------------------------------------------------------------
These were originally to satisfy the forewarning from Hafiz the gnome from east of Nashkel Mines who says we will battle the 6 that serve Sarevok.  There are various supporters who could have made the list to fulfill that vision.  For example:  
	Angelo, Tazok, Semaj, Winski Peroate, Cythandria, Tamoko, Zhalimar Cloudwulfe, and Korlasz  
Note: Thanks Guest Glimpse for the Winski idea :)  
Note: Shin mentioned that Zhalimar Cloudwulfe and his gang probably is what Hafiz was referring to and I agree.  So these quests are more than to just satisfy Hafiz's vision.  They are to clean up any lingering support for the movement.  It's also possible to sneak by that fight so, in case you have, you now have the opportunity to do what has been foreseen.  
Angelo, Tazok, and Semaj are probably already dead from the fight in the Undercity Temple.  But for those that just kill Sarevok and run, they will be able to still get experience for them, as well as some gold.
Winski and Angelo will have some rogue Flaming Fist cronies with them, Tazok some bandits, Zhalimar will have a couple of dopplegangers as well as the surviving members of his crew (Aasim, Alai, Diyab, Gardush and Naaman), Semaj, Cythandria and Tamoko will be alone, and Korlasz has her usual dungeon crawl quest from SoD.

------------------------------------------------------------------------
USED TOOLS AND RESOURCES
------------------------------------------------------------------------
The Transitions Mod was created using the resources provided by the IESDP (https://gibberlings3.github.io/iesdp/index.htm) and with the following software:

* Near Infinity				https://github.com/Argent77/NearInfinity/releases/latest
* DLTCEP					https://sourceforge.net/projects/gemrb/files/DLTCEP/
* WeiDU						http://www.weidu.org
* Audacity					https://www.audacityteam.org
* Real-Time-Voice-Cloning	https://github.com/CorentinJ/Real-Time-Voice-Cloning

Modding communities, tutorials and technical assistance:

The Gibberlings Three		http://gibberlings3.net

------------------------------------------------------------------------
HISTORY
------------------------------------------------------------------------
v1.0 - initial production release
v1.1 - added compat library for SoD
v2.0 - various fixes and all planned enhancements completed
v2.1 - allows quick transition to end of SoD even when EET isn't loaded (thank you Baptor for the idea) and a small update to accommodate BG1RE changes
v2.2 - fixed bugs with regions and global setting
v2.3 - BG2 fix of 2.6 changes and one script omission
v2.4 - Fix for Belt's dialogue when Kivan is present and resolution of compatibility issues with EndlessBG1

------------------------------------------------------------------------
LEGAL INFORMATION
------------------------------------------------------------------------
This mod is copyright (c) Lauriel.

This mod accepts bug fixes, compatibility fixes, and translation updates from the community.

This mod is additionally licensed under CC BY-NC-SA 3.0.

https://creativecommons.org/licenses/by-nc-sa/3.0/

The mod uses BAM files from Sarevok Wiederherstellung (the Sarevok Recovery Mod) by Nicolas Peters, licensed under CC BY-NC-SA 3.0.

http://www.baldursgate-refugium.de/mods/sarevok-wiederherstellung/

Endless BGEE components are licensed under CC BY-NC-SA 3.0 and used with the permission of the mod's author, jastey.

https://www.gibberlings3.net/mods/other/endlessbg1/

Transitions is unofficial Fan Content permitted under the Fan Content Policy. Not approved/endorsed by Wizards. Portions of the materials used are property of Wizards of the Coast. (c) Wizards of the Coast LLC.

This mod is also not developed, supported, or endorsed by BioWare, Black Isle Studios, Interplay Entertainment Corp., Overhaul Games or Beamdog. All other trademarks and copyrights are property of their respective owners.
