diff --git a/lua/terranprojectiles.lua b/lua/terranprojectiles.lua index cab4f18b3a..7bf39c832a 100644 --- a/lua/terranprojectiles.lua +++ b/lua/terranprojectiles.lua @@ -37,6 +37,19 @@ TFragmentationGrenade= Class(EmitterProjectile) { #PolyTrail= EffectTemplate.THeavyFragmentationGrenadePolyTrail, } +TFragmentationGrenade2= Class(EmitterProjectile) { + FxTrails= EffectTemplate.THeavyFragmentationGrenadeFxTrails, + #PolyTrail= EffectTemplate.THeavyFragmentationGrenadePolyTrail, + + # Hit Effects + FxImpactUnit = EffectTemplate.TNapalmHvyCarpetBombHitLand01, + FxImpactProp = EffectTemplate.TNapalmHvyCarpetBombHitLand01, + FxImpactLand = EffectTemplate.TNapalmHvyCarpetBombHitLand01, + FxImpactWater = EffectTemplate.TNapalmHvyCarpetBombHitWater01, + FxImpactUnderWater = {}, + PolyTrail = '/effects/emitters/default_polytrail_01_emit.bp', +} + TIFMissileNuke = Class(NukeProjectile, SingleBeamProjectile) { BeamName = '/effects/emitters/missile_exhaust_fire_beam_01_emit.bp', FxImpactUnit = {}, diff --git a/lua/ui/help/unitdescription.lua b/lua/ui/help/unitdescription.lua index 7cf37c68fe..c0b4d39975 100644 --- a/lua/ui/help/unitdescription.lua +++ b/lua/ui/help/unitdescription.lua @@ -26,25 +26,22 @@ Description = { -- UEF -- Support Commander Units/Upgrades ['uel0301'] = " A multi-purpose construction, repair, capture and reclamation unit. Equivalent to a Tech 3 Engineer. ", - ['uel0301-led'] = " Engineering Drone acts as a secondary Engineer. Assists the SACU where applicable.", - ['uel0301-red'] = " Engineering Drone acts as a secondary Engineer. Assists the SACU where applicable.", + ['uel0301-ed'] = " Engineering Drone acts as a secondary Engineer. Assists the SACU where applicable.", ['uel0301-psg'] = " Creates a protective shield around the SACU. Requires Energy to run.", ['uel0301-sgf'] = " Expands the radius of the SACU's personal shield. Requires Energy to run.", ['uel0301-rj'] = "Radar Jammer creates false radar images. Countered by Omni sensors.", ['uel0301-isb'] = " Increases SACU's resource generation.", ['uel0301-sre'] = "Greatly expands the range of the standard on-board SACU sensor systems.", ['uel0301-acu'] = "Rapidly cools any weapon mounted onto the SACU. Increases rate of fire.", - ['uel0301-heo'] = "Equips the standard SACU with a napalm granade launcher damage.", + ['uel0301-heo'] = "Equips the standard SACU Heavy plasma cannon with area-of-effect damage.", -- UEF -- Support Commander Presets ['uel0301_BubbleShield'] = "Support Armored Command Unit. Enhanced during construction with the bubble shield generator enhancement.", - ['uel0301_Combat'] = "Support Armored Command Unit. Enhanced during construction with personal shield and gun speed upgrade.", - ['uel0301_Engineer'] = "Support Armored Command Unit. Enhanced during construction with 2 engineering drone enhancements.", + ['uel0301_Combat'] = "Support Armored Command Unit. Enhanced during construction with the energy accelerator and heavy plasma refractor enhancements.", + ['uel0301_Engineer'] = "Support Armored Command Unit. Enhanced during construction with the engineering drone enhancement.", ['uel0301_IntelJammer'] = "Support Armored Command Unit. Enhanced during construction with the radar jammer and enhanced sensor system enhancements.", - ['uel0301_Rambo'] = "Support Armored Command Unit. Enhanced during construction with a personal shield, gun speed and granade launcher enhancements.", + ['uel0301_Rambo'] = "Support Armored Command Unit. Enhanced during construction with a personal shield, energy accelerator and heavy plasma refractor enhancements.", ['uel0301_RAS'] = "Support Armored Command Unit. Enhanced during construction with a Resource Allocation System.", - ['uel0301_Support'] = "Support Armored Command Unit. Enhanced during construction with a bubble shield, jamming and 2 drones.", - ['uel0301_BasicCombat'] = "Support Armored Command Unit. Enhanced during construction with the AdvancedCoolingUpgrade.", -- UEF -- Land Units ['uel0101'] = "Fast, lightly armored reconnaissance vehicle. Armed with a machine gun and a state-of-the-art sensor suite.", diff --git a/projectiles/TDFFragmentationGrenade02/TDFFragmentationGrenade02_proj.bp b/projectiles/TDFFragmentationGrenade02/TDFFragmentationGrenade02_proj.bp new file mode 100644 index 0000000000..7a8ab1b4c5 --- /dev/null +++ b/projectiles/TDFFragmentationGrenade02/TDFFragmentationGrenade02_proj.bp @@ -0,0 +1,52 @@ +ProjectileBlueprint { + Audio = { + Impact = Sound { + Bank = 'Explosions', + Cue = 'Explosion_Bomb', + LodCutoff = 'Weapon_LodCutoff', + }, + ImpactTerrain = Sound { + Bank = 'Explosions', + Cue = 'Explosion_Bomb', + LodCutoff = 'Weapon_LodCutoff', + }, + ImpactWater = Sound { + Bank = 'Impacts', + Cue = 'Impact_Water_Splash_UEF', + LodCutoff = 'Weapon_LodCutoff', + }, + }, + Categories = { + 'UEF', + 'PROJECTILE', + 'INDIRECTFIRE', + }, + Display = { + CameraFollowsProjectile = true, + ImpactEffects = { + Type = 'Medium02', + }, + MeshBlueprint = '/projectiles/TIFMortar01/TIFMortar01_mesh.bp', + StrategicIconSize = 1, + UniformScale = 0.05, + }, + General = { + Category = 'Direct Fire', + EntityCategory = { + 'UEF', + 'PROJECTILE', + 'INDIRECTFIRE', + }, + Faction = 'UEF', + }, + Interface = { + HelpText = 0, + }, + Physics = { + DestroyOnWater = true, + InitialSpeed = 34, + InitialSpeedReduceDistance = 200, + LeadTarget = false, + VelocityAlign = true, + }, +} diff --git a/projectiles/TDFFragmentationGrenade02/TDFFragmentationGrenade02_script.lua b/projectiles/TDFFragmentationGrenade02/TDFFragmentationGrenade02_script.lua new file mode 100644 index 0000000000..630782f1eb --- /dev/null +++ b/projectiles/TDFFragmentationGrenade02/TDFFragmentationGrenade02_script.lua @@ -0,0 +1,25 @@ +#**************************************************************************** +#** +#** File : /data/projectiles/TDFFragmentationGrenade02/TDFFragmentationGrenade02_script.lua +#** Author(s): Matt Vainio +#** +#** Summary : UEF Fragmentation Shells, DEL0204 +#** +#** Copyright © 2007 Gas Powered Games, Inc. All rights reserved. +#**************************************************************************** +local TFragmentationGrenade2 = import('/lua/terranprojectiles.lua').TFragmentationGrenade2 +local EffectTemplate = import('/lua/EffectTemplates.lua') +local RandomFloat = import('/lua/utilities.lua').GetRandomFloat + +TDFFragmentationGrenade02 = Class(TFragmentationGrenade2) { + OnImpact = function(self, TargetType, targetEntity) + if TargetType != 'Shield' and TargetType != 'Water' and TargetType != 'Air' and TargetType != 'UnitAir' and TargetType != 'Projectile' then + local rotation = RandomFloat(0,2*math.pi) + local size = RandomFloat(7.5,10.0) + CreateDecal(self:GetPosition(), rotation, 'scorch_001_albedo', '', 'Albedo', size, size, 150, 15, self:GetArmy()) + end + TFragmentationGrenade2.OnImpact(self, TargetType, targetEntity) + end, +} + +TypeClass = TDFFragmentationGrenade02 \ No newline at end of file diff --git a/textures/ui/common/icons/units/UEL0301_BasicCombat_icon.dds b/textures/ui/common/icons/units/UEL0301_BasicCombat_icon.dds deleted file mode 100644 index 4bc3c81c56..0000000000 Binary files a/textures/ui/common/icons/units/UEL0301_BasicCombat_icon.dds and /dev/null differ diff --git a/textures/ui/common/icons/units/UEL0301_Support_icon.dds b/textures/ui/common/icons/units/UEL0301_IntelJammer_icon.dds similarity index 100% rename from textures/ui/common/icons/units/UEL0301_Support_icon.dds rename to textures/ui/common/icons/units/UEL0301_IntelJammer_icon.dds diff --git a/units/UEL0301/UEL0301_script.lua b/units/UEL0301/UEL0301_script.lua index ef4b6dbe52..a21ece8eeb 100644 --- a/units/UEL0301/UEL0301_script.lua +++ b/units/UEL0301/UEL0301_script.lua @@ -10,6 +10,7 @@ local EffectUtil = import('/lua/EffectUtilities.lua') local CommandUnit = import('/lua/defaultunits.lua').CommandUnit local TWeapons = import('/lua/terranweapons.lua') local TDFHeavyPlasmaCannonWeapon = TWeapons.TDFHeavyPlasmaCannonWeapon +local TIFFragLauncherWeapon = TWeapons.TDFFragmentationGrenadeLauncherWeapon local SCUDeathWeapon = import('/lua/sim/defaultweapons.lua').SCUDeathWeapon UEL0301 = Class(CommandUnit) { @@ -24,6 +25,12 @@ UEL0301 = Class(CommandUnit) { }, Weapons = { + Grenade = Class(TIFFragLauncherWeapon) { + OnCreate = function(self) + TIFFragLauncherWeapon.OnCreate(self) + self:SetWeaponEnabled(false) + end, + }, RightHeavyPlasmaCannon = Class(TDFHeavyPlasmaCannonWeapon) {}, DeathWeapon = Class(SCUDeathWeapon) {}, }, @@ -33,6 +40,7 @@ UEL0301 = Class(CommandUnit) { self:SetCapturable(false) self:HideBone('Jetpack', true) self:HideBone('SAM', true) + self:GetWeaponByLabel('Grenade').NeedsUpgrade = true self:SetupBuildBones() self.HasLeftPod = false self.HasRightPod = false @@ -225,17 +233,17 @@ UEL0301 = Class(CommandUnit) { elseif enh =='AdvancedCoolingUpgradeRemove' then local wep = self:GetWeaponByLabel('RightHeavyPlasmaCannon') wep:ChangeRateOfFire(self:GetBlueprint().Weapon[1].RateOfFire or 1) - --Gun AoE + --Granade Launcher elseif enh =='HighExplosiveOrdnance' then - local wep = self:GetWeaponByLabel('RightHeavyPlasmaCannon') - wep:AddDamageRadiusMod(bp.NewDamageRadius) - wep:ChangeMaxRadius(bp.NewMaxRadius or 35) + self:SetWeaponEnabledByLabel('Grenade', true) + local wep = self:GetWeaponByLabel('Grenade') + wep:ChangeMaxRadius(bp.NewMaxRadius or 25) elseif enh =='HighExplosiveOrdnanceRemove' then - local wep = self:GetWeaponByLabel('RightHeavyPlasmaCannon') - wep:AddDamageRadiusMod(bp.NewDamageRadius) - wep:ChangeMaxRadius(bp.NewMaxRadius or 35) - end - end, + local wep = self:GetWeaponByLabel('Grenade') + wep:ChangeMaxRadius(self:GetBlueprint().Weapon[1].MaxRadius or 25) + self:SetWeaponEnabledByLabel('Grenade', false) + end + end, OnIntelEnabled = function(self) CommandUnit.OnIntelEnabled(self) diff --git a/units/UEL0301/UEL0301_unit.bp b/units/UEL0301/UEL0301_unit.bp index 48438df152..b8b14c6e71 100644 --- a/units/UEL0301/UEL0301_unit.bp +++ b/units/UEL0301/UEL0301_unit.bp @@ -320,19 +320,11 @@ UnitBlueprint { BuildTime = 6000, Icon = 'heo', Name = 'Heavy Plasma Refractor', - NewDamageRadius = 2, - NewMaxRadius = 29, + NewMaxRadius = 35, ShowBones = { 'SAM', }, Slot = 'RCH', - UpgradeEffectBones = { - 'SAM', - 'Cannon_Muzzle', - }, - UpgradeUnitAmbientBones = { - 'UEL0301', - }, }, HighExplosiveOrdnanceRemove = { BuildCostEnergy = 1, @@ -343,8 +335,7 @@ UnitBlueprint { }, Icon = 'heo', Name = 'Remove Heavy Plasma Refractor', - NewDamageRadius = -2, - NewMaxRadius = 25, + NewMaxRadius = 25, Prerequisite = 'HighExplosiveOrdnance', RemoveEnhancements = { 'HighExplosiveOrdnance', @@ -481,9 +472,9 @@ UnitBlueprint { Slot = 'RCH', }, Shield = { - BuildCostEnergy = 75000, - BuildCostMass = 2500, - BuildTime = 10000, + BuildCostEnergy = 45000, + BuildCostMass = 1500, + BuildTime = 6000, Icon = 'psg', ShowBones = { 'Jetpack', @@ -495,7 +486,7 @@ UnitBlueprint { PersonalShield = true, RegenAssistMult = 10, ShieldEnergyDrainRechargeTime = 5, - ShieldMaxHealth = 20000,#32000 + ShieldMaxHealth = 26000,#32000 ShieldRechargeTime = 170, ShieldRegenRate = 50, ShieldRegenStartTime = 1, @@ -591,23 +582,13 @@ UnitBlueprint { EnhancementPresets = { BubbleShield = { BuildIconSortPriority = 30, - Description = 'SACU (BubbleShield preset)', + Description = 'SACU (Shield preset)', Enhancements = { 'ShieldGeneratorField', }, HelpText = 'Support Armored Command Unit. Enhanced during construction with the bubble shield generator enhancement.', SortCategory = 'SORTOTHER', - UnitName = 'SACU (BubbleShield preset)', - }, - BasicCombat = { - BuildIconSortPriority = 15, - Description = 'SACU (BasicCombatant preset)', - Enhancements = { - 'AdvancedCoolingUpgrade', - }, - HelpText = 'Support Armored Command Unit. Enhanced during construction with the energy accelerator enhancement.', - SortCategory = 'SORTOTHER', - UnitName = 'SACU (Basic preset)', + UnitName = 'SACU (Shield preset)', }, Combat = { BuildIconSortPriority = 15, @@ -696,7 +677,7 @@ UnitBlueprint { ConstructionBar = true, FactionName = 'UEF', Icon = 'amph', - SelectionPriority = 1, + SelectionPriority = 3, TechLevel = 'RULEUTL_Secret', UnitWeight = 0, }, @@ -842,6 +823,83 @@ UnitBlueprint { WeaponCategory = 'Direct Fire', WeaponRepackTimeout = 0, WeaponUnpacks = false, + }, + { + AboveWaterTargetsOnly = true, + AimsStraightOnDisable = false, + Audio = { + Fire = Sound { + Bank = 'UELWeapon', + Cue = 'UEB2304_Missile_Flayer', + LodCutoff = 'Weapon_LodCutoff', + }, + }, + BallisticArc = 'RULEUBA_LowArc', + CollideFriendly = false, + Damage = 15, + DamageFriendly = true, + DamageRadius = 4, + DamageType = 'Normal', + DisplayName = 'Heavy Fragmentation Grenade Launcher', + DoTPulses = 8, + DoTTime = 6, + FireTargetLayerCapsTable = { + Land = 'Land|Water|Seabed', + Water = 'Land|Water|Seabed', + }, + FiringRandomness = 6.5, + FiringTolerance = 1, + Label = 'Grenade', + MaxRadius = 25, + MinRadius = 22, + MuzzleSalvoDelay = 0.05, + MuzzleSalvoSize = 12, + MuzzleVelocity = 14.8, + MuzzleVelocityRandomness = 0.25, + ProjectileId = '/projectiles/TDFFragmentationGrenade02/TDFFragmentationGrenade02_proj.bp', + ProjectileLifetimeUsesMultiplier = 2.5, + ProjectilesPerOnFire = 3, + RackBones = { + { + MuzzleBones = { + 'Arm_Right_Build', + --'Arm_Left_Muzzle', + }, + RackBone = 'Arm_Right_B03', + --RackBone = 'Arm_Left_Barrel02', + }, + }, + RackRecoilDistance = 0, + RackReloadTimeout = 0, + RackSalvoChargeTime = 0, + RackSalvoReloadTime = 0, + RackSalvoSize = 1, + RackSlavedToTurret = false, + RangeCategory = 'UWRC_DirectFire', + RateOfFire = 0.1, + TargetCheckInterval = 0.5, + TargetPriorities = { + 'TECH1 MOBILE', + 'TECH2 MOBILE', + 'TECH3 MOBILE', + 'STRUCTURE DEFENSE', + '(ALLUNITS - SPECIALLOWPRI)', + }, + TargetRestrictDisallow = 'UNTARGETABLE', + TrackingRadius = 1.15, + TurretBoneMuzzle = 'Arm_Right_Build', + TurretBonePitch = 'Arm_Right_B03', + TurretBoneYaw = 'Torso', + TurretDualManipulators = false, + TurretPitch = 0, + TurretPitchRange = 90, + TurretPitchSpeed = 45, + TurretYaw = 0, + TurretYawRange = 180, + TurretYawSpeed = 180, + Turreted = true, + UseFiringSolutionInsteadOfAimBone = true, + WeaponCategory = 'Direct Fire', }, { CollideFriendly = false,