<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>https://rustedwarfare.org/index.php?action=history&amp;feed=atom&amp;title=mod%E5%8F%82%E6%95%B0%2Fturret</id>
	<title>mod参数/turret - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://rustedwarfare.org/index.php?action=history&amp;feed=atom&amp;title=mod%E5%8F%82%E6%95%B0%2Fturret"/>
	<link rel="alternate" type="text/html" href="https://rustedwarfare.org/index.php?title=mod%E5%8F%82%E6%95%B0/turret&amp;action=history"/>
	<updated>2026-06-08T20:13:47Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://rustedwarfare.org/index.php?title=mod%E5%8F%82%E6%95%B0/turret&amp;diff=2580&amp;oldid=prev</id>
		<title>AbAb：​创建页面，内容为“{{RW代码|x:|float|&quot;Sets the horizontal position of the turret. 0 is center, negatives toward left, positives toward right.&quot;|x: 0}} {{RW代码|y:|float|&quot;Sets the vertical position of the turret.  0 is center, negatives toward bottom, positives toward top.&quot;|y:  40}} {{RW代码|copyFrom:|turret ref|Copy all values from another turret as defaut values for this turret|copyFrom: 1}} {{RW代码|projectile|projectile ref|Projectile fired from this turret.|projectile:…”</title>
		<link rel="alternate" type="text/html" href="https://rustedwarfare.org/index.php?title=mod%E5%8F%82%E6%95%B0/turret&amp;diff=2580&amp;oldid=prev"/>
		<updated>2023-02-20T10:05:00Z</updated>

		<summary type="html">&lt;p&gt;创建页面，内容为“{{RW代码|x:|float|&amp;quot;Sets the horizontal position of the turret. 0 is center, negatives toward left, positives toward right.&amp;quot;|x: 0}} {{RW代码|y:|float|&amp;quot;Sets the vertical position of the turret.  0 is center, negatives toward bottom, positives toward top.&amp;quot;|y:  40}} {{RW代码|copyFrom:|turret ref|Copy all values from another turret as defaut values for this turret|copyFrom: 1}} {{RW代码|projectile|projectile ref|Projectile fired from this turret.|projectile:…”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{RW代码|x:|float|&amp;quot;Sets the horizontal position of the turret. 0 is center, negatives toward left, positives toward right.&amp;quot;|x: 0}}&lt;br /&gt;
{{RW代码|y:|float|&amp;quot;Sets the vertical position of the turret.  0 is center, negatives toward bottom, positives toward top.&amp;quot;|y:  40}}&lt;br /&gt;
{{RW代码|copyFrom:|turret ref|Copy all values from another turret as defaut values for this turret|copyFrom: 1}}&lt;br /&gt;
{{RW代码|projectile|projectile ref|Projectile fired from this turret.|projectile: torpedo}}&lt;br /&gt;
{{RW代码|altProjectile|projectile ref|Alternative projectile fired from this turret when altProjectileCondition is true|altProjectile: spear}}&lt;br /&gt;
{{RW代码|altProjectileCondition|LogicBoolean|Used with altProjectile|altProjectileCondition: if self.hp() &amp;lt; 100}}&lt;br /&gt;
{{RW代码|barrelX|float|Defaults to 0. Controls horizontal position for projectile spawn.|barrelX: 0}}&lt;br /&gt;
{{RW代码|barrelY|float|Defaults to size. Note: size and barrelY have the same meaning|barrelY: 5}}&lt;br /&gt;
{{RW代码|barrelHeight|float|Height of barrel in 3d. Effect projectile and shoot flame starting height|barrelHeight: 10}}&lt;br /&gt;
{{RW代码|height: |float|&amp;quot;Height of the unit in 3D, to be used with decals&amp;quot;|height: 30}}&lt;br /&gt;
{{RW代码|size:|float|Controls the distance between the center of the turret and the point from where projectiles spawn.|size: 5}}&lt;br /&gt;
{{RW代码|turnSpeed|float|Max turn speed of the turret|turnSpeed: 2}}&lt;br /&gt;
{{RW代码|turnSpeedAcceleration|float|&amp;quot;Defaults to disabled, and full turn speed is used.&amp;quot;|turnSpeedAcceleration: 0.4}}&lt;br /&gt;
{{RW代码|turnSpeedDeceleration|float|Defaults to turnSpeedAcceleration. Setting this higher than turn acceleration might allow faster targets to be hit|turnSpeedDeceleration: 0.2}}&lt;br /&gt;
{{RW代码|idleDir |float|Defaults to 0|idleDir: 180}}&lt;br /&gt;
{{RW代码|idleDirReversing|float|Defaults to idleDir+180 unless attached to another turret (as attached turret will often be rotating when reversing)|idleDirReversing: 30}}&lt;br /&gt;
{{RW代码|shouldResetTurret:|bool|Defaults true. False to disable the reseting turret angle when idle|shouldResetTurret: false}}&lt;br /&gt;
{{RW代码|idleSweepAngle|int|&amp;quot;Disabled by default. Controls how far the turret will &amp;quot;&amp;quot;look&amp;quot;&amp;quot; left and right&amp;quot;|idleSweepAngle: 35}}&lt;br /&gt;
{{RW代码|idleSweepDelay|float|Controls the delay between idleSweep movements|idleSweepDelay: 20}}&lt;br /&gt;
{{RW代码|idleSweepSpeed|float|Controls the speed with which the turret sweeps when idle|idleSweepSpeed: 0.3}}&lt;br /&gt;
{{RW代码|idleSweepCondition|LogicBoolean|Disable idle sweep if false|idleSweepCondition: if self.hp() &amp;gt; 400}}&lt;br /&gt;
{{RW代码|idleSweepAddRandomDelay|float|&amp;quot;Default 1-20 depends on idleSweepDelay, used to stop sweep syncing up with other units&amp;quot;|idleSweepAddRandomDelay: 30}}&lt;br /&gt;
{{RW代码|idleSweepAddRandomAngle|int|Default 0|idleSweepAddRandomAngle: 15}}&lt;br /&gt;
{{RW代码|attachedTo:|turret ref|&amp;quot;Id of another turret to attach to, will be positioned relative to it, and rotate with it.&amp;quot;|attachedTo: base}}&lt;br /&gt;
{{RW代码|slave:|bool|Locks this turret&amp;#039;s direction and shot cooldown to attached turret. Often used with warmup for multiple barrel guns|slave: true}}&lt;br /&gt;
{{RW代码|isMainNanoTurret:|bool|&amp;quot;Defaults to false. Turret to use for creating buildings, etc. should only be true on one turret, and should have canShoot set to false&amp;quot;|isMainNanoTurret: true}}&lt;br /&gt;
{{RW代码|energyUsage:|float|Required energy to fire weapon. Same as resourceUsage: energy=X|energyUsage: 1}}&lt;br /&gt;
{{RW代码|resourceUsage|price|can be in credits/energy/hp/shield/ammo. Stops firing if not met|&amp;quot;resourceUsage: credits=5, energy=5, hp=100, shield=5, ammo=1&amp;quot;}}&lt;br /&gt;
{{RW代码|delay:|float|Override global shootDelay for this turret|delay: 2s}}&lt;br /&gt;
{{RW代码|linkDelayWithTurret|turret ref|When this other turret fires the cooldown delay on this turret will be reset/removed|linkDelayWithTurret: 1}}&lt;br /&gt;
{{RW代码|warmup:|float|Delay before firing a shot.|warmup: 5s}}&lt;br /&gt;
{{RW代码|warmupCallDownRate|float|Rate to reduce warmup when turret is not ready to fire at any targets|warmupCallDownRate: 10}}&lt;br /&gt;
{{RW代码|warmupNoReset|bool|Defaults to false. When true warmup is not reset after firing a shot and turret doesn&amp;#039;t wait for warnup. Used with warmupCallDownRate and warmupShootDelayTransfer.|warmupNoReset: true}}&lt;br /&gt;
{{RW代码|warmupShootDelayTransfer|float|&amp;quot;Defaults to 0, amount to reduces the next shot delay depending on warmup. When used with warmupNoReset, can make a each shot faster.&amp;quot;|warmupShootDelayTransfer: 20}}&lt;br /&gt;
{{RW代码|onShoot_freezeBodyMovementFor:|float|Freezes body movement while shooting.|onShoot_freezeBodyMovementFor: 2s}}&lt;br /&gt;
{{RW代码|barrelOffsetX_onOddShots: |float|&amp;quot;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.&amp;quot;|barrelOffsetX_onOddShots: -10}}&lt;br /&gt;
{{RW代码|aimOffsetSpread:||Sets the shot inaccuracy. 0 will make all shots land on target&amp;#039;s center|aimOffsetSpread: 14}}&lt;br /&gt;
{{RW代码|canShoot:|bool|Defaults to true|canShoot: true}}&lt;br /&gt;
{{RW代码|canAttackFlyingUnits:|LogicBoolean|&amp;quot;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)&amp;quot;|canAttackFlyingUnits: false}}&lt;br /&gt;
{{RW代码|canAttackLandUnits:|LogicBoolean|Default true. If false unit cannot attack surface units.|canAttackLandUnits: true}}&lt;br /&gt;
{{RW代码|canAttackUnderwaterUnits:|LogicBoolean|Default true. If false unit cannot attack underwaterunits.|canAttackUnderwaterUnits: true}}&lt;br /&gt;
{{RW代码|canAttackNotTouchingWaterUnits:|LogicBoolean|Default true. If false unit can only attack units in contact with the water. Used for units with torpedos.|canAttackNotTouchingWaterUnits: false}}&lt;br /&gt;
{{RW代码|canOnlyAttackUnitsWithTags:|tags|Only attacks potential targets with specific tags|&amp;quot;canOnlyAttackUnitsWithTags: shelled, armoured&amp;quot;}}&lt;br /&gt;
{{RW代码|canOnlyAttackUnitsWithoutTags:|tags|Only attacks potential targets without specific tags|&amp;quot;canOnlyAttackUnitsWithoutTags: corrosive, fleshy&amp;quot;}}&lt;br /&gt;
{{RW代码|canAttackCondition:|LogicBoolean|&amp;quot;Normally, used to optionally disable a turret based on a LogicBoolean. Eg: this unit&amp;#039;s height&amp;quot;|canAttackCondition: if not self.flying}}&lt;br /&gt;
{{RW代码|canAttackMaxAngle:|float|&amp;quot;Max angle to target for turret to be allowed for fire. Defaults to 5, don&amp;#039;t set lower. Can be set to 181 for turrets that don&amp;#039;t need to turn to fire missiles.&amp;quot;|canAttackMaxAngle: 181}}&lt;br /&gt;
{{RW代码|clearTurretTargetAfterFiring:|bool|Clears the turrets sub-target when using multi-targeting|clearTurretTargetAfterFiring:}}&lt;br /&gt;
{{RW代码|limitingRange:|float|Make this turret have less range than the maxAttackRange. Do not apply this to all turrets change maxAttackRange instead.|limitingRange: 100}}&lt;br /&gt;
{{RW代码|limitingAngle|int|Linked with idleDir. Turret will only be able to fire at units +/- this angle.|limitingAngle: 60}}&lt;br /&gt;
{{RW代码|limitingMinRange:|int|Sets minimum range for turret.|limitingMinRange: 200}}&lt;br /&gt;
{{RW代码|interceptProjectiles_withTags:|tags|Currently used with anti-nuke units.|interceptProjectiles_withTags: nuke}}&lt;br /&gt;
{{RW代码|interceptProjectiles_andTargetingGroundUnderDistance:|int|Minimum distance required for intercepting projectile|interceptProjectiles_andTargetingGroundUnderDistance: 100}}&lt;br /&gt;
{{RW代码|interceptProjectiles_andUnderDistance:|int|&amp;quot;Defaults to 2000, distance inflight before firing&amp;quot;|interceptProjectiles_andUnderDistance: 300}}&lt;br /&gt;
{{RW代码|interceptProjectiles_andOverHeight:|int|Defaults to 0. Sets the projectile target height limit|interceptProjectiles_andOverHeight: 10}}&lt;br /&gt;
{{RW代码|laserDefenceEnergyUse:|float|Set to enable a projectile laser defence from this turret. Should also set the energyMax in core.|laserDefenceEnergyUse: 0.25}}&lt;br /&gt;
{{RW代码|invisible:|LogicBoolean|&amp;quot;Don&amp;#039;t render this turret, but still can shoot, etc.&amp;quot;|invisible: true}}&lt;br /&gt;
{{RW代码|image:|file (image)|Use custom image. Overrides unit&amp;#039;s main turret image|image: gun.png}}&lt;br /&gt;
{{RW代码|image_applyTeamColors|bool|&amp;quot;When true, the specific turret applies team colors over the special greens in the sprite.&amp;quot;|image_applyTeamColors: true}}&lt;br /&gt;
{{RW代码|image_drawOffsetX|float|Moves the image horizontally from the turret center.|image_drawOffsetX: 0}}&lt;br /&gt;
{{RW代码|image_drawOffsetY|float|Moves the image verticallly from the turret center.|image_drawOffsetY: 30}}&lt;br /&gt;
{{RW代码|chargeEffectImage: |file (image)|Used with warmup. Shows a scaling effect image on turret barrel when charging.|chargeEffectImage: glow.png }}&lt;br /&gt;
{{RW代码|warmupStartEffect|effect ref|Spawns specified effects when the specific turret is charging/warming up|warmupStartEffect: CUSTOM:abosrb}}&lt;br /&gt;
{{RW代码|shoot_sound:|string|&amp;quot;Can be linked to an .ogg or .wav file, or one of the default game sounds (list at bottom of reference)&amp;quot;|shoot_sound: tank_firing | shoot_sound: missile.wav | shoot_sound: ROOT:audio/shoot.ogg}}&lt;br /&gt;
{{RW代码|shoot_sound_vol:|float|Sets the volume of the shoot sound|shoot_sound_vol: 0.4}}&lt;br /&gt;
{{RW代码|shoot_flame:|effects|&amp;quot;Current types are: small, large, smoke, shockwave, or CUSTOM: effectSectionName&amp;quot;|&amp;quot;eg: shoot_flame: smoke, CUSTOM:lightFade, CUSTOM:pop*5&amp;quot;}}&lt;br /&gt;
{{RW代码|shoot_light|color|Produces a colored light upon shooting|shoot_light: #fafafa}}&lt;br /&gt;
{{RW代码|idleSpin:|float|&amp;quot;Spin rate when idle, used on missile turrets&amp;quot;|idleSpin: 2}}&lt;br /&gt;
{{RW代码|onShoot_playAnimation|animation ref|Play a custom animation from an [animation] section after firing this turret|onShoot_playAnimation: heatUp}}&lt;br /&gt;
{{RW代码|onShoot_triggerActions|action refs|Trigger these actions each time this turret fires|onShoot_triggerActions: spawnShells}}&lt;br /&gt;
{{RW代码|unloadUpToXUnitsAndGiveAttackOrder|int|Unloads X units at turret barrel locations and gives them the attack order of turret target|unloadUpToXUnitsAndGiveAttackOrder: 1}}&lt;br /&gt;
{{RW代码|recoilOffset|float|Push turret forward or back after firing for a recoil effect. Value in pixels.|recoilOffset: 10}}&lt;br /&gt;
{{RW代码|recoilOutTime|float|Time to get to offset position after firing|recoilOutTime: 1s}}&lt;br /&gt;
{{RW代码|recoilReturnTime|float|Time to return to default position|recoilReturnTime: 0.5s}}&lt;br /&gt;
{{RW代码|showRangeUIGuide|bool|Defaults to true. Displays the attack range for this turret|showRangeUIGuide: true}}&lt;/div&gt;</summary>
		<author><name>AbAb</name></author>
	</entry>
</feed>