{
NameKey = "Parts/DedicatedHEsmall"
IconNameKey = "Parts/DedicatedHEsmallIcon"
ID = typhus.HE_missile_launcher // Part IDs must always be in the form of "author_name.part_name". If making your own mod, do *not* use "cosmoteer" as your author name, because it may conflict with future vanilla parts.
EditorGroup = "WeaponsMissile"
DescriptionKey = "Parts/DedicatedHEsmallDesc"
Cost = 15000
AIValue = 15000
Size = [2, 4]
PhysicalRect = [0, 1, 2, 3]
RectColliderRectType = Normal
SaveRect = &PhysicalRect
SelectionPriority = 1
SelectionTypeByRotation = true
MaxHealth = 6000
TypeCategories = [weapon, uses_missiles, uses_launcher_parts, is_crewed]
ProhibitAbove = 2
AllowedDoorLocations
[
[-1, 2]
[2, 2]
]
ExternalWallsByCell
[
{
Key = [0, 1]
Value = [TopLeft, Bottom, BottomLeft, Left]
}
{
Key = [1, 1]
Value = [TopRight, Right, BottomRight, Bottom]
}
]
InternalWallsByCell
[
{
Key = [0, 0]
Value = [Left, TopLeft, Top, TopRight]
}
{
Key = [1, 0]
Value = [Right, TopRight, Top, TopLeft]
}
]
EditorIcon
{
Texture
{
File = "icon.png"
SampleMode = Linear
}
Size = [46, 92]
}
Components
{
IsOperational
{
Type = MultiToggle
Toggles = [PowerToggle, PartCrew]
Mode = All
}
PowerToggle
{
Type = UIToggle
ToggleID = "on_off"
Default = 1
}
FireModeToggle
{
Type = UIToggle
ToggleID = "fire_mode"
Default = 1
}
MissileStorageA : ~/MissileStorageBase
{
// Nothing different.
}
MissileStorageB : ~/MissileStorageBase
{
// Nothing different.
}
MissileStorageC : ~/MissileStorageBase
{
// Nothing different.
}
MissilesPrereq
{
Type = MultiToggle
Toggles = [MissileStorageA, MissileStorageB, MissileStorageC]
Mode = Any
}
ReloadProgressBar
{
Type = ProgressBar
OperationalToggle = IsOperational
ShowProgressFor = &../WeaponA/FireInterval
Invert = true
}
WeaponA : ~/WeaponBase
{
Location = [.5, .5]
ShowExplicitTarget = false
Emitter = EmitterA
}
EmitterA : ~/EmitterBase
{
ChainedTo = WeaponA
FireTrigger = WeaponA
GetTargetFrom = WeaponA
AmmoStorage = MissileStorageA
}
WeaponB : ~/WeaponBase
{
Location = [1, .5]
Emitter = EmitterB
CoverageSectorArc
{
Texture = &/INDICATORS/VerticalGradient
VertexColor = [255, 255, 255, 51]
QuadCount = 64
}
}
EmitterB : ~/EmitterBase
{
ChainedTo = WeaponB
FireTrigger = WeaponB
GetTargetFrom = WeaponB
AmmoStorage = MissileStorageB
}
WeaponC : ~/WeaponBase
{
Location = [1.5, .5]
ShowExplicitTarget = false
Emitter = EmitterC
}
EmitterC : ~/EmitterBase
{
ChainedTo = WeaponC
FireTrigger = WeaponC
GetTargetFrom = WeaponC
AmmoStorage = MissileStorageC
}
CommonReloadResetTrigger
{
Type = MultiTrigger
Triggers = [WeaponA, WeaponB, WeaponC]
}
LaunchEffectA : ~/LaunchEffectBase
{
ChainedTo = WeaponA
Trigger = WeaponA
}
LaunchEffectB : ~/LaunchEffectBase
{
ChainedTo = WeaponB
Trigger = WeaponB
}
LaunchEffectC : ~/LaunchEffectBase
{
ChainedTo = WeaponC
Trigger = WeaponC
}
CrewLocation1
{
Type = CrewLocation
Location = [.65, 3.4]
Rotation = 20d
}
CrewLocation2
{
Type = CrewLocation
Location = [1.35, 3.4]
Rotation = -20d
}
PartCrew
{
Type = PartCrew
Crew = 2
Priorities = &/PRIORITIES/Weapon_Crew
PrerequisitesBeforeCrewing = [MissilesPrereq, PowerToggle]
CrewDestinations
[
[.65, 3.4]
[1.35, 3.4]
]
CrewLocations
[
CrewLocation1
CrewLocation2
]
}
Graphics
{
Type = Graphics
Location = [1, 2]
OperationalToggle = IsOperational
Floor
{
Layer = "floors"
DamageLevels
[
{
File = "floor.png"
Size = [2, 4]
}
{
File = "floor_33.png"
Size = [2, 4]
}
{
File = "floor_66.png"
Size = [2, 4]
}
]
}
OperationalDoodad
{
Layer = "doodads_low"
Offset = [0, 1.5]
DamageLevels
[
{
AnimationFiles
[
"doodads_on1.png"
"doodads_on2.png"
"doodads_on3.png"
"doodads_on4.png"
"doodads_on5.png"
"doodads_on6.png"
"doodads_on7.png"
"doodads_on8.png"
]
Size = [2, 1]
AnimationInterval = 0.075
AnimationStartTime = Zero
}
]
}
NonOperationalDoodad
{
Layer = "doodads_low"
Offset = [0, 1.5]
DamageLevels
[
{
File = "doodads_off.png"
Size = [2, 1]
}
]
}
OperationalLighting
{
Layer = "lights_add"
Offset = [0, .5]
DamageLevels
[
{
File = "lights.png"
Size = [2, 3]
}
]
}
Walls
{
Layer = "walls"
DamageLevels
[
{
File = "walls.png"
Size = [2, 4]
}
{
File = "walls_33.png"
Size = [2, 4]
}
{
File = "walls_66.png"
Size = [2, 4]
}
]
}
Roof
{
Layer = "roofs"
DamageLevels
[
{
File = "roof.png"
Size = [2, 4]
}
{
File = "roof_33.png"
Size = [2, 4]
}
{
File = "roof_66.png"
Size = [2, 4]
}
]
}
OperationalRoofWindows
{
Layer = "roof_windows"
Offset = [0, .5]
DamageLevels
[
{
File = "roof_windows_on.png"
Size = [2, 1]
}
{
File = "roof_windows_on_33.png"
Size = [2, 1]
}
{
File = "roof_windows_on_66.png"
Size = [2, 1]
}
]
}
NonOperationalRoofWindows
{
Layer = "roof_windows"
Offset = [0, .5]
DamageLevels
[
{
File = "roof_windows_off.png"
Size = [2, 1]
}
{
File = "roof_windows_off_33.png"
Size = [2, 1]
}
{
File = "roof_windows_off_66.png"
Size = [2, 1]
}
]
}
}
MissileSpritesA
{
Type = AmmoSprites
Location = [.5, 1.5]
AmmoStorage = MissileStorageA
Layer = "doodads_high"
HasZeroAmmoSprite = true
AmmoLevels
[
{
File = "missile_a0.png"
Size = [1, 3]
}
{
File = "missile_a1.png"
Size = [1, 3]
}
{
File = "missile_a2.png"
Size = [1, 3]
}
{
File = "missile_a3.png"
Size = [1, 3]
}
{
File = "missile_a4.png"
Size = [1, 3]
}
]
}
MissileSpritesB
{
Type = AmmoSprites
Location = [1, 1.5]
AmmoStorage = MissileStorageB
Layer = "doodads_high"
HasZeroAmmoSprite = true
AmmoLevels
[
{
File = "missile_b0.png"
Size = [1, 3]
}
{
File = "missile_b1.png"
Size = [1, 3]
}
{
File = "missile_b2.png"
Size = [1, 3]
}
{
File = "missile_b3.png"
Size = [1, 3]
}
{
File = "missile_b4.png"
Size = [1, 3]
}
]
}
MissileSpritesC
{
Type = AmmoSprites
Location = [1.5, 1.5]
AmmoStorage = MissileStorageC
Layer = "doodads_high"
HasZeroAmmoSprite = true
AmmoLevels
[
{
File = "missile_c0.png"
Size = [1, 3]
}
{
File = "missile_c1.png"
Size = [1, 3]
}
{
File = "missile_c2.png"
Size = [1, 3]
}
{
File = "missile_c3.png"
Size = [1, 3]
}
{
File = "missile_c4.png"
Size = [1, 3]
}
]
}
OperationEffects
{
Type = ToggleEffects
Location = [1, 2]
Toggle = IsOperational
ToggledOnMediaEffects = &/COMMON_EFFECTS/MachinesOn
ToggledOffMediaEffects = &/COMMON_EFFECTS/MachinesOff
}
DestroyedEffectsA : ~/DestroyedEffectsBase
{
FactorHitEffectsWith = MissileStorageA
}
DestroyedEffectsB : ~/DestroyedEffectsBase
{
FactorHitEffectsWith = MissileStorageB
}
DestroyedEffectsC : ~/DestroyedEffectsBase
{
FactorHitEffectsWith = MissileStorageC
}
DestroyedEffectsBase
{
Type = DeathEffects
MediaEffects = &/COMMON_EFFECTS/BigPartDestroyed
Location = [1, 2]
}
MissileStorageBase
{
Type = AmmoConsumer
AmmoType = missile_part_he
MaxAmmo = 4
Priorities = &/PRIORITIES/Missile_Supply
JobUnassignThreshold = 1000000// Effectively unassignable.
ToggleOnAmmo = 4
ToggleOffAmmo = 3
AmmoDesireToggle = PowerToggle
DelayBeforeReadyToUse = .5
ReceiveAmmoMediaEffects = &/COMMON_EFFECTS/MissileLoad
}
WeaponBase
{
Type = TurretWeapon // This has an arc of 0, but we don't want to use FixedWeapon because that will only shoot at things directly in the LOS.
Rotation = -90d
OperationalToggle = IsOperational
AutoFireToggle = AutoFireToggle
FireInterval = 1.8 // Uses common reload timer.
FiringArc = 0d;
ValidArc = 360d;
FireThresholdAngle = 180d;
RotateSpeed = 0d
AllowFireWithBlockedLOS = true
AIFirepowerRating = 1600
AutoTargets
[
{
TargetType = ShipParts
Toggle = FireModeToggle
EnableInDirectControlMode = true
}
]
}
EmitterBase
{
Type = BulletEmitter
OperationalToggle = IsOperational
Location = [.5, 0]
AmmoUsed = 4
Bullet = &<./Data/shots/missile_he/missile_he.txt>
TargetLeadPrediction = false
Recoil = 25
}
LaunchEffectBase
{
Type = TriggeredEffects
MediaEffects
[
&<../particles/missile_launcher_shoot.txt>
: /BASE_SOUNDS/AudioExterior
{
Sound = "../shoot.wav"
SpeedVariation = .25
}
]
}
DestroyedEffectsBase
{
Type = DeathEffects
Location = [1, 2]
HitEffects
[
{
Type = ExplosiveDamage
TotalDamage = 10000
Radius = 5
Delay = .05
FireChancePerNDamage = 50%
NDamage = 1000
Filter
{
OperationalHealth = true
StructuralHealth = false
Friendlies = true
}
}
{
Type = ExplosiveDamage
TotalDamage = 3333
Radius = 4
Delay = .05
Filter
{
OperationalHealth = false
StructuralHealth = true
Friendlies = true
}
}
]
}
MissileStats
{
NameKey = "StatCategories/MissileHE"
Stats
{
DamagePerShot = &~/EmitterBase/Bullet/Components/Hit/HitOperational/HitEffects/0/TotalDamage
DamagePerSecond = (&DamagePerShot) * (&ROF)
Damage = [&../DamagePerShot, &../DamagePerSecond]
DamageArea = &~/EmitterBase/Bullet/Components/Hit/HitOperational/HitEffects/0/Radius
ROF = 1 / (&<../missile_launcher.txt>/Part/Components/CommonReloadTimerShort/Duration)
Range = &~/EmitterBase/Bullet/Range
Arc = deg(&~/WeaponBase/ValidArc)
ShotSpeed = (&~/EmitterBase/Bullet/Components/Acceleration/Acceleration) / (&~/EmitterBase/Bullet/Components/Physics/LinearDamping)
ShotGuidance = deg(&~/EmitterBase/Bullet/Components/Homing/TurnVelocity) / (&ShotSpeed)
ShotHP = &~/EmitterBase/Bullet/Components/Targetable/Health
MissileParts = &~/EmitterBase/AmmoUsed
}
}
Indicators
{
Type = IndicatorSprites
Location = [1, 2]
Layer = "indicators"
Indicators
[
// Turned off.
{
Toggle = PowerToggle
AtlasSprite
{
File = &/INDICATORS/PowerOff
Size = [1, 1]
}
}
// Out of missiles.
{
Toggle = MissilesPrereq
AtlasSprite
{
File = &/INDICATORS/NoMissiles
Size = [1.5, 1.5]
}
}
// No crew.
{
Toggle = PartCrew
AtlasSprite
{
File = &/INDICATORS/NoCrew
Size = [1.5, 1.5]
}
}
]
}
Blueprints
{
Type = BlueprintSprite
File = "blueprints.png"
Size = [2, 4]
}
}
}```