### Brief: key ( database key )
# Name of 'doctrine_type'
# Faith doctrines are what defines how a faith works. All unique faith mechanics are tied to doctrines, rather than involving hardcoding or special parameters on the religion itself.
#
key = {
	### Brief: icon ( optional string )
	# To override which icon is used, set its filename here (without file ending).
	# Required path = DOCTRINE_TYPE_ICON_PATH
	# Default: Will look for icon in the path with the same name as key
	#
	icon = "filename"

	### brief: name ( optional dynamic description )
	# Dynamic description selecting name of doctrine.
	# Defaults to: <doctrine_key> + "_name"
	#
	# Supported scope:
	#	root ( Faith )
	#
	name = { ... }

	### brief: desc ( optional dynamic description )
	# Dynamic description selecting description of doctrine.
	# Defaults to: <doctrine_key> + "_desc"
	#
	# Supported scopes:
	#	root ( Faith )
	#
	desc = { ... }

	### brief: visible ( bool )
	# Will this doctrine show up in gui views?
	# Defaults to: yes
	#
	visible = yes/no

	### Brief: parameters ( parameter list )
	# Arbitrary parameters where bool types can be checked with the trigger: 'has_doctrine_parameter'
	# 
	# Note: The above trigger just checks for existence, so it does not
	# matter if the value is set to 'yes' or 'no'.
	#
	parameters = {
		param_name = yes/no 	# Parameters can take bools
		param_name = 0.5		# Or fixed point numbers
	}

	### Brief: piety_cost ( optional scripted cost )
	# How much does this doctrine cost?
	#
	piety_cost = {
		<scripted_cost>
	}

	### Brief: is_shown ( trigger )
	# When should this doctrine be shown when choosing doctrines?
	#
	# Supported scopes:
	#	root ( Faith )
	#
	is_shown = {
		<triggers>
	}

	### Brief: can_pick ( trigger )
	# When can this doctrine be picked when choosing doctrines?
	# When doctrines should refer to other selected doctrines when creating a new faith (e.g. for mutually exclusive doctrines), use:
	#	 flag:required_doctrine = { is_in_list = selected_doctrines }
	# The "selected_doctrines" list is the list of doctrines currently selected in the UI. (It might be different from the doctrines in
	# the faith, since the player can change multiple doctrines when creating a faith.)
	#
	# Supported scopes:
	#	root ( Faith )
	#
	can_pick = {
		<triggers>
	}

	### Brief: character_modifier ( modifiers )
	# All characters of this faith get this modifier.
	# Ex: { monthly_piety_gain_mult = -0.25, same_faith_opinion = -5 }
	#
	character_modifier = {
		<modifier>
	}

	### Brief: doctrine_character_modifier ( modifiers )
	# All characters of this faith get this modifier if the faith also has the specified doctrine.
	#
	doctrine_character_modifier = {
		doctrine = ...
		...
	}

	### Brief: traits ( database keys )
	# Adds additional sins/virtues. See traits in _religions.info. If a trait is already a sin or virtue in the religion, the doctrine takes precedence.
	#
	traits = { ... }
}

== Special parameters ==
Many parameters interact directly with the code. This is a list of all such parameters.

- minimum_fervor = 25 - Fervor cannot go below this value
- number_of_spouses = 1 - How many spouses can people have (script restricts non-rulers to one)
- number_of_consorts = 1 - How many consorts can rulers have (script restricts non-rulers to zero)
- female_spouses = 1 - How many spouses can women have
- men_can_have_multiple_spouses = yes - Can men have multiple spouses? (Combines with number_of_spouses)
- men_can_have_consorts = yes - Can men have consorts? (Combines with number_of_consorts)
- women_can_have_multiple_spouses = no - Can women have multiple spouses? (Combines with number_of_spouses)
- women_can_have_consorts = no - Can women have consorts? (Combines with number_of_consorts)
- divine_marriage_opinion = 10 - If married to someone in your extended family, you get this opinion bonus with direct vassals
- hostility_same_religion = 1 - How hostile is this faith towards other faiths of the same religion? See the "hostility" section for more info
- hostility_same_family = 1 - How hostile is this faith towards other faiths of the same religion family, but not same religion?
- hostility_others = 1 - How hostile is this faith towards faiths from different religion families?
- hostility_override_<doctrine_name> = 1 - How hostile is this faith towards faiths with the given doctrine? Overrides all other types of hostility (except for 0 hostility towards same faith).
- same_hof_hostility_override = 1 - How hostile is this faith towards faith who they share Head of Faith with? Takes precedence over other hostility overrides.
- opinion_of_<doctrine_parameter> = 10 - Has this opinion apply to people with faiths with the given doctrine parameter. Loc for the opinion tooltip is <doctrine_parameter>_opinion_name
- piety_from_long_peace = 0.5 - How much piety will the character get when they've been at peace for longer than NReligion::TIME_AT_PEACE_FOR_PIETY. Can be negative
- allowed_holding_type_holding_name = yes - This holding type can be held by rulers of this faith even if their government would not allow it. Example: allowed_holding_type_castle_holding = yes
- unreformed = yes - This is an unreformed faith. This means that "[Faith.IsUnreformed]" in the data system will return true. It also means that when creating a "new" faith (reforming), you keep the same icon and name, while your current faith gets renamed to its loc key + "_old", and its icon changed to its icon + "_old". Ensuring reformation can only happen once is your responsibility; it is not handled in code. The AI will also reform if they meet all the requirements, though do not actively attempt to fulfill them. When reforming, they'll use the same doctrines as they had before, minus the "Unreformed" doctrine (assuming of course that you've set it up to not be selectable)
- fervor_per_holy_site = 1 - yearly fervor gain per holy site held
- warmonger = yes - vassals and counties of the same faith will get at peace opinion penalty instead of offensive war opinion penalty
- increased_dynasty_prestige_birth_mult - A multiplier for the prestige that characters of this faiths are born.
- increased_dynasty_prestige_marriage_mult - A multiplier for the prestige that characters get from marriages, if both have this parameter (a minimum of their values will be used)
 -increased_dynasty_prestige_long_reign_mult - A multiplier for the maximum of years for the long reign opinion.

== Hostility ==
All faiths have a hostility level towards one another. What each level means is entirely scriptable.
A faith always has a hostility level of 0 towards itself.

The opinion effect of hostility is defined by the define HOSTILITY_OPINION_EFFECTS.
The multiplier applied to tolerance_advantage_mod is defined by the define HOSTILITY_COMBAT_MOD_MULT.
The name of each hostility level is defined by the define HOSTILITY_LEVEL_NAMES

Hostility level can be accessed in script. E.G., faith_hostility_level = { target = scope:some_faith value >= 1 }.
You can also compare to see which faith you're most hostile to. E.G., faith_hostility_level_comparison = { scope:some_faith > scope:some_other_faith }

== Precedence ==
Order of definition; later definition, higher precedence.

== Localisation ==
Effects are localized based on the parameter name. "doctrine_parameter_" plus the name. If the value is "no", that plus "_disabled" will be used. If an integer is used, the game will try to append that integer (E.G., "_1"), and use that loc key. If the key doesn't exist, then the int does not get appended.

== Triggers ==
# Used in faith scope
has_doctrine = doctrine_name
has_doctrine_parameter = parameter_name # Only works for bool parameters

== Further requirements ==
Further restrictions on faith creation can be added using the faith_creation scripted rule.
