diff --git a/OpenRA.Mods.Common/Traits/Sound/AmbientSound.cs b/OpenRA.Mods.Common/Traits/Sound/AmbientSound.cs index 540e641765..b9826d5d7c 100644 --- a/OpenRA.Mods.Common/Traits/Sound/AmbientSound.cs +++ b/OpenRA.Mods.Common/Traits/Sound/AmbientSound.cs @@ -18,7 +18,7 @@ namespace OpenRA.Mods.Common.Traits.Sound class AmbientSoundInfo : ConditionalTraitInfo { [FieldLoader.Require] - public readonly string SoundFile = null; + public readonly string[] SoundFiles = null; [Desc("Initial delay (in ticks) before playing the sound for the first time.", "Two values indicate a random delay range.")] @@ -74,16 +74,18 @@ namespace OpenRA.Mods.Common.Traits.Sound void StartSound(Actor self) { + var sound = Info.SoundFiles.RandomOrDefault(Game.CosmeticRandom); + ISound s; if (self.OccupiesSpace != null) { cachedPosition = self.CenterPosition; - s = loop ? Game.Sound.PlayLooped(SoundType.World, Info.SoundFile, cachedPosition) : - Game.Sound.Play(SoundType.World, Info.SoundFile, self.CenterPosition); + s = loop ? Game.Sound.PlayLooped(SoundType.World, sound, cachedPosition) : + Game.Sound.Play(SoundType.World, sound, self.CenterPosition); } else - s = loop ? Game.Sound.PlayLooped(SoundType.World, Info.SoundFile) : - Game.Sound.Play(SoundType.World, Info.SoundFile); + s = loop ? Game.Sound.PlayLooped(SoundType.World, sound) : + Game.Sound.Play(SoundType.World, sound); currentSounds.Add(s); } diff --git a/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs b/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs index 0115b2484a..e350aabe96 100644 --- a/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs +++ b/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs @@ -596,6 +596,11 @@ namespace OpenRA.Mods.Common.UtilityCommands RenameNodeKey(node, "-AcceptsDeliveredCash"); } + // Add random sound support to AmbientSound + if (engineVersion < 20170422) + if (node.Key == "SoundFile" && parent.Key.StartsWith("AmbientSound", StringComparison.Ordinal)) + RenameNodeKey(node, "SoundFiles"); + UpgradeActorRules(modData, engineVersion, ref node.Value.Nodes, node, depth + 1); } diff --git a/mods/cnc/rules/structures.yaml b/mods/cnc/rules/structures.yaml index 79e3d90e8a..a49673b64e 100644 --- a/mods/cnc/rules/structures.yaml +++ b/mods/cnc/rules/structures.yaml @@ -773,7 +773,7 @@ OBLI: ChargingCondition: charging AmbientSound: RequiresCondition: charging - SoundFile: obelpowr.aud + SoundFiles: obelpowr.aud Interval: 30, 40 -EmitInfantryOnSell: DetectCloaked: diff --git a/mods/d2k/rules/arrakis.yaml b/mods/d2k/rules/arrakis.yaml index 3d53db7f44..9433d79889 100644 --- a/mods/d2k/rules/arrakis.yaml +++ b/mods/d2k/rules/arrakis.yaml @@ -82,7 +82,7 @@ sandworm: Sequences: lightninga, lightningb, lightningc, lightningd, lightninge, lightningf RequiresCondition: !attacking AmbientSound: - SoundFile: WRMSIGN1.WAV + SoundFiles: WRMSIGN1.WAV Interval: 160 RequiresCondition: !attacking WithAttackOverlay@mouth: diff --git a/mods/d2k/rules/infantry.yaml b/mods/d2k/rules/infantry.yaml index ed6be9226c..80bd56c611 100644 --- a/mods/d2k/rules/infantry.yaml +++ b/mods/d2k/rules/infantry.yaml @@ -111,7 +111,7 @@ thumper: Sequence: thump-sand RequiresCondition: deployed AmbientSound: - SoundFile: THUMPER1.WAV + SoundFiles: THUMPER1.WAV Interval: 60 RequiresCondition: deployed AttractsWorms: diff --git a/mods/ts/maps/sunstroke/map.png b/mods/ts/maps/sunstroke/map.png index 32a168d24a..dbec7ee702 100644 Binary files a/mods/ts/maps/sunstroke/map.png and b/mods/ts/maps/sunstroke/map.png differ diff --git a/mods/ts/maps/sunstroke/map.yaml b/mods/ts/maps/sunstroke/map.yaml index a30a01d8b2..0ca6d2b19f 100644 --- a/mods/ts/maps/sunstroke/map.yaml +++ b/mods/ts/maps/sunstroke/map.yaml @@ -2548,6 +2548,22 @@ Actors: Actor735: trock02 Location: 125,41 Owner: Neutral + Actor736: jfish + Owner: Creeps + Location: 121,-90 + Facing: 92 + Actor739: jfish + Owner: Creeps + Location: 74,60 + Facing: 92 + Actor740: jfish + Owner: Creeps + Location: 170,-38 + Facing: 92 + Actor737: jfish + Owner: Creeps + Location: 58,23 + Facing: 92 Rules: rules.yaml diff --git a/mods/ts/mod.yaml b/mods/ts/mod.yaml index 891b87921d..4b40483f67 100644 --- a/mods/ts/mod.yaml +++ b/mods/ts/mod.yaml @@ -59,6 +59,7 @@ Rules: ts|rules/aircraft.yaml ts|rules/husks.yaml ts|rules/civilian-infantry.yaml + ts|rules/critters.yaml ts|rules/civilian-structures.yaml ts|rules/civilian-vehicles.yaml ts|rules/gdi-infantry.yaml @@ -95,6 +96,7 @@ Sequences: ts|sequences/vehicles.yaml ts|sequences/trees.yaml ts|sequences/bridges.yaml + ts|sequences/critters.yaml VoxelSequences: ts|sequences/voxels.yaml diff --git a/mods/ts/rules/bridges.yaml b/mods/ts/rules/bridges.yaml index 091fe027a1..9af88c9347 100644 --- a/mods/ts/rules/bridges.yaml +++ b/mods/ts/rules/bridges.yaml @@ -34,7 +34,7 @@ CABHUT: ^LowBridge: Inherits: ^LowBridgeRamp Targetable: - TargetTypes: Ground, Building + TargetTypes: Ground, Building, Bridge RequiresForceFire: true Health: HP: 500 diff --git a/mods/ts/rules/civilian-infantry.yaml b/mods/ts/rules/civilian-infantry.yaml index 3baebb6e32..38440ec814 100644 --- a/mods/ts/rules/civilian-infantry.yaml +++ b/mods/ts/rules/civilian-infantry.yaml @@ -212,86 +212,6 @@ SLAV: WithInfantryBody: DefaultAttackSequence: attack -DOGGIE: - Inherits@1: ^Infantry - Inherits@2: ^RegularInfantryDeath - Inherits@3: ^HealsOnTiberium - Tooltip: - Name: Tiberian Fiend - Health: - HP: 250 - Shape: Circle - Radius: 213 - Selectable: - Bounds: 24,24 - Valued: - Cost: 100 - Armor: - Type: Light - RevealsShroud: - Range: 4c0 - Mobile: - Speed: 113 - Voiced: - VoiceSet: Fiend - Targetable: - TargetTypes: Ground - Armament: - Weapon: FiendShard - AttackFrontal: - Voice: Attack - AttackWander: - WanderMoveRadius: 2 - MinMoveDelay: 200 - MaxMoveDelay: 600 - -SpawnActorOnDeath@FLAMEGUY: - WithDeathAnimation@fire: - DeathSequence: die- - DeathTypes: - FireDeath: burning - -VISC_SML: - Inherits: ^Visceroid - Tooltip: - Name: Baby Visceroid - Health: - HP: 200 - AttackWander: - WanderMoveRadius: 2 - MinMoveDelay: 30 - MaxMoveDelay: 60 - RenderSprites: - Image: vissml - -VISC_LRG: - Inherits: ^Visceroid - Inherits@CRATESTATS: ^CrateStatModifiers - Tooltip: - Name: Adult Visceroid - Health: - HP: 500 - Armor: - Type: Heavy - RevealsShroud: - Range: 4c0 - Armament: - Weapon: SlimeAttack - FireDelay: 10 - AutoTarget: - ScanRadius: 5 - AttackFrontal: - Voice: Attack - AttackWander: - WanderMoveRadius: 2 - MinMoveDelay: 25 - MaxMoveDelay: 50 - WithAttackAnimation: - AttackSequence: attack - Mobile: - Crushes: crate, infantry - RenderSprites: - Image: vislrg - CIV1: Inherits: ^CivilianInfantry WithInfantryBody: diff --git a/mods/ts/rules/critters.yaml b/mods/ts/rules/critters.yaml new file mode 100644 index 0000000000..c8ce54cdb1 --- /dev/null +++ b/mods/ts/rules/critters.yaml @@ -0,0 +1,121 @@ +DOGGIE: + Inherits@1: ^Infantry + Inherits@2: ^RegularInfantryDeath + Inherits@3: ^HealsOnTiberium + Tooltip: + Name: Tiberian Fiend + Health: + HP: 250 + Shape: Circle + Radius: 213 + Selectable: + Bounds: 24,24 + Valued: + Cost: 100 + Armor: + Type: Light + RevealsShroud: + Range: 4c0 + Mobile: + Speed: 113 + Voiced: + VoiceSet: Fiend + Targetable: + TargetTypes: Ground + Armament: + Weapon: FiendShard + AttackFrontal: + Voice: Attack + AttackWander: + WanderMoveRadius: 2 + MinMoveDelay: 200 + MaxMoveDelay: 600 + -SpawnActorOnDeath@FLAMEGUY: + WithDeathAnimation@fire: + DeathSequence: die- + DeathTypes: + FireDeath: burning + +VISC_SML: + Inherits: ^Visceroid + Tooltip: + Name: Baby Visceroid + Health: + HP: 200 + AttackWander: + WanderMoveRadius: 2 + MinMoveDelay: 30 + MaxMoveDelay: 60 + RenderSprites: + Image: vissml + +VISC_LRG: + Inherits: ^Visceroid + Inherits@CRATESTATS: ^CrateStatModifiers + Tooltip: + Name: Adult Visceroid + Health: + HP: 500 + Armor: + Type: Heavy + RevealsShroud: + Range: 4c0 + Armament: + Weapon: SlimeAttack + FireDelay: 10 + AutoTarget: + ScanRadius: 5 + AttackFrontal: + Voice: Attack + AttackWander: + WanderMoveRadius: 2 + MinMoveDelay: 25 + MaxMoveDelay: 50 + WithAttackAnimation: + AttackSequence: attack + Mobile: + Crushes: crate, infantry + RenderSprites: + Image: vislrg + +JFISH: + Inherits: ^Visceroid + Inherits@CRATESTATS: ^CrateStatModifiers + Tooltip: + Name: Tiberium Floater + Health: + HP: 500 + Shape: Circle + Radius: 363 + VerticalTopOffset: 768 + RevealsShroud: + Range: 5c0 + Mobile: + Speed: 72 + Crushes: crate + TerrainSpeeds: + Clear: 100 + Rail: 100 + DirtRoad: 100 + Rough: 100 + Water: 100 + Armament: + Weapon: Tentacle + FireDelay: 10 + AutoTarget: + ScanRadius: 5 + AttackFrontal: + AttackWander: + WanderMoveRadius: 6 + MinMoveDelay: 250 + MaxMoveDelay: 600 + WithAttackAnimation: + AttackSequence: attack + RenderSprites: + Image: floater + Selectable: + Bounds: 32,32,0,-5 + AmbientSound: + SoundFiles: floatmov.aud, flotmov2.aud, flotmov3.aud, flotmov4.aud + Delay: 150, 450 + Interval: 300, 800 diff --git a/mods/ts/rules/nod-support.yaml b/mods/ts/rules/nod-support.yaml index c7d6536aec..1911230584 100644 --- a/mods/ts/rules/nod-support.yaml +++ b/mods/ts/rules/nod-support.yaml @@ -218,7 +218,7 @@ NAOBEL: ChargingCondition: charging AmbientSound: RequiresCondition: charging - SoundFile: obelpowr.aud + SoundFiles: obelpowr.aud Interval: 30, 40 WithChargeOverlay: Palette: player diff --git a/mods/ts/sequences/critters.yaml b/mods/ts/sequences/critters.yaml new file mode 100644 index 0000000000..533ac3874f --- /dev/null +++ b/mods/ts/sequences/critters.yaml @@ -0,0 +1,92 @@ +doggie: + Defaults: + Tick: 80 + Offset: 0, 0, 16 + stand: + Facings: 8 + ShadowStart: 119 + run: + Start: 8 + Length: 6 + Facings: 8 + ShadowStart: 127 + attack: + Start: 56 + Length: 4 + Facings: 8 + ShadowStart: 175 + laydown: # TODO: Implement hiding when on a tiberium patch + Start: 88 + Length: 2 + ShadowStart: 207 + hide: # TODO: Implement hiding when on a tiberium patch + Start: 90 + ShadowStart: 209 + idle1: + Start: 91 + Length: 8 + ShadowStart: 210 + die-twirling: + Start: 99 + Length: 10 + ShadowStart: 218 + die-flying: + Start: 99 + Length: 10 + ShadowStart: 218 + die-exploding: s_bang34 + Length: * + die-crushed: + Start: 105 + Length: 4 + ShadowStart: 224 + Tick: 800 + ZOffset: -511 + die-burning: + Start: 109 + Length: 10 + ShadowStart: 228 + die-melting: + Start: 109 + Length: 10 + ShadowStart: 228 + +vissml: + idle: + Length: 90 + ShadowStart: 90 + Tick: 80 + Offset: 0, 0, 16 + +vislrg: + idle: + Length: 90 + ShadowStart: 90 + Tick: 80 + Offset: 0, 0, 16 + attack: + Combine: + vislgatk: + Start: 5 + Length: 35 + vislgatk: + Start: 0 + Length: 5 + Facings: -8 + Length: 5 + Tick: 80 + Offset: 0, 0, 16 +# ShadowStart: 40 # TODO: enable shadow frames + +floater: + idle: + Length: 16 + ShadowStart: 32 + Tick: 100 + Offset: 0, 0, 16 + attack: + Length: 16 + Start: 16 + ShadowStart: 48 + Tick: 100 + Offset: 0, 0, 16 diff --git a/mods/ts/sequences/infantry.yaml b/mods/ts/sequences/infantry.yaml index d7130331d6..48df5ff72d 100644 --- a/mods/ts/sequences/infantry.yaml +++ b/mods/ts/sequences/infantry.yaml @@ -474,86 +474,6 @@ weedguy: ShadowStart: 376 Tick: 1000 -doggie: - Defaults: - Tick: 80 - Offset: 0, 0, 16 - stand: - Facings: 8 - ShadowStart: 119 - run: - Start: 8 - Length: 6 - Facings: 8 - ShadowStart: 127 - attack: - Start: 56 - Length: 4 - Facings: 8 - ShadowStart: 175 - laydown: # TODO: Implement hiding when on a tiberium patch - Start: 88 - Length: 2 - ShadowStart: 207 - hide: # TODO: Implement hiding when on a tiberium patch - Start: 90 - ShadowStart: 209 - idle1: - Start: 91 - Length: 8 - ShadowStart: 210 - die-twirling: - Start: 99 - Length: 10 - ShadowStart: 218 - die-flying: - Start: 99 - Length: 10 - ShadowStart: 218 - die-exploding: s_bang34 - Length: * - die-crushed: - Start: 105 - Length: 4 - ShadowStart: 224 - Tick: 800 - ZOffset: -511 - die-burning: - Start: 109 - Length: 10 - ShadowStart: 228 - die-melting: - Start: 109 - Length: 10 - ShadowStart: 228 - -vissml: - idle: - Length: 90 - ShadowStart: 90 - Tick: 80 - Offset: 0, 0, 16 - -vislrg: - idle: - Length: 90 - ShadowStart: 90 - Tick: 80 - Offset: 0, 0, 16 - attack: - Combine: - vislgatk: - Start: 5 - Length: 35 - vislgatk: - Start: 0 - Length: 5 - Facings: -8 - Length: 5 - Tick: 80 - Offset: 0, 0, 16 -# ShadowStart: 40 # TODO: enable shadow frames - flameguy: Defaults: Facings: 8 diff --git a/mods/ts/weapons/otherweapons.yaml b/mods/ts/weapons/otherweapons.yaml index 813b8030b3..238f61601f 100644 --- a/mods/ts/weapons/otherweapons.yaml +++ b/mods/ts/weapons/otherweapons.yaml @@ -99,6 +99,23 @@ SlimeAttack: Concrete: 20 DamageTypes: Prone100Percent, TriggerProne, SmallExplosionDeath +Tentacle: + ReloadDelay: 80 + Range: 1c384 + Report: floatk1.aud + Projectile: InstantHit + InvalidTargets: Wall, Bridge + Warhead@1Dam: TargetDamage + Damage: 160 + InvalidTargets: Wall, Bridge + Versus: + None: 60 + Wood: 45 + Light: 90 + Heavy: 55 + Concrete: 10 + DamageTypes: Prone50Percent, TriggerProne, SmallExplosionDeath + Veins: ReloadDelay: 16 Warhead@Damage: TargetDamage