Initial commit

This commit is contained in:
cardboardbread committed 2026-09-18 05:35:15 -04:00
commit 74162a93be
1366 files changed
+81395

No files matched your search

Binary file not shown.
Binary file not shown.
Binary file not shown.
+118
View File
@@ -0,0 +1,118 @@
#****************************************************************************
#**
#** File : /cdimage/units/FSKARNOV/FSKARNOV_script.lua
#** Author(s): John Comes, David Tomandl, Jessica St. Croix, Gordon Duclos, Andres Mendez, Kami, FuegoTigre
#**
#** Summary : Karnov (3055) Transport Script
#**
#** Copyright © 2006 Gas Powered Games, Inc. All rights reserved.
#****************************************************************************
local explosion = import('/lua/defaultexplosions.lua')
local util = import('/lua/utilities.lua')
local WeaponsFile = import('/lua/terranweapons.lua')
local TAirUnit = import('/lua/terranunits.lua').TAirUnit
local TDFMachineGunWeapon = import('/lua/terranweapons.lua').TDFMachineGunWeapon
FSKARNOV = Class(TAirUnit) {
BeamExhaustCruise = '/effects/emitters/transport_thruster_beam_01_emit.bp',
BeamExhaustIdle = '/effects/emitters/transport_thruster_beam_02_emit.bp',
Weapons = {
MG = Class(TDFMachineGunWeapon) {},
},
DestructionTicks = 250,
EngineRotateBones = {'Front_Right_Engine', 'Front_Left_Engine', },
OnStopBeingBuilt = function(self,builder,layer)
TAirUnit.OnStopBeingBuilt(self,builder,layer)
self.EngineManipulators = {}
# create the engine thrust manipulators
for k, v in self.EngineRotateBones do
table.insert(self.EngineManipulators, CreateThrustController(self, "thruster", v))
end
# set up the thursting arcs for the engines
for keys,values in self.EngineManipulators do
# XMAX,XMIN,YMAX,YMIN,ZMAX,ZMIN, TURNMULT, TURNSPEED
values:SetThrustingParam( 0.0, 0.0, -0.1, 0.1, -0.0, 0.0, 1.0, 0.25 )
end
self.LandingAnimManip = CreateAnimator(self)
self.LandingAnimManip:SetPrecedence(0)
self.Trash:Add(self.LandingAnimManip)
self.LandingAnimManip:PlayAnim(self:GetBlueprint().Display.AnimationLand):SetRate(1)
self:ForkThread(self.ExpandThread)
end,
# When one of our attached units gets killed, detach it
OnAttachedKilled = function(self, attached)
attached:DetachFrom()
end,
OnKilled = function(self, instigator, type, overkillRatio)
TAirUnit.OnKilled(self, instigator, type, overkillRatio)
# TransportDetachAllUnits takes 1 bool parameter. If true, randomly destroys some of the transported
# units, otherwise successfully detaches all.
self:TransportDetachAllUnits(true)
end,
OnMotionVertEventChange = function(self, new, old)
TAirUnit.OnMotionVertEventChange(self, new, old)
if (new == 'Down') then
self.LandingAnimManip:SetRate(-1)
elseif (new == 'Up') then
self.LandingAnimManip:SetRate(1)
end
end,
# Override air destruction effects so we can do something custom here
CreateUnitAirDestructionEffects = function( self, scale )
self:ForkThread(self.AirDestructionEffectsThread, self )
end,
AirDestructionEffectsThread = function( self )
local numExplosions = math.floor( table.getn( self.AirDestructionEffectBones ) * 0.5 )
for i = 0, numExplosions do
explosion.CreateDefaultHitExplosionAtBone( self, self.AirDestructionEffectBones[util.GetRandomInt( 1, numExplosions )], 0.5 )
WaitSeconds( util.GetRandomFloat( 0.2, 0.9 ))
end
end,
OnCreate = function(self)
TAirUnit.OnCreate(self)
#CreateSlider(unit, bone, [goal_x, goal_y, goal_z, [speed,
self.Sliders = {}
self.Sliders[1] = CreateSlider(self, 'Char01')
self.Sliders[1]:SetGoal(0, 0, -35)
self.Sliders[2] = CreateSlider(self, 'Char02')
self.Sliders[2]:SetGoal(0, 0, -15)
self.Sliders[3] = CreateSlider(self, 'Char03')
self.Sliders[3]:SetGoal(0, 0, 15)
for k, v in self.Sliders do
v:SetSpeed(-1)
self.Trash:Add(v)
end
end,
ExpandThread = function(self)
if self.Sliders then
for k, v in self.Sliders do
v:SetGoal(0, 0, 0)
v:SetSpeed(10)
end
WaitFor(self.Sliders[4])
for k, v in self.Sliders do
v:Destroy()
end
end
end,
}
TypeClass = FSKARNOV
Binary file not shown.
Binary file not shown.
+429
View File
@@ -0,0 +1,429 @@
UnitBlueprint {
AI = {
BeaconName = 'UEB5102',
TargetBones = {
'FSKARNOV_lod0',
},
},
Air = {
AutoLandTime = 1,
BankFactor = 0.1,
BankForward = false,
CanFly = true,
CirclingDirChangeFrequencySec = 1,
CirclingElevationChangeRatio = 0.25,
CirclingRadiusChangeMaxRatio = 0.9,
CirclingRadiusChangeMinRatio = 0.6,
CirclingRadiusVsAirMult = 0.66,
CirclingTurnMult = 3,
KLift = 3,
KLiftDamping = 2.5,
KMove = 0.8,
KMoveDamping = 2,
KTurn = 0.8,
KTurnDamping = 1.5,
LiftFactor = 7,
MaxAirspeed = 17,
MinAirspeed = 0,
StartTurnDistance = 5,
TransportHoverHeight = 2,
},
Audio = {
AirUnitWaterImpact = Sound {
Bank = 'Explosions',
Cue = 'Expl_Water_Lrg_01',
LodCutoff = 'UnitMove_LodCutoff',
},
AmbientMove = Sound {
Bank = 'UEA',
Cue = 'UEA0104_Move_Loop',
LodCutoff = 'UnitMove_LodCutoff',
},
DeathExplosion = Sound {
Bank = 'UEADestroy',
Cue = 'UEA_Destroy_Air_Killed',
LodCutoff = 'UnitMove_LodCutoff',
},
Destroyed = Sound {
Bank = 'UEADestroy',
Cue = 'UEA_Destroy_Lrg',
LodCutoff = 'UnitMove_LodCutoff',
},
Killed = Sound {
Bank = 'UEADestroy',
Cue = 'UEA_Destroy_Air_Killed',
LodCutoff = 'UnitMove_LodCutoff',
},
Landing = Sound {
Bank = 'UEA',
Cue = 'UEA0104_Move_Land',
LodCutoff = 'UnitMove_LodCutoff',
},
StartMove = Sound {
Bank = 'UEA',
Cue = 'UEA0104_Move_Start',
LodCutoff = 'UnitMove_LodCutoff',
},
StopMove = Sound {
Bank = 'UEA',
Cue = 'UEA0104_Move_Stop',
LodCutoff = 'UnitMove_LodCutoff',
},
Thruster = Sound {
Bank = 'UEA',
Cue = 'UEA0104_Move_Thruster',
LodCutoff = 'UnitMove_LodCutoff',
},
UISelection = Sound {
Bank = 'Interface',
Cue = 'UEF_Select_Air',
LodCutoff = 'UnitMove_LodCutoff',
},
},
AverageDensity = 1,
Buffs = {
Regen = {
Level1 = 0.01,
Level2 = 0.02,
Level3 = 0.05,
Level4 = 0.1,
Level5 = 0.2,
},
},
BuildIconSortPriority = 10,
Categories = {
'PRODUCTSC1',
'SELECTABLE',
'TRANSPORTBUILTBYTIER1FACTORY',
'TRANSPORTBUILTBYTIER2FACTORY',
'TRANSPORTBUILTBYTIER3FACTORY',
'FS',
'MOBILE',
'AIR',
'TECH1',
'TRANSPORTATION',
'CANTRANSPORTCOMMANDER',
'VISIBLETORECON',
'RECLAIMABLE',
'TRANSPORTFOCUS',
'OVERLAYDIRECTFIRE',
'OVERLAYANTIAIR',
},
Defense = {
AirThreatLevel = 152,
ArmorType = 'A_A_Standard',
EconomyThreatLevel = 0,
Health = 41,
MaxHealth = 41,
RegenRate = 0,
SubThreatLevel = 0,
SurfaceThreatLevel = 152,
},
Description = '<LOC FSKARNOV_desc>Battle Armor Air Transport',
Display = {
Abilities = {
'<LOC ability_aa>Anti-Air',
'<LOC ability_transport>Transport',
'2x Machine Gun |-| Max: 90m',
},
AnimationLand = '/units/FSKARNOV/FSKARNOV_atakeoff01.sca',
ForcedBuildSpin = 90,
LayerChangeEffects = {
AirLand = {
Effects = {
{
Bones = {
'Front_Right_Exhaust',
'Front_Left_Exhaust',
},
Offset = {
0,
0,
0,
},
Type = 'Landing01',
},
},
},
LandAir = {
Effects = {
{
Bones = {
'Front_Right_Exhaust',
'Front_Left_Exhaust',
},
Type = 'TakeOff01',
},
},
},
},
Mesh = {
IconFadeInZoom = 100,
LODs = {
{
LODCutoff = 200,
ShaderName = 'Unit',
},
{
AlbedoName = 'FSKARNOV_lod1_albedo.dds',
LODCutoff = 100,
ShaderName = 'Unit',
SpecularName = 'FSKARNOV_lod1_specteam.dds',
},
},
},
MovementEffects = {
BeamExhaust = {
Bones = {
'Front_Right_Exhaust',
'Front_Left_Exhaust',
},
Cruise = true,
Idle = true,
},
},
PlaceholderMeshName = 'UXB0000',
SpawnRandomRotation = false,
UniformScale = 0.09,
},
Economy = {
BuildCostEnergy = 7600,
BuildCostMass = 152,
BuildTime = 900,
},
Footprint = {
MaxSlope = 0.25,
SizeX = 1,
SizeZ = 2,
},
General = {
Category = 'Transport',
Classification = 'RULEUC_MilitaryAircraft',
CommandCaps = {
RULEUCC_Attack = true,
RULEUCC_CallTransport = true,
RULEUCC_Capture = false,
RULEUCC_Ferry = true,
RULEUCC_Guard = true,
RULEUCC_Move = true,
RULEUCC_Nuke = false,
RULEUCC_Patrol = true,
RULEUCC_Reclaim = false,
RULEUCC_Repair = false,
RULEUCC_RetaliateToggle = true,
RULEUCC_Stop = true,
RULEUCC_Transport = true,
},
FactionName = 'UEF',
Icon = 'air',
SelectionPriority = 2,
TechLevel = 'RULEUTL_basic',
UnitName = '<LOC FSKARNOV_name>Karnov',
UnitWeight = 1,
},
Intel = {
VisionRadius = 22.5,
},
Interface = {
HelpText = '<LOC FSKARNOV_help>Karnov',
},
LifeBarHeight = 0.075,
LifeBarOffset = 3,
LifeBarSize = 2,
Physics = {
BuildOnLayerCaps = {
LAYER_Air = true,
LAYER_Land = false,
LAYER_Orbit = false,
LAYER_Seabed = false,
LAYER_Sub = false,
LAYER_Water = false,
},
Elevation = 8,
FuelRechargeRate = 70,
FuelUseTime = 800,
MaxSpeed = 0.5,
MeshExtentsX = 2,
MeshExtentsY = 2,
MeshExtentsZ = 3,
MotionType = 'RULEUMT_Air',
},
SelectionSizeX = 0.46,
SelectionSizeZ = 0.75,
SelectionThickness = 0.19,
SizeX = 1,
SizeY = 1,
SizeZ = 1,
StrategicIconName = 'icon_gunship2_transport',
StrategicIconSortPriority = 65,
Transport = {
AirClass = true,
TransportClass = 10,
},
UseOOBTestZoom = 200,
Veteran = {
Level1 = 5,
Level2 = 10,
Level3 = 20,
Level4 = 40,
Level5 = 80,
},
Weapon = {
{
AboveWaterTargetsOnly = true,
Audio = {
Fire = Sound {
Bank = 'UELWeapon',
Cue = 'UEL0106_MachineGun',
LodCutoff = 'Weapon_LodCutoff',
},
},
AutoInitiateAttackCommand = true,
BallisticArc = 'RULEUBA_None',
CollideFriendly = false,
Damage = .08,
DamageType = 'D_Ammo',
DisplayName = 'Machine Gun',
FireTargetLayerCapsTable = {
Air = 'Land|Water|Seabed|Air',
Land = 'Land|Water|Seabed|Air',
},
FiringRandomness = 0.3,
FiringRandomnessWhileMoving = 1.5,
FiringTolerance = 0.1,
HeadingArcCenter = 90,
HeadingArcRange = 180,
Label = 'MG',
LeadTarget = true,
MaxRadius = 9,
MuzzleSalvoDelay = 0,
MuzzleSalvoSize = 1,
MuzzleVelocity = 25,
ProjectileId = '/projectiles/TDFMachineGun01/TDFMachineGun01_proj.bp',
ProjectileLifetimeUsesMultiplier = 2.5,
ProjectilesPerOnFire = 1,
RackBones = {
{
MuzzleBones = {
'Left_Muzzle',
},
RackBone = 'Left_Barrel',
},
},
RackFireTogether = false,
RackRecoilDistance = 0,
RackReloadTimeout = 10,
RackSalvoChargeTime = 0,
RackSalvoReloadTime = 0,
RackSalvoSize = 1,
RackSlavedToTurret = false,
RangeCategory = 'UWRC_DirectFire',
RateOfFire = 2.5,
TargetCheckInterval = 0.3,
TargetPriorities = {
'SPECIALHIGHPRI',
'SPECIALLOWPRI',
'ALLUNITS',
},
TargetRestrictDisallow = 'UNTARGETABLE',
TrackingRadius = 1.15,
TurretBoneMuzzle = 'Left_Muzzle',
TurretBonePitch = 'Left_Barrel',
TurretBoneYaw = 'Left_Barrel',
TurretDualManipulators = false,
TurretPitch = -45,
TurretPitchRange = 180,
TurretPitchSpeed = 180,
TurretYaw = -90,
TurretYawRange = 180,
TurretYawSpeed = 180,
Turreted = true,
WeaponCategory = 'Direct Fire',
},
{
AboveWaterTargetsOnly = true,
Audio = {
Fire = Sound {
Bank = 'UELWeapon',
Cue = 'UEL0106_MachineGun',
LodCutoff = 'Weapon_LodCutoff',
},
},
AutoInitiateAttackCommand = true,
BallisticArc = 'RULEUBA_None',
CollideFriendly = false,
Damage = .08,
DamageType = 'D_Ammo',
DisplayName = 'Machine Gun',
FireTargetLayerCapsTable = {
Air = 'Land|Water|Seabed|Air',
Land = 'Land|Water|Seabed|Air',
},
FiringRandomness = 0.3,
FiringRandomnessWhileMoving = 1.5,
FiringTolerance = 0.1,
HeadingArcCenter = -90,
HeadingArcRange = 180,
Label = 'MG',
LeadTarget = true,
MaxRadius = 9,
MuzzleSalvoDelay = 0,
MuzzleSalvoSize = 1,
MuzzleVelocity = 25,
ProjectileId = '/projectiles/TDFMachineGun01/TDFMachineGun01_proj.bp',
ProjectileLifetimeUsesMultiplier = 2.5,
ProjectilesPerOnFire = 1,
RackBones = {
{
MuzzleBones = {
'Right_Muzzle',
},
RackBone = 'Right_Barrel',
},
},
RackFireTogether = false,
RackRecoilDistance = 0,
RackReloadTimeout = 10,
RackSalvoChargeTime = 0,
RackSalvoReloadTime = 0,
RackSalvoSize = 1,
RackSlavedToTurret = false,
RangeCategory = 'UWRC_DirectFire',
RateOfFire = 2.5,
TargetCheckInterval = 0.3,
TargetPriorities = {
'SPECIALHIGHPRI',
'SPECIALLOWPRI',
'ALLUNITS',
},
TargetRestrictDisallow = 'UNTARGETABLE',
TrackingRadius = 1.15,
TurretBoneMuzzle = 'Right_Muzzle',
TurretBonePitch = 'Right_Barrel',
TurretBoneYaw = 'Right_Barrel',
TurretDualManipulators = false,
TurretPitch = -45,
TurretPitchRange = 180,
TurretPitchSpeed = 180,
TurretYaw = -90,
TurretYawRange = 180,
TurretYawSpeed = 180,
Turreted = true,
WeaponCategory = 'Direct Fire',
},
},
Wreckage = {
Blueprint = '/props/DefaultWreckage/DefaultWreckage_prop.bp',
EnergyMult = 0,
HealthMult = 0.9,
MassMult = 0.9,
ReclaimTimeMultiplier = 1,
WreckageLayers = {
Air = false,
Land = true,
Seabed = false,
Sub = false,
Water = false,
},
},
}