@BRIBE_COST = 200
###############################
# SHARED
###############################

enc_railway_nevada = {
	refurbishment_facility = {	#Refurbishment facility
		icon = GFX_decision_generic_train
		cost = 5
		days_remove = 40
		fire_only_once = yes
		available = {
			has_completed_focus = enc_the_first_brick
		}
		modifier = {
				civilian_factory_use = 2
		}
		remove_effect = {
			country_event = {
				id = erx_train.6
			}
			285 = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}
        }
	}
	reno_carson_rail = {	#New Reno-Carson City Railroad
		icon = GFX_decision_generic_train
		cost = 5
		fire_only_once = yes
		available = {
			has_completed_focus = enc_home_in_nevada
			has_equipment = {
				locomotive_equipment > 3
			}
			has_equipment = {
				rail_equipment > 399
			}
		}
		complete_effect = {
            add_equipment_to_stockpile = {
				type = locomotive_equipment
				amount = -3
			}
			add_equipment_to_stockpile = {
				type = rail_equipment
				amount = -400
			}
        }
		remove_effect = {
			country_event = {
				id = erx_train.8
			}
			add_timed_idea = {
				idea = ERB_building_railroad_NR_CC
				days = 70
			}
        }
	}
	military_rail = {	#military railway service
		icon = GFX_decision_generic_train
		cost = 25
		days_remove = 10
		fire_only_once = yes
		available = {
			has_completed_focus = enc_the_first_brick
		}
		modifier = {
				civilian_factory_use = 2
		}
		remove_effect = {
			country_event = {
				id = erx_train.10
			}
			set_country_flag = rail_mil
        }
	}
	reno_vaul_rail = {	#Vault City Railway
		icon = GFX_decision_generic_train
		cost = 5
		fire_only_once = yes
		available = {
			controls_state = 291
			custom_trigger_tooltip = {
				tooltip = rail_mil_tt
				has_country_flag = rail_mil
			}
			has_equipment = {
				locomotive_equipment > 8
			}
			has_equipment = {
				rail_equipment > 999
			}
		}
		complete_effect = {
            add_equipment_to_stockpile = {
				type = locomotive_equipment
				amount = -9
			}
			add_equipment_to_stockpile = {
				type = rail_equipment
				amount = -1000
			}
			set_country_flag = rail_vc_nr
        }
		remove_effect = {
			country_event = {
				id = erx_train.11
			}
			add_timed_idea = {
				idea = ERB_building_railroad_NR_VC
				days = 100
			}
        }
	}
	nev_rail = {	#Nevada Railway
		icon = GFX_decision_generic_train
		cost = 5
		fire_only_once = yes
		available = {
			controls_state = 947
			controls_state = 307
			controls_state = 210
			custom_trigger_tooltip = {
				tooltip = rail_mil_tt
				has_country_flag = rail_mil
			}
			has_equipment = {
				locomotive_equipment > 14
			}
			has_equipment = {
				rail_equipment > 2499
			}
		}
		complete_effect = {
			
            add_equipment_to_stockpile = {
				type = locomotive_equipment
				amount = -15
			}
			add_equipment_to_stockpile = {
				type = rail_equipment
				amount = -2500
			}
        }
		remove_effect = {
			country_event = {
				id = erx_train.13
			}
			add_timed_idea = {
				idea = ERB_building_railroad_NR_NEV
				days = 150
			}
        }
	}
	sky_rev_rail = {	#Sky Raiders Railway
		icon = GFX_decision_generic_train
		cost = 5
		fire_only_once = yes
		visible = {
			has_country_flag = rail_nev
		}
		available = {
			controls_state = 389
			has_equipment = {
				locomotive_equipment > 4
			}
			has_equipment = {
				rail_equipment > 999
			}
		}
		complete_effect = {
            add_equipment_to_stockpile = {
				type = locomotive_equipment
				amount = -5
			}
			add_equipment_to_stockpile = {
				type = rail_equipment
				amount = -1000
			}
        }
		remove_effect = {
			country_event = {
				id = erx_train.15
			}
			add_timed_idea = {
				idea = ERB_building_railroad_NR_SR
				days = 70
			}
        }
	}
}



