# ============================================================================
# DUNE LEGACY - UNIT & STRUCTURE DATA CONFIGURATION
# ============================================================================
#
# This file allows you to customize unit and structure properties without
# recompiling the game. This file is located in the config subdirectory of your
# game installation:
#
#   Windows: <game_install_dir>\config\ObjectData.ini
#   Linux:   <game_install_dir>/config/ObjectData.ini
#   macOS:   Dune Legacy.app/Contents/Resources/config/ObjectData.ini
#
# For more information, visit:
# https://dunelegacy.sourceforge.net/website/development/modding.html
#
# ============================================================================
# PROPERTY REFERENCE
# ============================================================================
#
# The following properties are available for structures, units, or both:
#
# Enabled          - Is this unit/structure available (starting units/structures, 
#                    construction yard, factory, starport, reinforcement)?
# HitPoints        - What is the maximum health of this structure/unit?
# Price            - How much does this structure/unit cost?
# Power            - How much power does this structure require? 
#                    Wind traps have negative values because they produce power.
# ViewRange        - How much terrain is revealed when this structure is placed
#                    or this unit is moved?
# Capacity         - How much spice can this structure contain?
# WeaponDamage     - How much damage does the weapon of this unit/turret have?
# WeaponRange      - How far can this unit/turret shoot?
# WeaponReloadTime - How many frames does it take to reload the weapon?
# MaxSpeed         - How fast can this unit move?
# TurnSpeed        - How fast can this unit/turret turn around?
# BuildTime        - How much time does the production of this structure/unit take?
# InfSpawnProp     - What is the probability (in percent) that an infantry soldier
#                    is spawned on destruction?
# Builder          - In what structure can this structure/unit be built? One of:
#                    Invalid, Construction Yard, Barracks, WOR, Light Factory,
#                    Heavy Factory, Hightech Factory
# TechLevel        - What is the minimum required tech level (=mission) for this
#                    structure/unit to be available?
# UpgradeLevel     - What upgrade level (0,1,2,...) must the builder be in to make
#                    this structure/unit available?
# Prerequisite     - What other structures have to exist for this structure/unit
#                    to be available?
#
# NOTE: It depends on the unit/structure if a value is ignored. 
#       For example, an unarmed unit will ignore WeaponRange.
#
# ============================================================================
# HOUSE-SPECIFIC OVERRIDES
# ============================================================================
#
# You can set different values per house by adding a house suffix to any property:
#
# Example:
#   Price = 300          # Default price for all houses
#   Price(A) = 250       # Atreides-specific price
#   Price(H) = 350       # Harkonnen-specific price
#
# House codes:
#   A = Atreides
#   H = Harkonnen
#   O = Ordos
#   F = Fremen
#   S = Sardaukar
#   M = Mercenary
#
# When determining a property value for unit "Tank" of house "Atreides", 
# the game checks in this order:
#   1. Tank/Price(A)     (house-specific for this unit)
#   2. Tank/Price        (default for this unit)
#   3. default unit/Price (fallback default)
#
# ============================================================================
# MULTIPLAYER COMPATIBILITY
# ============================================================================
#
# IMPORTANT: For multiplayer games, every player must have identical 
# ObjectData.ini values. Otherwise the game will desynchronize.
#
# ============================================================================
# DEFAULT VALUES
# ============================================================================
#
# The [default structure] and [default unit] sections provide fallback values
# for any properties not specified in individual unit/structure sections.

# ============================================================================
# MAP SETTINGS
# ============================================================================
#
# These settings control global game behavior based on map size.

[Map Settings]
# Maximum harvesters per house based on map size (when override is not set)
# These are used when "Override max. harvesters" is unchecked in game options
HarvesterLimitSmallMap = 5      # Maps 32x32 or smaller (1024 tiles)
HarvesterLimitMediumMap = 10    # Maps 64x64 or smaller (4096 tiles)
HarvesterLimitLargeMap = 15     # Maps between 64x64 and 128x128 (4096-16384 tiles)
HarvesterLimitHugeMap = 40      # Maps 128x128 or larger (16384+ tiles)

# Maximum units per house based on map size (when override is not set)
# These are used when "Override max. number of units" is unchecked in game options
UnitLimitSmallMap = 25          # Maps 32x32 or smaller (1024 tiles)
UnitLimitMediumMap = 100        # Maps 64x64 or smaller (4096 tiles)
UnitLimitLargeMap = 250         # Maps between 64x64 and 128x128 (4096-16384 tiles)
UnitLimitHugeMap = 300          # Maps 128x128 or larger (16384+ tiles)

### default structure ###

[default structure]
Enabled = false
HitPoints = 0
Price = 0
Power = 0
ViewRange = 0
Capacity = 0
WeaponDamage = 0
WeaponRange = 0
WeaponReloadTime = 0
MaxSpeed = 0
TurnSpeed = 0
BuildTime = 80
InfSpawnProp = 0
Builder = Invalid
TechLevel = -1
UpgradeLevel = 0

### Structures ###

[Barracks]
Enabled = true
HitPoints = 300
Price = 300
Power = 10
ViewRange = 2
BuildTime = 72
InfSpawnProp = 50
Builder = Construction Yard
Builder(H) = Invalid
TechLevel = 2
Prerequisite = Windtrap, Radar

[Construction Yard]
Enabled = true
HitPoints = 400
Price = 400
Power = 0
ViewRange = 3
BuildTime = 80
InfSpawnProp = 25

[Gun-Turret]
Enabled = true
HitPoints = 200
Price = 125
Power = 10
ViewRange = 2
WeaponDamage = 20
WeaponRange = 5
WeaponReloadTime = 240
TurnSpeed = 0.01
BuildTime = 64
InfSpawnProp = 25
Builder = Construction Yard
TechLevel = 5
Prerequisite = Windtrap, Radar

[Heavy Factory]
Enabled = true
HitPoints = 200
Price = 600
Power = 35
ViewRange = 3
BuildTime = 144
InfSpawnProp = 25
Builder = Construction Yard
TechLevel = 4
Prerequisite = Windtrap, Radar, Light Factory

[Hightech Factory]
Enabled = true
HitPoints = 400
Price = 500
Power = 35
ViewRange = 3
BuildTime = 120
InfSpawnProp = 25
Builder = Construction Yard
TechLevel = 5
Prerequisite = Windtrap, Radar, Light Factory

[House IX]
Enabled = true
HitPoints = 400
Price = 500
Power = 40
ViewRange = 3
BuildTime = 80
BuildTime = 120
InfSpawnProp = 75
Builder = Construction Yard
TechLevel = 7
Prerequisite = Windtrap, Refinery, Starport

[Light Factory]
Enabled = true
HitPoints = 350
Price = 400
Power = 20
ViewRange = 3
BuildTime = 96
InfSpawnProp = 25
Builder = Construction Yard
TechLevel = 2
TechLevel(H) = 3
TechLevel(S) = 3
Prerequisite = Windtrap, Refinery

[Palace]
Enabled = true
HitPoints = 1000
Price = 999
Power = 80
ViewRange = 5
BuildTime = 130
InfSpawnProp = 50
Builder = Construction Yard
TechLevel = 8
Prerequisite = Starport

[Radar]
Enabled = true
HitPoints = 500
Price = 400
Power = 30
ViewRange = 10
BuildTime = 80
InfSpawnProp = 50
Builder = Construction Yard
TechLevel = 2
Prerequisite = Windtrap

[Refinery]
Enabled = true
HitPoints = 450
Price = 400
Power = 30
ViewRange = 4
Capacity = 1005
BuildTime = 80
InfSpawnProp = 50
Builder = Construction Yard
TechLevel = 1
Prerequisite = Windtrap

[Repair Yard]
Enabled = true
HitPoints = 200
Price = 700
Power = 20
ViewRange = 3
BuildTime = 80
InfSpawnProp = 50
Builder = Construction Yard
TechLevel = 5
Prerequisite = Windtrap, Radar, Light Factory

[Rocket-Turret]
Enabled = true
HitPoints = 200 
Price = 250
Power = 25
ViewRange = 5
WeaponDamage = 30
WeaponRange = 8
WeaponReloadTime = 360
TurnSpeed = 0.05 #0.01
BuildTime = 96
InfSpawnProp = 25
Builder = Construction Yard
TechLevel = 6
Prerequisite = Windtrap, Radar
UpgradeLevel = 2

[Spice Silo]
Enabled = true
HitPoints = 150
Price = 150
Power = 5
ViewRange = 2
Capacity = 1000
BuildTime = 48
InfSpawnProp = 0
Builder = Construction Yard
TechLevel = 2
Prerequisite = Windtrap, Refinery

[Slab1]
Enabled = true
Price = 5
ViewRange = 1
BuildTime = 16
Builder = Construction Yard
TechLevel = 1

[Slab4]
Enabled = true
Price = 20
ViewRange = 1
BuildTime = 16
Builder = Construction Yard
TechLevel = 4
UpgradeLevel = 1

[Starport]
Enabled = true
HitPoints = 500
Price = 500
Power = 50
ViewRange = 6
BuildTime = 120
InfSpawnProp = 50
Builder = Construction Yard
TechLevel = 6
Prerequisite = Windtrap, Refinery

[Wall]
Enabled = true
HitPoints = 50
Price = 50
Power = 0
ViewRange = 1
BuildTime = 40
InfSpawnProp = 0
Builder = Construction Yard
TechLevel = 4
Prerequisite = Windtrap, Radar

[Windtrap]
Enabled = true
HitPoints = 200
Price = 300
Power = -100		# power supply
ViewRange = 2
BuildTime = 48
InfSpawnProp = 25
Builder = Construction Yard
TechLevel = 1

[WOR]
Enabled = true
HitPoints = 400
Price = 400
Power = 20
ViewRange = 3
BuildTime = 104
InfSpawnProp = 50
Builder = Construction Yard
Builder(A) = Invalid
TechLevel = 5
TechLevel(H) = 2
Prerequisite = Windtrap, Radar, Barracks
Prerequisite(H) = Windtrap, Radar

### default unit ###

[default unit]
Enabled = false
HitPoints = 0
Price = 0
Power = 0
ViewRange = 0
Capacity = 0
WeaponDamage = 0
WeaponRange = 0
WeaponReloadTime = 0
MaxSpeed = 2.0
TurnSpeed = 0.0625
BuildTime = 80
InfSpawnProp = 0
Builder = Invalid
TechLevel = 1
UpgradeLevel = 0

### Units ###

[Carryall]
Enabled = true
HitPoints = 100
Price = 800
ViewRange = 5
MaxSpeed = 19.2  # Dynasty 240 px/s × 5.0 = 1,200 px/s ÷ 62.5Hz = 19.2
TurnSpeed = 0.099  # Dynasty 168.75°/s × 2.1 = 354.4°/s ÷ 62.5Hz = 5.67°/tick = 0.099 rad
BuildTime = 64
InfSpawnProp = 0
Builder = Hightech Factory

[Devastator]
Enabled = true
HitPoints = 400
Price = 800
ViewRange = 4
WeaponDamage = 40
WeaponRange = 5
WeaponReloadTime = 300
MaxSpeed = 1.28
BuildTime = 104
InfSpawnProp = 25
Builder = Heavy Factory
Builder(A) = Invalid
Builder(O) = Invalid
Prerequisite = House IX

[Deviator]
Enabled = true
HitPoints = 120
Price = 750
ViewRange = 5
WeaponDamage = 0
WeaponRange = 7
WeaponReloadTime = 540
MaxSpeed = 3.8400
BuildTime = 80
InfSpawnProp = 25
Builder(O) = Heavy Factory
TechLevel = 1
Prerequisite = House IX

[Frigate]
Enabled = true
HitPoints = 10000
Price = 0
ViewRange = 5
MaxSpeed = 12.8  # Dynasty 160 px/s × 5.0 = 800 px/s ÷ 62.5Hz = 12.8
TurnSpeed = 0.099  # Dynasty 168.75°/s × 2.1 = 354.4°/s ÷ 62.5Hz = 5.67°/tick = 0.099 rad
InfSpawnProp = 0

[Harvester]
Enabled = true
HitPoints = 150
Price = 300
ViewRange = 2
MaxSpeed = 2.5600
BuildTime = 64
InfSpawnProp = 50
Builder = Heavy Factory

[Launcher]
Enabled = true
HitPoints = 100
Price = 450
ViewRange = 5
WeaponDamage = 75
WeaponRange = 9
WeaponReloadTime = 360
MaxSpeed = 3.8400
BuildTime = 72
InfSpawnProp = 25
Builder = Heavy Factory
Builder(O) = Invalid
TechLevel = 5
UpgradeLevel = 2

