[b]AGoT Portrait Replacer VER 8.2 [For AGoT ver 2.2 & CKII 3.3.3][/b]

[b]ABOUT:[/b]
This is a sub-mod for AGoT adding over 200 portraits from GoT (the TV show), Telltales Games, and fantasy drawn portraits. All portraits are automatically generated for their respective characters on start-up. Portraits operate off custom hidden traits, and the portraits themselves are purely cosmetic. The way they work is the custom traits reference several .dds files, and within the files are several frames. Each frame represents a specific portrait that's supplied to characters in-game based on their given custom trait in their history files.

---------------------------------------------
[b]INCOMPATIBILITIES:[/b]

Do not use this mod with other mods sharing the portrait_properties.txt file. This may include mods involving cosmetic portrait mods.

---------------------------------------------
[b]INSTALLATION:[/b]

1.) Download the main AGoT base mod on the developer's forum:
http://agotcitadel.boards.net/board/1/general-discussion

2.) Extract the .zip file. Inside are two files you'll need: the .mod file and the folder. Put these two files in your Crusader Kings II mod directory:
Documents/Paradox Interactive/Crusader Kings II/mod

3.) Subscribe to my mod on Steam, or direct download for an offline copy. Start CKII. In the CKII launcher, go to the "Mod" tab. Ensure both the main AGoT mod AND my AGoT portrait mod are enabled.

4.) Click play, and you're done. You'll know it works when you see TV show character portraits when clicking around the world map. Note: The portraits won't show on the bookmarks screen!

---------------------------------------------
[b]KNOWN MOD ISSUES & RESTRICTIONS:[/b]

1.) The portraits of children (age 0-12), such as Bran, Rickon, Arya, etc. do not initially have portraits, but when they reach age 13, they'll automatically acquire them. This is necessary due to a limitation in CKII's treatment of children's portraits. I could have lowered this age further, but then all other characters would become adults at the same age, which would look awkward.

2.) Custom ruler designer characters conflict with my portraits, because my portrait hides the cosmetic DNA changes you're trying to make, so you have no clue what you're going to get until you load onto the world map. You shouldn't be replacing the TV show characters anyways, as it might break the game's events, since the character you're replacing will be forced into a position on your court, while your player with a random name takes their place.

3.) AGoT's mod is based on the book and not the show, so it conflicts with certain portraits. For example, Xaro Xhoan Daxos and Salladhor Saan are black in the TV show, but not in the mod/book! Regardless, I assigned them their show's character portraits. Furthermore, some characters do not exist in the mod at all, because they weren't in the book, and some character names are different from the book over the show! My point is, I understand the mod doesn't match the book. I also don't want to start a war between TV show viewers and book readers. If you're a book loyalist who hates the TV show, I wouldn't download this, lol.

---------------------------------------------
[b]HOW TO CHANGE A PORTRAIT IN-GAME:[/b]

This is not a requirement, unless you're using the vanilla CKII version of my mod, because all characters automatically acquire portraits on start-up.  Using the in-game console, you can manually remove and assign portraits to characters. To do this, when you're loaded onto the world map, hit the tilde (~) key, then type your commands. To switch YOUR portrait, type:
add_trait InsertNameOfPortraitHere

To switch the portrait of an AI controlled player, you must know their character ID. Type "charinfo" then hover your mouse cursor over their portrait. New information about that character will be displayed called the debug info. Look for their ID number. With that ID number, type:
add_trait InsertNameOfPortraitHere InsertCharIDHere

If you need to remove a portrait on yourself, type:
remove_trait InsertNameOfPortraitHere

To remove a portrait from an AI character, type:
remove_trait InsertNameOfPortraitHere InsertCharInfoIDHere

---------------------------------------------
[b]FAQ:[/b]

Q. You forgot a character.
A. If I forgot a character, let me know, but even so, I need to find a decent portrait of them from the show, and they need to actually be in the game for me to add them. If the character isn't in the book, they won't be in the mod!

Q. Is this Ironman compatible?
A. The console is disabled in Ironman mode, so for AGoT, it is fine, but in vanilla CKII, you must manually apply my portraits via the console, so for that one, no.

