mod参数/turret

来自RustedWarfare Wiki

x: <值> float
<释> "Sets the horizontal position of the turret. 0 is center, negatives toward left, positives toward right."
x: 0

y: <值> float
<释> "Sets the vertical position of the turret. 0 is center, negatives toward bottom, positives toward top."
y: 40

copyFrom: <值> turret ref
<释> Copy all values from another turret as defaut values for this turret
copyFrom: 1

projectile <值> projectile ref
<释> Projectile fired from this turret.
projectile: torpedo

altProjectile <值> projectile ref
<释> Alternative projectile fired from this turret when altProjectileCondition is true
altProjectile: spear

altProjectileCondition <值> LogicBoolean
<释> Used with altProjectile
altProjectileCondition: if self.hp() < 100

barrelX <值> float
<释> Defaults to 0. Controls horizontal position for projectile spawn.
barrelX: 0

barrelY <值> float
<释> Defaults to size. Note: size and barrelY have the same meaning
barrelY: 5

barrelHeight <值> float
<释> Height of barrel in 3d. Effect projectile and shoot flame starting height
barrelHeight: 10

height: <值> float
<释> "Height of the unit in 3D, to be used with decals"
height: 30

size: <值> float
<释> Controls the distance between the center of the turret and the point from where projectiles spawn.
size: 5

turnSpeed <值> float
<释> Max turn speed of the turret
turnSpeed: 2

turnSpeedAcceleration <值> float
<释> "Defaults to disabled, and full turn speed is used."
turnSpeedAcceleration: 0.4

turnSpeedDeceleration <值> float
<释> Defaults to turnSpeedAcceleration. Setting this higher than turn acceleration might allow faster targets to be hit
turnSpeedDeceleration: 0.2

idleDir <值> float
<释> Defaults to 0
idleDir: 180

idleDirReversing <值> float
<释> Defaults to idleDir+180 unless attached to another turret (as attached turret will often be rotating when reversing)
idleDirReversing: 30

shouldResetTurret: <值> bool
<释> Defaults true. False to disable the reseting turret angle when idle
shouldResetTurret: false

idleSweepAngle <值> int
<释> "Disabled by default. Controls how far the turret will ""look"" left and right"
idleSweepAngle: 35

idleSweepDelay <值> float
<释> Controls the delay between idleSweep movements
idleSweepDelay: 20

idleSweepSpeed <值> float
<释> Controls the speed with which the turret sweeps when idle
idleSweepSpeed: 0.3

idleSweepCondition <值> LogicBoolean
<释> Disable idle sweep if false
idleSweepCondition: if self.hp() > 400

idleSweepAddRandomDelay <值> float
<释> "Default 1-20 depends on idleSweepDelay, used to stop sweep syncing up with other units"
idleSweepAddRandomDelay: 30

idleSweepAddRandomAngle <值> int
<释> Default 0
idleSweepAddRandomAngle: 15

attachedTo: <值> turret ref
<释> "Id of another turret to attach to, will be positioned relative to it, and rotate with it."
attachedTo: base

slave: <值> bool
<释> Locks this turret's direction and shot cooldown to attached turret. Often used with warmup for multiple barrel guns
slave: true

isMainNanoTurret: <值> bool
<释> "Defaults to false. Turret to use for creating buildings, etc. should only be true on one turret, and should have canShoot set to false"
isMainNanoTurret: true

energyUsage: <值> float
<释> energyUsage: 1

resourceUsage <值> price
<释> can be in credits/energy/hp/shield/ammo. Stops firing if not met

delay: <值> float
<释> Override global shootDelay for this turret
delay: 2s

linkDelayWithTurret <值> turret ref
<释> When this other turret fires the cooldown delay on this turret will be reset/removed
linkDelayWithTurret: 1

warmup: <值> float
<释> Delay before firing a shot.
warmup: 5s

warmupCallDownRate <值> float
<释> Rate to reduce warmup when turret is not ready to fire at any targets
warmupCallDownRate: 10

warmupNoReset <值> bool
<释> Defaults to false. When true warmup is not reset after firing a shot and turret doesn't wait for warnup. Used with warmupCallDownRate and warmupShootDelayTransfer.
warmupNoReset: true

warmupShootDelayTransfer <值> float
<释> "Defaults to 0, amount to reduces the next shot delay depending on warmup. When used with warmupNoReset, can make a each shot faster."
warmupShootDelayTransfer: 20

onShoot_freezeBodyMovementFor: <值> float
<释> Freezes body movement while shooting.
onShoot_freezeBodyMovementFor: 2s

barrelOffsetX_onOddShots: <值> float
<释> "0 by default. Sets a barrelX offset only during odd numbered shots, useful for twin-barreled units. Use with barrelX. Use the opposite value of barrelX for most cases."
barrelOffsetX_onOddShots: -10

aimOffsetSpread: <值>
<释> Sets the shot inaccuracy. 0 will make all shots land on target's center
aimOffsetSpread: 14

canShoot: <值> bool
<释> Defaults to true
canShoot: true

canAttackFlyingUnits: <值> LogicBoolean
<释> "Narrows targeting for this turret, note targeting for the whole unit in [attack] is applied first. (so you can only use this to target less not more)"
canAttackFlyingUnits: false

