#Railways Untold Configuration
[track_clearing]
	#Number of blocks to clear horizontally on each side of the track.
	# Default: 3
	# Range: 1 ~ 16
	horizontalExpansion = 3
	#
	#Number of blocks to clear vertically above the track.
	# Default: 6
	# Range: 2 ~ 32
	verticalExpansion = 6

#World Generation Settings
#Controls which world types allow track generation
[world_generation]
	#Comma-separated list of chunk generator types where track generation is allowed.
	#Uses the registry name of the chunk generator (e.g. 'minecraft:noise', 'minecraft:flat').
	#Modded generators can be added by their full ID (e.g. 'bigglobe:scripted').
	#Set to an empty string to disable generation in all world types.
	generateInWorldTypes = "minecraft:noise,minecraft:flat"

#Feature Toggles
[features]
	#Whether to place a starting train at world generation.
	#If false, only the track network will be generated.
	startingTrain = true
	#
	#Whether track branches (junctions) are enabled.
	#If false, tracks will only generate as a single continuous line.
	branchesEnabled = true
	#
	#Whether branches can create additional branches (recursive branching).
	#If false, only the main track lines can create branches.
	#Has no effect if branchesEnabled is false.
	recursiveBranchingEnabled = true
	#
	#Maximum depth for recursive branching.
	#1 = one level of branches, 2 = branches can branch once, 3 = two levels of recursive branches, etc.
	#Setting to 0 means unlimited branch depth which could affect performance.
	#Only applies when recursiveBranchingEnabled is true.
	# Default: 3
	# Range: 0 ~ 10
	maxBranchDepth = 3
	#
	#Maximum number of simultaneously active track heads (including main tracks and all branches).
	#Limits how many track lines can be generating at once.
	#Setting to 0 means unlimited heads which could affect performance.
	# Default: 15
	# Range: 0 ~ 100
	maxActiveHeads = 15
	#
	#Minimum distance in blocks between consecutive branches from the same track head.
	#After spawning a branch, the parent head must travel this distance before branching again.
	# Default: 150
	# Range: 50 ~ 1000
	minBranchSpacing = 150
	#
	#Percent chance (0-100) that a newly spawned branch loops back and reconnects
	#into the existing network (its parent trunk, or the nearest other line it meets)
	#instead of running off as a dead-end.
	#At 100 every branch reconnects, turning the tree of tracks into a looping web.
	#Has no effect if branchesEnabled is false.
	# Default: 100
	# Range: 0 ~ 100
	branchReconnectChance = 100
	#
	#Whether tracks should seek out and path toward structures for station placement.
	#Which structures are targeted is configured via biome settings data packs (structure_target_tags).
	#When disabled, tracks will not target any structures regardless of data pack settings.
	structureTargeting = true
	#
	#Whether tracks should avoid obstacles by turning.
	#When enabled, tracks will curve around structures, terrain obstacles, and other hazards.
	#When disabled, tracks will go straight through all terrain (tunneling through mountains,
	#descending into ravines) without ever turning.
	allAvoidance = true
	#
	#Enable side-by-side dual track mode.
	#Two parallel tracks with opposite travel directions.
	#Separation = horizontalExpansion * 2 (minimum 5 blocks).
	sideBySideTracks = false
	#
	#Whether a head running parallel and adjacent to another line should merge into it.
	#When enabled, a head that meets another track running its way merges in (curving across
	#when touching, or steering over from up to ~70 blocks away) instead of running side by side.
	#When disabled, parallel lines are left as separate side-by-side tracks.
	parallelMergeEnabled = true
	#
	#Enable rail sidings (passing loops).
	#When enabled, long straight sections of track will occasionally
	#generate a parallel siding that diverges and reconnects.
	sidingsEnabled = true
	#
	#Minimum number of consecutive straight segments before a siding can be placed.
	#Each segment is approximately 16 blocks long.
	# Default: 6
	# Range: 3 ~ 100
	sidingMinStraightSegments = 6
	#
	#Track width/gauge.
	#Values: standard, wide, narrow.
	#Non-standard values require Steam 'n' Rails.
	#Note: phantom tracks only support standard gauge.
	gauge = "standard"
	#
	#How far (blocks) a track head searches for a village/structure to build a station at.
	#This is the main lever for STATION FREQUENCY: larger = heads detour to reach more
	#structures, so stations appear more often (but lines wander more and generation is slower).
	#Also bounded by world structure density and the datapack structure_target_tags.
	# Default: 1000
	# Range: 100 ~ 8000
	villageSearchRadius = 1000
	#
	#Percent chance (0-100) that a head locks onto a found village/structure as a station
	#target. Lower it to make some structures skipped (sparser stations); keep 100 for maximum.
	# Default: 100
	# Range: 0 ~ 100
	villageTargetingChance = 100
	#
	#Minimum distance (blocks) from world spawn before villages become station targets.
	# Default: 100
	# Range: 0 ~ 2000
	villageMinDistanceFromSpawn = 100
	#
	#Whether two lines that meet roughly perpendicular may form a level (at-grade)
	#crossing - a Create diamond crossing where the tracks cross flat - instead of always
	#bridging over, tunnelling under, or merging into one another.
	#Note: without signals, trains can collide at a level crossing.
	atGradeCrossingsEnabled = true
	#
	#When at-grade crossings are enabled, percent chance (0-100) that a head blocked by a
	#crossing line crosses it at grade (and continues) rather than merging into it as a
	#T-junction (which ends the head). Only applies to genuine perpendicular/diagonal crossings.
	# Default: 30
	# Range: 0 ~ 100
	atGradeCrossingChance = 30

