^BaseWorld:
	Faction@Atreides:
		Name: Atreides
		InternalName: atreides
		Description: House Atreides\nThe noble Atreides, from the water world of Caladan,\nrely on their ornithopters to ensure air superiority.\nThey have allied themselves with the Fremen, the fearsome\nnative warriors of Dune that can move undetected in battle.\n\nFaction Variations:\n    - Combat tanks are balanced in terms of speed and durability\n\nSpecial Units:\n    - Grenadier\n    - Fremen\n    - Sonic Tank\n\nSuperweapon:\n    - Airstrike
	Faction@Harkonnen:
		Name: Harkonnen
		InternalName: harkonnen
		Description: House Harkonnen\nThe evil Harkonnen will stop at nothing to gain control of the spice.\nThey rely on brute force and atomic weapons to achieve their goals:\nwealth, and the destruction of House Atreides.\n\nFaction Variations:\n    - Combat Tanks are more durable but slower \n\nSpecial Units:\n    - Sardaukar\n    - Devastator\n\nSuperweapon: \n    - Death Hand Missile
	Faction@Ordos:
		Name: Ordos
		InternalName: ordos
	Faction@Random:
		Name: Any
		InternalName: Random
		RandomFactionMembers: atreides, harkonnen, ordos
		Description: Random House\nA random house will be chosen when the game starts.
	Faction@Corrino:
		Name: Corrino
		InternalName: corrino
		Selectable: true
		Description: Corrino house
	Faction@Mercenaries:
		Name: Mercenaries
		InternalName: mercenary
		Selectable: true
		Description: mercenaries troops
	Faction@Smugglers:
		Name: Smugglers
		InternalName: smuggler
		Selectable: true
	Faction@Fremen:
		Name: Fremen
		InternalName: fremen
		Selectable: true