Q. I'm mid-way into a save. Can I still change the character portraits?
A. Yes, but don't mix up the artwork, otherwise, traits will reference incorrect portraits! For example, if you want to edit Theon, replace him with another portrait of Theon, but don't turn Theon's portrait into a different person. That could be messy.

Q. Can I use this as a stand-alone mod for vanilla CKII?
A. It wasn't designed to be used for vanilla CKII. If you want to use it with vanilla, please download the vanilla option near the top. You'll need to manually apply portraits to characters in-game via the in-game console.

Q. Can I add my own portraits to this?
A. Yes, my mod supports up to 650 portraits, which allows plenty of space to add your own to any of the empty portrait slots, so feel free to fill them! When I add more characters, I'll continue building on what I have, so I recommend you start at portrait 400'ish and work your way from there, so we don't conflict with each other! You need an art program to edit .dds files, like Photoshop w/ a .dds plugin, or GIMP. Open my .dds files in the gfx folder, and fit a portrait into one of the empty circles. Then add the corresponding portrait from the in-game console. For example, if you filled in portrait 421, you can manually call up the portrait in-game by typing: 
add_trait portrait421

Q. What's your policy on fair use?
A. These pictures are being used in a mod for non-commercial purposes only. All pictures depicted are not of their originals, but of thumbnails only.  I am not making a profit from this mod, and I refuse to accept donations. I feel this constitutes fair use, but it is up to the discretion of Steam if they would rather remove it.

Q. Can I use your portrait mod in one of my mods?
A. Yes, but credit me please! Thanks! :)

---------------------------------------------
CREDITS:
- UnhappyLawbro for adding and coding in the prequel TV show portraits.
- ngppgn and lockeslylcrit for some of the coding.
- Destin for some of the TV portraits, Telltales portraits, and improvements.
- Adel_Haldane for some optional console-only portraits:
https://www.dropbox.com/s/9ewitk6385hpjfz/AGoT%20Adel_Haldane%20additional%20portraits.zip?dl=0


---------------------------------------------
CHANGELOG:

VER 8.3 UPDATE:
- Added AGoT prequel TV show portraits (special thanks to UnhappyLawbro for all this!)

VER 8.2 UPDATE:
- Updated history files to match the main AGoT 2.2 mod.
- Updated Tower of Joy event file to match main AGoT 2.2 mod.
- Added Victarion Greyjoy.

VER 8.1 UPDATE:
- Updated history files to match the main AGoT 2.1 mod.
- Seven character portraits had their code moved to different files to match the main AGoT mod. This includes Mirri Maz Duur to lhazar, Pyatt Pree to Qarth, Grey Worm to Astapor, Missandei to Astapor, Mossador to Astapor, Moro to Dothraki, and Othell to Westerlands.
- Created an lhazar history file for Mirri Maz Duur's code.
- Deleted free_cities history file. It's obsolete, since the main AGoT mod no longer uses it.
- Fixed broken Alys Harroway portrait.
- Fixed Robert Baratheon not aging in History.

VER 8.0 UPDATE:
- Added a possible fix to a corrupt Steam subscription causing portraits to not display.
- Fixed a conflict between Elaena Forrester and Elaena Targaryen sharing the same trait name (elaena); therefore, the two characters would share the same portrait (thanks, Adel_Haldane). The trait names are now elaena and elaena_targ respectively.
- Tweaked layer code in interface/portraits/static_portraits.gfx.
- Updated common/traits/portrait_traits.txt's code efficiency. Reduced its file size from 5.4MB to 39KB and its lines from 427,051 to 724.

VER 7.5 UPDATE:
- Updated character histories to AGoT 2.0.
- Updated Tower of Joy event file to AGoT 2.0 to account for Bloodlines.
- Fixed a bug with Robert Baratheon not defaulting to his older portrait when selecting the Clash of Kings bookmark.

VER 7.4 UPDATE:
- Added dynastic bloodline portraits: Aenar, Nymeria I, Bran the Builder, Garth, Artys, Lann, Vickon, Benedict, Durran, Elenei.
- Added more miscellaneous fantasy portraits: Jon Arryn, Marwyn the Mage, Garlan, Alerie, and Willas.
- Added aged portraits: Robert Baratheon when he was young in armor (fantasy) and revised TV Robert (old).
- Revised several portraits to better emulate CKII on Lysa, Aerys II, Cersei (old), Wyman, Euron, Torrhen, Rickard, Theon (old), Melisandre, Shireen, Tywin, Petyr, Brynden, Grenn, Ygritte, Mathos, Bran (old), Margaery, Missandei, Maester Luwin, and Osha. These are save game compatible, as they're direct overwrites to existing portraits.
- Corrected Axell Florent's portrait. The portrait I used wasn't really him, oof! He's in the show, but his portraits look awful, so I used a fantasy portrait.

VER 7.3 UPDATE:
- Added new TV portraits: Harry Strickland, Robin Aryn (old).
- Added new fantasy portraits: Brandon Stark, Maelys the Monstrous, Aegon Targaryen (aegon_vi). Aegon's portrait is assigned when his character spawns from event id invasions.1
- Updated portraits: Joffrey, Littlefinger (old), Tyrion (old).
- Updated character histories to AGoT 1.9.1.
- Updated Tower of Joy event file to AGoT 1.9.1.

VER 7.2 UPDATE:
- Updated character histories to AGoT 1.9.

VER 7.1 UPDATE:
- Fixed broken portraits for Jhogo, Irri, Rakharo, Haggo, and Doreah.
- Fixed incorrect portrait assignments for Belicho and Moro.

VER 7.0 UPDATE:
- Added new TV characters: Izembaro, Khal Moro, Mossador, Mero, Prendahl na Ghezn, Karl Tanner, Todder, Yoren, Bowen Marsh, Cley Cerwyn, Steelshanks Walton, Denys Mallister, Lem Lemoncloak, Endrew Tarth, Donnel Waynwood, Jon Lynderly, Marillion, Vardis Egen, Waymar Royce, Belicho Paenymion [thanks to Destin for all these portraits].
- Added new fantasy characters: Aegor Rivers, Bellegere Otherys, Edric Storm, Daemon III.
- Updated portraits: Davos, Joffrey, Roose, Obara, Ygritte.
- Fixed broken portraits for Mellario and Lewyn.
- Fixed Theon not aging to his older aged portrait.
- Fixed Jon's second portrait displaying on game-start instead of his young portrait.
- Updated code to CKII's Holy Fury update to support its new portrait effects [thanks to lockeslylcrit for some code].
- Updated character histories to AGoT 1.8.
- Updated Tower of Joy txt file to AGoT 1.8.

VER 6.5 UPDATE:
- Fixed broken Wilding Giant portraits (Meg & Wun).
- Added Maege Mormont and Ser Dontos Hollard (thanks to Gra Gas and Destin for noticing they're missing).

VER 6.4.1 UPDATE:
- Updated character histories to match AGoT 1.7.1.
- Fixed portraits not displaying on imprisoned charcters. Unfortunately, the AGoT team included code that broke this, so to fix this I had to include an edited copy of the portrait_properties.txt file, which might conflict with other AGoT cosmetic portrait mods.
- Added 47 new fantasy portraits comprising the Targaryen dynasty tree and 3 new portraits for Dorne via various online artwork. If any of these characters appear in the TV show, their real-life counterparts will take precedence.

VER 6.3.1 UPDATE:
- Added Tower of Joy portrait code to events to accomodate for missing portraits. Thanks to Palynium for catching this.

VER 6.3 UPDATE:
- Updated character histories to match AGoT 1.6.1.
- Reverted young Sansa portrait back to better quality King's Landing version.

VER 6.2 UPDATE:
- Fixed the broken North.txt history file which was causing CTD crashes on saving/loading.

VER 6.1 UPDATE:
- Updated character history files to AGoT ver 1.6.
- Added Rhaeger and Lyanna's TV portraits.
- Added Mors Westford from the RPG version of Game of Thrones.
- Fixed broken portraits not working with characters wearing crown treasury items introduced by AGoT ver 1.6.
- Fixed a few minor misaligned portraits on the portrait_swapping9 gfx file.
- Lowered portrait aging requirements on Sansa and Arya by about five years.
- Fixed missing portrait and aging on the third dummy Arya appearing in A Feast for Crows bookmark.
- The dummy Arya character who appears out of hiding now defaults to her old portrait instead of the young one.

VER 6.0 UPDATE:
- Added portraits for Hizdahr zo loraq, Locke (Vargo Hoat in books), Matthos Seaworth, Maester Cressen, Septa Mordane, Aeron Greyjoy, Dagmer Cleftjaw, Kovarro (Jhogo in books), Haggo, Irri, Qotho, Lollys Stokeworth, Jonos Bracken, Leo Lefford, Addam Marbrand, Harys Swyft, and Tycho Nestoris (thanks to BiRTH and Destin for noticing some of these).
- New feature: Partial character aging. When SOME characters come of age, they'll start with a portrait from an early season of the show (esp. season 1). This portrait later swaps to a later season's portrait when the character either reaches a much older age, or you've started in a history bookmark where a major story event (ex. Lancel joining the Faith Militant). This feature is supported for Eddard, Sansa, Rickon, Bran, Arya, Jon, Theon, Daenerys, Cersei, Jamie, Tyrion, Lancel, and Littlefinger. Depending what history date you start, you may not see all the portraits (ex. Daenerys when she's young and timid).
- To accomodate the new aging feature, several of the above character portraits are updated.
- Updated Euron, Randyll, and Dickon.
- Fixed Doreah's portrait not auto-assigning to her on new games (thanks, Destin).

