Titular Title Generator
By Measter
Thanks to fivex for the assistance with scripting.

Features:
 - Creates higher titular titles for every landed duchy and kingdom. The lower tier title is required to create the title (e.g. to create the Kingdom of Leinster, you would need the Duchy of Leinster as your primary title.)
 - Ability to use an existing mod as a base to create new titles.
 - Able to modify mod in place, or create a copy. If copying, the resulting mod will be called KA%modname%.
 - Selectable culture restrictions:
    - None: No cultural restrictions. A character of any culture can create the title.
    - Culture: To create the Kingdom of Leinster, your character would need to be Irish.
	- Culture Group: To create the Kingdom of Leinster, your character would have to be Irish, Scottish, Welsh, or Breton to create it.
 - Selectable religion restrictions:
   - None: No religios restrictions. A character of any religion can create the title.
   - Religion: To create the Kingdom of Leinster, your character would have to be Catholic, or a heresy of Catholic to create it.
   - Religion Group: To create the Kingdom of Leinster, your character would have to be Christian to create it.
 - Selectable lower-tier-title requirements:
   - Duchies: To create a kingdom, you would need this number of duchy titles (minimum of 2).
   - Kingdoms: To create an empire, you would need this number of kingdom titles (minimum of 2).
 - Can make new titles de jure liege of currently held titles.
   - Replace De Jure Unchecked: You create the Kingdom of Leinster with the Duchies of Munster and Leinster, both remain de jure Kingdom of Ireland.
   - Replace De Jure Checked: You create the Kingdom of Leinster with the Duchies of Munster and Leinster, both are new de jure Kingdom of Leinster.
   
Changelog:

Version 1.1.1
 - Generated titles can now be usurped without holding the capital.
 - Generated titles that have been destroyed will no longer add new de jure duchies when recreated.

Version 1.1
 - Fixed bug causing the program to crash if there are no mods installed in CK2.
 - Fixed bug causing tags in allow brackets to be read incorrectly as title stats.
 - Fixed bug in which the landed_titles.txt file wasn't replaced when run on vanilla.
 - Titles now become de jure vassals of new titles.

Version 1.0.1
 - Clamped colour values to the expected range.
 - Handled cases where there is a county level title without a matching province file.
 - Fixed bug where the program will fail if Copy was checked but Use Mod is not.
 - Fixed a bug in the file/directory selection code which caused files to be place/modified outside of the mod directory.