### System Resources

# allow_deficit = no				# default yes // only implemented for tech resources
# market_amount = 100			# default -1, if non-positive, resource cannot be traded in the Market
# market_price = 100				# default -1, if non-positive, resource cannot be traded in the Market
# culling_conversion_value = 3	# Represents the weight between the different resources when comparing different critters for auto culling
# fixed_max_amount = yes/no		# default no, if yes maximum storage capacity of the resource is fixed to the amount specified in max = INT
# special_max_amount = yes/no	# default no, if yes maximum storage capacity of the resource is fixed to the amount specified in max = INT + country_resource_max_RESOURCE_NAME_add modifiers + dynamic_capacity
#								This explicitly ignores MOD_COUNTRY_RESOURCE_MAX_ADD modifiers.
# tradable_in_market = {}		# default yes, trigger for blocking a resource from the market but still leaving it open for trade agreements


### Basic Resources

energy = {
	tradable = yes
	category = basic
	market_amount = 100
	market_price = 100
	max = 25000

	deficit_situation = situation_energy_deficit
	deficit_trade_conversion_mult = -0.125

	culling_conversion_value = 1

	ai_weight = {
		weight = 1.5
	}

	ai_wants = {
		base = 500
	}
}

minerals = {
	tradable = yes
	category = basic
	market_amount = 100
	market_price = 100
	max = 15000

	deficit_situation = situation_mineral_deficit
	deficit_trade_conversion_mult = -0.125

	culling_conversion_value = 1

	ai_weight = {
		weight = 1
	}

	ai_wants = {
		base = 1000
	}
}

food = {
	tradable = yes
	category = basic
	market_amount = 100
	market_price = 100
	max = 15000
	dynamic_capacity = {
		base = 0
		modifier = {
			country_uses_bio_ships = yes
			add = 10000
		}
	}

	deficit_situation = situation_food_deficit
	deficit_trade_conversion_mult = -0.125

	culling_conversion_value = 1

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.1
			country_uses_food = no
		}
	}

	ai_wants = {
		base = 500
		modifier = {
			factor = 0.1
			country_uses_food = no
		}
	}
}

physics_research = {
	category = other
	allow_deficit = no

	culling_conversion_value = 3

	ai_weight = {
		weight = 1
	}
	intangible_weight = 0.33
}

society_research = {
	category = other
	allow_deficit = no

	culling_conversion_value = 3

	ai_weight = {
		weight = 1
	}
	intangible_weight = 0.33
}

engineering_research = {
	category = other
	allow_deficit = no

	culling_conversion_value = 3

	ai_weight = {
		weight = 1
	}
	intangible_weight = 0.33
}

influence = {
	category = other
	max = 1000
	tooltip_decimals = 1
	fixed_max_amount = yes

	deficit_modifier = influence_deficit #found in static modifiers

	ai_weight = {
		weight = 1
	}
}

unity = {
	category = other
	deficit_modifier = unity_deficit #found in static modifiers

	culling_conversion_value = 1

	ai_weight = {
		weight = 1
	}
}


##########################
### Advanced Resources ###
##########################

#Edited to allow deficit situation
#Paradox please make these not require an entire file overwrite someday
trade = {
	tradable = yes
	category = advanced
	max = 50000

	culling_conversion_value = 1
	deficit_modifier = trade_deficit
	deficit_situation = situation_oeo_logistics_deficit
}

consumer_goods = {
	tradable = yes
	category = advanced
	market_amount = 50
	market_price = 100
	max = 15000

	deficit_situation = situation_consumer_goods_deficit
	deficit_trade_conversion_mult = -0.25

	visibility_prerequisite = {
		OR = {
			is_scope_valid = no
			is_wilderness_empire = no
		}
	}

	culling_conversion_value = 2

	ai_weight = {
		weight = 5
		modifier = {
			factor = 0.1
			country_uses_consumer_goods = no
		}
	}

	ai_wants = {
		base = 500
		modifier = {
			factor = 0.1
			country_uses_consumer_goods = no
		}
	}

	tradable_in_market = {
		NOT = {
			AND = {
				exists = this
				has_valid_civic = civic_machine_obsessional_directive
			}
		}
	}
}

alloys = {
	tradable = yes
	category = advanced
	market_amount = 25
	market_price = 100
	max = 15000
	dynamic_capacity = {
		base = 0
		modifier = {
			country_uses_bio_ships = yes
			subtract = 2500
		}
	}

	deficit_situation = situation_alloys_deficit
	deficit_trade_conversion_mult = -0.50

	culling_conversion_value = 4

	ai_weight = {
		weight = 5
	}

	ai_wants = {
		base = 500
	}
}

###########################
### Strategic Resources ###
###########################

