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

LowoTV (talk | contribs)
im gonna rework operation soon
LowoTV (talk | contribs)
get reworked lol
Line 76: Line 76:


==== Task Upgrades ====
==== Task Upgrades ====
This only upgrades tasks and subtasks.
This only upgrades tasks and subtasks. It uses 2 objects.
 
The first object is to find the task/subtask to upgrade, it consists of 2 variables:
{| class="wikitable sortable"
{| class="wikitable sortable"
!Key
!Key
Line 85: Line 87:
|-
|-
|<code>Operation</code>
|<code>Operation</code>
|The operation to find what to change.
|It decides how to find the task/subtask. It can either be <code>SelectByType</code> or <code>SelectByLocation</code>.
{| class="wikitable"
|String
|<code>SelectByType</code>
|
|Selects by the type of task/subtask.
|
|-
|-
|<code>Type</code>
|<code>Type</code>
|The type of task/subtask to look for.
|The type of task/subtask to look for. Requires <code>Operation</code> to be <code>SelectByType</code>.
|-
|String
|<code>SelectByLocation</code>
|
|Selects by the location of the task/subtask.
|
|-
|-
|<code>Location</code>
|<code>Location</code>
|The location of the task/subtask
|The location of where task/subtask is. Requires <code>Operation</code> to be <code>SelectByLocation</code>.
|Array of Numbers
|
|
|}
|}
And whether to adjust or replace a task/subtask
 
{| class="wikitable"
The second object defines what to upgrade, it consists of 2 or more variables. The first one is an operation string and all the others in the object are the variables that are to be upgraded.
{| class="wikitable sortable"
!Key
!Description
!Type
!Required?
!Behavior when absent
|-
|<code>Operation</code>
|It decides what to do with a variable. It can either be <code>Adjust</code> or <code>Replace</code>.
|String
|
|
|-
|<code>Adjust</code>
|<code>Adjust</code>
|To adjust the value or values.
|It adds/subtracts numerical values. Requires <code>Operation</code> to be <code>Adjust</code>.
|N/A
|
|
|-
|-
|<code>Replace</code>
|<code>Replace</code>
|To replace the value or values.
|It replaces values with others. Requires <code>Operation</code> to be <code>Replace</code>.
|}
|N/A
|String<abbr title="Location is an array of numbers.">*</abbr>
|
|
|
|
|}
|}