// misc config stuff

World
{
	// truce gets lifted at this year
	truce_over_year		= 1607
}

Port
{
	// base upkeeps for normal ports & homeports
	upkeep_basic		= 2500
	upkeep_home		= 5000
	
	// factor for AI upkeep (0.25)
	upkeep_ai_factor	= 0.25
	
	// AI trades better, UPDATE: use difficulty settings below instead and adjust these to 1.00?
	AI_port_in_cheat	= 1.15
	AI_port_out_cheat	= 0.85


	// game difficulty affects port pricing

	// easy: cheaper for player, more expensive to AI
	plr_port_in_factor_easy		= 1.10
	plr_port_out_factor_easy	= 0.90
	AI_port_in_factor_easy		= 0.95
	AI_port_out_factor_easy		= 1.05

	// medium
	plr_port_in_factor_medium	= 1.05
	plr_port_out_factor_medium	= 0.95
	AI_port_in_factor_medium	= 0.98
	AI_port_out_factor_medium	= 1.03

	// hard
	plr_port_in_factor_hard		= 0.97
	plr_port_out_factor_hard	= 1.03
	AI_port_in_factor_hard		= 1.03
	AI_port_out_factor_hard		= 0.97

	
	// AI doesn't capture ports until this year
	AI_no_capture_until		= 1615

	// AI doesn't random attack others before this year
	// this is disabled atm, even though world peace could be nice and all.
	AI_no_random_violence_until	= 1607

	
	// control fleet's tendency to commit a suicide in port capture.
	// if fleet_power * this_value > port_power, fleet thinks
	// it can capture port. See "IsAbleToCapturePort" in log.
	//AI_fleet_capture_trigger	= 1.25
	AI_fleet_capture_trigger	= 2.25

	
	// export and generic items are randomized in ports on year change.
	// finetune amounts and prices with these.
	
	// random factor to amount
	item_amount_rand_diff_min	= 0.0
	item_amount_rand_diff_max	= 2.0
	
	// factor by year, min = 1600, max = 1800
	item_amount_year_diff_min	= 1
	item_amount_year_diff_max	= 10
	
	// prices may vary this much
	item_price_rand_factor_min	= 0.95
	item_price_rand_factor_max	= 1.05

	// Angry port length in months
	angry_port_min	= 10
	angry_port_max	= 20

	// Native marines
	//calc. = 10 per year..
	nativeMarine1600 = 300
	nativeMarine1750 = 1800
	nativernd1600_1649 = 50;
	nativernd1650_1699 = 100;
	nativernd1700_1749 = 150;
	nativernd1750_1799 = 200;
	
	//Multiplier for MTIs
	mti_multiplier_1650 = 5.0
	mti_multiplier_1700 = 10.0
}

RandomEvents
{
	// annual random event probability (in %)
	event_probability	= 20
	
	// annual "port need" event probability (in %)
	port_need_probability = 10
	
	// the first year when "port need" is possible
	port_need_min_year = 1610

	// treasure amount
	treasure_1600_min	= 5000
	treasure_1600_max	= 50000
	treasure_1650_min	= 50000
	treasure_1650_max	= 100000
	treasure_1700_min	= 100000
	treasure_1700_max	= 200000

	// fleet quarantine length in months
	quarantine_fleet_min	= 1
	quarantine_fleet_max	= 3
	quarantine_fleet_kill_percent_min = 10
	quarantine_fleet_kill_percent_max = 50
	quarantine_fleet_shield = 10
	
	
	// port quarantine length in months
	quarantine_port_min	= 24
	quarantine_port_max	= 36

	// ship found cargo probability (in %) NOT IN USE (YET)
	ship_found_cargo	= 30

	// found ship has this much cargo %
	ship_found_amount_min	= 10
	ship_found_amount_max	= 100

	// when
	attack_port_time = 1625
	// attack port event enemy soldiers
	attack_soldiers_min	= 300
	attack_soldiers_max	= 900

	// cooldowns
	random_event_sink_ships_cooldown = 5
	random_event_treasure_found_cooldown = 5
	random_event_infectious_disease_cooldown = 5
	random_event_port_quarantined_cooldown = 5
	random_event_ship_found_cooldown = 5
	random_event_attack_port_cooldown = 5
	random_event_building_upgrade_cooldown = 5
	random_event_building_upgrade_required_cooldown = 5
	random_event_detroyed_by_fire_cooldown = 5
	random_event_shareholders_to_be_paid_cooldown = 5
	random_event_commander_died_cooldown = 5
}

// AI nations builds stuff on month change (50-50 upgrade port or build a fleet)
NationMonthChange
{
	// pirate nation builds a fleet on month change with this probability (%)
	pirate_probability		= 15

	// pirate probability % to attack AI fleet
	pirate_AIattack_probability 	= 65

	// a growing change of doing something on month change
	// zerolevel on nollataso, esim 10 => 10% mahis joka kk ett?rakennetaan fleet tai building
	// increment listn thn joka kk kunnes jotain rakennetaan -> takasin zeroleveliin
	// incrementti?interpoloidaan annetulla vlill?vuosiluvun mukaan
	build_something_zero_level	= 1
	build_something_increment_1600	= 2
	build_something_increment_1800	= 8

	// can use this much of balance at once (forced to 0.8 when nation has no fleets)
	build_budget			= 0.35

	// minimum tradeship-warship ratio. 0.60 => atleast 60% of my total ships should be tradeships 
	build_tradeship_min_amount	= 0.6


	// AI selects build slot depending on wealth
	// build slot defines shiptypes to build and fleet size limits

	build_slot_A_require_wealth	= 0
	build_slot_A_shipyard_level	= 2
	build_slot_A_fleetsize_min	= 1
	build_slot_A_fleetsize_max	= 3

	build_slot_B_require_wealth	= 300000
	build_slot_B_shipyard_level	= 3
	build_slot_B_fleetsize_min	= 2
	build_slot_B_fleetsize_max	= 4

	build_slot_C_require_wealth	= 1000000
	build_slot_C_shipyard_level	= 4
	build_slot_C_fleetsize_min	= 2
	build_slot_C_fleetsize_max	= 5
	

	// prosentti fleetin rakennukseen (vs. upgrade)
	build_fleet_prc = 65
	//Jos rakennetaan. niin Garrisonille bonus
	build_garrison_bonus = 8

}

// AI diplomacy offer stuff, see "Diplomatic AI" @ DD
DiplomaticAI
{
	// don't make offers before this year
	AI_diplomacy_offer_require_year	= 1605

	// Each year AI nation has 10% (= 0.1) chance of being willing to offer some deal to player
	AI_diplomacy_offer_annual_probability = 0.1

	// Each year AI nation has some chance to end pact / alliance with someone
	AI_end_pact_probability 	= 0.04
	AI_end_alliance_probability	= 0.02

	// Each year AI nation has some chance to start pact (or upgrade to alliance) with someone
	AI_start_pact_probability	= 0.05

	// how many months at war until AI tries to make peace? (with player OR OTHER AI)
	// if peace offer is not accepted, duration will be randomized again.
	// and again. and again. and so forth.
	war_duration_months_min		= 24
	war_duration_months_max		= 62

	// When AI suggests peace to stronger player AI will pay this much
	AI_pays_for_peace_1600		= 100000
	AI_pays_for_peace_1800		= 350000
	// plus-miinus this much
	AI_pays_for_peace_variance	= 20000

	// When AI asks player to help him with war AI will pay this much
	AI_pays_for_help_1600		= 100000
	AI_pays_for_help_1800		= 350000
	AI_pays_for_help_variance	= 20000

	// When AI offers to help player with war AI will ask for this much
	AI_wants_for_help_1600		= 100000
	AI_wants_for_help_1800		= 350000
	AI_wants_for_help_variance	= 20000

	// When AI asks player to break pact/alliance with someone AI will pay this much
	AI_pays_for_breakup_1600	= 10000
	AI_pays_for_breakup_1800	= 100000
	AI_pays_for_breakup_variance	= 20000

	// When AI suggests pact to player AI will pay this much
	AI_pays_for_pact_1600		= 10000
	AI_pays_for_pact_1800		= 300000
	AI_pays_for_pact_variance	= 20000

	// When AI suggests alliance to player AI will pay this much
	AI_pays_for_alliance_1600	= 10000
	AI_pays_for_alliance_1800	= 500000
	AI_pays_for_alliance_variance	= 20000

	// AI makes a trade offer
	AI_trade_offer_mti_amount_1600	= 100
	AI_trade_offer_mti_amount_1800	= 1000
	AI_trade_offer_mti_amount_variance = 30
	// price is plus-minus this many % relative to plr homeport (1.0 = 100%)
	AI_trade_offer_mti_price_variance = 0.2
	
	//when player breaks pact or alliance AI won't make alliance or pact for this many months with the player
	AI_alliance_cooldown_months = 12
	AI_pact_cooldown_months = 10

	//stop negotiation for while when declared war
	stop_negotiation_min = 10
	stop_negotiation_max = 20
}