volatile_motes = {
	tradable = yes
	category = strategic
	market_amount = 10
	market_price = 100
	max = 15000

	prerequisites = { "tech_mine_volatile_motes" }

	deficit_situation = situation_volatile_motes_deficit
	deficit_trade_conversion_mult = -1.25

	culling_conversion_value = 7

	ai_weight = {
		weight = 10
	}

	ai_wants = {
		base = 10
	}
}

exotic_gases = {
	tradable = yes
	category = strategic
	market_amount = 10
	market_price = 100
	max = 15000

	prerequisites = { "tech_mine_exotic_gases" }

	deficit_situation = situation_exotic_gases_deficit
	deficit_trade_conversion_mult = -1.25

	culling_conversion_value = 7

	ai_weight = {
		weight = 10
	}

	ai_wants = {
		base = 10
	}
}

rare_crystals = {
	tradable = yes
	category = strategic
	market_amount = 10
	market_price = 100
	max = 15000

	prerequisites = { "tech_mine_rare_crystals" }

	deficit_situation = situation_rare_crystals_deficit
	deficit_trade_conversion_mult = -1.25

	culling_conversion_value = 7

	ai_weight = {
		weight = 10
	}

	ai_wants = {
		base = 10
	}
}


#######################
###	Rare Resources	###
#######################

# Living Metal
sr_living_metal = {
	tradable = yes
	category = rare
	market_amount = 5
	market_price = 100
	max = 15000

	prerequisites = { "tech_mine_living_metal" }
	visibility_prerequisite = { always = yes }
	deficit_modifier = sr_living_metal_deficit
	deficit_trade_conversion_mult = -2.5

	culling_conversion_value = 20

	ai_weight = {
		weight = 100
	}

	ai_wants = {
		base = 5
	}
}

# Zro
sr_zro = {
	tradable = yes
	category = rare
	market_amount = 5
	market_price = 100
	max = 15000

	prerequisites = { "tech_mine_zro" }
	visibility_prerequisite = { always = yes }
	deficit_modifier = sr_zro_deficit
	deficit_trade_conversion_mult = -2.5

	culling_conversion_value = 20

	ai_weight = {
		weight = 100
	}

	ai_wants = {
		base = 5
	}
}

# Dark Matter
sr_dark_matter = {
	tradable = yes
	category = rare
	market_amount = 5
	market_price = 100
	max = 15000

	prerequisites = { "tech_mine_dark_matter" }
	visibility_prerequisite = { always = yes }

	ai_weight = {
		weight = 100
	}
	deficit_modifier = dark_matter_deficit #found in static modifiers
	deficit_trade_conversion_mult = -2.5

	culling_conversion_value = 20

	ai_wants = {
		base = 5
	}
}

# Nanites
nanites = {
	tradable = no
	category = rare

	visibility_prerequisite = { always = yes }
	deficit_modifier = nanites_deficit #found in static modifiers
	deficit_trade_conversion_mult = -2.5

	culling_conversion_value = 20

	ai_weight = {
		weight = 100
	}
}

#############################
### Exceptional Materials ###
#############################

# Minor Artifacts
minor_artifacts = {
	tradable = no
	category = rare
	max = 2000
	special_max_amount = yes

	visibility_prerequisite = { has_ancrel = yes }

	deficit_trade_conversion_mult = -0.50

	culling_conversion_value = 10

	ai_weight = {
		weight = 100
	}

	ai_wants = {
		base = 5
	}
}

# Astral Thread
astral_threads = {
	tradable = no
	category = rare
	max = 500
	special_max_amount = yes

	deficit_trade_conversion_mult = -0.50

	dynamic_capacity = {
		base = @astral_threads_capacity_from_each_explored_rift
		complex_trigger_modifier = {
			trigger = astral_rifts_completed
			mode = mult
		}
	}

	prerequisites = { "tech_astral_harvesting" }
	visibility_prerequisite = { has_astral_planes_dlc = yes }

	culling_conversion_value = 5

	ai_weight = {
		weight = 100
	}

	ai_wants = {
		base = 5
	}
}

biomass = {
	tradable = no
	category = advanced
	hide_gain = yes

	visibility_prerequisite = {
		has_biogenesis_dlc = yes
		OR = {
			is_scope_valid = no
			is_wilderness_empire = yes
		}
	}
}

################
###	Crisis Resources ###
################

menace = {
	tradable = no
	category = other

	ai_weight = {
		weight = 1
	}
}

advanced_logic = {
	tradable = no
	category = other

	ai_weight = {
		weight = 1
	}
}

feral_insight = {
	tradable = no
	category = other

	ai_weight = {
		weight = 1
	}
}

entropy_crystals = {
	tradable = no
	category = other
	deficit_modifier = entropy_crystals_deficit

	visibility_prerequisite = {
		has_infernals = yes
		OR = {
			is_scope_valid = no
			has_ascension_perk = ap_galactic_hyperthermia
		}
	}

	ai_weight = {
		weight = 1
	}
}