enc_railway_rebuild_cal = {
	rebuild_rail_NR_SC = {	#New Reno-Sac-City track
		icon = GFX_decision_generic_train
		custom_cost_text = command_power_10
		custom_cost_trigger = {
				command_power > 9.9
			}
		days_remove = 35
		fire_only_once = yes
		available = {
			controls_state = 135
			has_equipment = {
				rail_equipment > 399
			}
		}
		modifier = {
				civilian_factory_use = 1
				country_resource_metal = -2
		}
		complete_effect = {
			add_equipment_to_stockpile = {
				type = rail_equipment
				amount = -400
			}
        }
		remove_effect = {	
			set_country_flag = rail_NR_SC
			168 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			584 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			135 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
        }
	}
	rebuild_rail_NR_SC2 = {	#New Reno-Sac-City track 2
		icon = GFX_decision_generic_construction
		custom_cost_trigger = {
			set_temp_variable = { temp_cap_cost = 75 }
			check_variable = {
				caps_number_display > temp_cap_cost
			}
		}
		custom_cost_text = "caps_decisions_cost_text"
		days_remove = 55
		fire_only_once = yes
		available = {
			custom_trigger_tooltip = {
				tooltip = rail_NR_SC_tt
				has_country_flag = rail_NR_SC
			}
			has_equipment = {
				rail_equipment > 899
			}
			has_equipment = {
				signaling_equipment > 49
			}
			has_equipment = {
				construction_train_equipment > 3
			}
		}
		modifier = {
				civilian_factory_use = 2
				country_resource_metal = -2
				base_fuel_gain_factor = -0.05
		}
		complete_effect = {
			add_equipment_to_stockpile = {
				type = rail_equipment
				amount = -900
			}
			add_equipment_to_stockpile = {
				type = signaling_equipment
				amount = -50
			}
			add_equipment_to_stockpile = {
				type = construction_train_equipment
				amount = -4
			}
        }
		remove_effect = {
			add_equipment_to_stockpile = {
				type = construction_train_equipment
				amount = 3
			}
			set_country_flag = rail_NR_SC2
			168 = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
			584 = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
			135 = {
				add_extra_state_shared_building_slots = 4
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
        }
	}
	rebuild_rail_SR_NAV = {	#Sac-City-Redding-Navarro track
		icon = GFX_decision_generic_train
		custom_cost_text = command_power_10
		custom_cost_trigger = {
				command_power > 9.9
			}
		days_remove = 65
		fire_only_once = yes
		available = {
			controls_state = 548
			controls_state = 141
			custom_trigger_tooltip = {
				tooltip = rail_NR_SC_tt
				has_country_flag = rail_NR_SC
			}
			has_equipment = {
				rail_equipment > 899
			}
		}
		modifier = {
				civilian_factory_use = 2
				country_resource_metal = -2
		}
		complete_effect = {
			add_equipment_to_stockpile = {
				type = rail_equipment
				amount = -900
			}
        }
		remove_effect = {
			set_country_flag = rail_SR_NAV
			421 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			162 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			141 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			56 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			353 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			548 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
        }
	}
	rebuild_rail_SR_NAV2 = {	#Sac-City-Redding-Navarro track 2
		icon = GFX_decision_generic_construction
		custom_cost_trigger = {
			set_temp_variable = { temp_cap_cost = 110 }
			check_variable = {
				caps_number_display > temp_cap_cost
			}
		}
		custom_cost_text = "caps_decisions_cost_text"
		days_remove = 100
		fire_only_once = yes
		available = {
			has_equipment = {
				rail_equipment > 1899
			}
			has_equipment = {
				signaling_equipment > 89
			}
			has_equipment = {
				construction_train_equipment > 4
			}
			custom_trigger_tooltip = {
				tooltip = rail_SR_NAV_tt
				has_country_flag = rail_SR_NAV
			}
		}
		modifier = {
				civilian_factory_use = 3
				country_resource_metal = -3
				base_fuel_gain_factor = -0.10
		}
		complete_effect = {
			add_equipment_to_stockpile = {
				type = rail_equipment
				amount = -1900
			}
			add_equipment_to_stockpile = {
				type = signaling_equipment
				amount = -90
			}
			add_equipment_to_stockpile = {
				type = construction_train_equipment
				amount = -5
			}
		}
		remove_effect = {
			add_equipment_to_stockpile = {
				type = construction_train_equipment
				amount = 4
			}
			set_country_flag = rail_SR_NAV2
			421 = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
			162 = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
			141 = {
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
			56 = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
			353 = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
			548 = {
				add_extra_state_shared_building_slots = 4
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
        }
	}
	rebuild_rail_SR_SS = {	#Sac-City-Shady Sands track
		icon = GFX_decision_generic_train
		custom_cost_text = command_power_10
		custom_cost_trigger = {
				command_power > 9.9
			}
		days_remove = 75
		fire_only_once = yes
		available = {
			has_equipment = {
				rail_equipment > 499
			}
			controls_state = 190
			controls_state = 253
			custom_trigger_tooltip = {
				tooltip = rail_NR_SC_tt
				has_country_flag = rail_NR_SC
			}
		}
		complete_effect = {
			add_equipment_to_stockpile = {
				type = rail_equipment
				amount = -500
			}
        }
		modifier = {
				civilian_factory_use = 2
				country_resource_metal = -2
		}
		remove_effect = {
			set_country_flag = rail_SR_SS
			60 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			190 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			263 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			342 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			151 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			253 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
        }
	}
	rebuild_rail_SR_SS2 = {	#Sac-City-Shady Sands track 2
		icon = GFX_decision_generic_construction
		custom_cost_trigger = {
			set_temp_variable = { temp_cap_cost = 125 }
			check_variable = {
				caps_number_display > temp_cap_cost
			}
		}
		custom_cost_text = "caps_decisions_cost_text"
		days_remove = 135
		fire_only_once = yes
		available = {
			has_equipment = {
				rail_equipment > 2099
			}
			has_equipment = {
				signaling_equipment > 99
			}
			has_equipment = {
				construction_train_equipment > 5
			}
			custom_trigger_tooltip = {
				tooltip = rail_SR_SS_tt
				has_country_flag = rail_SR_SS
			}
		}
		complete_effect = {
			add_equipment_to_stockpile = {
				type = rail_equipment
				amount = -2100
			}
			add_equipment_to_stockpile = {
				type = signaling_equipment
				amount = -100
			}
			add_equipment_to_stockpile = {
				type = construction_train_equipment
				amount = -7
			}
		}
		modifier = {
				civilian_factory_use = 3
				country_resource_metal = -4
				base_fuel_gain_factor = -0.10
		}
		remove_effect = {
			add_equipment_to_stockpile = {
				type = construction_train_equipment
				amount = 5
			}
			set_country_flag = rail_SR_SS2
			60 = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
			190 = {
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
			263 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
			342 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
			151 = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
			253 = {
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
        }
	}
	rebuild_rail_SR_HUB = {	#Sac-City-Hub track
		icon = GFX_decision_generic_train
		custom_cost_text = command_power_10
		custom_cost_trigger = {
				command_power > 9.9
			}
		days_remove = 50
		fire_only_once = yes
		available = {
			has_equipment = {
				rail_equipment > 699
			}
			controls_state = 214
			controls_state = 1
			custom_trigger_tooltip = {
				tooltip = rail_NR_SC_tt
				has_country_flag = rail_NR_SC
			}
		}
		complete_effect = {
			add_equipment_to_stockpile = {
				type = rail_equipment
				amount = -700
			}
        }
		modifier = {
				civilian_factory_use = 2
				country_resource_metal = -2
		}
		remove_effect = {
			set_country_flag = rail_SR_HUB
			605 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			529 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			214 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			455 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			360 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			489 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			1 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
        }
	}
	rebuild_rail_SR_HUB2 = {	#Sac-City-Hub track 2
		icon = GFX_decision_generic_construction
		custom_cost_trigger = {
			set_temp_variable = { temp_cap_cost = 80 }
			check_variable = {
				caps_number_display > temp_cap_cost
			}
		}
		custom_cost_text = "caps_decisions_cost_text"
		days_remove = 95
		fire_only_once = yes
		available = {
			has_equipment = {
				rail_equipment > 1399
			}
			has_equipment = {
				signaling_equipment > 59
			}
			has_equipment = {
				construction_train_equipment > 4
			}
			custom_trigger_tooltip = {
				tooltip = rail_SR_HUB_tt
				has_country_flag = rail_SR_HUB
			}
		}
		modifier = {
				civilian_factory_use = 2
				country_resource_metal = -3
				base_fuel_gain_factor = -0.10
		}
		complete_effect = {
			add_equipment_to_stockpile = {
				type = rail_equipment
				amount = -1400
			}
			add_equipment_to_stockpile = {
				type = signaling_equipment
				amount = -60
			}
			add_equipment_to_stockpile = {
				type = construction_train_equipment
				amount = -5
			}
		}
		remove_effect = {
			add_equipment_to_stockpile = {
				type = construction_train_equipment
				amount = 4
			}
			set_country_flag = rail_SR_HUB2
			605 = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
			529 = {
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
			214 = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
			455 = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
			360 = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
			489 = {
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
			1 = {
				add_extra_state_shared_building_slots = 4
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
        }
	}
	rebuild_rail_HUB_BN_DG = {	#Hub-Boneyard-Dayglow track
		icon = GFX_decision_generic_train
		custom_cost_text = command_power_10
		custom_cost_trigger = {
				command_power > 9.9
			}
		days_remove = 45
		fire_only_once = yes
		available = {
			has_equipment = {
				rail_equipment > 799
			}
			controls_state = 350
			controls_state = 63
			custom_trigger_tooltip = {
				tooltip = rail_SR_HUB_tt
				has_country_flag = rail_SR_HUB
			}
		}
		complete_effect = {
			add_equipment_to_stockpile = {
				type = rail_equipment
				amount = -500
			}
        }
		modifier = {
				civilian_factory_use = 2
				country_resource_metal = -2
		}
		remove_effect = {
			set_country_flag = rail_HUB_BN_DG
			180 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			19 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			350 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			591 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			63 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
        }
	}
	rebuild_rail_HUB_BN_DG2 = {	#Hub-Boneyard-Dayglow track 2
		icon = GFX_decision_generic_construction
		custom_cost_trigger = {
			set_temp_variable = { temp_cap_cost = 135 }
			check_variable = {
				caps_number_display > temp_cap_cost
			}
		}
		custom_cost_text = "caps_decisions_cost_text"
		days_remove = 110
		fire_only_once = yes
		available = {
			has_equipment = {
				rail_equipment > 1699
			}
			has_equipment = {
				signaling_equipment > 89
			}
			has_equipment = {
				construction_train_equipment > 5
			}
			custom_trigger_tooltip = {
				tooltip = rail_HUB_BN_DG_tt
				has_country_flag = rail_HUB_BN_DG
			}
		}
		complete_effect = {
			add_equipment_to_stockpile = {
				type = rail_equipment
				amount = -1700
			}
			add_equipment_to_stockpile = {
				type = signaling_equipment
				amount = -90
			}
			add_equipment_to_stockpile = {
				type = construction_train_equipment
				amount = -6
			}
		}
		modifier = {
				civilian_factory_use = 2
				country_resource_metal = -4
				base_fuel_gain_factor = -0.10
		}
		remove_effect = {
			add_equipment_to_stockpile = {
				type = construction_train_equipment
				amount = 5
			}
			set_country_flag = rail_HUB_BN_DG2
			180 = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
			19 = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
			350 = {
				add_extra_state_shared_building_slots = 4
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
			591 = {
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
			63 = {
				add_extra_state_shared_building_slots = 4
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
        }
	}
	rebuild_rail_HUB_MAX = {	#Hub-Maxon track
		icon = GFX_decision_generic_train
		custom_cost_text = command_power_10
		custom_cost_trigger = {
				command_power > 9.9
			}
		days_remove = 85
		fire_only_once = yes
		available = {
			has_equipment = {
				rail_equipment >199
			}
			controls_state = 70
			controls_state = 245
			custom_trigger_tooltip = {
				tooltip = rail_SR_HUB_tt
				has_country_flag = rail_SR_HUB
			}
			
		}
		complete_effect = {
			add_equipment_to_stockpile = {
				type = rail_equipment
				amount = -200
			}
        }
		modifier = {
				civilian_factory_use = 1
				country_resource_metal = -2
		}
		remove_effect = {
			set_country_flag = rail_HUB_MAX
			70 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			258 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			245 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
        }
	}
	rebuild_rail_HUB_MAX2 = {	#Hub-Maxon track 2
		icon = GFX_decision_generic_construction
		custom_cost_trigger = {
			set_temp_variable = { temp_cap_cost = 50 }
			check_variable = {
				caps_number_display > temp_cap_cost
			}
		}
		custom_cost_text = "caps_decisions_cost_text"
		days_remove = 125
		fire_only_once = yes
		available = {
			has_equipment = {
				rail_equipment > 1199
			}
			has_equipment = {
				signaling_equipment > 39
			}
			has_equipment = {
				construction_train_equipment > 3
			}
			custom_trigger_tooltip = {
				tooltip = rail_HUB_MAX_tt
				has_country_flag = rail_HUB_MAX
			}
		}
		complete_effect = {
			add_equipment_to_stockpile = {
				type = rail_equipment
				amount = -1200
			}
			add_equipment_to_stockpile = {
				type = signaling_equipment
				amount = -40
			}
			add_equipment_to_stockpile = {
				type = construction_train_equipment
				amount = -4
			}
		}
		modifier = {
				civilian_factory_use = 2
				country_resource_metal = -2
				base_fuel_gain_factor = -0.05
		}
		remove_effect = {
			add_equipment_to_stockpile = {
				type = construction_train_equipment
				amount = 3
			}
			set_country_flag = rail_HUB_MAX2
			70 = {
				add_extra_state_shared_building_slots = 4
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
			258 = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
			245 = {
				add_extra_state_shared_building_slots = 4
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
        }
	}
	rebuild_rail_BN_MOJ = {	#Boneyard-Mojave track
		icon = GFX_decision_generic_train
		custom_cost_text = command_power_10
		custom_cost_trigger = {
				command_power > 9.9
			}
		days_remove = 85
		fire_only_once = yes
		available = {
			has_equipment = {
				rail_equipment > 399
			}
			controls_state = 77
			custom_trigger_tooltip = {
				tooltip = rail_HUB_BN_DG_tt
				has_country_flag = rail_HUB_BN_DG
			}
		}
		modifier = {
				civilian_factory_use = 2
				country_resource_metal = -2
		}
		complete_effect = {
			add_equipment_to_stockpile = {
				type = rail_equipment
				amount = -400
			}
        }
		remove_effect = {
			set_country_flag = rail_BN_MOJ
			243 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			589 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			77 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
        }
	}
	rebuild_rail_BN_MOJ2 = {	#Boneyard-Mojave track 2
		icon = GFX_decision_generic_construction
		custom_cost_trigger = {
			set_temp_variable = { temp_cap_cost = 70 }
			check_variable = {
				caps_number_display > temp_cap_cost
			}
		}
		custom_cost_text = "caps_decisions_cost_text"
		days_remove = 125
		fire_only_once = yes
		available = {
			has_equipment = {
				rail_equipment > 1599
			}
			has_equipment = {
				signaling_equipment > 59
			}
			has_equipment = {
				construction_train_equipment > 3
			}
			custom_trigger_tooltip = {
				tooltip = rail_BN_MOJ_tt
				has_country_flag = rail_BN_MOJ
			}
		}
		complete_effect = {
			add_equipment_to_stockpile = {
				type = rail_equipment
				amount = -1600
			}
			add_equipment_to_stockpile = {
				type = signaling_equipment
				amount = -60
			}
			add_equipment_to_stockpile = {
				type = construction_train_equipment
				amount = -4
			}
		}
		modifier = {
				civilian_factory_use = 2
				country_resource_metal = -3
				base_fuel_gain_factor = -0.10
		}
		remove_effect = {
			add_equipment_to_stockpile = {
				type = construction_train_equipment
				amount = 2
			}
			set_country_flag = rail_BN_MOJ2
			243 = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
			589 = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
			77 = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
        }
	}
	rebuild_rail_BN_SF_NAV = {	#Boneyard-San Francisco-Nevarro track
		icon = GFX_decision_generic_train
		custom_cost_text = command_power_10
		custom_cost_trigger = {
				command_power > 9.9
			}
		days_remove = 85
		fire_only_once = yes
		available = {
			has_equipment = {
				rail_equipment > 1099
			}
			controls_state = 163
			custom_trigger_tooltip = {
				tooltip = rail_HUB_BN_DG_tt
				has_country_flag = rail_HUB_BN_DG
			}
			custom_trigger_tooltip = {
				tooltip = rail_SR_NAV_tt
				has_country_flag = rail_SR_NAV
			}
		}
		complete_effect = {
			add_equipment_to_stockpile = {
				type = rail_equipment
				amount = -1100
			}
        }
		modifier = {
				civilian_factory_use = 2
				country_resource_metal = -3
		}
		remove_effect = {
			set_country_flag = rail_BN_SF_NAV
			396 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			64 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			558 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			312 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			539 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			473 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			511 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			216 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
        }
	}
	rebuild_rail_BN_SF_NAV2 = {	#Boneyard-San Francisco-Nevarro track 2
		icon = GFX_decision_generic_construction
		custom_cost_trigger = {
			set_temp_variable = { temp_cap_cost = 175 }
			check_variable = {
				caps_number_display > temp_cap_cost
			}
		}
		custom_cost_text = "caps_decisions_cost_text"
		days_remove = 145
		fire_only_once = yes
		available = {
			has_equipment = {
				rail_equipment > 3599
			}
			has_equipment = {
				signaling_equipment > 149
			}
			has_equipment = {
				construction_train_equipment > 11
			}
			custom_trigger_tooltip = {
				tooltip = rail_BN_SF_NAV_tt
				has_country_flag = rail_BN_SF_NAV
			}
		}
		complete_effect = {
			add_equipment_to_stockpile = {
				type = rail_equipment
				amount = -3600
			}
			add_equipment_to_stockpile = {
				type = signaling_equipment
				amount = -150
			}
			add_equipment_to_stockpile = {
				type = construction_train_equipment
				amount = -12
			}
		}
		modifier = {
				civilian_factory_use = 4
				country_resource_metal = -4
				base_fuel_gain_factor = -0.15
		}
		remove_effect = {
			add_equipment_to_stockpile = {
				type = construction_train_equipment
				amount = 9
			}
			set_country_flag = rail_BN_SF_NAV2
			396 = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
			64 = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
			558 = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
			312 = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
			539 = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
			473 = {
				add_extra_state_shared_building_slots = 4
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
			511 = {
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
			216 = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = civilian_power_grid
					level = 1
					instant_build = yes
				}
			}
        }
	}
	repair_rail_finnished = {	#Finnihshed rail repair
		icon = GFX_decision_generic_train
		cost = 10
		fire_only_once = yes
		available = {
			custom_trigger_tooltip = {
				tooltip = rail_NR_SC_tt
				has_country_flag = rail_NR_SC
			}
			custom_trigger_tooltip = {
				tooltip = rail_SR_NAV_tt
				has_country_flag = rail_SR_NAV
			}
			custom_trigger_tooltip = {
				tooltip = rail_SR_SS_tt
				has_country_flag = rail_SR_SS
			}
			custom_trigger_tooltip = {
				tooltip = rail_SR_HUB_tt
				has_country_flag = rail_SR_HUB
			}
			custom_trigger_tooltip = {
				tooltip = rail_HUB_BN_DG_tt
				has_country_flag = rail_HUB_BN_DG
			}
			custom_trigger_tooltip = {
				tooltip = rail_HUB_MAX_tt
				has_country_flag = rail_HUB_MAX
			}
		}
		remove_effect = {
			set_country_flag = rail_repair_finnished 
			country_event = {
				id = erx_train.21
			}
        }
	}
	rebuild_rail_finnished = {	#Finnihshed rail repair
		icon = GFX_decision_generic_train
		cost = 10
		fire_only_once = yes
		available = {
			custom_trigger_tooltip = {
				tooltip = rail_NR_SC2_tt
				has_country_flag = rail_NR_SC2
			}
			custom_trigger_tooltip = {
				tooltip = rail_SR_NAV2_tt
				has_country_flag = rail_SR_NAV2
			}
			custom_trigger_tooltip = {
				tooltip = rail_SR_SS2_tt
				has_country_flag = rail_SR_SS2
			}
			custom_trigger_tooltip = {
				tooltip = rail_SR_HUB2_tt
				has_country_flag = rail_SR_HUB2
			}
			custom_trigger_tooltip = {
				tooltip = rail_HUB_BN_DG2_tt
				has_country_flag = rail_HUB_BN_DG2
			}
			custom_trigger_tooltip = {
				tooltip = rail_HUB_MAX2_tt
				has_country_flag = rail_HUB_MAX2
			}
		}
		remove_effect = {
			country_event = {
				id = erx_train.23
			}
        }
	}
}



enc_railway_reborne = {
	NCR_railway_manpower = {	#Amerivcan Railway 1
		icon = GFX_decision_generic_train
		cost = 25
		days_remove = 15
		fire_only_once = yes
		visible = {
			NOT = {
				has_country_flag = has_Enclave_railway_manpower
			}
		}
		available = {
			has_completed_focus = enc_yesterdays_enemies
			NOT = {
				custom_trigger_tooltip = {
					tooltip = has_Enclave_railway_manpower_tt
					has_country_flag = has_Enclave_railway_manpower
				}
			}
		}
		complete_effect = {
			set_country_flag = has_NCR_railway_manpower
			add_manpower = -250
		}
		modifier = {
				stability_factor = -0.05
				political_power_gain = -0.10
		}
		remove_effect = {
			set_country_flag = has_railway_manpower
			add_manpower = 500
        }
	}
	Enclave_railway_manpower = {	#Amerivcan Railway 1
		icon = GFX_decision_generic_train
		cost = 25
		days_remove = 60
		fire_only_once = yes
		visible = {
			NOT = {
				has_country_flag = has_NCR_railway_manpower
			}
		}
		available = {
			NOT = {
				custom_trigger_tooltip = {
					tooltip = has_NCR_railway_manpower_tt
					has_country_flag = has_NCR_railway_manpower
				}
			}
		}
		complete_effect = {
			set_country_flag = has_Enclave_railway_manpower
			add_manpower = -1250
		}
		modifier = {
				civilian_factory_use = 2
				political_power_gain = -0.05
				
		}
		remove_effect = {
			set_country_flag = has_railway_manpower
			
			add_manpower = 1000
        }
	}
	NCR_railway_trains = {	#Amerivcan Railway 1
		icon = GFX_decision_generic_train
		cost = 25
		days_remove = 25
		fire_only_once = yes
		available = {
			custom_trigger_tooltip = {
					tooltip = has_railway_manpower_tt
					has_country_flag = has_railway_manpower
				}
		}
		modifier = {
				civilian_factory_use = 2
				political_power_gain = -0.01
		}
		remove_effect = {
			add_equipment_to_stockpile = { type = locomotive_equipment_1 amount = 35 producer = ERB }
			set_country_flag = has_NCR_trains
        }
	}
	american_railway_1 = {	#Amerivcan Railway 1
		icon = GFX_decision_generic_train
		cost = 25
		days_remove = 5
		fire_only_once = yes
		available = {
			NOT = {
				has_idea = enc_NCR_power_struggle
			}
			custom_trigger_tooltip = {
				tooltip = has_NCR_trains_tt
				has_country_flag = has_NCR_trains
			}
			custom_trigger_tooltip = {
				tooltip = rail_vc_nr_tt
				has_country_flag = rail_vc_nr
			}
		}
		modifier = {
				civilian_factory_use = 2
				political_power_gain = -0.10
		}
		remove_effect = {
			country_event = {
				id = erx_train.22
			}
        }
	}
	railway_institute = {	#Amerivcan Railway institute
		icon = GFX_decision_generic_train
		custom_cost_trigger = {
			set_temp_variable = { temp_cap_cost = 30 }
			check_variable = {
				caps_number_display > temp_cap_cost
			}
		}
		custom_cost_text = "caps_decisions_cost_text"
		days_remove = 35
		fire_only_once = yes
		visible = {
			has_idea = ERB_american_railway
		}	
		available = {
			controls_state = 135
			has_completed_focus = enc_department_of_education
			custom_trigger_tooltip = {
				tooltip = rail_NR_SC_tt
				has_country_flag = rail_NR_SC
			}
			
		}
		modifier = {
				civilian_factory_use = 2
				research_speed_factor = -0.05
		}
		complete_effect = {
			country_event = {
				id = erx_train.20
			}
		}
		remove_effect = {
			set_country_flag = rail_institute
			135 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			421 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
        }
	}
	railway_signaling = {	#Amerivcan Railway 1
		icon = GFX_decision_generic_train
		custom_cost_trigger = {
			set_temp_variable = { temp_cap_cost = 65 }
			check_variable = {
				caps_number_display > temp_cap_cost
			}
		}
		custom_cost_text = "caps_decisions_cost_text"
		days_remove = 80
		fire_only_once = yes
		visible = {
			has_idea = ERB_american_railway
		}	
		available = {
			custom_trigger_tooltip = {
				tooltip = rail_repair_finnished_tt
				has_country_flag = rail_repair_finnished
			}
			custom_trigger_tooltip = {
				tooltip = rail_institute_tt
				has_country_flag = rail_institute
			}
		}
		modifier = {
				civilian_factory_use = 2
				country_resource_metal = -3
		}
		remove_effect = {
			set_country_flag = rail_signaling
			set_technology = { enc_locomotive_tech_4 = 1 }
        }
	}
	railway_railyards = {	#Amerivcan Railway 1
		icon = GFX_decision_generic_train
		custom_cost_trigger = {
			set_temp_variable = { temp_cap_cost = 80 }
			check_variable = {
				caps_number_display > temp_cap_cost
			}
		}
		custom_cost_text = "caps_decisions_cost_text"
		days_remove = 100
		fire_only_once = yes
		visible = {
			has_idea = ERB_american_railway
		}	
		available = {
			custom_trigger_tooltip = {
				tooltip = rail_repair_finnished_tt
				has_country_flag = rail_repair_finnished
			}
		}
		modifier = {
				civilian_factory_use = 2
				country_resource_metal = -3
		}
		remove_effect = {
			set_country_flag = rail_railyards
			135 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			253 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			350 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			63 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			1 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			163 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
        }
	}
	railway_locomotive = {	#Locomotives
		icon = GFX_decision_generic_train
		custom_cost_trigger = {
			set_temp_variable = { temp_cap_cost = 75 }
			check_variable = {
				caps_number_display > temp_cap_cost
			}
		}
		custom_cost_text = "caps_decisions_cost_text"
		days_remove = 80
		fire_only_once = yes
		visible = {
			has_idea = ERB_american_railway
		}	
		available = {
			has_idea = ERB_american_railway
			custom_trigger_tooltip = {
				tooltip = rail_institute_tt
				has_country_flag = rail_institute
			}
			
		}
		modifier = {
				civilian_factory_use = 2
				industrial_capacity_factory = -0.05
		}
		remove_effect = {
			set_country_flag = rail_locomotive
			set_technology = { enc_locomotive_tech_6 = 1 }
        }
	}
	railway_construction_train = {	#Locomotives
		icon = GFX_decision_generic_train
		custom_cost_trigger = {
			set_temp_variable = { temp_cap_cost = 250 }
			check_variable = {
				caps_number_display > temp_cap_cost
			}
		}
		custom_cost_text = "caps_decisions_cost_text"
		days_remove = 110
		fire_only_once = yes
		visible = {
			has_idea = ERB_american_railway
		}	
		available = {
			has_idea = ERB_american_railway
			custom_trigger_tooltip = {
				tooltip = rail_institute_tt
				has_country_flag = rail_institute
			}
			
		}
		modifier = {
				civilian_factory_use = 2
				industrial_capacity_factory = -0.05
		}
		remove_effect = {
			set_country_flag = rail_locomotive
			set_technology = { enc_locomotive_tech_5 = 1 }
        }
	}
	railway_cargo_wagon = {	#Amerivcan Railway 1
		icon = GFX_decision_generic_train
		custom_cost_trigger = {
			set_temp_variable = { temp_cap_cost = 75 }
			check_variable = {
				caps_number_display > temp_cap_cost
			}
		}
		custom_cost_text = "caps_decisions_cost_text"
		days_remove = 80
		fire_only_once = yes
		visible = {
			has_idea = ERB_american_railway
		}	
		available = {
			has_idea = ERB_american_railway
			custom_trigger_tooltip = {
				tooltip = rail_institute_tt
				has_country_flag = rail_institute
			}
		}
		modifier = {
				civilian_factory_use = 2
				industrial_capacity_factory = -0.05
		}
		remove_effect = {
			set_country_flag = rail_cargo_wagon
			country_event = {
				id = erx_train.28
			}
			set_technology = { enc_locomotive_tech_7 = 1 }
        }
	}
	railway_passenger_wagon = {	#Amerivcan Railway 1
		icon = GFX_decision_generic_train
		custom_cost_trigger = {
			set_temp_variable = { temp_cap_cost = 100 }
			check_variable = {
				caps_number_display > temp_cap_cost
			}
		}
		custom_cost_text = "caps_decisions_cost_text"
		days_remove = 95
		fire_only_once = yes
		visible = {
			has_idea = ERB_american_railway
		}	
		available = {
			has_idea = ERB_american_railway
			custom_trigger_tooltip = {
				tooltip = rail_institute_tt
				has_country_flag = rail_institute
			}
		}
		modifier = {
				civilian_factory_use = 2
				industrial_capacity_factory = -0.05
		}
		remove_effect = {
			set_country_flag = rail_passenger_wagon
			set_technology = { passenger_car_tech = 1 }
			set_technology = { enc_locomotive_tech_8 = 1 }
        }
	}
	railway_admin_buildings_1 = {	#Amerivcan Railway 1
		icon = GFX_decision_generic_train
		custom_cost_trigger = {
			set_temp_variable = { temp_cap_cost = 25 }
			check_variable = {
				caps_number_display > temp_cap_cost
			}
		}
		custom_cost_text = "caps_decisions_cost_text"
		days_remove = 50
		fire_only_once = yes
		visible = {
			has_idea = ERB_american_railway
		}	
		available = {
			controls_state = 63
		}
		modifier = {
				civilian_factory_use = 2
				political_power_gain = -0.05
		}
		remove_effect = {
			set_country_flag = rail_admin_building_1
			63 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
        }
	}
	railway_admin_buildings_2 = {	#Amerivcan Railway 1
		icon = GFX_decision_generic_train
		custom_cost_trigger = {
			set_temp_variable = { temp_cap_cost = 25 }
			check_variable = {
				caps_number_display > temp_cap_cost
			}
		}
		custom_cost_text = "caps_decisions_cost_text"
		days_remove = 50
		fire_only_once = yes
		visible = {
			has_idea = ERB_american_railway
		}	
		available = {
			controls_state = 135
		}
		modifier = {
				civilian_factory_use = 2
				political_power_gain = -0.05
		}
		remove_effect = {
			set_country_flag = rail_admin_building_2
			135 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
        }
	}
	american_railway_2 = {	#Amerivcan Railway 2
		icon = GFX_decision_generic_train
		cost = 25
		days_remove = 5
		fire_only_once = yes
		visible = {
			has_idea = ERB_american_railway
		}	
		available = {
			NOT = {
				has_idea = ERB_destroyed_railway
			}
			custom_trigger_tooltip = {
				tooltip = rail_institute_tt
				has_country_flag = rail_institute
			}
			custom_trigger_tooltip = {
				tooltip = rail_locomotive_tt
				has_country_flag = rail_locomotive
			}
			custom_trigger_tooltip = {
				tooltip = rail_cargo_wagon_tt
				has_country_flag = rail_cargo_wagon
			}
			custom_trigger_tooltip = {
				tooltip = rail_passenger_wagon_tt
				has_country_flag = rail_passenger_wagon
			}
			custom_trigger_tooltip = {
				tooltip = rail_signaling_tt
				has_country_flag = rail_signaling
			}
			custom_trigger_tooltip = {
				tooltip = rail_railyards_tt
				has_country_flag = rail_railyards
			}	
			custom_trigger_tooltip = {
				tooltip = rail_admin_building_1_tt
				has_country_flag = rail_admin_building_1
			}
			custom_trigger_tooltip = {
				tooltip = rail_admin_building_2_tt
				has_country_flag = rail_admin_building_2
			}
		}
		modifier = {
				civilian_factory_use = 2
				political_power_gain = -0.10
		}
		remove_effect = {
			country_event = {
				id = erx_train.25
			}
        }
	}
	railway_factory_1 = {	#Amerivcan Railway 1
		icon = GFX_decision_generic_train
		custom_cost_trigger = {
			set_temp_variable = { temp_cap_cost = 60 }
			check_variable = {
				caps_number_display > temp_cap_cost
			}
		}
		custom_cost_text = "caps_decisions_cost_text"
		days_remove = 110
		fire_only_once = yes
		visible = {
			has_idea = ERB_american_railway_2
		}	
		available = {
			has_completed_focus = enc_department_of_manufacturing
			controls_state = 285
			custom_trigger_tooltip = {
				tooltip = rail_repair_finnished_tt
				has_country_flag = rail_repair_finnished
			}
		}
		modifier = {
				civilian_factory_use = 3
				country_resource_metal = -2
		}
		remove_effect = {
			set_country_flag = rail_factory_1
			285 = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
				add_building_construction = {
					type = arms_factory
					level = 5
					instant_build = yes
				}
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}
        }
	}
	railway_factory_2 = {	#Amerivcan Railway 1
		icon = GFX_decision_generic_train
		custom_cost_trigger = {
			set_temp_variable = { temp_cap_cost = 60 }
			check_variable = {
				caps_number_display > temp_cap_cost
			}
		}
		custom_cost_text = "caps_decisions_cost_text"
		days_remove = 110
		fire_only_once = yes
		visible = {
			has_idea = ERB_american_railway_2
		}	
		available = {
			has_completed_focus = enc_department_of_manufacturing
			controls_state = 163
			custom_trigger_tooltip = {
				tooltip = rail_repair_finnished_tt
				has_country_flag = rail_repair_finnished
			}
		}
		modifier = {
				civilian_factory_use = 3
				country_resource_metal = -2
		}
		remove_effect = {
			set_country_flag = rail_factory_2
			163 = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
				add_building_construction = {
					type = arms_factory
					level = 5
					instant_build = yes
				}
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}
        }
	}
	railway_factory_3 = {	#Amerivcan Railway 1
		icon = GFX_decision_generic_train
		custom_cost_trigger = {
			set_temp_variable = { temp_cap_cost = 60 }
			check_variable = {
				caps_number_display > temp_cap_cost
			}
		}
		custom_cost_text = "caps_decisions_cost_text"
		days_remove = 110
		fire_only_once = yes
		visible = {
			has_idea = ERB_american_railway_2
		}	
		available = {
			has_completed_focus = enc_department_of_manufacturing
			controls_state = 350
			custom_trigger_tooltip = {
				tooltip = rail_repair_finnished_tt
				has_country_flag = rail_repair_finnished
			}
		}
		modifier = {
				civilian_factory_use = 3
				country_resource_metal = -2
		}
		remove_effect = {
			set_country_flag = rail_factory_3
			350 = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
				add_building_construction = {
					type = arms_factory
					level = 5
					instant_build = yes
				}
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}
        }
	}
	railway_factory_4 = {	#Amerivcan Railway 1
		icon = GFX_decision_generic_train
		custom_cost_trigger = {
			set_temp_variable = { temp_cap_cost = 60 }
			check_variable = {
				caps_number_display > temp_cap_cost
			}
		}
		custom_cost_text = "caps_decisions_cost_text"
		days_remove = 110
		fire_only_once = yes
		visible = {
			has_idea = ERB_american_railway_2
		}	
		available = {
			has_completed_focus = enc_department_of_manufacturing
			controls_state = 63
			custom_trigger_tooltip = {
				tooltip = rail_repair_finnished_tt
				has_country_flag = rail_repair_finnished
			}
		}
		modifier = {
				civilian_factory_use = 3
				country_resource_metal = -2
		}
		remove_effect = {
			set_country_flag = rail_factory_4
			63 = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
				add_building_construction = {
					type = arms_factory
					level = 4
					instant_build = yes
				}
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
        }
	}
	railway_tcs = {	#Amerivcan Railway 1
		icon = GFX_decision_generic_train
		custom_cost_trigger = {
			set_temp_variable = { temp_cap_cost = 150 }
			check_variable = {
				caps_number_display > temp_cap_cost
			}
		}
		custom_cost_text = "caps_decisions_cost_text"
		days_remove = 155
		fire_only_once = yes
		visible = {
			has_idea = ERB_american_railway_2
		}	
		available = {
			custom_trigger_tooltip = {
				tooltip = rail_repair_finnished_tt
				has_country_flag = rail_repair_finnished
			}
		}
		modifier = {
				civilian_factory_use = 2
				research_speed_factor = -0.05
				industrial_capacity_factory = -0.05
		}
		remove_effect = {
			set_country_flag = rail_tcs
			add_stability = 0.05
        }
	}
	railway_stations = {	#Amerivcan Railway 1
		icon = GFX_decision_generic_train
		custom_cost_trigger = {
			set_temp_variable = { temp_cap_cost = 175 }
			check_variable = {
				caps_number_display > temp_cap_cost
			}
		}
		custom_cost_text = "caps_decisions_cost_text"
		days_remove = 100
		fire_only_once = yes
		visible = {
			has_idea = ERB_american_railway_2
		}	
		available = {
			custom_trigger_tooltip = {
				tooltip = rail_repair_finnished_tt
				has_country_flag = rail_repair_finnished
			}
		}
		modifier = {
				civilian_factory_use = 5
		}
		remove_effect = {
			set_country_flag = rail_stations
			285 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			135 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			163 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			548 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			253 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			350 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			63 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			1 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
        }
	}
	railway_schools = {	#Amerivcan Railway 1
		icon = GFX_decision_generic_train
		custom_cost_trigger = {
			set_temp_variable = { temp_cap_cost = 50 }
			check_variable = {
				caps_number_display > temp_cap_cost
			}
		}
		custom_cost_text = "caps_decisions_cost_text"
		days_remove = 60
		fire_only_once = yes
		visible = {
			has_idea = ERB_american_railway_2
		}	
		available = {
			custom_trigger_tooltip = {
				tooltip = rail_repair_finnished_tt
				has_country_flag = rail_repair_finnished
			}
		}
		modifier = {
				civilian_factory_use = 5
		}
		remove_effect = {
			set_country_flag = rail_schools
			add_stability = 0.10
        }
	}
	railway_presidential_train = {	#Amerivcan Railway 1
		icon = GFX_decision_generic_train
		custom_cost_trigger = {
			set_temp_variable = { temp_cap_cost = 40 }
			check_variable = {
				caps_number_display > temp_cap_cost
			}
		}
		custom_cost_text = "caps_decisions_cost_text"
		days_remove = 50
		fire_only_once = yes
		visible = {
			has_idea = ERB_american_railway_2
		}	
		available = {
			custom_trigger_tooltip = {
				tooltip = rail_repair_finnished_tt
				has_country_flag = rail_repair_finnished
			}
			has_equipment = {
				locomotive_equipment > 2
			}
			has_equipment = {
				passanger_wagon_equipment > 14
			}
		}
		modifier = {
				civilian_factory_use = 5
		}
		complete_effect = {
			add_equipment_to_stockpile = {
				type = locomotive_equipment
				amount = -3
			}
			add_equipment_to_stockpile = {
				type = passanger_wagon_equipment
				amount = -15
			}
			country_event = {
				id = erx_train.27
			}
		}
		remove_effect = {
			set_country_flag = rail_presidential_train
			add_ideas = ERB_presidential_train
        }
	}
	american_railway_3 = {	#Amerivcan Railway 3
		icon = GFX_decision_generic_train
		cost = 25
		days_remove = 5
		fire_only_once = yes
		visible = {
			has_idea = ERB_american_railway_2
		}	
		available = {
			NOT = {
				has_idea = ERB_destroyed_railway_2
				has_idea = ERB_destroyed_railway
			}
			custom_trigger_tooltip = {
				tooltip = rail_railyards_tt
				has_country_flag = rail_tcs
			}
			custom_trigger_tooltip = {
				tooltip = rail_factory_1_tt
				has_country_flag = rail_factory_1
			}
			custom_trigger_tooltip = {
				tooltip = rail_factory_2_tt
				has_country_flag = rail_factory_2
			}
			custom_trigger_tooltip = {
				tooltip = rail_factory_3_tt
				has_country_flag = rail_factory_3
			}
			custom_trigger_tooltip = {
				tooltip = rail_factory_4_tt
				has_country_flag = rail_factory_4
			}
			custom_trigger_tooltip = {
				tooltip = rail_factory_2_tt
				has_country_flag = rail_stations
			}
			custom_trigger_tooltip = {
				tooltip = rail_factory_3_tt
				has_country_flag = rail_schools
			}
		}
		modifier = {
				civilian_factory_use = 2
				political_power_gain = -0.10
		}
		remove_effect = {
			country_event = {
				id = erx_train.26
			}
        }
	}
	railway_stock_1 = {	#Amerivcan Railway 1
		icon = GFX_decision_generic_train
		custom_cost_trigger = {
			set_temp_variable = { temp_cap_cost = 10 }
			check_variable = {
				caps_number_display > temp_cap_cost
			}
		}
		custom_cost_text = "caps_decisions_cost_text"
		days_remove = 5
		fire_only_once = no
		visible = {
			has_idea = ERB_destroyed_railstock_1
		}	
		available = {
			has_equipment = {
				locomotive_equipment > 39
			}
			has_equipment = {
				cargo_wagon_equipment > 149
			}
			has_equipment = {
				passanger_wagon_equipment > 79
			}
		}
		complete_effect = {
			add_equipment_to_stockpile = {
				type = locomotive_equipment
				amount = -40
			}
			add_equipment_to_stockpile = {
				type = cargo_wagon_equipment
				amount = -150
			}
			add_equipment_to_stockpile = {
				type = passanger_wagon_equipment
				amount = -80
			}
		}
		remove_effect = {
			swap_ideas = {
				remove_idea = ERB_destroyed_railstock_1
				add_idea = ERB_destroyed_railstock_2
			}
        }
	}
	railway_stock_2 = {	#Amerivcan Railway 1
		icon = GFX_decision_generic_train
		custom_cost_trigger = {
			set_temp_variable = { temp_cap_cost = 10 }
			check_variable = {
				caps_number_display > temp_cap_cost
			}
		}
		custom_cost_text = "caps_decisions_cost_text"
		days_remove = 5
		fire_only_once = no
		visible = {
			has_idea = ERB_destroyed_railstock_2
		}	
		available = {
			has_equipment = {
				locomotive_equipment > 49
			}
			has_equipment = {
				cargo_wagon_equipment > 499
			}
			has_equipment = {
				passanger_wagon_equipment > 199
			}
		}
		complete_effect = {
			add_equipment_to_stockpile = {
				type = locomotive_equipment
				amount = -50
			}
			add_equipment_to_stockpile = {
				type = cargo_wagon_equipment
				amount = -500
			}
			add_equipment_to_stockpile = {
				type = passanger_wagon_equipment
				amount = -200
			}
		}
		remove_effect = {
			swap_ideas = {
				remove_idea = ERB_destroyed_railstock_2
				add_idea = ERB_destroyed_railstock_3
			}
        }
	}
	railway_stock_3 = {	#Amerivcan Railway 1
		icon = GFX_decision_generic_train
		custom_cost_trigger = {
			set_temp_variable = { temp_cap_cost = 10 }
			check_variable = {
				caps_number_display > temp_cap_cost
			}
		}
		custom_cost_text = "caps_decisions_cost_text"
		days_remove = 5
		fire_only_once = no
		visible = {
			has_idea = ERB_destroyed_railstock_3
		}	
		available = {
			has_equipment = {
				locomotive_equipment > 99
			}
			has_equipment = {
				cargo_wagon_equipment > 499
			}
			has_equipment = {
				passanger_wagon_equipment > 399
			}
		}
		complete_effect = {
			add_equipment_to_stockpile = {
				type = locomotive_equipment
				amount = -100
			}
			add_equipment_to_stockpile = {
				type = cargo_wagon_equipment
				amount = -500
			}
			add_equipment_to_stockpile = {
				type = passanger_wagon_equipment
				amount = -400
			}
		}
		remove_effect = {
			remove_ideas = {
				ERB_destroyed_railstock_3
			}
        }
	}
	
}