#Bridge Settings
#Controls bridge decking placement (pier spacing comes from the railing pattern NBT)
[pillars]
	#
	#Minimum height above ground to use bridge decking.
	#When the track is this many blocks above ground, bridge decking and
	#pillar schematics are placed instead of terrain fill.
	#Set to 0 to only use bridge decking over water.
	# Default: 4
	# Range: 0 ~ 32
	bridgeElevationThreshold = 4

#Terrain Detection
#Controls how the track generator detects and responds to terrain features
[terrain]
	#
	#Allow curves to change elevation while turning (banking curves).
	#When false, curves are always flat and elevation changes happen on straight segments.
	#When true, curves can slope up/down while turning, creating a roller coaster effect.
	bankingCurves = false
	#
	#Whether tracks can make gentle lateral shifts (slight sideways beziers).
	#When disabled, tracks stay on the cardinal axis and use SCurve45 diagonals
	#or L-shaped curves to correct accumulated drift.
	laterals = false
	#
	#Lateral drift correction threshold (in blocks).
	#When the track drifts this far off the cardinal axis, an SCurve45 diagonal
	#or curve correction is inserted to realign with the planned route.
	# Default: 5
	# Range: 2 ~ 20
	lateralOffset = 5
	#
	#Rise component of the maximum slope ratio (rise:run).
	#Combined with slopeRun to determine max track steepness.
	#Example: rise=1, run=2 means max slope of 1/2 (0.5).
	# Default: 1
	# Range: 1 ~ 5
	slopeRise = 1
	#
	#Run component of the maximum slope ratio (rise:run).
	#Combined with slopeRise to determine max track steepness.
	#Example: rise=1, run=2 means max slope of 1/2 (0.5).
	# Default: 4
	# Range: 1 ~ 20
	slopeRun = 4
	#
	#Minimum curve radius in blocks.
	#Smaller values allow tighter turns but may cause train navigation issues.
	# Default: 15
	# Range: 10 ~ 50
	minCurveRadius = 15
	#
	#Maximum curve radius in blocks.
	#Larger values create wider, smoother turns.
	# Default: 25
	# Range: 10 ~ 100
	maxCurveRadius = 25
	#
	#Minimum height above water level for bridge tracks over oceans and rivers.
	#Set to 0 to disable water bridging.
	# Default: 5
	# Range: 0 ~ 20
	bridgeWaterDistance = 5

#Tunnel Settings
#Controls tunnel decoration like torch placement
[tunnels]
	#Distance in blocks between light placements in tunnels.
	#Lights are placed on both walls at this interval.
	#Lighting block type is configured via biome settings data packs.
	# Default: 14
	# Range: 2 ~ 64
	lightSpacing = 14

#Debug Settings
[debug]
	#Enable verbose debug logging for track placement and chunk loading.
	#Warning: produces a lot of log output. Only enable when troubleshooting.
	verboseLogging = true

#Station and Train Settings
[station_train]
	#Whether to place a station at the starting track area with the starting train.
	#Has no effect if startingTrain is disabled.
	stationAtStart = true

#Event Settings
[events]
	#Enable placing custom event schematics along tracks.
	#Requires valid .nbt files in config/railways-untold/events/
	customEvents = false
	#
	#Minimum distance in blocks between events.
	#After placing an event, the track must travel this far before another can appear.
	# Default: 500
	# Range: 100 ~ 5000
	eventSeparationMinDistance = 500
	#
	#Chance (percent) of placing an event once minimum distance is met.
	#Checked each track segment after the minimum distance requirement.
	# Default: 15
	# Range: 1 ~ 100
	eventChance = 15
