diff --git a/OpenRA.Game/GameRules/TechTree.cs b/OpenRA.Game/GameRules/TechTree.cs index e3f96c645f..8d5b274130 100755 --- a/OpenRA.Game/GameRules/TechTree.cs +++ b/OpenRA.Game/GameRules/TechTree.cs @@ -39,9 +39,9 @@ namespace OpenRA.GameRules foreach( var b in player.World.Queries.OwnedBy[player].Where( x=>x.Info.Traits.Contains() ) ) { ret[ b.Info.Name ].Add( b ); - var buildable = b.Info.Traits.GetOrDefault(); - if( buildable != null ) - foreach( var alt in buildable.AlternateName ) + var tt = b.Info.Traits.GetOrDefault(); + if( tt != null ) + foreach( var alt in tt.AlternateName ) ret[ alt ].Add( b ); } return ret; diff --git a/OpenRA.Game/Traits/Buildable.cs b/OpenRA.Game/Traits/Buildable.cs index a5ba1f357d..67793530e9 100755 --- a/OpenRA.Game/Traits/Buildable.cs +++ b/OpenRA.Game/Traits/Buildable.cs @@ -13,26 +13,34 @@ namespace OpenRA.Traits public class ValuedInfo : ITraitInfo { public readonly int Cost = 0; - public readonly string Description = ""; - public readonly string LongDesc = ""; - public readonly string[] Owner = { }; - - public virtual object Create(ActorInitializer init) { return new Valued(); } + public object Create(ActorInitializer init) { return new Valued(); } } - - public class BuildableInfo : ValuedInfo + + public class TooltipInfo : ITraitInfo + { + public readonly string Description = ""; + public readonly string Name = ""; + public readonly string Icon = null; + public readonly string[] AlternateName = { }; + public object Create(ActorInitializer init) { return new Tooltip(); } + } + + public class BuildableInfo : ITraitInfo { - [ActorReference]public readonly string[] Prerequisites = { }; - [ActorReference] public readonly string[] BuiltAt = { }; - - public readonly string Icon = null; - public readonly string[] AlternateName = { }; + [ActorReference] + public readonly string[] Prerequisites = { }; + [ActorReference] + public readonly string[] BuiltAt = { }; + + public readonly string[] Owner = { }; + + // todo: UI fluff; doesn't belong here public readonly int BuildPaletteOrder = 9999; public readonly string Hotkey = null; - - public override object Create(ActorInitializer init) { return new Buildable(); } + public object Create(ActorInitializer init) { return new Buildable(); } } - class Valued { } /* halfway to buildable */ - class Buildable { } + class Valued { } + class Buildable { } + class Tooltip { } } diff --git a/OpenRA.Game/Traits/Player/ProductionQueue.cs b/OpenRA.Game/Traits/Player/ProductionQueue.cs index 50fd350379..d59ae6f2bd 100644 --- a/OpenRA.Game/Traits/Player/ProductionQueue.cs +++ b/OpenRA.Game/Traits/Player/ProductionQueue.cs @@ -54,7 +54,7 @@ namespace OpenRA.Traits for (var n = 0; n < order.TargetLocation.X; n++) // repeat count { var unit = Rules.Info[order.TargetString]; - var ui = unit.Traits.Get(); + var cost = unit.Traits.Contains() ? unit.Traits.Get().Cost : 0; var time = GetBuildTime(self, order.TargetString); if (!Rules.TechTree.BuildableItems(order.Player, unit.Category).Contains(order.TargetString)) @@ -63,7 +63,7 @@ namespace OpenRA.Traits bool hasPlayedSound = false; BeginProduction(unit.Category, - new ProductionItem(order.TargetString, (int)time, ui.Cost, + new ProductionItem(order.TargetString, (int)time, cost, () => self.World.AddFrameEndTask( _ => { @@ -102,8 +102,8 @@ namespace OpenRA.Traits return 0; if (Game.LobbyInfo.GlobalSettings.AllowCheats && self.Trait().FastBuild) return 0; - var ui = unit.Traits.Get(); - var time = ui.Cost + var cost = unit.Traits.Contains() ? unit.Traits.Get().Cost : 0; + var time = cost * self.Owner.PlayerActor.Info.Traits.Get().BuildSpeed /* todo: country-specific build speed bonus */ * (25 * 60) /* frames per min */ /* todo: build acceleration, if we do that */ / 1000; diff --git a/OpenRA.Game/Traits/Player/TechTreeCache.cs b/OpenRA.Game/Traits/Player/TechTreeCache.cs index 15ff04a027..e90f076c3e 100755 --- a/OpenRA.Game/Traits/Player/TechTreeCache.cs +++ b/OpenRA.Game/Traits/Player/TechTreeCache.cs @@ -37,7 +37,7 @@ namespace OpenRA.Traits if (owner.Country == null) return; - var effectivePrereq = prerequisites.Where( a => a.Traits.Get().Owner.Contains( owner.Country.Race ) ); + var effectivePrereq = prerequisites.Where( a => a.Traits.Contains() && a.Traits.Get().Owner.Contains( owner.Country.Race ) ); var nowHasPrerequisites = effectivePrereq.Any() && effectivePrereq.All( a => buildings[ a.Name ].Any( b => !b.Trait().Disabled ) ); diff --git a/OpenRA.Game/Traits/SupportPower.cs b/OpenRA.Game/Traits/SupportPower.cs index aa87ab76c9..91337babb5 100644 --- a/OpenRA.Game/Traits/SupportPower.cs +++ b/OpenRA.Game/Traits/SupportPower.cs @@ -96,7 +96,7 @@ namespace OpenRA.Traits var buildings = Rules.TechTree.GatherBuildings(Owner); var effectivePrereq = Info.Prerequisites .Select(a => a.ToLowerInvariant()) - .Where(a => Rules.Info[a].Traits.Get().Owner.Contains(Owner.Country.Race)); + .Where(a => Rules.Info[a].Traits.Get().Owner.Contains(Owner.Country.Race)); if (Info.Prerequisites.Count() == 0) return Owner.PlayerActor.Trait().GetPowerState() == PowerState.Normal; diff --git a/OpenRA.Game/Widgets/WorldTooltipWidget.cs b/OpenRA.Game/Widgets/WorldTooltipWidget.cs index ccf6353dc3..3c757562ca 100644 --- a/OpenRA.Game/Widgets/WorldTooltipWidget.cs +++ b/OpenRA.Game/Widgets/WorldTooltipWidget.cs @@ -47,8 +47,8 @@ namespace OpenRA.Widgets if (actor == null || !actor.IsVisible(world.LocalPlayer)) return; - var text = actor.Info.Traits.Contains() - ? actor.Info.Traits.Get().Description + var text = actor.Info.Traits.Contains() + ? actor.Info.Traits.Get().Name : actor.Info.Name; var text2 = (actor.Owner.NonCombatant) ? "" : "{0}".F(actor.Owner.PlayerName); diff --git a/OpenRA.Mods.RA/Crates/GiveUnitCrateAction.cs b/OpenRA.Mods.RA/Crates/GiveUnitCrateAction.cs index c4b6906539..16f3292fdd 100644 --- a/OpenRA.Mods.RA/Crates/GiveUnitCrateAction.cs +++ b/OpenRA.Mods.RA/Crates/GiveUnitCrateAction.cs @@ -30,7 +30,7 @@ namespace OpenRA.Mods.RA.Crates public override int GetSelectionShares(Actor collector) { - var valuedInfo = Rules.Info[Info.Unit].Traits.Get(); + var valuedInfo = Rules.Info[Info.Unit].Traits.Get(); return valuedInfo.Owner.Contains(collector.Owner.Country.Race) ? base.GetSelectionShares(collector) : 0; // this unit is not buildable by the collector's country, so diff --git a/OpenRA.Mods.RA/Widgets/BuildPaletteWidget.cs b/OpenRA.Mods.RA/Widgets/BuildPaletteWidget.cs index be8204a1c6..58430c97bc 100755 --- a/OpenRA.Mods.RA/Widgets/BuildPaletteWidget.cs +++ b/OpenRA.Mods.RA/Widgets/BuildPaletteWidget.cs @@ -61,7 +61,7 @@ namespace OpenRA.Mods.RA.Widgets .Where(u => u.Traits.Contains()) .ToDictionary( u => u.Name, - u => SpriteSheetBuilder.LoadAllSprites(u.Traits.Get().Icon ?? (u.Name + "icon"))[0]); + u => SpriteSheetBuilder.LoadAllSprites(u.Traits.Get().Icon ?? (u.Name + "icon"))[0]); var groups = Rules.Categories(); @@ -331,7 +331,7 @@ namespace OpenRA.Mods.RA.Widgets if( a[ 0 ] == '@' ) return "any " + a.Substring( 1 ); else - return Rules.Info[ a.ToLowerInvariant() ].Traits.Get().Description; + return Rules.Info[ a.ToLowerInvariant() ].Traits.Get().Name; } void HandleBuildPalette( World world, string item, bool isLmb ) @@ -457,24 +457,25 @@ namespace OpenRA.Mods.RA.Widgets var p = pos.ToFloat2() - new float2(297, -3); var info = Rules.Info[unit]; + var tooltip = info.Traits.Get(); var buildable = info.Traits.Get(); - + var cost = info.Traits.Get().Cost; var buildings = Rules.TechTree.GatherBuildings( pl ); var canBuildThis = Rules.TechTree.CanBuild(info, pl, buildings); - var longDescSize = Game.Renderer.RegularFont.Measure(buildable.LongDesc.Replace("\\n", "\n")).Y; + var longDescSize = Game.Renderer.RegularFont.Measure(tooltip.Description.Replace("\\n", "\n")).Y; if (!canBuildThis) longDescSize += 8; WidgetUtils.DrawPanel("dialog4", new Rectangle(Game.viewport.Width - 300, pos.Y, 300, longDescSize + 65)); Game.Renderer.BoldFont.DrawText( - buildable.Description + ((buildable.Hotkey != null)? " ({0})".F(buildable.Hotkey.ToUpper()) : ""), + tooltip.Name + ((buildable.Hotkey != null)? " ({0})".F(buildable.Hotkey.ToUpper()) : ""), p.ToInt2() + new int2(5, 5), Color.White); var resources = pl.PlayerActor.Trait(); - DrawRightAligned("${0}".F(buildable.Cost), pos + new int2(-5, 5), - (resources.DisplayCash + resources.DisplayOre >= buildable.Cost ? Color.White : Color.Red )); + DrawRightAligned("${0}".F(cost), pos + new int2(-5, 5), + (resources.DisplayCash + resources.DisplayOre >= cost ? Color.White : Color.Red )); var lowpower = resources.GetPowerState() != PowerState.Normal; var time = ProductionQueue.GetBuildTime(pl.PlayerActor, info.Name) @@ -500,7 +501,7 @@ namespace OpenRA.Mods.RA.Widgets } p += new int2(0, 15); - Game.Renderer.RegularFont.DrawText(buildable.LongDesc.Replace("\\n", "\n"), + Game.Renderer.RegularFont.DrawText(tooltip.Description.Replace("\\n", "\n"), p.ToInt2(), Color.White); Game.Renderer.RgbaSpriteRenderer.Flush(); diff --git a/mods/cnc/civilian.yaml b/mods/cnc/civilian.yaml index ddf850c6a1..c2ba704f03 100644 --- a/mods/cnc/civilian.yaml +++ b/mods/cnc/civilian.yaml @@ -6,8 +6,8 @@ V01: Building: Footprint: xx xx Dimensions: 2,2 - Valued: - Description: Church + Tooltip: + Name: Church V02: Inherits: ^CivBuilding @@ -147,15 +147,18 @@ BARB: Health: HP: 100 Armor: none - Valued: - Description: Wire Fence + Tooltip: + Name: Wire Fence + Icon: barbicnh + WOOD: Inherits: ^Wall Health: HP: 100 Armor: none - Valued: - Description: Wooden Fence + Tooltip: + Name: Wooden Fence + Icon: woodicnh BRIDGE1: Inherits: ^Bridge diff --git a/mods/cnc/defaults.yaml b/mods/cnc/defaults.yaml index 41d0c94290..ffd2bee16d 100644 --- a/mods/cnc/defaults.yaml +++ b/mods/cnc/defaults.yaml @@ -102,7 +102,8 @@ Bounds: 12,17,0,-9 Valued: Cost: 70 - Description: Civilian + Tooltip: + Name: Civilian Mobile: Speed: 4 Health: @@ -186,16 +187,16 @@ Armor: wood Building: -RepairableBuilding: - Valued: - Description: Civilian Building + Tooltip: + Name: Civilian Building ^CivField: Inherits: ^CivBuilding -Selectable: DeadBuildingState: Zombie: true - Valued: - Description: Field + Tooltip: + Name: Field RenderBuilding: OverrideTheater: DESERT OverrideImage: v23 @@ -227,8 +228,8 @@ ^Tree: Category: Building - Valued: - Description: Tree + Tooltip: + Name: Tree RenderBuilding: Palette: terrain Building: @@ -239,8 +240,8 @@ Terrain: Tree ^Rock: Category: Building - Valued: - Description: Rock + Tooltip: + Name: Rock RenderBuilding: Palette: terrain Building: @@ -264,8 +265,8 @@ ^Bridge: Category: Building - Valued: - Description: Bridge + Tooltip: + Name: Bridge Targetable: TargetTypes: Ground, Water BelowUnits: diff --git a/mods/cnc/infantry.yaml b/mods/cnc/infantry.yaml index eeca728fed..54bb2765e8 100644 --- a/mods/cnc/infantry.yaml +++ b/mods/cnc/infantry.yaml @@ -1,12 +1,14 @@ E1: Inherits: ^Infantry + Valued: + Cost: 100 + Tooltip: + Name: Minigunner + Description: General-purpose infantry.\n Strong vs Infantry\n Weak vs Vehicles + Icon: e1icnh Buildable: BuildPaletteOrder: 10 Owner: gdi, nod - Cost: 100 - Description: Minigunner - LongDesc: General-purpose infantry.\n Strong vs Infantry\n Weak vs Vehicles - Icon: e1icnh Selectable: Bounds: 12,17,0,-6 Mobile: @@ -19,14 +21,16 @@ E1: E2: Inherits: ^Infantry + Valued: + Cost: 160 + Tooltip: + Name: Grenadier + Description: Infantry armed with grenades. \n Strong vs Buildings, Infantry\n Weak vs Vehicles + Icon: e2icnh Buildable: BuildPaletteOrder: 40 Prerequisites: hq Owner: gdi - Cost: 160 - Description: Grenadier - LongDesc: Infantry armed with grenades. \n Strong vs Buildings, Infantry\n Weak vs Vehicles - Icon: e2icnh Selectable: Bounds: 12,17,0,-6 Mobile: @@ -41,13 +45,15 @@ E2: E3: Inherits: ^Infantry + Valued: + Cost: 300 + Tooltip: + Name: Rocket Soldier + Description: Anti-tank/Anti-aircraft infantry. \n Strong vs Tanks, Aircraft\n Weak vs Infantry + Icon: e3icnh Buildable: BuildPaletteOrder: 20 Owner: nod, gdi - Cost: 300 - Description: Rocket Soldier - LongDesc: Anti-tank/Anti-aircraft infantry. \n Strong vs Tanks, Aircraft\n Weak vs Infantry - Icon: e3icnh Selectable: Bounds: 12,17,0,-6 Mobile: @@ -62,14 +68,16 @@ E3: E4: Inherits: ^Infantry + Valued: + Cost: 200 + Tooltip: + Name: Flamethrower + Description: Advanced Anti-infantry unit.\n Strong vs Infantry, Buildings\n Weak vs Vehicles + Icon: e4icnh Buildable: BuildPaletteOrder: 40 Owner: nod Prerequisites: hq - Cost: 200 - Description: Flamethrower - LongDesc: Advanced Anti-infantry unit.\n Strong vs Infantry, Buildings\n Weak vs Vehicles - Icon: e4icnh Selectable: Bounds: 12,17,0,-6 Mobile: @@ -87,13 +95,15 @@ E4: E5: Inherits: ^Infantry + Valued: + Cost: 300 + Tooltip: + Name: Chem Warrior + Description: Advanced Anti-infantry unit.\n Strong vs Infantry\n Weak vs Vehicles + Icon: e5icnh Buildable: BuildPaletteOrder: 50 Owner: nod - Cost: 300 - Description: Chem Warrior - LongDesc: Advanced Anti-infantry unit.\n Strong vs Infantry\n Weak vs Vehicles - Icon: e5icnh Prerequisites: tmpl Selectable: Bounds: 12,17,0,-6 @@ -113,13 +123,15 @@ E5: E6: Inherits: ^Infantry + Valued: + Cost: 500 + Tooltip: + Name: Engineer + Description: Infiltrates and captures enemy structures.\n Strong vs Nothing\n Weak vs Everything + Icon: e6icnh Buildable: BuildPaletteOrder: 30 Owner: gdi,nod - Cost: 500 - Description: Engineer - LongDesc: Infiltrates and captures enemy structures.\n Strong vs Nothing\n Weak vs Everything - Icon: e6icnh Selectable: Bounds: 12,17,0,-6 Mobile: @@ -135,14 +147,16 @@ E6: RMBO: Inherits: ^Infantry + Valued: + Cost: 1000 + Tooltip: + Icon: rmboicnh + Name: Commando + Description: Elite sniper infantry unit.\n Strong vs Infantry, Buildings\n Weak vs Vehicles Buildable: BuildPaletteOrder: 50 Owner: gdi - Cost: 1000 Prerequisites: eye - Icon: rmboicnh - Description: Commando - LongDesc: Elite sniper infantry unit.\n Strong vs Infantry, Buildings\n Weak vs Vehicles Selectable: Bounds: 12,17,0,-6 Voice: CommandoVoice diff --git a/mods/cnc/structures.yaml b/mods/cnc/structures.yaml index 08a5a88e7e..4b250e3750 100644 --- a/mods/cnc/structures.yaml +++ b/mods/cnc/structures.yaml @@ -2,7 +2,10 @@ FACT: Inherits: ^Building Valued: Cost: 2000 - Description: Construction Yard + Tooltip: + Name: Construction Yard + Icon: mcvicnh + Description: Builds structures Building: Power: 15 Footprint: xxx xxx xxx @@ -23,13 +26,15 @@ FACT: Facing: 108 NUKE: Inherits: ^Building - Buildable: + Valued: + Cost: 300 + Tooltip: + Name: Power Plant Icon: nukeicnh + Description: Provides power for other structures + Buildable: BuildPaletteOrder: 10 Owner: gdi,nod - Cost: 300 - Description: Power Plant - LongDesc: Provides power for other structures Building: Power: 100 Footprint: x_ xx @@ -44,14 +49,16 @@ NUKE: PROC.proxy: Inherits: ^Building - Buildable: + Valued: + Cost: 2000 + Tooltip: + Name: Tiberium Refinery Icon: procicnh + Description: Processes raw Tiberium into useable resources + Buildable: BuildPaletteOrder: 30 Prerequisites: nuke Owner: gdi,nod - Cost: 2000 - Description: Tiberium Refinery - LongDesc: Processes raw Tiberium into useable resources Building: Power: -50 Footprint: ___xx xxxxx xxx__ xxx__ @@ -69,8 +76,10 @@ PROC: Inherits: ^Building Valued: Cost: 1700 - Description: Tiberium Refinery - LongDesc: Processes raw Tiberium into useable resources + Tooltip: + Name: Tiberium Refinery + Icon: procicnh + Description: Processes raw Tiberium into useable resources Building: Power: -30 Footprint: ___ xxx === @@ -106,14 +115,16 @@ PROC: SpawnOffset: 3,1 SILO: Inherits: ^Building - Buildable: + Valued: + Cost: 150 + Tooltip: + Name: Tiberium Silo Icon: siloicnh + Description: Stores processed Tiberium + Buildable: BuildPaletteOrder: 20 Prerequisites: proc Owner: gdi,nod - Cost: 150 - Description: Tiberium Silo - LongDesc: Stores processed Tiberium Building: Power: -10 Footprint: xx @@ -134,15 +145,17 @@ SILO: PYLE: Inherits: ^Building - Buildable: + Valued: + Cost: 300 + Tooltip: + Name: Barracks Icon: pyleicnh + Description: Trains infantry + AlternateName: @Barracks + Buildable: BuildPaletteOrder: 40 Prerequisites: nuke Owner: gdi - Cost: 300 - Description: Barracks - LongDesc: Trains infantry - AlternateName: @Barracks Building: Power: -20 Footprint: xx xx @@ -163,15 +176,17 @@ PYLE: HAND: Inherits: ^Building - Buildable: + Valued: + Cost: 300 + Tooltip: + Name: Hand of Nod Icon: handicnh + Description: Trains infantry + AlternateName: @Barracks + Buildable: BuildPaletteOrder: 40 Prerequisites: nuke Owner: nod - Cost: 300 - Description: Hand of Nod - LongDesc: Trains infantry - AlternateName: @Barracks Building: Power: -20 Footprint: __ xx xx @@ -192,15 +207,17 @@ HAND: AFLD: Inherits: ^Building - Buildable: + Valued: + Cost: 2000 + Tooltip: + Name: Airstrip Icon: afldicnh + AlternateName: @Vehicle Production + Description: Provides a dropzone for vehicle reinforcements + Buildable: BuildPaletteOrder: 60 Prerequisites: proc Owner: nod - Cost: 2000 - Description: Airstrip - AlternateName: @Vehicle Production - LongDesc: Provides a dropzone for vehicle reinforcements Building: Power: -30 Footprint: xxxx xxxx @@ -223,15 +240,17 @@ AFLD: WEAP: Inherits: ^Building - Buildable: + Valued: + Cost: 2000 + Tooltip: + Name: Weapons Factory Icon: weapicnh + AlternateName: @Vehicle Production + Description: Assembly point for vehicle reinforcements + Buildable: BuildPaletteOrder: 60 Prerequisites: proc Owner: gdi - Cost: 2000 - Description: Weapons Factory - AlternateName: @Vehicle Production - LongDesc: Assembly point for vehicle reinforcements Building: Power: -30 Footprint: ___ xxx === @@ -256,14 +275,16 @@ HQ: RequiresPower: CanPowerDown: Inherits: ^Building - Buildable: + Valued: + Cost: 1000 + Tooltip: + Name: Communications Center Icon: hqicnh + Description: Provides an overview of the battlefield.\n Requires power to operate. + Buildable: BuildPaletteOrder: 80 Prerequisites: proc Owner: gdi,nod - Cost: 1000 - Description: Communications Center - LongDesc: Provides an overview of the battlefield.\n Requires power to operate. Building: Power: -40 Footprint: __ xx @@ -281,14 +302,16 @@ HQ: NUK2: Inherits: ^Building - Buildable: + Valued: + Cost: 500 + Tooltip: + Name: Advanced Power Plant Icon:nuk2icnh + Description: Provides more power, cheaper than the \nstandard Power Plant + Buildable: BuildPaletteOrder: 90 Prerequisites: hq Owner: gdi,nod - Cost: 500 - Description: Advanced Power Plant - LongDesc: Provides more power, cheaper than the \nstandard Power Plant Building: Power: 200 Footprint: xx xx @@ -303,14 +326,16 @@ NUK2: FIX: Inherits: ^Building - Buildable: + Valued: + Cost: 1200 + Tooltip: + Name: Repair Facility Icon: fixicnh + Description: Repairs vehicles and allows the\nconstruction of additional bases. + Buildable: BuildPaletteOrder: 70 Prerequisites: @Vehicle Production Owner: gdi,nod - Cost: 1200 - Description: Repair Facility - LongDesc: Repairs vehicles and allows the\nconstruction of additional bases. Building: Power: -30 Footprint: _x_ xxx _x_ @@ -328,14 +353,16 @@ FIX: HPAD: Inherits: ^Building - Buildable: + Valued: + Cost: 1500 + Tooltip: + Name: Helipad Icon:hpadicnh + Description: Produces and reloads helicopters + Buildable: BuildPaletteOrder: 50 Prerequisites: @Barracks Owner: gdi,nod - Cost: 1500 - Description: Helipad - LongDesc: Produces and reloads helicopters Building: Power: -10 Footprint: xx xx @@ -361,15 +388,17 @@ EYE: RequiresPower: CanPowerDown: Inherits: ^Building - Buildable: + Valued: + Cost: 1800 + Tooltip: + Name: Advanced Communications Center Icon: eyeicnh + Description: Provides access to the Ion Cannon.\n Requires power to operate. + AlternateName: @Superweapon + Buildable: BuildPaletteOrder: 100 Prerequisites: hq Owner: gdi - Cost: 1800 - Description: Advanced Communications Center - LongDesc: Provides access to the Ion Cannon.\n Requires power to operate. - AlternateName: @Superweapon Building: Power: -200 Footprint: __ xx @@ -388,15 +417,17 @@ TMPL: RequiresPower: CanPowerDown: Inherits: ^Building - Buildable: + Valued: + Cost: 2000 + Tooltip: + Name: Temple of Nod Icon: tmplicnh + Description: Place of worship and secret missile silo.\nRequires power to operate. + AlternateName: @Superweapon + Buildable: BuildPaletteOrder: 100 Prerequisites: hq Owner: nod - Cost: 2000 - Description: Temple of Nod - LongDesc: Place of worship and secret missile silo.\nRequires power to operate. - AlternateName: @Superweapon Building: Power: -150 Footprint: ___ xxx xxx @@ -415,14 +446,16 @@ OBLI: Category: Defense RequiresPower: Inherits: ^Building - Buildable: + Valued: + Cost: 1500 + Tooltip: + Name: Obelisk of Light Icon:obliicnh + Description: Advanced base defense. Requires power\nto operate.\n Strong vs Tanks, Infantry\n Weak vs Aircraft + Buildable: BuildPaletteOrder: 60 Prerequisites: tmpl Owner: nod - Cost: 1500 - Description: Obelisk of Light - LongDesc: Advanced base defense. Requires power\nto operate.\n Strong vs Tanks, Infantry\n Weak vs Aircraft Building: Power: -150 Footprint: _ x @@ -446,14 +479,16 @@ OBLI: CYCL: Category: Defense Inherits: ^Wall - Buildable: + Valued: + Cost: 25 + Tooltip: + Name: Chain Link Barrier Icon:cyclicnh + Description: Stops infantry and blocks enemy fire.\nCan be crushed by tanks. + Buildable: BuildPaletteOrder: 10 Prerequisites: fact Owner: nod - Cost: 25 - Description: Chain Link Barrier - LongDesc: Stops infantry and blocks enemy fire.\nCan be crushed by tanks. Health: HP: 300 Armor: none @@ -461,14 +496,16 @@ CYCL: SBAG: Category: Defense Inherits: ^Wall - Buildable: + Valued: + Cost: 25 + Tooltip: + Name: Sandbag Barrier Icon:sbagicnh + Description: Stops infantry and blocks enemy fire.\nCan be crushed by tanks. + Buildable: BuildPaletteOrder: 20 Prerequisites: fact Owner: gdi - Cost: 25 - Description: Sandbag Barrier - LongDesc: Stops infantry and blocks enemy fire.\nCan be crushed by tanks. Health: HP: 250 Armor: none @@ -476,14 +513,16 @@ SBAG: BRIK: Category: Defense Inherits: ^Wall - Buildable: + Valued: + Cost: 100 + Tooltip: + Name: Concrete Barrier Icon:brikicnh + Description: Stop units and blocks enemy fire. + Buildable: BuildPaletteOrder: 30 Prerequisites: fact Owner: gdi,nod - Cost: 100 - Description: Concrete Barrier - LongDesc: Stop units and blocks enemy fire. Health: HP: 1000 Armor: heavy @@ -493,14 +532,16 @@ BRIK: GUN: Category: Defense Inherits: ^Building - Buildable: + Valued: + Cost: 600 + Tooltip: + Name: Turret Icon: gunicnh + Description: Anti-Armor base defense.\n Strong vs Tanks\n Weak vs Infantry, Aircraft + Buildable: BuildPaletteOrder: 40 Prerequisites: hand Owner: nod - Cost: 600 - Description: Turret - LongDesc: Anti-Armor base defense.\n Strong vs Tanks\n Weak vs Infantry, Aircraft Building: Power: -20 Health: @@ -522,14 +563,16 @@ GUN: SAM: Category: Defense Inherits: ^Building - Buildable: + Valued: + Cost: 750 + Tooltip: + Name: SAM Site Icon: samicnh + Description: Anti-Air base defense.\n Strong vs Aircraft\n Weak vs Infantry, Tanks + Buildable: BuildPaletteOrder: 50 Prerequisites: hand Owner: nod - Cost: 750 - Description: SAM Site - LongDesc: Anti-Air base defense.\n Strong vs Aircraft\n Weak vs Infantry, Tanks Building: Power: -20 Footprint: xx @@ -553,14 +596,16 @@ SAM: GTWR: Category: Defense Inherits: ^Building - Buildable: + Valued: + Cost: 500 + Tooltip: + Name: Guard Tower Icon: gtwricnh + Description: Basic defensive structure.\n Strong vs Infantry, Light Vehicles\n Weak vs Tanks, Aircraft + Buildable: BuildPaletteOrder: 50 Prerequisites: pyle Owner: gdi - Cost: 500 - Description: Guard Tower - LongDesc: Basic defensive structure.\n Strong vs Infantry, Light Vehicles\n Weak vs Tanks, Aircraft Building: Power: -10 Health: @@ -578,14 +623,16 @@ GTWR: ATWR: Category: Defense Inherits: ^Building - Buildable: + Valued: + Cost: 1000 + Tooltip: + Name: Advanced Guard Tower Icon: atwricnh + Description: Anti-armor defensive structure.\n Strong vs Light Vehicles, Tanks\n Weak vs Infantry + Buildable: BuildPaletteOrder: 60 Prerequisites: hq Owner: gdi - Cost: 1000 - Description: Advanced Guard Tower - LongDesc: Anti-armor defensive structure.\n Strong vs Light Vehicles, Tanks\n Weak vs Infantry Building: Power: -20 Health: diff --git a/mods/cnc/system.yaml b/mods/cnc/system.yaml index 85fd966b25..93b93dbf38 100644 --- a/mods/cnc/system.yaml +++ b/mods/cnc/system.yaml @@ -146,9 +146,8 @@ World: WaterChance: 0 CRATE: - Valued: - Cost: 0 - Description: Crate + Tooltip: + Name: Crate Crate: Lifetime: 120 TerrainTypes: Clear, Rough, Road, Ore, Beach diff --git a/mods/cnc/trees.yaml b/mods/cnc/trees.yaml index 2c69fe3a55..3c0e5dfabf 100644 --- a/mods/cnc/trees.yaml +++ b/mods/cnc/trees.yaml @@ -4,8 +4,8 @@ SPLIT2: Palette: terrain SeedsResource: ResourceType:Tiberium - Valued: - Description: Blossom Tree + Tooltip: + Name: Blossom Tree -Selectable: RadarColorFromTerrain: Terrain: Ore @@ -16,8 +16,8 @@ SPLIT3: Palette: terrain SeedsResource: ResourceType:Tiberium - Valued: - Description: Blossom Tree + Tooltip: + Name: Blossom Tree -Selectable: RadarColorFromTerrain: Terrain: Ore diff --git a/mods/cnc/vehicles.yaml b/mods/cnc/vehicles.yaml index 0d9b2a0061..73e945c0d7 100644 --- a/mods/cnc/vehicles.yaml +++ b/mods/cnc/vehicles.yaml @@ -1,13 +1,15 @@ MCV: Inherits: ^Vehicle - Buildable: + Valued: + Cost: 2000 + Tooltip: + Name: Mobile Construction Vehicle Icon: mcvicnh + Description: Deploys into another Construction Yard.\n Unarmed + Buildable: BuildPaletteOrder: 70 Prerequisites: fix Owner: gdi,nod - Cost: 2000 - Description: Mobile Construction Vehicle - LongDesc: Deploys into another Construction Yard.\n Unarmed Selectable: Priority: 3 Mobile: @@ -28,14 +30,16 @@ MCV: HARV: Inherits: ^Tank - Buildable: + Valued: + Cost: 1400 + Tooltip: + Name: Harvester Icon: harvicnh + Description: Collects Tiberium for processing.\n Unarmed + Buildable: BuildPaletteOrder: 10 Prerequisites: proc Owner: gdi,nod - Cost: 1400 - Description: Harvester - LongDesc: Collects Tiberium for processing.\n Unarmed Selectable: Priority: 7 Harvester: @@ -54,14 +58,16 @@ HARV: APC: Inherits: ^Tank - Buildable: + Valued: + Cost: 700 + Tooltip: + Name: Armored Personnel Carrier Icon: apcicnh + Description: Tough infantry transport.\n Strong vs Infantry, Light Vehicles\n Weak vs Tanks, Aircraft + Buildable: BuildPaletteOrder: 30 Prerequisites: pyle Owner: gdi - Cost: 700 - Description: Armored Personnel Carrier - LongDesc: Tough infantry transport.\n Strong vs Infantry, Light Vehicles\n Weak vs Tanks, Aircraft Mobile: ROT: 5 Speed: 15 @@ -84,14 +90,16 @@ APC: ARTY: Inherits: ^Tank - Buildable: + Valued: + Cost: 600 + Tooltip: + Name: Artillery Icon:artyicnh + Description: Long-range artillery.\n Strong vs Infantry, Buildings\n Weak vs Tanks, Aircraft + Buildable: BuildPaletteOrder: 40 Prerequisites: hq Owner: gdi - Cost: 600 - Description: Artillery - LongDesc: Long-range artillery.\n Strong vs Infantry, Buildings\n Weak vs Tanks, Aircraft Mobile: ROT: 2 Speed: 6 @@ -108,14 +116,16 @@ ARTY: FTNK: Inherits: ^Tank - Buildable: + Valued: + Cost: 800 + Tooltip: + Name: Flame Tank Icon: ftnkicnh + Description: Heavily armored flame-throwing vehicle.\n Strong vs Infantry, Buildings\n Weak vs Aircraft + Buildable: BuildPaletteOrder: 50 Prerequisites: hq Owner: nod - Cost: 800 - Description: Flame Tank - LongDesc: Heavily armored flame-throwing vehicle.\n Strong vs Infantry, Buildings\n Weak vs Aircraft Mobile: ROT: 5 Speed: 9 @@ -133,14 +143,16 @@ FTNK: BGGY: Inherits: ^Vehicle - Buildable: + Valued: + Cost: 300 + Tooltip: + Name: Nod Buggy Icon: bggyicnh + Description: Fast scout & anti-infantry vehicle.\n Strong vs Infantry\n Weak vs Tanks, Aircraft + Buildable: BuildPaletteOrder: 20 Prerequisites: afld Owner: nod - Cost: 300 - Description: Nod Buggy - LongDesc: Fast scout & anti-infantry vehicle.\n Strong vs Infantry\n Weak vs Tanks, Aircraft Mobile: ROT: 10 Speed: 18 @@ -160,14 +172,16 @@ BGGY: BIKE: Inherits: ^Vehicle - Buildable: + Valued: + Cost: 450 + Tooltip: + Name: Recon Bike Icon: bikeicnh + Description: Fast scout vehicle, armed with \nrockets.\n Strong vs Vehicles, Aircraft\n Weak vs Infantry + Buildable: BuildPaletteOrder: 30 Prerequisites: afld Owner: nod - Cost: 450 - Description: Recon Bike - LongDesc: Fast scout vehicle, armed with \nrockets.\n Strong vs Vehicles, Aircraft\n Weak vs Infantry Mobile: ROT: 10 Speed: 20 @@ -188,14 +202,16 @@ BIKE: JEEP: Inherits: ^Vehicle - Buildable: + Valued: + Cost: 400 + Tooltip: + Name: Hum-Vee Icon: jeepicnh + Description: Fast scout & anti-infantry vehicle.\n Strong vs Infantry\n Weak vs Tanks, Aircraft + Buildable: BuildPaletteOrder: 20 Prerequisites: weap Owner: gdi - Cost: 400 - Description: Hum-Vee - LongDesc: Fast scout & anti-infantry vehicle.\n Strong vs Infantry\n Weak vs Tanks, Aircraft Mobile: ROT: 10 Speed: 15 @@ -215,14 +231,16 @@ JEEP: LTNK: Inherits: ^Tank - Buildable: + Valued: + Cost: 600 + Tooltip: + Name: Light Tank Icon: ltnkicnh + Description: Light Tank, good for scouting.\n Strong vs Light Vehicles\n Weak vs Tanks, Aircraft + Buildable: BuildPaletteOrder: 30 Prerequisites: hq Owner: nod - Cost: 600 - Description: Light Tank - LongDesc: Light Tank, good for scouting.\n Strong vs Light Vehicles\n Weak vs Tanks, Aircraft Mobile: Speed: 9 Health: @@ -245,14 +263,16 @@ LTNK: MTNK: Inherits: ^Tank - Buildable: + Valued: + Cost: 800 + Tooltip: + Name: Medium Tank Icon: mtnkicnh + Description: General-Purpose GDI Tank.\n Strong vs Tanks, Light Vehicles\n Weak vs Infantry, Aircraft + Buildable: BuildPaletteOrder: 30 Prerequisites: hq Owner: gdi - Cost: 800 - Description: Medium Tank - LongDesc: General-Purpose GDI Tank.\n Strong vs Tanks, Light Vehicles\n Weak vs Infantry, Aircraft Mobile: Speed: 9 Health: @@ -275,14 +295,16 @@ MTNK: HTNK: Inherits: ^Tank - Buildable: + Valued: + Cost: 1500 + Tooltip: + Name: Mammoth Tank Icon: htnkicnh + Description: Heavily armored GDI Tank.\n Strong vs Everything + Buildable: BuildPaletteOrder: 60 Prerequisites: eye Owner: gdi - Cost: 1500 - Description: Mammoth Tank - LongDesc: Heavily armored GDI Tank.\n Strong vs Everything Mobile: Crushes: wall, heavywall Speed: 3 @@ -310,14 +332,16 @@ HTNK: MSAM: Inherits: ^Tank - Buildable: + Valued: + Cost: 800 + Tooltip: + Name: Rocket Launcher Icon: msamicnh + Description: Long range artillery.\n Strong vs Infantry, Buildings\n Weak vs Tanks, Aircraft + Buildable: BuildPaletteOrder: 50 Prerequisites: hq Owner: gdi - Cost: 800 - Description: Rocket Launcher - LongDesc: Long range artillery.\n Strong vs Infantry, Buildings\n Weak vs Tanks, Aircraft Mobile: Speed: 6 Health: @@ -342,14 +366,16 @@ MSAM: MLRS: Inherits: ^Tank - Buildable: + Valued: + Cost: 750 + Tooltip: + Name: SSM Launcher Icon: mlrsicnh + Description: Long range artillery.\n Strong vs Infantry, Aircraft\n Weak vs Tanks, Aircraft + Buildable: BuildPaletteOrder: 60 Prerequisites: hq Owner: nod - Cost: 750 - Description: SSM Launcher - LongDesc: Long range artillery.\n Strong vs Infantry, Aircraft\n Weak vs Tanks, Aircraft Mobile: Speed: 6 Health: @@ -369,14 +395,16 @@ MLRS: STNK: Inherits: ^Vehicle - Buildable: + Valued: + Cost: 900 + Tooltip: + Name: Stealth Tank Icon: stnkicnh + Description: Missile tank that can bend light around \nitself to become invisible\n Strong vs Infantry, Aircraft\n Weak vs Tanks + Buildable: BuildPaletteOrder: 90 Prerequisites: tmpl Owner: nod - Cost: 900 - Description: Stealth Tank - LongDesc: Missile tank that can bend light around \nitself to become invisible\n Strong vs Infantry, Aircraft\n Weak vs Tanks Mobile: Speed: 15 Health: @@ -396,15 +424,17 @@ STNK: TRAN: Inherits: ^Helicopter - Buildable: + Valued: + Cost: 1500 + Tooltip: + Name: Chinook Transport Icon:tranicnh + Description: Fast Infantry Transport Helicopter.\n Unarmed + Buildable: BuildPaletteOrder: 10 Prerequisites: hpad BuiltAt: hpad Owner: gdi,nod - Cost: 1500 - Description: Chinook Transport - LongDesc: Fast Infantry Transport Helicopter.\n Unarmed Helicopter: LandWhenIdle: true ROT: 5 @@ -425,15 +455,17 @@ TRAN: HELI: Inherits: ^Helicopter - Buildable: + Valued: + Cost: 1200 + Tooltip: + Name: Apache Longbow Icon: heliicnh + Description: Helicopter Gunship with AG Missiles.\n Strong vs Buildings, Tanks\n Weak vs Infantry + Buildable: BuildPaletteOrder: 20 Prerequisites: hpad, hq BuiltAt: hpad Owner: nod - Cost: 1200 - Description: Apache Longbow - LongDesc: Helicopter Gunship with AG Missiles.\n Strong vs Buildings, Tanks\n Weak vs Infantry Helicopter: ROT: 4 Speed: 20 @@ -453,15 +485,17 @@ HELI: ORCA: Inherits: ^Helicopter - Buildable: + Valued: + Cost: 1200 + Tooltip: + Name: Orca Icon: orcaicnh + Description: Helicopter Gunship with AG Missiles.\n Strong vs Buildings, Tanks\n Weak vs Infantry + Buildable: BuildPaletteOrder: 20 Prerequisites: hpad, hq BuiltAt: hpad Owner: gdi - Cost: 1200 - Description: Orca - LongDesc: Helicopter Gunship with AG Missiles.\n Strong vs Buildings, Tanks\n Weak vs Infantry Helicopter: ROT: 4 Speed: 20 @@ -482,6 +516,8 @@ C17: ParaDrop: LZRange: 1 Inherits: ^Plane + Tooltip: + Name: Supply Aircraft Plane: ROT: 5 Speed: 25 @@ -500,6 +536,9 @@ C17: A10: Inherits: ^Plane + Tooltip: + Name: A10 Bomber + Icon: a10icnh Plane: ROT: 4 Speed: 25 @@ -519,7 +558,9 @@ BOAT: Inherits: ^Ship Valued: Cost: 300 - Description: Gunboat + Tooltip: + Name: Gunboat + Icon: boaticnh Health: HP: 700 Armor: heavy @@ -544,7 +585,8 @@ LST: Inherits: ^Ship Valued: Cost: 300 - Description: Landing Craft + Tooltip: + Name: Landing Craft Mobile: Crushes: crate TerrainTypes: Clear, Rough, Road, Tree, Water, Rock, Wall, Ore, Beach, River @@ -567,8 +609,9 @@ LST: LTNK.Husk: Inherits: ^Husk - Valued: - Description: Husk (Light Tank) + Tooltip: + Name: Husk (Light Tank) + Icon: ltnkicnh RenderUnit: Image: ltnk ThrowsParticle@turret: @@ -579,8 +622,9 @@ LTNK.Husk: MTNK.Husk: Inherits: ^Husk - Valued: - Description: Husk (Medium Tank) + Tooltip: + Name: Husk (Medium Tank) + Icon: mtnkicnh RenderUnit: Image: mtnk ThrowsParticle@turret: @@ -591,8 +635,9 @@ MTNK.Husk: HTNK.Husk: Inherits: ^Husk - Valued: - Description: Husk (Mammoth Tank) + Tooltip: + Name: Husk (Mammoth Tank) + Icon: htnkicnh RenderUnit: Image: htnk ThrowsParticle@turret: @@ -603,8 +648,9 @@ HTNK.Husk: MSAM.Husk: Inherits: ^Husk - Valued: - Description: Husk (Rocket Launcher) + Tooltip: + Name: Husk (Rocket Launcher) + Icon: msamicnh RenderUnit: Image: msam ThrowsParticle@turret: @@ -615,8 +661,9 @@ MSAM.Husk: MLRS.Husk: Inherits: ^Husk - Valued: - Description: Husk (SSM Launcher) + Tooltip: + Name: Husk (SSM Launcher) + Icon: mlrsicnh RenderUnit: Image: mlrs ThrowsParticle@turret: