diff --git a/OpenRa.FileFormats/MiniYaml.cs b/OpenRa.FileFormats/MiniYaml.cs new file mode 100755 index 0000000000..3b51b27e72 --- /dev/null +++ b/OpenRa.FileFormats/MiniYaml.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.IO; + +namespace OpenRa.FileFormats +{ + public class MiniYaml + { + public string Value; + public Dictionary Nodes = new Dictionary(); + + public MiniYaml( string value ) : this( value, new Dictionary() ) { } + + public MiniYaml( string value, Dictionary nodes ) + { + Value = value; + Nodes = nodes; + } + + public static Dictionary FromFile( string path ) + { + var lines = File.ReadAllLines( path ); + + var levels = new List>(); + levels.Add( new Dictionary() ); + + foreach( var line in lines ) + { + var t = line.TrimStart( ' ', '\t' ); + if( t.Length == 0 || t[ 0 ] == '#' ) + continue; + var level = line.Length - t.Length; + + if( levels.Count <= level ) + throw new InvalidOperationException( "Bad indent in miniyaml" ); + while( levels.Count > level + 1 ) + levels.RemoveAt( levels.Count - 1 ); + + var colon = t.IndexOf( ':' ); + var d = new Dictionary(); + + if( colon == -1 ) + levels[ level ].Add( t.Trim(), new MiniYaml( null, d ) ); + else + { + var value = t.Substring( colon + 1 ).Trim(); + if( value.Length == 0 ) + value = null; + levels[ level ].Add( t.Substring( 0, colon ).Trim(), new MiniYaml( value, d ) ); + } + levels.Add( d ); + } + return levels[ 0 ]; + } + } +} diff --git a/OpenRa.FileFormats/OpenRa.FileFormats.csproj b/OpenRa.FileFormats/OpenRa.FileFormats.csproj index 0016cbc237..5c8fd2cd1b 100644 --- a/OpenRa.FileFormats/OpenRa.FileFormats.csproj +++ b/OpenRa.FileFormats/OpenRa.FileFormats.csproj @@ -57,6 +57,7 @@ + diff --git a/OpenRa.Game/Actor.cs b/OpenRa.Game/Actor.cs index 2c7e3b9677..76044e28a0 100755 --- a/OpenRa.Game/Actor.cs +++ b/OpenRa.Game/Actor.cs @@ -48,8 +48,11 @@ namespace OpenRa.Game if( Info.Traits == null ) throw new InvalidOperationException( "No Actor traits for {0}; add Traits= to units.ini for appropriate unit".F(Info.Name) ); - foreach (var traitName in Info.Traits) - traits.Add(ConstructTrait(traitName)); + //foreach (var traitName in Info.Traits) + // traits.Add(ConstructTrait(traitName)); + + foreach( var traitName in Rules.NewUnitInfo[Info.Name.ToLower()].Traits.Keys ) + traits.Add( ConstructTrait( traitName ) ); } public void Tick() diff --git a/OpenRa.Game/GameRules/FieldLoader.cs b/OpenRa.Game/GameRules/FieldLoader.cs index bff21b7c5a..dc5107be51 100755 --- a/OpenRa.Game/GameRules/FieldLoader.cs +++ b/OpenRa.Game/GameRules/FieldLoader.cs @@ -1,6 +1,7 @@ using System; using System.Linq; using OpenRa.FileFormats; +using System.Collections.Generic; namespace OpenRa.Game.GameRules { @@ -15,6 +16,39 @@ namespace OpenRa.Game.GameRules } } + public static void CheckYaml( object self, Dictionary d ) + { + //foreach( var x in d ) + //{ + // if( x.Key == "Tab" ) continue; + // if( x.Key == "Description" ) continue; + // if( x.Key == "LongDesc" ) continue; + + // var key = x.Key; + // if( key == "Prerequisites" ) key = "Prerequisite"; + // if( key == "HP" ) key = "Strength"; + // if( key == "Priority" ) key = "SelectionPriority"; + // if( key == "Bounds" ) key = "SelectionSize"; + // var field = self.GetType().GetField( key ); + // var old = field.GetValue( self ); + // var neww = GetValue( field.FieldType, x.Value.Value.Trim() ); + // if( old.ToString() != neww.ToString() ) + // throw new NotImplementedException(); + //} + foreach( var x in d ) + { + var key = x.Key; + if( key == "Tab" ) + continue; + if( key == "Prerequisites" ) key = "Prerequisite"; + if( key == "HP" ) key = "Strength"; + if( key == "Priority" ) key = "SelectionPriority"; + if( key == "Bounds" ) key = "SelectionSize"; + var field = self.GetType().GetField( key.Trim() ); + field.SetValue( self, GetValue( field.FieldType, x.Value.Value.Trim() ) ); + } + } + static object GetValue( Type fieldType, string x ) { if( fieldType == typeof( int ) ) diff --git a/OpenRa.Game/GameRules/NewUnitInfo.cs b/OpenRa.Game/GameRules/NewUnitInfo.cs new file mode 100755 index 0000000000..dd37e7115c --- /dev/null +++ b/OpenRa.Game/GameRules/NewUnitInfo.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using OpenRa.FileFormats; + +namespace OpenRa.Game.GameRules +{ + class NewUnitInfo + { + public readonly string Parent; + public readonly Dictionary Traits = new Dictionary(); + + public NewUnitInfo( MiniYaml node ) + { + MiniYaml inherit; + if( node.Nodes.TryGetValue( "Inherits", out inherit ) ) + { + Parent = inherit.Value; + node.Nodes.Remove( "Inherits" ); + } + Traits = node.Nodes; + } + } +} diff --git a/OpenRa.Game/GameRules/Rules.cs b/OpenRa.Game/GameRules/Rules.cs index 3a9c135180..ae9bf199f7 100755 --- a/OpenRa.Game/GameRules/Rules.cs +++ b/OpenRa.Game/GameRules/Rules.cs @@ -24,6 +24,8 @@ namespace OpenRa.Game public static Map Map; public static TileSet TileSet; + public static Dictionary NewUnitInfo; + public static void LoadRules(string mapFileName, bool useAftermath) { if( useAftermath ) @@ -91,6 +93,14 @@ namespace OpenRa.Game Map = new Map( AllRules ); FileSystem.MountTemporary( new Package( Rules.Map.Theater + ".mix" ) ); TileSet = new TileSet( Map.TileSuffix ); + + NewUnitInfo = new Dictionary(); + foreach( var kv in MiniYaml.FromFile( "ra.yaml" ) ) + NewUnitInfo.Add( kv.Key.ToLowerInvariant(), new NewUnitInfo( kv.Value ) ); + + foreach( var unit in NewUnitInfo ) + foreach( var trait in unit.Value.Traits.Values ) + FieldLoader.CheckYaml( UnitInfo[ unit.Key.ToLowerInvariant() ], trait.Nodes ); } static void LoadCategories(params string[] types) diff --git a/OpenRa.Game/OpenRa.Game.csproj b/OpenRa.Game/OpenRa.Game.csproj index 088f626e4e..f43e6f6383 100644 --- a/OpenRa.Game/OpenRa.Game.csproj +++ b/OpenRa.Game/OpenRa.Game.csproj @@ -95,6 +95,7 @@ + @@ -215,6 +216,7 @@ + @@ -240,6 +242,7 @@ + diff --git a/OpenRa.Game/Support/PerfHistory.cs b/OpenRa.Game/Support/PerfHistory.cs index 1b05dc49ad..f17546548b 100644 --- a/OpenRa.Game/Support/PerfHistory.cs +++ b/OpenRa.Game/Support/PerfHistory.cs @@ -9,7 +9,7 @@ namespace OpenRa.Game.Support { static class PerfHistory { - static readonly Color[] colors = { Color.Red, Color.Green, Color.Blue, Color.Yellow, Color.Orange, Color.Fuchsia, Color.Lime, Color.LightBlue }; + static readonly Color[] colors = { Color.Red, Color.Green, Color.Blue, Color.Yellow, Color.Orange, Color.Fuchsia, Color.Lime, Color.LightBlue, Color.White, Color.Black }; static int nextColor; public static Cache items = new Cache( diff --git a/OpenRa.Game/Traits/Buildable.cs b/OpenRa.Game/Traits/Buildable.cs new file mode 100755 index 0000000000..fb1f95dc52 --- /dev/null +++ b/OpenRa.Game/Traits/Buildable.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace OpenRa.Game.Traits +{ + class Buildable + { + public Buildable( Actor self ) { } + } +} diff --git a/OpenRa.Game/Traits/Selectable.cs b/OpenRa.Game/Traits/Selectable.cs new file mode 100755 index 0000000000..902d9d8df2 --- /dev/null +++ b/OpenRa.Game/Traits/Selectable.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace OpenRa.Game.Traits +{ + class Selectable + { + public Selectable( Actor self ) { } + } +} diff --git a/RulesConverter/Program.cs b/RulesConverter/Program.cs index a94f312403..546dfdc6bb 100644 --- a/RulesConverter/Program.cs +++ b/RulesConverter/Program.cs @@ -45,7 +45,7 @@ namespace RulesConverter { "Selectable", new PL { { "Priority", "SelectionPriority" }, { "Voice", "Voice" }, - { "@Bounds", "SelectionSize" } } + { "Bounds", "SelectionSize" } } }, { "Mobile", new PL { @@ -112,7 +112,7 @@ namespace RulesConverter { "Buildable", new PL { { "TechLevel", "TechLevel" }, { "Tab", "$Tab" }, - { "@Prerequisites", "Prerequisite" }, + { "Prerequisites", "Prerequisite" }, { "Owner", "Owner" }, { "Cost", "Cost" }, { "Icon", "Icon" }, @@ -121,7 +121,7 @@ namespace RulesConverter }, { "Cargo", new PL { - { "@PassengerTypes", "PassengerTypes" } } + { "PassengerTypes", "PassengerTypes" } } }, { "LimitedAmmo", new PL { diff --git a/RulesConverter/RulesConverter.csproj b/RulesConverter/RulesConverter.csproj index 207bcfcfbf..cb7cdaa697 100644 --- a/RulesConverter/RulesConverter.csproj +++ b/RulesConverter/RulesConverter.csproj @@ -21,6 +21,7 @@ DEBUG;TRACE prompt 4 + false pdbonly diff --git a/ra.yaml b/ra.yaml new file mode 100644 index 0000000000..419bad4e12 --- /dev/null +++ b/ra.yaml @@ -0,0 +1,1543 @@ +# +# Red Alert rules +# + +DefaultVehicle: +# Unit: +# HP: 1 +# Armor: none +# Crewed: yes +# Voice: VehicleVoice +# Mobile: +# Sight: 1 +# ROT: 5 +# Speed: 1 +# UMT: Wheel +# Repairable: +# Chronoshiftable: +# Passenger: +# IronCurtainable: + +V2RL: + Inherits: DefaultVehicle + Buildable: + TechLevel: 4 + Tab: Vehicle + Prerequisites: weap,dome + Owner: soviet + Cost: 700 + Description: "V2 Rocket" + LongDesc: "Long-range rocket artillery.\n Strong vs Infantry, Buildings\n Weak vs Tanks, Aircraft" + Selectable: + Voice: VehicleVoice + Unit: + HP: 150 + Armor: light + Crewed: yes + Mobile: + Sight: 5 + ROT: 5 + Speed: 7 + AttackBase: + RenderUnitReload: + AutoTarget: + Repairable: + Chronoshiftable: + Passenger: + IronCurtainable: + +1TNK: + Inherits: DefaultVehicle + Buildable: + TechLevel: 4 + Tab: Vehicle + Prerequisites: weap + Owner: allies + Cost: 700 + Description: "Light Tank" + LongDesc: "Light Tank, good for scouting.\n Strong vs Light Vehicles\n Weak vs Tanks, Aircraft" + Selectable: + Voice: VehicleVoice + Unit: + HP: 300 + Armor: heavy + Crewed: yes + Mobile: + Sight: 4 + ROT: 5 + Speed: 9 + Turreted: + AttackTurreted: + RenderUnitTurreted: + AutoTarget: + Repairable: + Chronoshiftable: + Passenger: + IronCurtainable: + +2TNK: + Inherits: DefaultVehicle + Buildable: + TechLevel: 6 + Tab: Vehicle + Prerequisites: weap + Owner: allies + Cost: 800 + Description: "Medium Tank" + LongDesc: "Allied Main Battle Tank.\n Strong vs Tanks, Light Vehicles\n Weak vs Infantry, Aircraft" + Selectable: + Voice: VehicleVoice + Unit: + HP: 400 + Armor: heavy + Crewed: yes + Mobile: + Sight: 5 + ROT: 5 + Speed: 8 + Turreted: + AttackTurreted: + RenderUnitTurreted: + AutoTarget: + Repairable: + Chronoshiftable: + Passenger: + IronCurtainable: + +3TNK: + Inherits: DefaultVehicle + Buildable: + TechLevel: 4 + Tab: Vehicle + Prerequisites: weap + Owner: soviet + Cost: 950 + Description: "Heavy Tank" + LongDesc: "Soviet Main Battle Tank, with dual cannons\n Strong vs Tanks, Light Vehicles\n Weak vs Infantry, Aircraft" + Selectable: + Voice: VehicleVoice + Unit: + HP: 400 + Armor: heavy + Crewed: yes + Mobile: + Sight: 5 + ROT: 5 + Speed: 7 + Turreted: + AttackTurreted: + RenderUnitTurreted: + AutoTarget: + Repairable: + Chronoshiftable: + Passenger: + IronCurtainable: + +4TNK: + Inherits: DefaultVehicle + Buildable: + TechLevel: 10 + Tab: Vehicle + Prerequisites: weap,stek + Owner: soviet + Cost: 1700 + Description: "Mammoth Tank" + LongDesc: "Big and slow tank, with anti-air capability.\n Strong vs Tanks, Aircraft\n Weak vs Infantry" + Selectable: + Voice: VehicleVoice + Unit: + HP: 600 + Armor: heavy + Crewed: yes + Mobile: + Sight: 6 + ROT: 5 + Speed: 4 + Turreted: + AttackTurreted: + RenderUnitTurreted: + AutoTarget: + Repairable: + Chronoshiftable: + Passenger: + IronCurtainable: + +MRJ: + Inherits: DefaultVehicle + Buildable: + TechLevel: 12 + Tab: Vehicle + Prerequisites: weap,dome + Owner: allies + Cost: 600 + Description: "Radar Jammer" + LongDesc: "Hides nearby units on the enemy's minimap.\n Unarmed" + Selectable: + Priority: 3 + Voice: VehicleVoice + Unit: + HP: 110 + Armor: light + Crewed: yes + Mobile: + Sight: 7 + ROT: 5 + Speed: 9 + RenderUnitSpinner: + Repairable: + Chronoshiftable: + Passenger: + IronCurtainable: + +MGG: + Inherits: DefaultVehicle + Buildable: + TechLevel: 11 + Tab: Vehicle + Prerequisites: weap,atek + Owner: allies + Cost: 600 + Description: "Mobile Gap Generator" + LongDesc: "Regenerates Fog of War in a small area \naround the unit.\n Unarmed" + Selectable: + Priority: 3 + Voice: VehicleVoice + Unit: + HP: 110 + Armor: light + Crewed: yes + Mobile: + Sight: 4 + ROT: 5 + Speed: 9 + RenderUnitSpinner: + Repairable: + Chronoshiftable: + Passenger: + IronCurtainable: + +ARTY: + Inherits: DefaultVehicle + Buildable: + TechLevel: 8 + Tab: Vehicle + Prerequisites: weap + Owner: allies + Cost: 600 + Description: "Artillery" + LongDesc: "Long-range artillery.\n Strong vs Infantry, Buildings\n Weak vs Tanks, Aircraft" + Selectable: + Voice: VehicleVoice + Unit: + HP: 75 + Armor: light + Crewed: yes + Mobile: + Sight: 5 + ROT: 2 + Speed: 6 + AttackBase: + RenderUnit: + Explodes: + AutoTarget: + Repairable: + Chronoshiftable: + Passenger: + IronCurtainable: + +HARV: + Inherits: DefaultVehicle + Buildable: + TechLevel: 1 + Tab: Vehicle + Prerequisites: weap,proc + Owner: allies,soviet + Cost: 1400 + Description: "Ore Truck" + LongDesc: "Collects Ore and Gems for processing.\n Unarmed" + Selectable: + Priority: 7 + Voice: VehicleVoice + Harvester: + Unit: + HP: 600 + Armor: heavy + Crewed: yes + Mobile: + Sight: 4 + ROT: 5 + Speed: 6 + RenderUnit: + Repairable: + Chronoshiftable: + Passenger: + IronCurtainable: + +MCV: + Inherits: DefaultVehicle + Buildable: + TechLevel: 11 + Tab: Vehicle + Prerequisites: weap,fix + Owner: allies,soviet + Cost: 2500 + Description: "Mobile Construction Vehicle" + LongDesc: "Deploys into another Construction Yard.\n Unarmed" + Selectable: + Priority: 3 + Voice: VehicleVoice + Unit: + HP: 600 + Armor: light + Crewed: yes + Mobile: + Sight: 4 + ROT: 5 + Speed: 6 + McvDeploy: + RenderUnit: + Repairable: + Chronoshiftable: + Passenger: + IronCurtainable: + +JEEP: + Inherits: DefaultVehicle + Buildable: + TechLevel: 3 + Tab: Vehicle + Prerequisites: weap + Owner: allies + Cost: 600 + Description: "Ranger" + LongDesc: "Fast scout & anti-infantry vehicle.\n Strong vs Infantry\n Weak vs Tanks, Aircraft" + Selectable: + Voice: VehicleVoice + Unit: + HP: 150 + Armor: light + Crewed: yes + Mobile: + Sight: 6 + ROT: 10 + Speed: 10 + Turreted: + AttackTurreted: + RenderUnitTurreted: + AutoTarget: + Repairable: + Chronoshiftable: + Passenger: + IronCurtainable: + +APC: + Inherits: DefaultVehicle + Buildable: + TechLevel: 5 + Tab: Vehicle + Prerequisites: weap,tent + Owner: allies + Cost: 800 + Description: "Armored Personnel Carrier" + LongDesc: "Tough infantry transport.\n Strong vs Infantry, Light Vehicles\n Weak vs Tanks, Aircraft" + Selectable: + Voice: VehicleVoice + Unit: + HP: 200 + Armor: heavy + Mobile: + Sight: 5 + ROT: 5 + Speed: 10 + AttackBase: + RenderUnitMuzzleFlash: + AutoTarget: + Repairable: + Chronoshiftable: + Cargo: + PassengerTypes: Foot + Passenger: + IronCurtainable: + +MNLY.AP: + Inherits: DefaultVehicle + Buildable: + TechLevel: 3 + Tab: Vehicle + Prerequisites: weap,fix + Owner: soviet + Cost: 800 + Icon: MNLYICON + Description: "Minelayer (Anti-Personnel)" + LongDesc: "Lays mines to destroy unwary enemy units.\n Unarmed" + Selectable: + Voice: VehicleVoice + Unit: + HP: 100 + Armor: heavy + Crewed: yes + Mobile: + Sight: 5 + ROT: 5 + Speed: 9 + RenderUnit: + Image: MNLY + Minelayer: + MineImmune: + Repairable: + LimitedAmmo: + Ammo: 5 + Chronoshiftable: + Passenger: + IronCurtainable: + +MNLY.AT: + Inherits: DefaultVehicle + Buildable: + TechLevel: 3 + Tab: Vehicle + Prerequisites: weap,fix + Owner: allies + Cost: 800 + Icon: MNLYICON + Description: "Minelayer (Anti-Tank)" + LongDesc: "Lays mines to destroy unwary enemy units.\n Unarmed" + Selectable: + Voice: VehicleVoice + Unit: + HP: 100 + Armor: heavy + Crewed: yes + Mobile: + Sight: 5 + ROT: 5 + Speed: 9 + RenderUnit: + Image: MNLY + Minelayer: + MineImmune: + Repairable: + LimitedAmmo: + Ammo: 5 + Chronoshiftable: + Passenger: + IronCurtainable: + +SS: + Inherits: DefaultShip + Buildable: + TechLevel: 5 + Tab: Ship + Prerequisites: spen + Owner: soviet + Cost: 950 + Description: "Submarine" + LongDesc: "Submerged anti-ship unit armed with \ntorpedoes.\n Strong vs Ships\n Weak vs Everything\n Special Ability: Submerge" + Selectable: + Unit: + HP: 120 + Armor: light + Mobile: + Sight: 6 + ROT: 7 + Speed: 6 + RenderUnit: + Submarine: + AttackBase: + Chronoshiftable: + IronCurtainable: + +DD: + Inherits: DefaultShip + Buildable: + TechLevel: 7 + Tab: Ship + Prerequisites: syrd + Owner: allies + Cost: 1000 + Description: "Destroyer" + LongDesc: "Fast multi-role ship. \n Strong vs Submarines, Aircraft\n Weak vs Infantry, Tanks" + Selectable: + Unit: + HP: 400 + Armor: heavy + Mobile: + Sight: 6 + ROT: 7 + Speed: 6 + Turreted: + AttackTurreted: + RenderUnitTurreted: + AutoTarget: + Chronoshiftable: + IronCurtainable: + +CA: + Inherits: DefaultShip + Buildable: + TechLevel: 10 + Tab: Ship + Prerequisites: syrd,atek + Owner: allies + Cost: 2000 + Description: "Cruiser" + LongDesc: "Very slow long-range ship. \n Strong vs Buildings\n Weak vs Ships, Submarines" + Selectable: + Unit: + HP: 700 + Armor: heavy + Mobile: + Sight: 7 + ROT: 5 + Speed: 4 + Turreted: + AttackTurreted: + RenderUnitTurreted: + AutoTarget: + Chronoshiftable: + IronCurtainable: + +LST: + Inherits: DefaultShip + Buildable: + TechLevel: 3 + Tab: Ship + Owner: allies,soviet + Cost: 700 + Description: "Transport" + LongDesc: "General-purpose naval transport.\nCan carry infantry and tanks.\n Unarmed" + Selectable: + Unit: + HP: 350 + Armor: heavy + Mobile: + Sight: 6 + ROT: 10 + Speed: 14 + RenderUnit: + Cargo: + PassengerTypes: Foot,Wheel,Track + IronCurtainable: + +PT: + Inherits: DefaultShip + Buildable: + TechLevel: 5 + Tab: Ship + Prerequisites: syrd + Owner: allies + Cost: 500 + Description: "Gunboat" + LongDesc: "Light scout & support ship. \n Strong vs Ships, Submarines\n Weak vs Aircraft" + Selectable: + Unit: + HP: 200 + Armor: heavy + Mobile: + Sight: 7 + ROT: 7 + Speed: 9 + Turreted: + AttackTurreted: + RenderUnitTurreted: + AutoTarget: + Chronoshiftable: + IronCurtainable: + +MIG: + Inherits: DefaultPlane + Buildable: + TechLevel: 10 + Tab: Plane + Prerequisites: afld + Owner: soviet + Cost: 1200 + Description: "Mig Attack Plane" + LongDesc: "Fast Ground-Attack Plane.\n Strong vs Buildings\n Weak vs Infantry, Light Vehicles" + Selectable: + Unit: + HP: 50 + Armor: light + AttackPlane: + Plane: + ROT: 5 + Speed: 20 + RenderUnit: + WithShadow: + LimitedAmmo: + Ammo: 3 + IronCurtainable: + +YAK: + Inherits: DefaultPlane + Buildable: + TechLevel: 5 + Tab: Plane + Prerequisites: afld + Owner: soviet + Cost: 800 + Description: "Yak Attack Plane" + LongDesc: "Anti-Tanks & Anti-Infantry Plane.\n Strong vs Infantry, Tanks\n Weak vs Buildings" + Selectable: + Unit: + HP: 60 + Armor: light + Crewed: yes + AttackPlane: + Plane: + ROT: 5 + Speed: 16 + RenderUnit: + WithShadow: + LimitedAmmo: + Ammo: 15 + IronCurtainable: + +TRAN: + Inherits: DefaultPlane + Buildable: + TechLevel: 11 + Tab: Plane + Prerequisites: hpad + Owner: allies + Cost: 1200 + Description: "Transport Helicopter" + LongDesc: "Fast Infantry Transport Helicopter.\n Unarmed" + Selectable: + Unit: + HP: 90 + Armor: light + Helicopter: + ROT: 5 + Speed: 12 + RenderUnitRotor: + WithShadow: + Cargo: + PassengerTypes: Foot + IronCurtainable: + +HELI: + Inherits: DefaultPlane + Buildable: + TechLevel: 9 + Tab: Plane + Prerequisites: hpad + Owner: allies + Cost: 1200 + Description: "Longbow" + LongDesc: "Helicopter Gunship with AG Missiles.\n Strong vs Buildings, Tanks\n Weak vs Infantry" + Selectable: + Unit: + HP: 225 + Armor: heavy + Crewed: yes + AttackHeli: + Helicopter: + ROT: 4 + Speed: 16 + RenderUnitRotor: + WithShadow: + LimitedAmmo: + Ammo: 6 + IronCurtainable: + +HIND: + Inherits: DefaultPlane + Buildable: + TechLevel: 9 + Tab: Plane + Prerequisites: hpad + Owner: allies + Cost: 1200 + Description: "Hind" + LongDesc: "Helicopter Gunship with Chainguns.\n Strong vs Infantry, Light Vehicles.\n Weak vs Tanks" + Selectable: + Unit: + HP: 225 + Armor: heavy + Crewed: yes + AttackHeli: + Helicopter: + ROT: 4 + Speed: 12 + RenderUnitRotor: + WithShadow: + LimitedAmmo: + Ammo: 12 + IronCurtainable: + +IRON: + Inherits: DefaultDefense + Buildable: + TechLevel: 12 + Tab: Defense + Prerequisites: stek + Owner: soviet + Cost: 2800 + Description: "Iron Curtain" + LongDesc: "Makes a group of units invulnerable for a \nshort time.\n Special Ability: Invulnerability" + Selectable: + Priority: 3 + Building: + RenderBuilding: + IronCurtainable: + IronCurtain: + +PDOX: + Inherits: DefaultDefense + Buildable: + TechLevel: 12 + Tab: Defense + Prerequisites: atek + Owner: allies + Cost: 2800 + Description: "Chronosphere" + LongDesc: "Teleports a unit from one place \nto another, for a limited time.\n Special Ability: Chronoshift" + Selectable: + Priority: 3 + Building: + RenderBuilding: + Chronosphere: + IronCurtainable: + +PBOX: + Inherits: DefaultDefense + Buildable: + TechLevel: 2 + Tab: Defense + Prerequisites: tent + Owner: allies + Cost: 400 + Description: "Pillbox" + LongDesc: "Basic defensive structure.\n Strong vs Infantry, Light Vehicles\n Weak vs Tanks, Aircraft" + Selectable: + Priority: 3 + Building: + Turreted: + RenderBuilding: + AttackTurreted: + AutoTarget: + IronCurtainable: + +HBOX: + Inherits: DefaultDefense + Buildable: + TechLevel: 3 + Tab: Defense + Prerequisites: tent + Owner: allies + Cost: 600 + Description: "Camo Pillbox" + LongDesc: "Hidden defensive structure.\n Strong vs Infantry, Light Vehicles\n Weak vs Tanks, Aircraft" + Selectable: + Priority: 3 + Building: + Turreted: + RenderBuilding: + AttackTurreted: + AutoTarget: + IronCurtainable: + +TSLA: + Inherits: DefaultDefense + Buildable: + TechLevel: 7 + Tab: Defense + Prerequisites: weap + Owner: soviet + Cost: 1500 + Description: "Tesla Coil" + LongDesc: "Advanced base defense. Requires power\nto operate.\n Strong vs Tanks, Infantry\n Weak vs Aircraft" + Selectable: + Priority: 3 + Building: + Turreted: + RenderBuildingCharge: + AttackTurreted: + AutoTarget: + IronCurtainable: + +GUN: + Inherits: DefaultDefense + Buildable: + TechLevel: 4 + Tab: Defense + Prerequisites: tent + Owner: allies + Cost: 600 + Description: "Turret" + LongDesc: "Anti-Armor base defense.\n Strong vs Tanks\n Weak vs Infantry, Aircraft" + Selectable: + Priority: 3 + Building: + Turreted: + RenderBuildingTurreted: + AttackTurreted: + AutoTarget: + IronCurtainable: + +AGUN: + Inherits: DefaultDefense + Buildable: + TechLevel: 5 + Tab: Defense + Prerequisites: dome + Owner: allies + Cost: 600 + Description: "AA Gun" + LongDesc: "Anti-Air base defense.\n Strong vs Aircraft\n Weak vs Infantry, Tanks" + Selectable: + Priority: 3 + Building: + Turreted: + RenderBuildingTurreted: + AttackTurreted: + AutoTarget: + IronCurtainable: + +FTUR: + Inherits: DefaultDefense + Buildable: + TechLevel: 2 + Tab: Defense + Prerequisites: barr + Owner: soviet + Cost: 600 + Description: "Flame Turret" + LongDesc: "Anti-Infantry base defense.\n Strong vs Infantry\n Weak vs Aircraft" + Selectable: + Priority: 3 + Turreted: + Building: + RenderBuilding: + AttackTurreted: + AutoTarget: + IronCurtainable: + +GAP: + Inherits: DefaultDefense + Buildable: + TechLevel: 10 + Tab: Defense + Prerequisites: atek + Owner: allies + Cost: 500 + Description: "Gap Generator" + LongDesc: "Regenerates the Fog of War nearby, \nobscuring the area.\n Unarmed" + Selectable: + Priority: 3 + Building: + RenderBuilding: + IronCurtainable: + +SAM: + Inherits: DefaultDefense + Buildable: + TechLevel: 9 + Tab: Defense + Prerequisites: dome + Owner: soviet + Cost: 750 + Description: "SAM Site" + LongDesc: "Anti-Air base defense.\n Strong vs Aircraft\n Weak vs Infantry, Tanks" + Selectable: + Priority: 3 + Building: + Turreted: + RenderBuildingTurreted: + AttackTurreted: + AutoTarget: + IronCurtainable: + +MSLO: + Inherits: DefaultDefense + Buildable: + TechLevel: 13 + Tab: Defense + Prerequisites: stek,atek + Owner: soviet,allies + Cost: 2500 + Description: "Missile Silo" + LongDesc: "Launches a devastating nuclear strike.\n Strong vs Infantry, Buildings\n Weak vs Tanks\n Special Ability: Nuclear Missile" + Selectable: + Priority: 3 + Building: + RenderBuilding: + IronCurtainable: + +ATEK: + Inherits: DefaultBuilding + Buildable: + TechLevel: 10 + Tab: Building + Prerequisites: weap,dome + Owner: allies + Cost: 1500 + Description: "Allied Tech Center" + LongDesc: "Provides Allied advanced technologies.\n Special Ability: GPS Satellite" + Selectable: + Priority: 3 + Building: + RenderBuilding: + IronCurtainable: + GpsLaunchSite: + +WEAP: + Inherits: DefaultBuilding + Buildable: + TechLevel: 3 + Tab: Building + Prerequisites: proc + Owner: soviet,allies + Cost: 2000 + Description: "War Factory" + LongDesc: "Produces tanks & light vehicles." + Selectable: + Priority: 3 + Building: + RenderWarFactory: + RenderBuilding: + RallyPoint: + Production: + IronCurtainable: + +SYRD: + Inherits: DefaultBuilding + Buildable: + TechLevel: 3 + Tab: Building + Prerequisites: powr + Owner: allies + Cost: 650 + Description: "Shipyard" + LongDesc: "Produces and repairs ships" + Selectable: + Priority: 3 + Building: + RenderBuilding: + ProductionSurround: + IronCurtainable: + +SPEN: + Inherits: DefaultBuilding + Buildable: + TechLevel: 3 + Tab: Building + Prerequisites: powr + Owner: soviet + Cost: 650 + Description: "Sub Pen" + LongDesc: "Produces and repairs submarines and \ntransports" + Selectable: + Priority: 3 + Building: + RenderBuilding: + ProductionSurround: + IronCurtainable: + +FACT: + Inherits: DefaultBuilding + Selectable: + Priority: 3 + Building: + RenderBuilding: + ConstructionYard: + IronCurtainable: + +PROC: + Inherits: DefaultBuilding + Buildable: + TechLevel: 1 + Tab: Building + Prerequisites: powr + Owner: allies,soviet + Cost: 2000 + Description: "Ore Refinery" + LongDesc: "Converts Ore and Gems into money" + Selectable: + Priority: 3 + Building: + RenderBuilding: + AcceptsOre: + StoresOre: + IronCurtainable: + +SILO: + Inherits: DefaultBuilding + Buildable: + TechLevel: 1 + Tab: Building + Prerequisites: proc + Owner: allies,soviet + Cost: 150 + Description: "Silo" + LongDesc: "Stores excess harvested Ore" + Selectable: + Priority: 3 + Building: + RenderBuildingOre: + StoresOre: + IronCurtainable: + +HPAD: + Inherits: DefaultBuilding + Buildable: + TechLevel: 9 + Tab: Building + Prerequisites: dome + Owner: allies + Cost: 1500 + Description: "Helipad" + LongDesc: "Produces and reloads helicopters" + Selectable: + Priority: 3 + Building: + RenderBuilding: + Production: + BelowUnits: + Reservable: + IronCurtainable: + +DOME: + Inherits: DefaultBuilding + Buildable: + TechLevel: 3 + Tab: Building + Prerequisites: proc + Owner: allies,soviet + Cost: 1000 + Description: "Radar Dome" + LongDesc: "Provides an overview of the battlefield.\n Requires power to operate." + Selectable: + Priority: 3 + Building: + RenderBuilding: + ProvidesRadar: + IronCurtainable: + +AFLD: + Inherits: DefaultBuilding + Buildable: + TechLevel: 5 + Tab: Building + Prerequisites: dome + Owner: soviet + Cost: 600 + Description: "Airstrip" + LongDesc: "Produces and reloads planes\n Special Ability: Paratroopers\n Special Ability: Spy Plane" + Selectable: + Priority: 3 + Building: + RenderBuilding: + Production: + BelowUnits: + Reservable: + IronCurtainable: + +POWR: + Inherits: DefaultBuilding + Buildable: + TechLevel: 1 + Tab: Building + Prerequisites: fact + Owner: allies,soviet + Cost: 300 + Description: "Power Plant" + LongDesc: "Provides power for other structures" + Selectable: + Priority: 3 + Building: + RenderBuilding: + IronCurtainable: + +APWR: + Inherits: DefaultBuilding + Buildable: + TechLevel: 8 + Tab: Building + Prerequisites: powr + Owner: allies,soviet + Cost: 500 + Description: "Advanced Power Plant" + LongDesc: "Provides more power, cheaper than the \nstandard Power Plant" + Selectable: + Priority: 3 + Building: + RenderBuilding: + IronCurtainable: + +STEK: + Inherits: DefaultBuilding + Buildable: + TechLevel: 6 + Tab: Building + Prerequisites: weap,dome + Owner: soviet + Cost: 1500 + Description: "Soviet Tech Center" + LongDesc: "Provides Soviet advanced technologies" + Selectable: + Priority: 3 + Building: + RenderBuilding: + IronCurtainable: + +BARR: + Inherits: DefaultBuilding + Buildable: + TechLevel: 1 + Tab: Building + Prerequisites: powr + Owner: soviet + Cost: 300 + Description: "Soviet Barracks" + LongDesc: "Produces infantry" + Selectable: + Priority: 3 + Building: + RenderBuilding: + RallyPoint: + Production: + IronCurtainable: + +TENT: + Inherits: DefaultBuilding + Buildable: + TechLevel: 1 + Tab: Building + Prerequisites: powr + Owner: allies + Cost: 300 + Description: "Allied Barracks" + LongDesc: "Produces infantry" + Selectable: + Priority: 3 + Building: + RenderBuilding: + RallyPoint: + Production: + IronCurtainable: + +KENN: + Inherits: DefaultBuilding + Buildable: + TechLevel: 3 + Tab: Building + Prerequisites: barr + Owner: soviet + Cost: 200 + Description: "Kennel" + LongDesc: "Produces attack dogs" + Selectable: + Priority: 3 + Building: + RenderBuilding: + RallyPoint: + Production: + IronCurtainable: + +FIX: + Inherits: DefaultBuilding + Buildable: + TechLevel: 3 + Tab: Building + Prerequisites: weap + Owner: allies,soviet + Cost: 1200 + Description: "Service Depot" + LongDesc: "Repairs vehicles, reloads minelayers, and \nallows the construction of additional bases." + Selectable: + Priority: 3 + Building: + RenderBuilding: + BelowUnits: + Reservable: + IronCurtainable: + +FACF: + Inherits: DefaultBuilding + Buildable: + TechLevel: 1 + Tab: Building + Owner: allies + Cost: 50 + Description: "Fake Construction Yard" + LongDesc: "Looks like a Construction Yard." + Selectable: + Priority: 3 + Building: + RenderBuilding: + Image: FACT + Fake: + IronCurtainable: + +WEAF: + Inherits: DefaultBuilding + Buildable: + TechLevel: 3 + Tab: Building + Prerequisites: proc + Owner: allies + Cost: 50 + Description: "Fake War Factory" + LongDesc: "Looks like a War Factory." + Selectable: + Priority: 3 + Building: + RenderWarFactory: + RenderBuilding: + Image: WEAP + Fake: + IronCurtainable: + +SYRF: + Inherits: DefaultBuilding + Buildable: + TechLevel: 3 + Tab: Building + Prerequisites: powr + Owner: allies + Cost: 50 + Description: "Fake Shipyard" + LongDesc: "Looks like a Shipyard" + Selectable: + Priority: 3 + Building: + RenderBuilding: + Image: SYRD + Fake: + +SPEF: + Inherits: DefaultBuilding + Selectable: + Priority: 3 + Building: + RenderBuilding: + Image: SPEN + Fake: + +DOMF: + Inherits: DefaultBuilding + Buildable: + TechLevel: 3 + Tab: Building + Prerequisites: proc + Owner: allies + Cost: 50 + Description: "Fake Radar Dome" + LongDesc: "Looks like a Radar Dome" + Selectable: + Priority: 3 + Building: + RenderBuilding: + Image: DOME + Fake: + +MINP: + Inherits: DefaultBuilding + Unit: + HP: 1 + RenderUnit: + APMine: + BelowUnits: + InvisibleToOthers: + +MINV: + Inherits: DefaultBuilding + Unit: + HP: 1 + RenderUnit: + ATMine: + BelowUnits: + InvisibleToOthers: + +DOG: + Inherits: DefaultInfantry + Buildable: + TechLevel: 3 + Tab: Infantry + Prerequisites: kenn + Owner: soviet + Cost: 200 + Description: "Attack Dog" + LongDesc: "Anti-infantry unit. Not fooled by the \nSpy's disguise.\n Strong vs Infantry\n Weak vs Vehicles" + Selectable: + Voice: DogVoice + Bounds: 12,17,-1,-4 + Unit: + HP: 12 + Armor: none + Mobile: + Sight: 5 + Speed: 4 + RenderInfantry: + Passenger: + +E1: + Inherits: DefaultInfantry + Buildable: + TechLevel: 1 + Tab: Infantry + Owner: allies,soviet + Cost: 100 + Description: "Rifle Infantry" + LongDesc: "General-purpose infantry. Strong vs Infantry\n Weak vs Vehicles" + Selectable: + Bounds: 12,17,0,-9 + Unit: + HP: 50 + Armor: none + Mobile: + Sight: 4 + Speed: 4 + RenderInfantry: + AttackBase: + TakeCover: + SquishByTank: + AutoTarget: + Passenger: + +E2: + Inherits: DefaultInfantry + Buildable: + TechLevel: 1 + Tab: Infantry + Owner: soviet + Cost: 160 + Description: "Grenadier" + LongDesc: "Infantry armed with grenades. \n Strong vs Buildings, Infantry\n Weak vs Vehicles" + Selectable: + Bounds: 12,17,0,-9 + Unit: + HP: 50 + Armor: none + Mobile: + Sight: 4 + Speed: 5 + RenderInfantry: + AttackBase: + TakeCover: + SquishByTank: + AutoTarget: + Passenger: + +E3: + Inherits: DefaultInfantry + Buildable: + TechLevel: 2 + Tab: Infantry + Owner: allies,soviet + Cost: 300 + Description: "Rocket Soldier" + LongDesc: "Anti-tank/Anti-aircraft infantry.\n Strong vs Tanks, Aircraft\n Weak vs Infantry" + Selectable: + Bounds: 12,17,0,-9 + Unit: + HP: 45 + Armor: none + Mobile: + Sight: 4 + Speed: 3 + RenderInfantry: + AttackBase: + TakeCover: + SquishByTank: + AutoTarget: + Passenger: + +E4: + Inherits: DefaultInfantry + Buildable: + TechLevel: 6 + Tab: Infantry + Prerequisites: stek + Owner: soviet + Cost: 300 + Description: "Flamethrower" + LongDesc: "Advanced Anti-infantry unit.\n Strong vs Infantry, Buildings\n Weak vs Vehicles" + Selectable: + Bounds: 12,17,0,-9 + Unit: + HP: 40 + Armor: none + Mobile: + Sight: 4 + Speed: 3 + RenderInfantry: + AttackBase: + TakeCover: + SquishByTank: + AutoTarget: + Passenger: + +E6: + Inherits: DefaultInfantry + Buildable: + TechLevel: 5 + Tab: Infantry + Owner: soviet,allies + Cost: 500 + Description: "Engineer" + LongDesc: "Infiltrates and captures enemy structures.\n Strong vs Nothing\n Weak vs Everything" + Selectable: + Voice: EngineerVoice + Bounds: 12,17,0,-9 + Unit: + HP: 25 + Armor: none + Mobile: + Sight: 4 + Speed: 4 + EngineerCapture: + RenderInfantry: + TakeCover: + SquishByTank: + Passenger: + +SPY: + Inherits: DefaultInfantry + Buildable: + TechLevel: 6 + Tab: Infantry + Prerequisites: dome + Owner: allies + Cost: 500 + Description: "Spy" + LongDesc: "Infiltrates enemy structures to gather \nintelligence. Exact effect depends on the \nbuilding infiltrated.\n Strong vs Nothing\n Weak vs Everything\n Special Ability: Disguised" + Selectable: + Voice: SpyVoice + Bounds: 12,17,0,-9 + Unit: + HP: 25 + Armor: none + Mobile: + Sight: 5 + Speed: 4 + RenderInfantry: + TakeCover: + SquishByTank: + Passenger: + +THF: + Inherits: DefaultInfantry + Buildable: + TechLevel: 11 + Tab: Infantry + Prerequisites: atek + Owner: allies + Cost: 500 + Description: "Thief" + LongDesc: "Infiltrates enemy refineries & \nsilos, and steals money stored there.\n Unarmed" + Selectable: + Voice: ThiefVoice + Bounds: 12,17,0,-9 + Unit: + HP: 25 + Armor: none + Mobile: + Sight: 5 + Speed: 4 + RenderInfantry: + TakeCover: + SquishByTank: + Passenger: + Thief: + +E7: + Inherits: DefaultInfantry + Buildable: + TechLevel: 11 + Tab: Infantry + Prerequisites: atek,stek + Owner: allies,soviet + Cost: 1200 + Description: "Tanya" + LongDesc: "Elite commando infantry, armed with \ndual pistols and C4.\n Strong vs Infantry, Buildings\n Weak vs Vehicles\n Special Ability: Destroy Building with C4" + Selectable: + Voice: TanyaVoice + Bounds: 12,17,0,-9 + Unit: + HP: 100 + Armor: none + Mobile: + Sight: 6 + Speed: 5 + RenderInfantry: + C4Demolition: + AttackBase: + TakeCover: + SquishByTank: + AutoTarget: + Passenger: + +MEDI: + Inherits: DefaultInfantry + Buildable: + TechLevel: 2 + Tab: Infantry + Owner: allies + Cost: 800 + Description: "Medic" + LongDesc: "Heals nearby infantry.\n Strong vs Nothing\n Weak vs Everything" + Selectable: + Voice: MedicVoice + Bounds: 12,17,0,-9 + Unit: + HP: 80 + Armor: none + Mobile: + Sight: 3 + Speed: 4 + RenderInfantry: + AutoHeal: + AttackBase: + TakeCover: + SquishByTank: + Passenger: + + + + +T01 + Inherits: DefaultTree +T02 + Inherits: DefaultTree +T03 + Inherits: DefaultTree +T05 + Inherits: DefaultTree +T06 + Inherits: DefaultTree +T07 + Inherits: DefaultTree +T08 + Inherits: DefaultTree +T10 + Inherits: DefaultTree +T11 + Inherits: DefaultTree +T12 + Inherits: DefaultTree +T13 + Inherits: DefaultTree +T14 + Inherits: DefaultTree +T15 + Inherits: DefaultTree +T16 + Inherits: DefaultTree +T17 + Inherits: DefaultTree +TC01 + Inherits: DefaultTree +TC02 + Inherits: DefaultTree +TC03 + Inherits: DefaultTree +TC04 + Inherits: DefaultTree +TC05 + Inherits: DefaultTree +MINE + Inherits: DefaultTree +