User:Polavux/Technical:Bloons TD 5 (multiplatform)/Weapons: Difference between revisions

documenting this so i don't forgor later (ty david)
moved the movement stuff to its own section since it's not really a task, and added a list of statuses
Line 197: Line 197:
|-
|-
|<code>Tasks</code>
|<code>Tasks</code>
|A list of tasks that the weapon will execute when it fires.
|A list of tasks the weapon executes each time it fires.
|Array of objects
|Array of objects
|Yes
|Yes
Line 222: Line 222:


== Tasks ==
== Tasks ==
A <code>Task</code> is a process that executes when a weapon fires. An array of tasks is executed in its array order, lowest first. Some tasks, such as Projectile, AreaOfEffect, and Effect tasks, can also have tasks, which are referred to as "sub-tasks" and execute under different conditions.


===AreaOfEffect===
===AreaOfEffect===
Line 241: Line 242:
|Number
|Number
|Yes
|Yes
|
|-
|<code>Tasks</code>
|A list of tasks the area of effect executes on each Bloon it hits.
|Array of objects
|
|
|
|}
|}
Line 322: Line 329:
|-
|-
|<code>CollectionRadius</code>
|<code>CollectionRadius</code>
|The radius in which the collectable can be collected from
|The radius in which the collectable can be collected from.
|Number
|Number
|
|
|-
|<code>Movement</code>
|The [[#Movement|movement]] of the collectable.
|Object
|
|
|
|
Line 440: Line 453:


===LaunchAircraft===
===LaunchAircraft===
=== Movement ===
{| class="wikitable sortable"
!Key
!Description
!Type
!Required?
!Behavior when absent
|-
|<code>Type</code>
|The type of movement
{| class="wikitable"
|<code>Forward</code>
|The projectile moves forwards.
|
{| class="wikitable sortable"
!Key
!Description
!Type
!Required?
!Behavior when absent
|-
|<code>Speed</code>
|How fast the projectile moves.
|Number
|Yes
|Weapon functionally stops existing
|-
|<code>CutOffDistance</code>
|The distance at which the projectile expires.
|Number
|No
|Deafults to <code>-1</code>
|}
|-
|<code>Target</code>
|The projectile targets a bloon by continuously turning to it.
|
{| class="wikitable sortable"
!Key
!Description
!Type
!Required?
!Behavior when absent
|-
|<code>Speed</code>
|How fast the projectile moves.
|Number
|Yes
|Weapon functionally stops existing
|-
|<code>CutOffDistance</code>
|The distance at which the projectile expires.
|Number
|No
|Deafults to <code>-1</code>
|-
|<code>SeekAngle</code>
|The angle at which the projectile can target a bloon from.
|Number
|
|
|-
|<code>TurnSpeed</code>
|How quickly the projectile can turn around.
|Number
|
|
|-
|<code>TargetRange</code>
|The radius at which the projectile can target a bloon.
|Number
|
|
|-
|<code>ActivateCutOffFromSpotter</code>
|
|Boolean
|
|
|}
|-
|<code>MotionCurve</code>
|The projectile moves in a curve.
|
{| class="wikitable sortable"
!Key
!Description
!Type
!Required?
!Behavior when absent
|-
|<code>Speed</code>
|How fast the projectile moves.
|Number
|Yes
|Weapon functionally stops existing
|-
|<code>CutOffDistance</code>
|The distance at which the projectile expires.
|Number
|No
|Deafults to <code>-1</code>
|-
|<code>Curves</code>
|The movement of the projectile.
|Array of objects
|Yes
|
|-
|<code>AngleOffset</code>
|
|Number
|
|
|-
|<code>TerminateAtEndOfCurve</code>
|If off, projectile stays active when the curve ends.
|Boolean
|
|
|}
|-
|<code>GoToTarget</code>
|The projectile changes direction every time it hits a bloon.
|
{| class="wikitable sortable"
!Key
!Description
!Type
!Required?
!Behavior when absent
|-
|<code>Speed</code>
|How fast the projectile moves.
|Number
|Yes
|Weapon functionally stops existing
|-
|<code>CutOffDistance</code>
|The distance at which the projectile expires.
|Number
|No
|Deafults to <code>-1</code>
|-
|<code>NextTargetRange</code>
|The radius at which the projectile targets a bloon
|Number
|
|
|-
|<code>DestroyWhenNoTarget</code>
|If on, then the projectile terminates itself if there are no targets in its range.
|Boolean
|
|
|}
|}
|String
|Yes
|Weapon functionally stops existing
|}


=== MultiFire ===
=== MultiFire ===
Line 694: Line 545:
|If true, the projectile expires when all pierce is consumed.
|If true, the projectile expires when all pierce is consumed.
|Boolean
|Boolean
|
|
|-
|<code>Tasks</code>
|A list of tasks the projectile executes on each Bloon it hits.
|Array of objects
|
|
|-
|<code>Movement</code>
|The [[#Movement|movement]] of the projectile.
|Object
|
|
|
|
Line 741: Line 604:
|-
|-
|<code>Tasks</code>
|<code>Tasks</code>
|Executes these tasks on every Bloon it touches.
|A list of tasks the ray executes on each Bloon it touches.
|Array of objects
|Array of objects
|
|
Line 781: Line 644:
|
|
|}
|}
===StatusEffect===
{| class="wikitable"
!Key
!Description
!Type
!Required?
!Behavior when absent
|-
|<code>Status</code>
|The type of status. Any additional properties supported by this task depend on what this is set to. See below for a list of types.
|String
|
|
|}
====AbsoluteZero====
====AbsoluteZeroPermafrost====
====BeeSting====
====BeeTarget====
====BloonSpeedBoost====
====BloonSpeedBoostEffect====
====Camo====
====ContestedTerritory====
====CrippleMOAB====
====BloonChipperSuck====
====DamageMultiplier====
====DamageOverTime====
====DazeEffect====
====DiminishingReturns====
====Foam====
{| class="wikitable"
!Key
!Description
!Type
!Required?
!Behavior when absent
|-
|<code>NumPersists</code>
|
|Number
|
|
|}
====Freeplay====
====Glue====
====GlueOnTrack====
====HoldBloon====
====Ice====
====IceShards====
====Misdirection====
====MOABSlow====
====MoveOnCurve====
====MoveToPath====
====MultiLayerDamage====
====Napalm====
====Permafrost====
====RBEDamage====
====Regen====
====Sabotage====
====ShredBloon====
====SignalFlare====
====Slow====
====Stun====
====VacStatus====
====ViralFrost====


===TextEffect===
===TextEffect===
Line 858: Line 823:
|-
|-
|<code>PoppingPower</code>
|<code>PoppingPower</code>
|The pierce of the tower
|The pierce of the tower. Affects both <code>Projectile</code> and <code>AreaOfEffect</code> tasks.
|-
|-
|<code>CanPopCamo</code>
|<code>CanPopCamo</code>
Line 869: Line 834:
|The amount of damage the tower does.
|The amount of damage the tower does.
|}
|}
|Array of objects
|Object
|
|
|
|
Line 878: Line 843:
|No
|No
|Deafults to <code>-1</code>
|Deafults to <code>-1</code>
|}
==Movement ==
<code>Movement</code> is a property shared by Projectiles, Collectables, and TextEffects.
===Forward===
Moves forwards in a straight line.
{| class="wikitable sortable"
!Key
!Description
!Type
!Required?
!Behavior when absent
|-
|<code>Speed</code>
|How fast the object moves.
|Number
|Yes
|Weapon functionally stops existing
|-
|<code>CutOffDistance</code>
|The distance at which the object expires.
|Number
|No
|Deafults to <code>-1</code>
|-
|<code>SpeedDecay</code>
|
|Number
|No
|
|}
===GoToTarget===
The object selects a new target and turns towards towards it on each collision. If it cannot select a target after colliding, it continues moving in the same direction.
{| class="wikitable sortable"
!Key
!Description
!Type
!Required?
!Behavior when absent
|-
|<code>Speed</code>
|How fast the object moves.
|Number
|Yes
|Weapon functionally stops existing
|-
|<code>CutOffDistance</code>
|The distance at which the object expires.
|Number
|No
|Defaults to <code>-1</code>
|-
|<code>NextTargetRange</code>
|The radius at which the object can target.
|Number
|
|
|-
|<code>DestroyWhenNoTarget</code>
|If <code>true</code>, the object terminates itself if there are no targets in its range.
|Boolean
|
|
|}
===MotionCurve===
Follows a path defined by a [[wp:Bézier curve|cubic Bézier curve]]. (An easy way to visualize it is with [https://www.desmos.com/calculator/fblkj0psxe this calculator].)
{| class="wikitable sortable"
!Key
!Description
!Type
!Required?
!Behavior when absent
|-
|<code>Speed</code>
|How fast the object moves.
|Number
|Yes
|Weapon functionally stops existing
|-
|<code>CutOffDistance</code>
|The distance at which the object expires.
|Number
|No
|Defaults to <code>-1</code>
|-
|<code>Curves</code>
|The control points of the Bézier curve. The first number of each sub-array is the X-position, and the second number is the Y-position.
|Array of array of numbers
|Yes
|
|-
|<code>AngleOffset</code>
|
|Number
|
|
|-
|<code>TerminateAtEndOfCurve</code>
|If <code>true</code>, the object expires when it reaches the end of the path.
|Boolean
|
|
|}
===ReturnToSender===
The object moves to its target, then returns to the location it was fired from.
{| class="wikitable sortable"
!Key
!Description
!Type
!Required?
!Behavior when absent
|-
|<code>Speed</code>
|Determines the object's speed when moving towards the target.
|Number
|
|
|-
|<code>ReturnSpeed</code>
|Determines the object's speed when returning to its sender.
|Number
|
|
|-
|<code>TargetShouldFaceWeapon</code>
|
|Boolean
|
|
|-
|<code>StartOnTarget</code>
|If <code>true</code>, the object starts at the target and returns to the sender, skipping the phase of traveling to the target first. <code>Speed</code> is ignored.
|Boolean
|No
|Defaults to <code>false</code>
|}
===RotateAroundTower===
===Target===
The object constantly rotates towards the target.
{| class="wikitable sortable"
!Key
!Description
!Type
!Required?
!Behavior when absent
|-
|<code>Speed</code>
|How fast the object moves.
|Number
|Yes
|Weapon functionally stops existing
|-
|<code>CutOffDistance</code>
|The distance at which the object expires.
|Number
|No
|Deafults to <code>-1</code>
|-
|<code>SeekAngle</code>
|The angle at which the object can target from.
|Number
|
|
|-
|<code>TurnSpeed</code>
|How quickly the object can rotate towards its target, in degrees per second.
|Number
|
|
|-
|<code>TargetRange</code>
|The radius at which the object can target.
|Number
|
|
|-
|<code>ActivateCutOffFromSpotter</code>
|
|Boolean
|
|
|}
|}