My part don't work when I try to stack it
Comes up with crash saying Game popped Its stack or pushed onto stack.
Part : /BASE_PART
{
NameKey = "Parts/KodePlasmaTorpedo"
IconNameKey = "Parts/KodePlasmaTorpedoIcon"
IDString = kodename.plasma_torpedo // 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.
OtherIDs = [plasma_missile_launcher]
EditorGroup = "Covenant"
DescriptionKey = "Parts/KodePlasmaTorpedoDesc"
Cost = 32000
AIValue = 40
Size = [1, 2]
PhysicalRect = [0, 1, 1, 1]
SaveRect = &PhysicalRect
SelectionPriority = 1
SelectionTypeByRotation = true
MaxHealth = 6000
PenetrationResistance = 1
TypeCategories = [weapon, weapon_using_missiles]
ProhibitAbove = 2
ReceivableBuffs = [RailgunShot]
AllowedDoorLocations
[
[-1, 1]
[1, 1]
[0, 2]
]
EditorIcon
{
Texture
{
File = "icon.png"
SampleMode = Linear
}
Size = [21.33, 42.66]
}
Components
{
IsOperational
{
Type = MultiToggle
Toggles = [PowerToggle, PlasmaStorage]
Mode = All
}
PowerToggle
{
Type = UIToggle
ToggleID = "on_off"
Default = 1
}
FireModeToggle
{
Type = UIToggle
ToggleID = "fire_mode"
Default = 1
}
PlasmaStorage
{
Type = AmmoConsumer
AmmoType = battery
MaxAmmo = 800
Priorities = &/PRIORITIES/Weapon_Supply
JobUnassignThreshold = 1000000// Effectively unassignable.
ResupplyThreshold = 200
AmmoDesireToggle = PowerToggle
DelayBeforeReadyToUse = .5
ReceiveAmmoMediaEffects = &/COMMON_EFFECTS/MissileLoad
}
BuffProvider
{
Type = GridBuffProvider
BuffType = RailgunShot
BuffAmount = { BaseValue=5; BuffType=RailgunShot; BuffMode=Add; }
AllowDiagonals = false
GridDistance = 1
OperationalToggle = IsOperational
}
WeaponA
{
Location = [0.5, 0]
AmmoStorage = PlasmaStorage
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
FireInterval = 6
FiringArc = 0d;
RotateSpeed = 0d
FireThresholdAngle = 360d;
SpawnLoc = [.5, 0]
AmmoUsed = 200
AllowFireWithBlockedLOS = true
TargetSearchTriesPerFrame = 0
AIFirepowerRating = 1600
FireModeToggle = FireModeToggle
Emitter
{
Type = Bullet
Bullet = &<../../../shots/plasma_torpedo/plasma.txt>
TargetLeadPrediction = false
}
}
LaunchEffectA : ~/LaunchEffectBase
{
ChainedTo = WeaponA
Trigger = WeaponA
}
Graphics
{
Type = Graphics
Location = [0.5, 1]
OperationalToggle = IsOperational
Floor
{
Layer = "floors"
DamageLevels
[
{
File = "floor.png"
Size = [1, 2]
}
{
File = "floor_33.png"
Size = [1, 2]
}
{
File = "floor_66.png"
Size = [1, 2]
}
]
}
OperationalDoodad
{
Layer = "doodads_low"
DamageLevels
[
{
File = "doodads on.png"
Size = [1, 2]
}
]
}
NonOperationalDoodad
{
Layer = "doodads_low"
DamageLevels
[
{
File = "doodads off.png"
Size = [1, 2]
}
]
}
OperationalLighting
{
Layer = "lights_add"
DamageLevels
[
{
File = "lights.png"
Size = [1, 2]
}
]
}
Walls
{
Layer = "walls"
DamageLevels
[
{
File = "walls.png"
Size = [1, 2]
}
{
File = "walls_33.png"
Size = [1, 2]
}
{
File = "walls_66.png"
Size = [1, 2]
}
]
}
Roof
{
Layer = "roofs"
DamageLevels
[
{
File = "roof.png"
Size = [1, 2]
}
{
File = "roof_33.png"
Size = [1, 2]
}
{
File = "roof_66.png"
Size = [1, 2]
}
]
}
OperationalRoofDoodad
{
Layer = "roof_doodads"
DamageLevels
[
{
File = "roof_doodads_on.png"
Size = [1, 2]
}
]
}
}
WeaponSprites
{
Type = AmmoSprites
AmmoStorage = PlasmaStorage
Layer = "weapons"
HasZeroAmmoSprite = true
Location = [0.5, 1]
AmmoLevels
[
{
File = "weapon.png"
Size = [1, 2]
}
{
File = "weapon_25.png"
Size = [1, 2]
}
{
File = "weapon_50.png"
Size = [1, 2]
}
{
File = "weapon_75.png"
Size = [1, 2]
}
{
File = "weapon_100.png"
Size = [1, 2]
}
]
}
OperationalDoodadTGT
{
Type = Sprite
Location = [0.5, 1]
Layer = "doodads_high"
ResetAnimationTrigger = WeaponA
AtlasSprite
{
AnimationFiles
[
"FIRING.png"
"NO_TARGET.png"
]
Size = [1, 2]
AnimationInterval = 0.825
AnimationStartTime = MinValue
ClampAnimation = true
}
}
OperationEffects
{
Type = ToggleEffects
Location = [0.5, 1]
Toggle = IsOperational
ToggledOnMediaEffects = &/COMMON_EFFECTS/MachinesOn
ToggledOffMediaEffects = &/COMMON_EFFECTS/MachinesOff
}
DestroyedEffects
{
Type = DeathEffects
MediaEffects = &/COMMON_EFFECTS/BigPartDestroyed
Location = [0.5, 1]
FactorHitEffectsWith = PlasmaStorage
HitEffects
[
{
Type = PartAreaDamage
DamageVsOperationalPerTile = 1000
RadiusVsOperational = 6
DamageVsStructurePerTile = 500
RadiusVsStructure = 8.5
Delay = .05
AllowFriendlyDamage = true
}
{
Type = AreaFires
FireChancePerTile = .4
FireRadius = 6
FireFalloff = 0
Delay = .05
AllowFriendlyFires = true
}
]
}
BatterySprites
{
Type = AmmoSprites
Location = [0.5, 1]
AmmoStorage = PlasmaStorage
Layer = "doodads_low"
AmmoLevels
[
{
File = "plasma_cell.png"
Size = [1, 2]
}
]
}
Indicators
{
Type = IndicatorSprites
Location = [0.5, 1]
Layer = "indicators"
Indicators
[
// Turned off.
{
Toggle = PowerToggle
AtlasSprite
{
File = &/INDICATORS/PowerOff
Size = [1, 1]
}
}
{
Toggle = PlasmaStorage
AtlasSprite
{
File = &/INDICATORS/NoMissiles
Size = [1.5, 1.5]
}
}
]
}
Blueprints
{
Type = BlueprintSprite
File = "blueprints.png"
Size = [1, 2]
}
CrewUIStats
{
Type = UIStats
Stat = Crew
Min = 0
Ideal = 1
}
}
}
LaunchEffectBase
{
Type = TriggeredEffects
MediaEffects
[
: /BASE_SOUNDS/AudioExterior
{
Sound = "shoot.wav"
SpeedVariation = .25
}
]
}