VER 5.1 UPDATE:
- Fixed Finn's portrait. He was incorrectly displaying Asher's portrait. Thanks to Destin for catching this.

VER 5.0 UPDATE:
- Added portraits from the Telltale's version of Game of Thrones. There's 26 total, which should comprise all the characters in CKII, but let me know if I missed any.
- New TV portraits: Axell Florent, Alys Karstark and Archmaester Ebrose. Ned Umber is not in the book, so he doesn't exist and can't be included.
- Updated Dickon Tarly's portrait to his new season 7 actor.
- Added new photos because they fit my guidelines better: Randyll, Ramsay, Yara, Sam, Tyene, and Lysa. 
- Tweaked various photos either because of lighting issues or bad head cropping: Ilyn, Joffrey, Varys, Edmure, and Rodrik.

VER 4.2 UPDATE:
- Updated character history files to AGoT ver 1.5.

VER 4.1 UPDATE:
- Updated character history files. Mostly minor changes, and is save compatible.

VER 4.0 UPDATE:
- Includes support for Monks & Mystics (CKII ver. 2.7.0.2).
- New framework method for assigning my portraits has been added, courtesy of ngppgn. This increases compatibility among other mods by no longer requiring cultural gfx files and not requiring a portrait_properties text file (Translation: If my mod wasn't compatible with another mod in the past, this might fix it).
- Increased portrait cap from 520 to 650 for those who need more room adding their own custom portraits to what I already have.
- Fixed Missandei being possibly broken.
- Updated character histories to AGoT mod ver 1.4.

VER 2.3 UPDATE:
- Updated character histories to reflect the main AGoT mod ver 1.3.1.

VER 2.2 UPDATE:
- Added Rickard Stark
- Fixed Arthur Dayne's portrait not being in the history file.

VER 2.1 UPDATE:
- Added several new characters: 
Howland Reed - 126
Jojen Reed - 2126
Meera Reed - 1126
Jeyne Poole - 2095
Vayon Poole - 1095
Aerys II The Mad King - 77037
Kraznys mo Nakloz - 6571000
Razdal mo Eraz - 6571007 (Named Grazdan mo Eraz in book!)
Yezzan zo Qaggaz - 6571004
Mirri Maz Duur - 12300100
Randyll Tarly - 296
Melessa Tarly - 2281
Talla Tarly - 88018
Dickon Tarly - 88020
Wun Weg Wun Dar Wun - 157014
Mag Mar Tun Doh Weg - 157013
Lothar Frey - 4129
Stevron Frey - 1127
Ryger Rivers - 6008127
Walder Rivers - 6177
Galbart Glover - 62
Smalljon Umber - 4093
Torrhen Karstark - 3089
Jory Cassel - 4060
Arthur Dayne - 16
Gerold Hightower - 56
Willem Lannister - 3189 
Amory Lorch - 207
Eddison Tollett - 94032
Brynden "Bloodraven aka Three_Eyed" Rivers - 77026

- Updated Sansa, Arya, Catelyn, and Eddard portraits. Sansa and Arya needed updating because they look much older now. Eddard I prefer him looking off-camera. Catelyn because I hated the old portrait with her neck spun around.