canAttackLandUnits: <值> LogicBoolean
<释> Default true. If false unit cannot attack surface units.
canAttackLandUnits: true

canAttackUnderwaterUnits: <值> LogicBoolean
<释> Default true. If false unit cannot attack underwaterunits.
canAttackUnderwaterUnits: true

canAttackNotTouchingWaterUnits: <值> LogicBoolean
<释> Default true. If false unit can only attack units in contact with the water. Used for units with torpedos.
canAttackNotTouchingWaterUnits: false

canOnlyAttackUnitsWithTags: <值> tags
<释> Only attacks potential targets with specific tags
"canOnlyAttackUnitsWithTags: shelled, armoured"

canOnlyAttackUnitsWithoutTags: <值> tags
<释> Only attacks potential targets without specific tags
"canOnlyAttackUnitsWithoutTags: corrosive, fleshy"

canAttackCondition: <值> LogicBoolean
<释> "Normally, used to optionally disable a turret based on a LogicBoolean. Eg: this unit's height"
canAttackCondition: if not self.flying

canAttackMaxAngle: <值> float
<释> "Max angle to target for turret to be allowed for fire. Defaults to 5, don't set lower. Can be set to 181 for turrets that don't need to turn to fire missiles."
canAttackMaxAngle: 181

clearTurretTargetAfterFiring: <值> bool
<释> Clears the turrets sub-target when using multi-targeting
clearTurretTargetAfterFiring:

limitingRange: <值> float
<释> Make this turret have less range than the maxAttackRange. Do not apply this to all turrets change maxAttackRange instead.
limitingRange: 100

limitingAngle <值> int
<释> Linked with idleDir. Turret will only be able to fire at units +/- this angle.
limitingAngle: 60

limitingMinRange: <值> int
<释> Sets minimum range for turret.
limitingMinRange: 200

interceptProjectiles_withTags: <值> tags
<释> Currently used with anti-nuke units.
interceptProjectiles_withTags: nuke

interceptProjectiles_andTargetingGroundUnderDistance: <值> int
<释> Minimum distance required for intercepting projectile
interceptProjectiles_andTargetingGroundUnderDistance: 100

interceptProjectiles_andUnderDistance: <值> int
<释> "Defaults to 2000, distance inflight before firing"
interceptProjectiles_andUnderDistance: 300

interceptProjectiles_andOverHeight: <值> int
<释> Defaults to 0. Sets the projectile target height limit
interceptProjectiles_andOverHeight: 10

laserDefenceEnergyUse: <值> float
<释> Set to enable a projectile laser defence from this turret. Should also set the energyMax in core.
laserDefenceEnergyUse: 0.25

invisible: <值> LogicBoolean
<释> "Don't render this turret, but still can shoot, etc."
invisible: true

image: <值> file (image)
<释> Use custom image. Overrides unit's main turret image
image: gun.png

image_applyTeamColors <值> bool
<释> "When true, the specific turret applies team colors over the special greens in the sprite."
image_applyTeamColors: true

image_drawOffsetX <值> float
<释> Moves the image horizontally from the turret center.
image_drawOffsetX: 0

image_drawOffsetY <值> float
<释> Moves the image verticallly from the turret center.
image_drawOffsetY: 30

chargeEffectImage: <值> file (image)
<释> Used with warmup. Shows a scaling effect image on turret barrel when charging.
chargeEffectImage: glow.png

warmupStartEffect <值> effect ref
<释> Spawns specified effects when the specific turret is charging/warming up
warmupStartEffect: CUSTOM:abosrb

shoot_sound: <值> string
<释> "Can be linked to an .ogg or .wav file, or one of the default game sounds (list at bottom of reference)"
shoot_sound: tank_firing

shoot_sound_vol: <值> float
<释> Sets the volume of the shoot sound
shoot_sound_vol: 0.4

shoot_flame: <值> effects
<释> "Current types are: small, large, smoke, shockwave, or CUSTOM: effectSectionName"
"eg: shoot_flame: smoke, CUSTOM:lightFade, CUSTOM:pop*5"

shoot_light <值> color
<释> Produces a colored light upon shooting
shoot_light: #fafafa

idleSpin: <值> float
<释> "Spin rate when idle, used on missile turrets"
idleSpin: 2

onShoot_playAnimation <值> animation ref
<释> Play a custom animation from an [animation] section after firing this turret
onShoot_playAnimation: heatUp

onShoot_triggerActions <值> action refs
<释> Trigger these actions each time this turret fires
onShoot_triggerActions: spawnShells

unloadUpToXUnitsAndGiveAttackOrder <值> int
<释> Unloads X units at turret barrel locations and gives them the attack order of turret target
unloadUpToXUnitsAndGiveAttackOrder: 1

recoilOffset <值> float
<释> Push turret forward or back after firing for a recoil effect. Value in pixels.
recoilOffset: 10

recoilOutTime <值> float
<释> Time to get to offset position after firing
recoilOutTime: 1s

recoilReturnTime <值> float
<释> Time to return to default position
recoilReturnTime: 0.5s

showRangeUIGuide <值> bool
<释> Defaults to true. Displays the attack range for this turret
showRangeUIGuide: true