// related to realism settings
RealismSettings
{
	//speed_base = min ship speed
	//wind push = how much the wind pushes the ships 
	//head wind = how much sailing upwind affects the speed of the ship	
	
	//Arcade	
	speed_base_arcade = 0.03
	wind_push_arcade = 0.3
	headwind_arcade = 0.4
	
	//Normal
	speed_base_normal = 0.02
	wind_push_normal = 0.6
	headwind_normal = 0.8
	
	//Simulation	
	speed_base_simulation = 0.01	
	wind_push_simulation = 1.0
	headwind_simulation = 1.0

}

// stuff related to cannonballing
CannonBallManager
{
	// cannonball fly speed, original value is 0.00075
	ball_speed			= 0.00075


	// damages (variances are _added_ to base values)
	// f.ex if base is 15 and variance is 5 result will be between 15 and 20, mmkay)
	// these are for NORMAL difficulty level	

	// original values
	// ball_damage_hull_base	= 20
	// ball_damage_hull_variance	= 20
	// ball_damage_sails_base	= 9
	// ball_damage_sails_variance	= 9
	// ball_damage_crew_base	= 6
	// ball_damage_crew_variance	= 1

	ball_damage_hull_base		= 10
	ball_damage_hull_variance	= 10
	ball_damage_sails_base		= 5
	ball_damage_sails_variance	= 5
	ball_damage_crew_base		= 1
	ball_damage_crew_variance	= 2

	// modifiers for light / heavy cannons
	ball_damage_cannon_light	= 0.9
	ball_damage_cannon_heavy	= 1.1


	// difficulty modifiers easy/hard

	// at EASY player does more damage, AI does less
	difficulty_player_shoots_easy	= 1.0
	difficulty_AI_shoots_easy	= 0.8

	// at HARD player does less damage, AI does more
	difficulty_player_shoots_hard	= 0.8
	difficulty_AI_shoots_hard	= 1.0


	// ball range factors, base value is range from shiptypes.txt
	ball_range_solid		= 1.0
	ball_range_fire			= 1.0
	ball_range_chain		= 0.8
	ball_range_grape		= 0.33

	// modifiers for light / heavy cannons
	ball_range_cannon_light		= 0.9
	ball_range_cannon_heavy		= 1.1


	// ball spread, 0 = no, 0.5 = a lot
	ball_spread_narrow		= 0.1
	ball_spread_normal		= 0.17
	ball_spread_wide		= 0.30
	
	// this value is added to above values when balltype is grape
	ball_spread_grape_bonus		= 0.15


	// propellerhead stuff goes below


	// for a single cannonball:
	// destination is adjusted this many meters towards target ship pivot AKA auto-aim
	accuracy_adjust			= 9.0
	// variance in shot lenghts (m)
	length_variance			= 100.0
	// variance in shot directions
	dir_distribution		= 5.0
	
	// auto-aim: correct cannondirs max this much towards assumed target ship
	dc_max_correction		= 14.0
	rts_max_correction		= 11.0
	
	
	//DC Fire fields (in degrees)
	dc_fieldoffire_narrow = 10.0
	dc_fieldoffire_normal = 20.0
	dc_fieldoffire_wide = 25.0
	
}

MarineShoot
{
	marine_change_to_hit = 3
	marine_shoot_time = 10
	marine_rifle_range = 200
}

AIBattle
{
	money_multiplier_to_winner = 250
}

PortAttack
{
	maximum_power = 16000
}
FleetCommander
{
	experience_per_money_amount = 50000
	experience_per_money = 1.0
	
}
ShipLoot
{
	ship_sloop_min = 5000
	ship_sloop_max = 10000
	ship_schooner_min = 10000
	ship_schooner_max = 15000		
	ship_brig_min = 15000
	ship_brig_max = 25000		
	ship_flute_min = 20000
	ship_flute_max = 30000	
	ship_eastindiaman_min = 25000
	ship_eastindiaman_max = 40000	
	ship_cutter_min = 5000
	ship_cutter_max = 10000
	ship_xebec_min = 5000
	ship_xebec_max = 15000
	ship_galleon_min = 20000
	ship_galleon_max = 30000
	ship_frigate_min = 25000
	ship_frigate_max = 35000
	ship_shipoftheline_light_min = 30000
	ship_shipoftheline_light_max = 40000
	ship_shipoftheline_min = 40000
	ship_shipoftheline_max = 70000
}