[MCV]
Enabled = true
HitPoints = 150
Price = 900
ViewRange = 2
MaxSpeed = 2.56
BuildTime = 80
InfSpawnProp = 25
Builder = Heavy Factory
TechLevel = 4
UpgradeLevel = 1

[Ornithopter]
Enabled = true
HitPoints = 25
Price = 600
ViewRange = 5
WeaponDamage = 45#50
WeaponRange = 5
WeaponReloadTime = 150
MaxSpeed = 14.4  # Dynasty 180 px/s × 5.0 = 900 px/s ÷ 62.5Hz = 14.4
TurnSpeed = 0.0707  # Dynasty 168.75°/s × 1.5 = 253.1°/s ÷ 62.5Hz = 4.05°/tick = 0.0707 rad
BuildTime = 96
InfSpawnProp = 0
Builder = Hightech Factory
Builder(H) = Invalid
TechLevel = 7
Prerequisite = House IX
UpgradeLevel = 1

[Quad]
Enabled = true
HitPoints = 130
Price = 200
ViewRange = 2
WeaponDamage = 7
WeaponRange = 3
WeaponReloadTime = 150
MaxSpeed = 5.12
BuildTime = 48
InfSpawnProp = 25
Builder = Light Factory
TechLevel = 3
TechLevel(H) = 1
UpgradeLevel = 1
UpgradeLevel(H) = 0

[Raider Trike]
Enabled = true
HitPoints = 80
Price = 150
ViewRange = 2
WeaponDamage = 5
WeaponRange = 3
WeaponReloadTime = 150
MaxSpeed = 9.25
BuildTime = 40
InfSpawnProp = 25
Builder = Light Factory
Builder(A) = Invalid
Builder(H) = Invalid

[Saboteur]
Enabled = true
HitPoints = 10
Price = 0
ViewRange = 1
WeaponRange = 0
MaxSpeed = 5.1200
BuildTime = 48
InfSpawnProp = 0

[Sandworm]
Enabled = true
HitPoints = 1000
Price = 0
ViewRange = 2
WeaponDamage = 300
WeaponRange = 0
WeaponReloadTime = 60
MaxSpeed = 4.4800
TurnSpeed = 0.625
InfSpawnProp = 0

[Siege Tank]
Enabled = true
HitPoints = 300
Price = 600
ViewRange = 4
WeaponDamage = 30
WeaponRange = 5
WeaponReloadTime = 270
MaxSpeed = 2.5600
BuildTime = 96
InfSpawnProp = 25
Builder = Heavy Factory
TechLevel = 6
TechLevel(O) = 7
UpgradeLevel = 3
UpgradeLevel(O) = 2

[Soldier]
Enabled = true
HitPoints = 20
Price = 60
ViewRange = 1
WeaponDamage = 3
WeaponRange = 2
WeaponReloadTime = 135
MaxSpeed = 1.0240
BuildTime = 32
InfSpawnProp = 0
Builder = Barracks

[Sonic Tank]
Enabled = true
HitPoints = 110
Price = 600
ViewRange = 4
WeaponDamage = 60
WeaponRange = 8
WeaponReloadTime = 240
MaxSpeed = 3.8400
BuildTime = 104
InfSpawnProp = 25
Builder = Heavy Factory
Builder(O) = Invalid
Builder(H) = Invalid
Prerequisite = House IX

[Tank]
Enabled = true
HitPoints = 200
Price = 300
ViewRange = 3
WeaponDamage = 25
WeaponRange = 4
WeaponReloadTime = 240
MaxSpeed = 4.0
BuildTime = 64
InfSpawnProp = 25
Builder = Heavy Factory

[Trike]
Enabled = true
HitPoints = 100
Price = 150
ViewRange = 2
WeaponDamage = 5
WeaponRange = 3
WeaponReloadTime = 150
MaxSpeed = 6.4425
BuildTime = 40
InfSpawnProp = 25
Builder = Light Factory
Builder(O) = Invalid
Builder(H) = Invalid

[Trooper]
Enabled = true
HitPoints = 45
Price = 100
ViewRange = 1
WeaponDamage = 5
WeaponRange = 5
WeaponReloadTime = 150
MaxSpeed = 1.9200
BuildTime = 56
InfSpawnProp = 0
Builder = WOR
