{
	"factions" :
	[
		"config/factions/castle.json",
		"config/factions/rampart.json",
		"config/factions/tower.json",
		"config/factions/necropolis.json",
		"config/factions/inferno.json",
		"config/factions/dungeon.json",
		"config/factions/stronghold.json",
		"config/factions/fortress.json",
		"config/factions/conflux.json",
		"config/factions/neutral.json"
	],

	"creatures" :
	[
		"config/creatures/castle.json",
		"config/creatures/rampart.json",
		"config/creatures/tower.json",

		"config/creatures/necropolis.json",
		"config/creatures/inferno.json",
		"config/creatures/dungeon.json",

		"config/creatures/stronghold.json",
		"config/creatures/fortress.json",
		"config/creatures/conflux.json",

		"config/creatures/neutral.json",
		"config/creatures/special.json"
	],

	"heroes" :
	[
		"config/heroes/castle.json",
		"config/heroes/rampart.json",
		"config/heroes/tower.json",
		"config/heroes/necropolis.json",
		"config/heroes/inferno.json",
		"config/heroes/dungeon.json",
		"config/heroes/stronghold.json",
		"config/heroes/fortress.json",
		"config/heroes/conflux.json",
		"config/heroes/special.json",
		"config/heroes/portraits.json"
	],

	"objects" :
	[
		"config/objects/cartographer.json",
		"config/objects/coverOfDarkness.json",
		"config/objects/creatureBanks.json",
		"config/objects/dwellings.json",
		"config/objects/generic.json",
		"config/objects/lighthouse.json",
		"config/objects/magicSpring.json",
		"config/objects/magicWell.json",
		"config/objects/markets.json",
		"config/objects/moddables.json",
		"config/objects/observatory.json",
		"config/objects/pyramid.json",
		"config/objects/rewardableBonusing.json",
		"config/objects/rewardableOncePerHero.json",
		"config/objects/rewardableOncePerWeek.json",
		"config/objects/rewardableOnceVisitable.json",
		"config/objects/rewardablePickable.json",
		"config/objects/scholar.json",
		"config/objects/shrine.json",
		"config/objects/witchHut.json"
	],

	"biomes" :
	[
		"config/biomes.json"
	],

	"artifacts" :
	[
		"config/artifacts.json"
	],
	
	"heroClasses" :
	[
		"config/heroClasses.json"
	],

	"bonuses" :
	[
		"config/bonuses.json"
	],
	"spells" :
	[
		"config/spells/adventure.json",
		"config/spells/offensive.json",
		"config/spells/other.json",
		"config/spells/timed.json",
		"config/spells/ability.json",
		"config/spells/vcmiAbility.json",
		"config/spells/moats.json"
	],
	"skills" :
	[
		"config/skills.json"
	],
	"terrains":
	[
		"config/terrains.json"
	],
	"roads":
	[
		"config/roads.json"
	],
	"rivers":
	[
		"config/rivers.json"
	],
	"battlefields":
	[
		"config/battlefields.json"
	],
	"obstacles":
	[
		"config/obstacles.json"
	],
	
	"settings":
	{
		// Number of entries of each type to load from Heroes III text files
		"textData" :
		{
			"heroClass"  : 18,
			"artifact"   : 144,
			"creature"   : 150,
			"faction"    : 9,
			"hero"       : 156,
			"spell"      : 81,
			"object"     : 256,
			"terrain"    : 10,
			"river"      : 5,
			"road"       : 4
		},
		
		"mapFormat" : {
			"restorationOfErathia" : { 
				"supported" : true,
				"iconIndex" : 0,

				"buildingsCommon": {
					"townHall"       : 0,
					"cityHall"       : 1,
					"capitol"        : 2,

					"fort"           : 3,
					"citadel"        : 4,
					"castle"         : 5,

					"tavern"         : 6,
					"blacksmith"     : 7,
					"marketplace"    : 8,
					"resourceSilo"   : 9,

					"mageGuild1"     : 11,
					"mageGuild2"     : 12,
					"mageGuild3"     : 13,
					"mageGuild4"     : 14,
					"mageGuild5"     : 15,

					"shipyard"       : 16,
					"grail"          : 17,

					"dwellingLvl1"   : 22,
					"dwellingUpLvl1" : 23,
					"horde1"         : 24,
					"dwellingLvl2"   : 25,
					"dwellingUpLvl2" : 26,
					"horde2"         : 27,
					"dwellingLvl3"   : 28,
					"dwellingUpLvl3" : 29,
					"horde3"         : 30,
					"dwellingLvl4"   : 31,
					"dwellingUpLvl4" : 32,
					"horde4"         : 33,
					"dwellingLvl5"   : 34,
					"dwellingUpLvl5" : 35,
					"horde5"         : 36,

					"dwellingLvl6"   : 37,
					"dwellingUpLvl6" : 38,
					"dwellingLvl7"   : 39,
					"dwellingUpLvl7" : 40
				},

				"buildings" : {
					"castle" : {
						"special1" : 18, // lighthouse
						"special2" : 20, // stables
						"special3" : 19  // brotherhoodOfSword
					},
					"rampart" : {
						"special1" : 18, // mysticPond
						"special2" : 19, // fountainOfFortune
						"special3" : 20  // treasury
					},
					"tower" : {
						"special1" : 10, // artifactMerchants
						"special2" : 20, // lookoutTower
						"special3" : 18, // library
						"special4" : 19  // wallOfKnowledge
					},
					"inferno" : {
						"special2" : 18, // brimstoneStormclouds
						"special3" : 19, // castleGate
						"special4" : 20  // orderOfFire
					},
					"necropolis" : {
						"special1" : 18, // coverOfDarkness
						"special2" : 19, // necromancyAmplifier
						"special3" : 20  // skeletonTransformer
					},
					"dungeon" : {
						"special1" : 10, // artifactMerchants
						"special2" : 18, // manaVortex
						"special3" : 19, // portalOfSummoning
						"special4" : 20  // battleScholarAcademy
					},
					"stronghold" : {
						"special1" : 18, // escapeTunnel
						"special2" : 19, // freelancersGuild
						"special3" : 20, // ballistaYard
						"special4" : 21  // hallOfValhalla
					},
					"fortress" : {
						"special1" : 20, // cageOfWarlords
						"special2" : 19, // bloodObelisk
						"special3" : 18  // glyphsOfFear
					}
				},

				"portraits" : {
					"catherine" : 128, // In "RoE" Catherine only has portrait
					"portraitGeneralKendal" : 129
				}
			},
			"armageddonsBlade" : {
				"supported" : true,
				"iconIndex" : 1,
				"buildings" : {
					"conflux" : {
						"special1" : 10, // artifactMerchants
						"special2" : 18  // magicUniversity
					}
				},
				
				"portraits" : {
					"pasis" : 128,
					"thunar" : 129,
					"portraitGeneralKendal" : 156,
					"portraitYoungCristian" : 157,
					"portraitOrdwald" : 158
				}
			},
			"shadowOfDeath" : { 
				"supported" : true,
				"iconIndex" : 2,
				
				"portraits" : {
					"portraitGeneralKendal" : 156,
					"portraitYoungCristian" : 157,
					"portraitOrdwald" : 158,
					"portraitFinneas" : 159,
					"portraitYoungGem" : 160,
					"portraitYoungSandro" : 161,
					"portraitYoungYog" : 162
				}
			},
			"chronicles" : { 
				"supported" : false,
				"iconIndex" : 2
			},
			"jsonVCMI" : { 
				"supported" : true,
				"iconIndex" : 3
			},
			"hornOfTheAbyss" : { 
				"supported" : false
			},
			"inTheWakeOfGods" : { 
				"supported" : false
			}
		},

		"heroes" :
		{
			// number of heroes that player can have active on map at the same time
			"perPlayerOnMapCap" : 8,
			// number of heroes that player can have in total, including garrisoned
			"perPlayerTotalCap" : 16,
			// if enabled, hero that wins a battle without any non-summoned troops left will retreat and become available in tavern instead of being lost
			"retreatOnWinWithoutTroops" : true,
			// Chances for a hero with default army to receive corresponding stack out of his predefined starting troops
			"startingStackChances": [ 100, 88, 25],
			// number of artifacts that can fit in a backpack. -1 is unlimited.
			"backpackSize"		: -1,
			// if heroes are invitable in tavern
			"tavernInvite"            : false,
			// minimal primary skills for heroes
			"minimalPrimarySkills": [ 0, 0, 1, 1],
			/// movement points hero can get on start of the turn when on land, depending on speed of slowest creature (0-based list)
			"movementPointsLand" : [ 1500, 1500, 1500, 1500, 1560, 1630, 1700, 1760, 1830, 1900, 1960, 2000 ],
			/// movement points hero can get on start of the turn when on sea, depending on speed of slowest creature (0-based list)
			"movementPointsSea" : [ 1500 ]
		},

		"towns":
		{
			// How many new building can be built in a town per day
			"buildingsPerTurnCap" : 1,
			// Chances for a town with default buildings to receive corresponding dwelling level built in start
			"startingDwellingChances": [100, 50],
			// Enable spell research in mage guild
			"spellResearch": false,
			// Cost for an spell research (array index is spell tier)
			"spellResearchCost": [
				{ "gold": 1000, "wood" : 2, "mercury": 2, "ore": 2, "sulfur": 2, "crystal": 2, "gems": 2 },
				{ "gold": 1000, "wood" : 4, "mercury": 4, "ore": 4, "sulfur": 4, "crystal": 4, "gems": 4 },
				{ "gold": 1000, "wood" : 6, "mercury": 6, "ore": 6, "sulfur": 6, "crystal": 6, "gems": 6 },
				{ "gold": 1000, "wood" : 8, "mercury": 8, "ore": 8, "sulfur": 8, "crystal": 8, "gems": 8 },
				{ "gold": 1000, "wood" : 10, "mercury": 10, "ore": 10, "sulfur": 10, "crystal": 10, "gems": 10 }
			],
			// How much researchs/skips per day are possible? (array index is spell tier)
			"spellResearchPerDay": [ 2, 2, 2, 2, 1 ],
			// Exponent for increasing cost for each research (factor 1 disables this; array index is spell tier)
			"spellResearchCostExponentPerResearch": [ 1.25, 1.25, 1.25, 1.25, 1.25 ]
		},

		"combat":
		{
			// defines dice size of a morale roll, based on creature's morale.
			// Resulting chance is 1/(value). If list contains 0 values, option will be disabled
			"goodMoraleDice" : [ 24, 12, 8 ],
			"badMoraleDice" : [ 12, 6, 4],

			// defines dice size of a luck roll, based on creature's luck
			"goodLuckDice" : [ 24, 12, 8 ],
			"badLuckDice" : [],

			// every 1 attack point damage influence in battle when attack points > defense points during creature attack
			"attackPointDamageFactor": 0.05, 
			// limit of damage increase that can be achieved by overpowering attack points
			"attackPointDamageFactorCap": 4.0, 
			// every 1 defense point damage influence in battle when defense points > attack points during creature attack
			"defensePointDamageFactor": 0.025, 
			// limit of damage reduction that can be achieved by overpowering defense points
			"defensePointDamageFactorCap": 0.7,
			// If set to true, double-wide creatures will trigger obstacle effect when moving one tile forward or backwards
			"oneHexTriggersObstacles": false,
			// Allow area shooters with SPELL_LIKE_ATTACK bonus such as liches or magogs to target empty hexes
			"areaShotCanTargetEmptyHex" : false,
			
			// Positions of units on start of the combat
			// If battle does not defines specific configuration, 'default' configuration will be used
			// Configuration must define either 'attackerUnits' list of 7 elements or both 'attackerUnitsLoose' and 'attackerUnitsTight' lists of 7 elements, 1..7 elements each
			// Similarly, for defender configuration must have either 'defenderUnits' or both 'defenderUnitsLoose' and 'defenderUnitsTight'
			"layouts" : {
				"default" : {
					"tacticsAllowed" : true,
					"obstaclesAllowed" : true,
					"attackerCommander" : 88,
					"defenderCommander" : 98,
					"attackerWarMachines" : [ 52, 18, 154, 120 ],
					"defenderWarMachines" : [ 66, 32, 168, 134 ],
					"attackerUnitsLoose": [
						[            86                ],
						[ 35,                 137      ],
						[ 35,        86,      137      ],
						[ 1,     69,     103,      171 ],
						[ 1, 35,     86,      137, 171 ],
						[ 1, 35, 69,     103, 137, 171 ],
						[ 1, 35, 69, 86, 103, 137, 171 ]
					],
					"defenderUnitsLoose": [
						[             100                ],
						[     49,               151      ],
						[     49,     100,      151      ],
						[ 15,     83,      117,      185 ],
						[ 15, 49,     100,      151, 185 ],
						[ 15, 49, 83,      117, 151, 185 ],
						[ 15, 49, 83, 100, 117, 151, 185 ]
					],
					"attackerUnitsTight": [
						[             86                ],
						[         69,     103           ],
						[         69, 86, 103           ],
						[     35, 69,     103, 137      ],
						[     35, 69, 86, 103, 137      ],
						[  1, 35, 69,     103, 137, 171 ],
						[  1, 35, 69, 86, 103, 137, 171 ]
					],
					"defenderUnitsTight": [
						[             100                ],
						[         83,      117           ],
						[         83, 100, 117           ],
						[     49, 83,      117, 151      ],
						[     49, 83, 100, 117, 151      ],
						[ 15, 49, 83,      117, 151, 185 ],
						[ 15, 49, 83, 100, 117, 151, 185 ]
					]
				},
				// Configuration for creature banks with single-tile enemies
				"creatureBankNarrow" : {
					"tacticsAllowed" : false,
					"obstaclesAllowed" : false,
					"attackerCommander" : 95,
					"defenderCommander" : 8,
					"attackerUnits": [ 57, 61, 90, 93, 96, 125, 129 ],
					"defenderUnits": [ 15, 185, 172, 2, 100, 87, 8 ]
				},
				// Configuration for creature banks with double-wide enemies
				"creatureBankWide" : {
					"tacticsAllowed" : false,
					"obstaclesAllowed" : false,
					"attackerCommander" : 95,
					"defenderCommander" : 8,
					"attackerUnits": [ 57, 61, 90, 93, 96, 125, 129 ],
					"defenderUnits": [ 15, 185, 171, 1, 100, 86, 8 ]
				}
			}
		},

		"creatures":
		{
			// creatures on map will grow by specified percentage each week
			"weeklyGrowthPercent" : 10,
			// creatures on map will not grow if their quantity is greater than this value
			"weeklyGrowthCap" : 4000,
			// if stack experience is on, creatures on map will get specified amount of experience daily 
			"dailyStackExperience" : 100,
			// if enabled, double growth, plague and creature weeks can happen randomly. Has no effect on weeks by "Deity of Fire" 
			// NOTE: on HotA maps, this setting has no effect. Value provided in map will be used instead.
			"allowRandomSpecialWeeks" : true,
			// if enabled, every creature can get double growth month, ignoring predefined list
			"allowAllForDoubleMonth" : false,
			// if enabled creatures may join player for free, disabling it removes free joining globally unless creature is set to join in map editor
			"allowJoiningForFree" : true,
			// percent of stack amount that joins player per each successful join (does not decrease cost when joining for gold), if 0 or lower creatures never join for free or gold
			"joiningPercentage" : 100
		},
		
		"dwellings" :
		{
			// if enabled, neutral dwellings will accumulate creatures 
			"accumulateWhenNeutral" : false,
			// if enabled, dwellings owned by players will accumulate creatures 
			"accumulateWhenOwned" : false,
			// if enabled, game will attempt to merge slots in army on recruit if all slots in hero army are in use
			"mergeOnRecruit" : true
		},
		
		"markets" : 
		{
			// period between restocking of "Black Market" object found on adventure map
			"blackMarketRestockPeriod" : 0
		},
		
		"banks" : 
		{
			// show guards composition when visiting creature banks
			"showGuardsComposition" : true
		},

		"modules":
		{
			// if enabled, creatures may collect experience (WoG feature)
			"stackExperience": false,
			// if enabled, certain artifacts can be granted to creatures (WoG feature)
			"stackArtifact": false,
			// if enabled, all heroes gain commander creature in battle (WoG feature)
			"commanders": false
		},
		
		"pathfinder" :
		{
			// if enabled, pathfinder will build path through locations guarded by wandering monsters
			"ignoreGuards" : false,
			// if enabled, pathfinder will take use of any available boats
			"useBoat" : true,
			// if enabled, pathfinder will take use of any bidirectional monoliths 
			"useMonolithTwoWay" : true,
			// if enabled, pathfinder will take use of one-way monolith that only have one known exit
			"useMonolithOneWayUnique" : false,
			// if enabled, pathfinder will take use of one-way monoliths with multiple exits.
			"useMonolithOneWayRandom" : false,
			// if enabled and hero has whirlpool protection effect, pathfinder will take use of whirpools
			"useWhirlpool" : true,
			// if enabled flying will work like in original game, otherwise nerf similar to HotA flying is applied
			"originalFlyRules" : true
		},
		
		"resources" : {
			// H3 mechanics - AI receives bonus (or malus, on easy) to his resource income
			// AI will receive specified values as percentage of his weekly income
			// So, "gems" : 200 will give AI player 200% of his daily income of gems over week, or, in other words,
			// giving AI player 2 additional gems per week for every owned Gem Pond
			"weeklyBonusesAI" : {
				"pawn"  : { "gold" : -175 },
				"knight": {},
				"rook"  : {},
				"queen" : { "wood" : 275 , "mercury" : 100, "ore" : 275, "sulfur" : 100, "crystal" : 100, "gems" : 100, "gold" : 175},
				"king"  : { "wood" : 375 , "mercury" : 200, "ore" : 375, "sulfur" : 200, "crystal" : 200, "gems" : 200, "gold" : 350}
			}
		},

		"spells":
		{
			// if enabled, dimension work doesn't work into tiles under Fog of War
			"dimensionDoorOnlyToUncoveredTiles" : false,
			// if enabled, dimension door will hint regarding tile being incompatible terrain type, unlike H3 (water/land)
			"dimensionDoorExposesTerrainType" : false,
			// if enabled, attempt to use dimension door on incompatible terrain (water/land) will result in spending of mana, movement and casts per day (H3 behavior)
			"dimensionDoorFailureSpendsPoints" : true,
			// if enabled, dimension door will initiate a fight upon landing on tile adjacent to neutral creature
			"dimensionDoorTriggersGuards" : false,
			// if enabled, dimension door can be used 1x per day, exception being 2x per day for XL+U or bigger maps (41472 tiles) + hero having expert air magic
			"dimensionDoorTournamentRulesLimit" : false
		},
		
		"bonuses" : 
		{
			"global" : 
			{
				"spellDamage" : 
				{
					"type" : "SPELL_DAMAGE",
					"subtype" : "spellSchool.any",
					"val" : 100,
					"valueType" : "BASE_NUMBER"
				},
				"wisdom" : 
				{
					"type" : "MAX_LEARNABLE_SPELL_LEVEL", //Hero can always learn level 1 and 2 spells
					"val" : 2,
					"valueType" : "BASE_NUMBER"
				}
			},
			"perHero":
			{
				"manaRegeneration" :
				{
					"type" : "MANA_REGENERATION", //default mana regeneration
					"val" : 1,
					"valueType" : "BASE_NUMBER"
				},
				"sightRadius" :
				{
					"type" : "SIGHT_RADIUS", //default sight radius
					"val" : 5,
					"valueType" : "BASE_NUMBER"
				},
				"experienceGain" : 
				{
					"type" : "HERO_EXPERIENCE_GAIN_PERCENT", //default hero xp
					"val" : 100,
					"valueType" : "BASE_NUMBER"
				},
				"manaPerKnowledge" :
				{
					"type" : "MANA_PER_KNOWLEDGE_PERCENTAGE", //1000% mana per knowledge
					"val" : 1000,
					"valueType" : "BASE_NUMBER"
				}
			}
		},

		"interface" :
		{
			// Color transform to make color of brown DIBOX.PCX texture match color of specified player
			"playerColoredBackground" :
			{
				"red" :    [  0.25,  0,     0,     1.25, 0.00, 0.00 ],
				"blue" :   [  0,     0,     0,     0.45, 1.20, 4.50 ],
				"tan" :    [  0.40,  0.27,  0.23,  1.10, 1.20, 1.15 ],
				"green" :  [ -0.27,  0.10, -0.27,  0.70, 1.70, 0.70 ],
				"orange" : [  0.47,  0.17, -0.27,  1.60, 1.20, 0.70 ],
				"purple" : [  0.12, -0.1,   0.25,  1.15, 1.20, 2.20 ],
				"teal" :   [ -0.13,  0.23,  0.23,  0.90, 1.20, 2.20 ],
				"pink" :   [  0.44,  0.15,  0.25,  1.00, 1.00, 1.75 ]
			}
		}
	}
}