World:
	LuaScript:
		Scripts: scripts.lua
	MissionData:
		Briefing: \n\n**** Enhanced D2k ver 0.8 ****\n\nFor more competitive and fun MP games\n\nFaction options:\n- Main FACTION: Standard D2k with Enhanced rules\n- SUBFACTIONS enabled: Play as Main faction or one of its sub-factions\n- SUBFACTION Merged: Chosen Subfaction will be merged into to your tech tree n\nSUBFACTION WILL BE CHOSEN WHEN GAME STARTS!!!\nHighlights:\n* new Map Options:  FreeCarryall, Worm Spawn, Factions mode\n*  Refinery rotation with hotkey: u must add "ToggleVariant: 'your_hotkey'" to hotkey.yaml in d2k folder. Hotkey must be unique!\n* Engineer can repair passages/buildings and capture husks\n* Better AI: Bots have better eco management, use smart targeting, expand, protect they Conyards against engineer.\nAdditional Assets by SirCake, Fey, N.N.>\n\nGAME TIPS:\n- trike and quad have extended vision.\n- Before Conyard_Upgrade, Buildings are more vulnerable to low tech weapons.\n- Siege/Missile tanks have larger Range than vision. Use trikes to expand visibility.\n- Saboteur have selfKill ability similar to Devastator\n- Deviator gas still leaks from Deviator husks and can capture near by units. Destroy husk to stop leaks.\n- Units has updated Tool Bar Tips according this balance mod.\nFULL CHANGELOG AT MAP FILE.
	MapOptions:
		TechLevelDropdownVisible: false
		TechLevel: unrestricted
		ShortGameCheckboxVisible: true
		GameSpeed: fast
	MapCreeps:
		CheckboxEnabled: true
		CheckboxLocked: true
		CheckboxVisible: false
	ScriptLobbyDropdown@WormsSpawnDelay:
		ID: WormsSpawnDelay
		Label: Spawn Worms
		Description: Spawn worms options
		Default: 10
		Values:
			5: After 5 min
			10: After 10 min
			15: After 15 min
			0: Never
		Locked: false
		Visible: true 
		DisplayOrder: 30
	ScriptLobbyDropdown@factionoptions:
		ID: fation_mode
		Label: Factions mode
		Description: Main FACTION: Standard D2k with Enhanced rules \n- SUBFACTIONS enabled: Play as Main faction or one of its sub-factions \n Subfaction Merged: Subfaction tech tree will merged into your tech tree.
		Default: 0
		Values:
			0: Main factions only
			1: Subfactions enabled
			2: Subfaction Merged
		Visible: true
		DisplayOrder: 40
	Locomotor@TANK_harkonnen:
		Name: tank_harkonnen
		Crushes: crate, infantry, spicebloom
		TerrainSpeeds:
			Sand: 100
			Rock: 100
			Transition: 100
			Concrete: 100
			SpiceSand: 100
			Spice: 100
			SpiceBlobs: 100
			Dune: 85
	Locomotor@TANK:
		Name: tank
		Crushes: crate, infantry, spicebloom
		TerrainSpeeds:
			Sand: 100
			Rock: 100
			Transition: 100
			Concrete: 100
			SpiceSand: 100
			Spice: 100
			SpiceBlobs: 100
			Dune: 60
	Locomotor@LIGHTVEHICLE:
		Name: light_vehicle
		Crushes: crate, spicebloom
		TerrainSpeeds:
			Sand: 100
			Rock: 100
			Transition: 100
			Concrete: 100
			SpiceSand: 100
			Spice: 100
			SpiceBlobs: 100
			Dune: 70
	Locomotor@WORMMP:
		Name: worm_mp
		Crushes: crate, worm_dinner, spicebloom, vehicle
		TerrainSpeeds:
			Sand: 100
			Dune: 100
			SpiceSand: 100
			Spice: 100
	SmudgeLayer@RockSmoke: # custom smudges didnt work on current OpenRA release
		Type: RockCrater_with_smoke
		Sequence: rockcraters
		SmokeChance: 100
		SmokeImage: smoke_m
		SmokeSequences: smokeFromRA01loop
	SmudgeLayer@SandSmoke:  # custom smudges didnt work on current OpenRA release
		Type: SandCrater_with_smoke
		Sequence: sandcraters
		SmokeChance: 100
		SmokeImage: smoke_m
		SmokeSequences: smokeFromRA01loop
	MPStartUnits@mcv:
		Class: none
		ClassName: MCV Only
		BaseActor: choosefaction
		Factions: atreides, ordos, harkonnen, corrino, mercenary, smuggler, fremen
	MPStartUnits@lightatreides:
		Class: light
		ClassName: Light Support
		Factions: atreides, fremen
		BaseActor: choosefaction
		SupportActors: light_inf, light_inf, light_inf, trooper, grenadier, trike, quad
		InnerSupportRadius: 3
		OuterSupportRadius: 5
	MPStartUnits@lightharkonnen:
		Class: light
		ClassName: Light Support
		Factions: harkonnen, corrino
		BaseActor: choosefaction
		SupportActors: light_inf, light_inf, light_inf, trooper, trooper, trike, quad
		InnerSupportRadius: 3
		OuterSupportRadius: 5
	MPStartUnits@lightordos:
		Class: light
		ClassName: Light Support
		Factions: ordos, mercenary, smuggler
		BaseActor: choosefaction
		SupportActors: light_inf, light_inf, light_inf, trooper, engineer, raider, quad
		InnerSupportRadius: 3
		OuterSupportRadius: 5
	MPStartUnits@heavyatreides:
		Class: heavy
		ClassName: Heavy Support
		Factions: atreides, fremen
		BaseActor: choosefaction
		SupportActors: light_inf, light_inf, light_inf, trooper, grenadier, trike, combat_tank_a, missile_tank
		InnerSupportRadius: 3
		OuterSupportRadius: 5
	MPStartUnits@heavyharkonnen:
		Class: heavy
		ClassName: Heavy Support
		Factions: harkonnen, corrino
		BaseActor: choosefaction
		SupportActors: light_inf, light_inf, light_inf, trooper, engineer, quad, combat_tank_h, siege_tank
		InnerSupportRadius: 3
		OuterSupportRadius: 5
	MPStartUnits@heavyordos:
		Class: heavy
		ClassName: Heavy Support
		Factions: ordos, mercenary, smuggler
		BaseActor: choosefaction
		SupportActors: light_inf, light_inf, light_inf, trooper, engineer, raider, combat_tank_o, missile_tank
		InnerSupportRadius: 3
		OuterSupportRadius: 5
	FlashPaletteEffect:
		Type: UsePlayerColor
		Color: E2DD8F4D
	TerrainLighting:


Player:
	DeveloperMode:
	Shroud:
		ExploredMapCheckboxEnabled: true
		FogCheckboxEnabled: true
		FogCheckboxLocked: true
	LobbyPrerequisiteCheckbox@AUTOCONCRETE:
		Enabled: True
	LobbyPrerequisiteCheckbox@FreeCarryCheckBox:
		ID: FreeCarryCheckBox
		Label: Free Carryall
		Description: Give 1 free Carryall to all Players
		Enabled: true
		Visible: true
		DisplayOrder: 7
		Prerequisites: FreeCarry
	ExternalCondition@vanilla_factions_Only:
		Condition: vanilla_factions_Only
	ExternalCondition@subfactions:
		Condition: subfactions
	ExternalCondition@merged:
		Condition: mergedsubfactions
	ProvidesPrerequisite@merged:
		Prerequisite: factions.merged
		RequiresCondition: mergedsubfactions
	ProvidesPrerequisite@subfactions:
		Prerequisite: factions.subfaction_allowed
		RequiresCondition: subfactions
	ProvidesPrerequisite@vanila_factions:
		Prerequisite: factions.standard
		RequiresCondition: vanilla_factions_Only
	ClassicProductionQueue@Infantry:
		BuildTimeSpeedReduction: 100, 80, 60, 50
	ClassicProductionQueue@Building:
		BuildTimeSpeedReduction: 100, 75, 50
	ClassicProductionQueue@Vehicle:
		BuildTimeSpeedReduction: 100, 75, 50
	ClassicProductionQueue@Armor:
		BuildTimeSpeedReduction: 100, 75, 50
	ClassicProductionQueue@Aircraft:
		BuildTimeSpeedReduction: 100, 75, 50
	PlaceBuilding:
		ToggleVariantKey: ToggleVariant
	VeteranProductionIconOverlay:
		Image: iconchevrons
		Sequence: veteran


wormspawner:
	ExternalCondition:
		Condition: WormSpamDelayed
	ActorSpawner:
		RequiresCondition: WormSpamDelayed

#
# subfaction selection
#

choosefaction:
	Inherits@1: ^ExistsInWorld
	Inherits@2: ^SpriteActor
	Building:
		Footprint: xxx xxx ===
		Dimensions: 3,3
		LocalCenterOffset: 0,-512,0
	Health:
		HP: 30000
	HitShape:
		Type: Rectangle
			TopLeft: -1536, -1024
			BottomRight: 1536, 1024
	Armor:
		Type: invulnerable
	RevealsShroud:
		Range: 5c768
	HiddenUnderFog:
	MustBeDestroyed:
		RequiredForShortGame: true
	WithSpriteBody:
	ProvidesPrerequisite@upgradename:
	Production:
		Produces: Upgrade
	ProvidesPrerequisite@bluesubfactions:
		Prerequisite: bluesubfactions
		Factions: atreides, fremen
	ProvidesPrerequisite@redsubfactions:
		Prerequisite: redsubfactions
		Factions: harkonnen, corrino
	ProvidesPrerequisite@greensubfactions:
		Prerequisite: greensubfactions
		Factions: ordos, smuggler, mercenary
	ProvidesPrerequisite@mergedsubfactions:
		Prerequisite: mergedsubfactions

subfaction.random_blue:
	Interactable:
	HiddenUnderFog:
		Type: CenterPosition
	ScriptTriggers:
	Tooltip:
		Name: Random
	Buildable:
		BuildPaletteOrder: 11
		Prerequisites: ~bluesubfactions, ~factions.subfaction_allowed
		Queue: Upgrade
		BuildLimit: 1
		BuildDuration: 1
		BuildDurationModifier: 100
		Description: Random selection
	Valued:
		Cost: 0
	RenderSprites:
		Image: subfaction.random
	GrantRandomCondition:
		Conditions: atreides, fremen
	ProvidesPrerequisite@Atreides:
		Prerequisite: subfaction.atreides
		RequiresCondition: atreides
	ProvidesPrerequisite@Fremen:
		Prerequisite: subfaction.fremen
		RequiresCondition: fremen

subfaction.atreides:
	Interactable:
	HiddenUnderFog:
		Type: CenterPosition
	ScriptTriggers:
	Tooltip:
		Name: Atreides
	Buildable:
		BuildPaletteOrder: 12
		Prerequisites: ~bluesubfactions, ~factions.subfaction_allowed
		Queue: Upgrade
		BuildLimit: 1
		BuildDuration: 1
		BuildDurationModifier: 100
		Description: Atreides \n special units: Grenadier, Sonic tank \n Support powers: AirStrike, Officer
	Valued:
		Cost: 0
	RenderSprites:
		Image: subfaction.atreides
	ProvidesPrerequisite@upgradename:

subfaction.fremen:
	Interactable:
	HiddenUnderFog:
		Type: CenterPosition
	ScriptTriggers:
	Tooltip:
		Name: Fremen
	Buildable:
		BuildPaletteOrder: 13
		Prerequisites: ~bluesubfactions, ~factions.subfaction_allowed
		Queue: Upgrade
		BuildLimit: 1
		BuildDuration: 1
		BuildDurationModifier: 100
		Description: Fremen \n Special units: Fremen Fedaykin, Hunt trike, Bison tank \n Support powers: Hide units, WormRider
	Valued:
		Cost: 0
	RenderSprites:
		Image: subfaction.fremen
	ProvidesPrerequisite@upgradename:

subfaction.random_red:
	Interactable:
	ScriptTriggers:
	HiddenUnderFog:
		Type: CenterPosition
	Tooltip:
		Name: Random
	Buildable:
		BuildPaletteOrder: 14
		Prerequisites: ~redsubfactions, ~factions.subfaction_allowed
		Queue: Upgrade
		BuildLimit: 1
		BuildDuration: 1
		BuildDurationModifier: 100
		Description: Random selection
	Valued:
		Cost: 0
	RenderSprites:
		Image: subfaction.random
	GrantRandomCondition:
		Conditions: harkonnen, corrino
	ProvidesPrerequisite@Harkonnen:
		Prerequisite: subfaction.harkonnen
		RequiresCondition: harkonnen
	ProvidesPrerequisite@Corrino:
		Prerequisite: subfaction.corrino
		RequiresCondition: corrino

subfaction.harkonnen:
	Interactable:
	ScriptTriggers:
	HiddenUnderFog:
		Type: CenterPosition
	Tooltip:
		Name: Harkonnen
	Buildable:
		BuildPaletteOrder: 15
		Prerequisites: ~redsubfactions, ~factions.subfaction_allowed
		Queue: Upgrade
		BuildLimit: 1
		BuildDuration: 1
		BuildDurationModifier: 100
		Description: Harkonnen \n Special units: Assassin, Devastator \n Support powers: Death hand
	Valued:
		Cost: 0
	RenderSprites:
		Image: subfaction.harkonnen
	ProvidesPrerequisite@upgradename:

subfaction.corrino:
	Interactable:
	ScriptTriggers:
	HiddenUnderFog:
		Type: CenterPosition
	Tooltip:
		Name: Corrino
	Buildable:
		BuildPaletteOrder: 16
		Prerequisites: ~redsubfactions, ~factions.subfaction_allowed
		Queue: Upgrade
		BuildLimit: 1
		BuildDuration: 1
		BuildDurationModifier: 100
		Description: Corrino \n Special units: Sardaukar, Bombardment tank \n Support powers: Rally Sardaudars \n Passive bonus: Defenses on Palace
	Valued:
		Cost: 0
	RenderSprites:
		Image: subfaction.corrino
	ProvidesPrerequisite@upgradename:

subfaction.random_green:
	Interactable:
	ScriptTriggers:
	HiddenUnderFog:
		Type: CenterPosition
	Tooltip:
		Name: Random
	Buildable:
		BuildPaletteOrder: 17
		Prerequisites: ~greensubfactions, ~factions.subfaction_allowed
		Queue: Upgrade
		BuildLimit: 1
		BuildDuration: 1
		BuildDurationModifier: 100
		Description: Random selection
	Valued:
		Cost: 0
	RenderSprites:
		Image: subfaction.random
	GrantRandomCondition:
		Conditions: ordos, mercenary, smuggler
	ProvidesPrerequisite@Ordos:
		Prerequisite: subfaction.ordos
		RequiresCondition: ordos
	ProvidesPrerequisite@mercenary:
		Prerequisite: subfaction.mercenary
		RequiresCondition: mercenary
	ProvidesPrerequisite@smuggler:
		Prerequisite: subfaction.smuggler
		RequiresCondition: smuggler

subfaction.ordos:
	Interactable:
	ScriptTriggers:
	HiddenUnderFog:
		Type: CenterPosition
	Tooltip:
		Name: Ordos
	Buildable:
		BuildPaletteOrder: 18
		Prerequisites: ~greensubfactions, ~factions.subfaction_allowed
		Queue: Upgrade
		BuildLimit: 1
		BuildDuration: 1
		BuildDurationModifier: 100
		Description: Ordos \n Special unit: Deviator, Raider, Stealth Raider \n Support powers: Chaos bomb \n no Missile tank
	Valued:
		Cost: 0
	RenderSprites:
		Image: subfaction.ordos
	ProvidesPrerequisite@upgradename:

subfaction.smuggler:
	Interactable:
	ScriptTriggers:
	HiddenUnderFog:
		Type: CenterPosition
	Tooltip:
		Name: Smugglers
	Buildable:
		BuildPaletteOrder: 19
		Prerequisites: ~greensubfactions, ~factions.subfaction_allowed
		Queue: Upgrade
		BuildLimit: 1
		BuildDuration: 1
		BuildDurationModifier: 100
		Description: Smugglers \n Special units: Flamer, Hunt trike\n Support powers: Saboteur, Jammer \n Passive bonus: 10% discout from Starport purchases \n no missile tank
	Valued:
		Cost: 0
	RenderSprites:
		Image: subfaction.smuggler
	ProvidesPrerequisite@upgradename:

subfaction.mercenary:
	Interactable:
	ScriptTriggers:
	HiddenUnderFog:
		Type: CenterPosition
	Tooltip:
		Name: Mercenaries
	Buildable:
		BuildPaletteOrder: 20
		Prerequisites: ~greensubfactions, ~factions.subfaction_allowed
		Queue: Upgrade
		BuildLimit: 1
		BuildDuration: 1
		BuildDurationModifier: 100
		Description: Mercenaries \n Special units: Bison tank, Mortar infantry, Crawler \n Support powers: Hire Contractors
	Valued:
		Cost: 0
	RenderSprites:
		Image: subfaction.mercenary
	ProvidesPrerequisite@upgradename:



#
# merged faction mode
#

merged.random:
	Interactable:
	ScriptTriggers:
	HiddenUnderFog:
		Type: CenterPosition
	Tooltip:
		Name: Random
	Buildable:
		BuildPaletteOrder: 21
		Prerequisites: ~mergedsubfactions, ~factions.merged
		Queue: Upgrade
		BuildLimit: 1
		BuildDuration: 1
		BuildDurationModifier: 100
		Description: Randowm selection
	Valued:
		Cost: 0
	RenderSprites:
		Image: subfaction.random
	GrantRandomCondition:
		Conditions: fremen, corrino, smuggler, mercenary
	ProvidesPrerequisite@fremen:
		Prerequisite: merged.fremen
		RequiresCondition: fremen
	ProvidesPrerequisite@corrino:
		Prerequisite: merged.corrino
		RequiresCondition: corrino
	ProvidesPrerequisite@smuggler:
		Prerequisite: merged.smuggler
		RequiresCondition: smuggler
	ProvidesPrerequisite@mercenary:
		Prerequisite: merged.mercenary
		RequiresCondition: mercenary
	

merged.fremen:
	Interactable:
	HiddenUnderFog:
		Type: CenterPosition
	ScriptTriggers:
	Tooltip:
		Name: Fremen
	Buildable:
		BuildPaletteOrder: 22
		Prerequisites: ~mergedsubfactions, ~factions.merged
		Queue: Upgrade
		BuildLimit: 1
		BuildDuration: 1
		BuildDurationModifier: 100
		Description: Fremen \n Special Building: Sietch \n Special units: Fremen Fedaykin \n Support powers: Hide units, WormRider
	Valued:
		Cost: 0
	RenderSprites:
		Image: subfaction.fremen
	ProvidesPrerequisite@upgradename:

merged.corrino:
	Interactable:
	ScriptTriggers:
	HiddenUnderFog:
		Type: CenterPosition
	Tooltip:
		Name: Corrino
	Buildable:
		BuildPaletteOrder: 23
		Prerequisites: ~mergedsubfactions, ~factions.merged
		Queue: Upgrade
		BuildLimit: 1
		BuildDuration: 1
		BuildDurationModifier: 100
		Description: Corrino \n Special Building: Corrino Palace\n Special units: Sardaukar, Bombardment tank \n Passive bonus: Defenses on Palace
	Valued:
		Cost: 0
	RenderSprites:
		Image: subfaction.corrino
	ProvidesPrerequisite@upgradename:

merged.smuggler:
	Interactable:
	ScriptTriggers:
	HiddenUnderFog:
		Type: CenterPosition
	Tooltip:
		Name: Smugglers
	Buildable:
		BuildPaletteOrder: 24
		Prerequisites: ~mergedsubfactions, ~factions.merged
		Queue: Upgrade
		BuildLimit: 1
		BuildDuration: 1
		BuildDurationModifier: 100
		Description: Smugglers \n Special Building: Smugglers Starport \n Special units: Hunter trike, Flamer \n Support powers: Saboteur \n Passive bonus: 10% discout from Starport purchases
	Valued:
		Cost: 0
	RenderSprites:
		Image: subfaction.smuggler
	ProvidesPrerequisite@upgradename:

merged.mercenary:
	Interactable:
	ScriptTriggers:
	HiddenUnderFog:
		Type: CenterPosition
	Tooltip:
		Name: Mercenaries
	Buildable:
		BuildPaletteOrder: 25
		Prerequisites: ~mergedsubfactions, ~factions.merged
		Queue: Upgrade
		BuildLimit: 1
		BuildDuration: 1
		BuildDurationModifier: 100
		Description: Mercenaries \n Special Building: Mercenary factory \n Special units: Mortar Infantry, Crawler \n Support powers: Hire Contractors, Area jammer
	Valued:
		Cost: 0
	RenderSprites:
		Image: subfaction.mercenary
	ProvidesPrerequisite@upgradename:

