Editing Template:True Melee DPS Calculator
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
<includeonly><!-- | <includeonly><!-- | ||
− | !!! | + | !!! WARNING !!! |
− | |||
− | |||
The following variables are reused by [[Template:Weapon Quality Table/Melee/Row]]. If you change them here you probably have to change them there as well: | The following variables are reused by [[Template:Weapon Quality Table/Melee/Row]]. If you change them here you probably have to change them there as well: | ||
* {{#var:trueAP}} | * {{#var:trueAP}} | ||
Line 12: | Line 10: | ||
1. VARIABLES | 1. VARIABLES | ||
− | + | -->{{#vardefine:name | {{{1|{{PAGENAME}} }}} }}<!-- | |
− | -->{{#vardefine:name | + | -->{{#vardefine:material | {{{2|}}} }}<!-- |
− | --> | + | -->{{#vardefine:sharpFactor | {{Q|{{#var:material}}|Melee Sharp Damage Factor|1}} }}<!-- |
− | + | -->{{#vardefine:bluntFactor | {{Q|{{#var:material}}|Melee Blunt Damage Factor|1}} }}<!-- | |
− | + | -->{{#vardefine:cooldownFactor | {{Q|{{#var:material}}|Melee Cooldown Factor|1}} }}<!-- | |
− | }}<!-- | + | -->{{#vardefine:attack1Type | {{Q|{{#var:name}}|Attack 1 Type}} }}<!-- |
− | -->{{#vardefine: | + | -->{{#vardefine:attack2Type | {{Q|{{#var:name}}|Attack 2 Type}} }}<!-- |
− | -->{{#vardefine: | + | -->{{#vardefine:attack3Type | {{Q|{{#var:name}}|Attack 3 Type}} }}<!-- |
− | -->{{#vardefine: | + | -->{{#vardefine:attack4Type | {{Q|{{#var:name}}|Attack 4 Type}} }}<!-- |
− | -->{{#vardefine:attack1Type | + | -->{{#vardefine:attack5Type | {{Q|{{#var:name}}|Attack 5 Type}} }}<!-- |
− | -->{{#vardefine:attack2Type | + | -->{{#vardefine:attack6Type | {{Q|{{#var:name}}|Attack 6 Type}} }}<!-- |
− | -->{{#vardefine:attack3Type | + | -->{{#vardefine:qualityFactor | {{#switch: {{lc:{{{3|}}} }} |
− | -->{{#vardefine:attack4Type | + | | awful = 0.8 |
− | -->{{#vardefine: | + | | poor = 0.9 |
− | + | | normal = 1 | |
− | + | | good = 1.1 | |
− | + | | excellent = 1.2 | |
− | -->{{#vardefine: | + | | masterwork = 1.45 |
− | + | | legendary = 1.65 | |
− | + | | #default = 1 | |
− | -->{{#vardefine: | + | }} }}<!-- |
− | |||
− | | awful = | ||
− | | poor = | ||
− | | good | ||
− | | excellent | ||
− | | masterwork = | ||
− | | legendary = | ||
− | | #default = | ||
− | }}<!-- | ||
− | + | 1.1 Clearing variables in case the page is called multiple times on the same page | |
− | + | -->{{#vardefine:attack1InitialSelectionWeight|}}{{#vardefine:attack1SelectionCategory|}}{{#vardefine:attack1AP|}}{{#vardefine:attack1Cooldown|}}{{#vardefine:attack1Damage|}}{{#vardefine:attack1SelectionChance|}}<!-- | |
− | + | -->{{#vardefine:attack2InitialSelectionWeight|}}{{#vardefine:attack2SelectionCategory|}}{{#vardefine:attack2AP|}}{{#vardefine:attack2Cooldown|}}{{#vardefine:attack2Damage|}}{{#vardefine:attack2SelectionChance|}}<!-- | |
− | + | -->{{#vardefine:attack3InitialSelectionWeight|}}{{#vardefine:attack3SelectionCategory|}}{{#vardefine:attack3AP|}}{{#vardefine:attack3Cooldown|}}{{#vardefine:attack3Damage|}}{{#vardefine:attack3SelectionChance|}}<!-- | |
− | + | -->{{#vardefine:attack4InitialSelectionWeight|}}{{#vardefine:attack4SelectionCategory|}}{{#vardefine:attack4AP|}}{{#vardefine:attack4Cooldown|}}{{#vardefine:attack4Damage|}}{{#vardefine:attack4SelectionChance|}}<!-- | |
− | + | -->{{#vardefine:attack5InitialSelectionWeight|}}{{#vardefine:attack5SelectionCategory|}}{{#vardefine:attack5AP|}}{{#vardefine:attack5Cooldown|}}{{#vardefine:attack5Damage|}}{{#vardefine:attack5SelectionChance|}}<!-- | |
− | + | -->{{#vardefine:attack6InitialSelectionWeight|}}{{#vardefine:attack6SelectionCategory|}}{{#vardefine:attack6AP|}}{{#vardefine:attack6Cooldown|}}{{#vardefine:attack6Damage|}}{{#vardefine:attack6SelectionChance|}}<!-- | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | -->{{#vardefine:attack1InitialSelectionWeight | }}{{#vardefine:attack1SelectionCategory |}}{{#vardefine:attack1AP | }}{{#vardefine:attack1Cooldown | }}{{#vardefine:attack1Damage | }} | ||
− | |||
− | -->{{#vardefine: | ||
− | |||
− | -->{{#vardefine: | ||
− | |||
− | -->{{#vardefine: | ||
− | |||
− | -->{{#vardefine: | ||
− | |||
− | -->{{#vardefine: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
-->{{#vardefine:numBestAttacks|0}}{{#vardefine:numMidAttacks|0}}<!-- | -->{{#vardefine:numBestAttacks|0}}{{#vardefine:numMidAttacks|0}}<!-- | ||
2. CALCULATIONS | 2. CALCULATIONS | ||
− | 2.1 Define the damage type of the attacks so it knows which material stat to use for the damage multiplier. Needs updating if new damage types added. | + | 2.1 Define the damage type of the attacks so it knows which material stat to use for the damage multiplier. Needs updating if new damage types added. |
− | + | 2.1.1 First attack | |
− | 2 | + | -->{{#switch: {{#var:attack1Type}} |
− | -->{{# | + | | Arrow | ArrowHighVelocity | Bite | Bomb | BombSuper | Bullet | Cut | RangedStab | Scratch | Stab | Thump | Toxic bite | Toxic scratch = |
+ | {{#vardefine:attack1Damage | {{#expr: {{Q|{{#var:name}}|Attack 1 Damage}}*{{#var:qualityFactor}}*{{#var:sharpFactor}} }} }} | ||
+ | {{#vardefine:attack1AP | {{#expr: {{Q|{{#var:name}}|Attack 1 AP}} *{{#var:qualityFactor}}*{{#var:sharpFactor}} }} }} | ||
| Blunt | Crush | Demolish | Poke = | | Blunt | Crush | Demolish | Poke = | ||
− | + | {{#vardefine:attack1Damage | {{#expr: {{Q|{{#var:name}}|Attack 1 Damage}}*{{#var:qualityFactor}}*{{#var:bluntFactor}} }} }} | |
− | + | {{#vardefine:attack1AP | {{#expr: {{Q|{{#var:name}}|Attack 1 AP}} *{{#var:qualityFactor}}*{{#var:bluntFactor}} }} }} | |
− | + | | #default = {{Error|Unrecognised Damage Type: {{#var:attack1Type}} }} | |
− | + | }}<!-- | |
− | + | -->{{#vardefine: attack1InitialSelectionWeight | {{#expr: {{#var:attack1Damage}} * (1 + ({{#var:attack1AP}}/100)) * {{Q|{{#var:name}}|Attack 1 Chance Factor|1}} / {{#vardefineecho:attack1Cooldown | ({{Q|{{#var:name}}|Attack 1 Cooldown}}*{{#var:cooldownFactor}}) }} round 1}} }}<!-- | |
− | + | 2.1.2 Second attack | |
− | + | -->{{#if: {{#var:attack2Type}} | | |
− | + | {{#switch: {{#var:attack2Type}} | |
− | + | | Arrow | ArrowHighVelocity | Bite | Bomb | BombSuper | Bullet | Cut | RangedStab | Scratch | Stab | Thump | Toxic bite | Toxic scratch = | |
− | + | {{#vardefine:attack2Damage| {{#expr: {{Q|{{#var:name}}|Attack 2 Damage}}*{{#var:qualityFactor}}*{{#var:sharpFactor}} }} }} | |
− | + | {{#vardefine:attack2AP | {{#expr: {{Q|{{#var:name}}|Attack 2 AP}} *{{#var:qualityFactor}}*{{#var:sharpFactor}} }} }} | |
− | |||
| Blunt | Crush | Demolish | Poke = | | Blunt | Crush | Demolish | Poke = | ||
− | + | {{#vardefine:attack2Damage| {{#expr: {{Q|{{#var:name}}|Attack 2 Damage}}*{{#var:qualityFactor}}*{{#var:bluntFactor}} }} }} | |
− | + | {{#vardefine:attack2AP | {{#expr: {{Q|{{#var:name}}|Attack 2 AP}} *{{#var:qualityFactor}}*{{#var:bluntFactor}} }} }} | |
− | + | | #default = {{Error|Unrecognised Damage Type: {{#var:attack2Type}} }} | |
− | + | }} | |
− | + | {{#vardefine: attack2InitialSelectionWeight | {{#expr: {{#var:attack2Damage}} * (1 + ({{#var:attack2AP}}/100)) * {{Q|{{#var:name}}|Attack 2 Chance Factor|1}} / {{#vardefineecho:attack2Cooldown | ({{Q|{{#var:name}}|Attack 2 Cooldown}}*{{#var:cooldownFactor}}) }} round 1}} }} | |
− | + | }}<!-- | |
− | + | 2.1.3 Third attack | |
− | + | -->{{#if: {{#var:attack3Type}} | | |
− | + | {{#switch: {{#var:attack3Type}} | |
− | }} | + | | Arrow | ArrowHighVelocity | Bite | Bomb | BombSuper | Bullet | Cut | RangedStab | Scratch | Stab | Thump | Toxic bite | Toxic scratch = |
− | + | {{#vardefine:attack3Damage| {{#expr: {{Q|{{#var:name}}|Attack 3 Damage}}*{{#var:qualityFactor}}*{{#var:sharpFactor}} }} }} | |
− | + | {{#vardefine:attack3AP | {{#expr: {{Q|{{#var:name}}|Attack 3 AP}} *{{#var:qualityFactor}}*{{#var:sharpFactor}} }} }} | |
| Blunt | Crush | Demolish | Poke = | | Blunt | Crush | Demolish | Poke = | ||
− | + | {{#vardefine:attack3Damage| {{#expr: {{Q|{{#var:name}}|Attack 3 Damage}}*{{#var:qualityFactor}}*{{#var:bluntFactor}} }} }} | |
− | + | {{#vardefine:attack3AP | {{#expr: {{Q|{{#var:name}}|Attack 3 AP}} *{{#var:qualityFactor}}*{{#var:bluntFactor}} }} }} | |
− | + | | #default = {{Error|Unrecognised Damage Type: {{#var:attack3Type}} }} | |
− | + | }} | |
− | + | {{#vardefine: attack3InitialSelectionWeight | {{#expr: {{#var:attack3Damage}} * (1 + ({{#var:attack3AP}}/100)) * {{Q|{{#var:name}}|Attack 3 Chance Factor|1}} / {{#vardefineecho:attack3Cooldown | ({{Q|{{#var:name}}|Attack 3 Cooldown}}*{{#var:cooldownFactor}}) }} round 1}} }} | |
− | + | }}<!-- | |
− | + | 2.1.4 Fourth attack | |
− | + | -->{{#if: {{#var:attack4Type}} | | |
− | + | {{#switch: {{#var:attack4Type}} | |
− | }} | + | | Arrow | ArrowHighVelocity | Bite | Bomb | BombSuper | Bullet | Cut | RangedStab | Scratch | Stab | Thump | Toxic bite | Toxic scratch = |
− | + | {{#vardefine:attack4Damage| {{#expr: {{Q|{{#var:name}}|Attack 4 Damage}}*{{#var:qualityFactor}}*{{#var:sharpFactor}} }} }} | |
− | + | {{#vardefine:attack4AP | {{#expr: {{Q|{{#var:name}}|Attack 4 AP}} *{{#var:qualityFactor}}*{{#var:sharpFactor}} }} }} | |
| Blunt | Crush | Demolish | Poke = | | Blunt | Crush | Demolish | Poke = | ||
− | + | {{#vardefine:attack4Damage| {{#expr: {{Q|{{#var:name}}|Attack 4 Damage}}*{{#var:qualityFactor}}*{{#var:bluntFactor}} }} }} | |
− | + | {{#vardefine:attack4AP | {{#expr: {{Q|{{#var:name}}|Attack 4 AP}} *{{#var:qualityFactor}}*{{#var:bluntFactor}} }} }} | |
− | + | | #default = {{Error|Unrecognised Damage Type: {{#var:attack4Type}} }} | |
− | + | }} | |
− | | #default = | + | {{#vardefine: attack4InitialSelectionWeight | {{#expr: {{#var:attack4Damage}} * (1 + ({{#var:attack4AP}}/100)) * {{Q|{{#var:name}}|Attack 4 Chance Factor|1}} / {{#vardefineecho:attack4Cooldown | ({{Q|{{#var:name}}|Attack 4 Cooldown}}*{{#var:cooldownFactor}}) }} round 1}} }} |
− | + | }}<!-- | |
− | + | 2.1.5 Fifth attack | |
− | |||
− | |||
− | }} round 1}} }} | ||
− | 2.1. | ||
− | |||
-->{{#if: {{#var:attack5Type}} | | -->{{#if: {{#var:attack5Type}} | | ||
− | + | {{#switch: {{#var:attack5Type}} | |
− | | {{#vardefine: | + | | Arrow | ArrowHighVelocity | Bite | Bomb | BombSuper | Bullet | Cut | RangedStab | Scratch | Stab | Thump | Toxic bite | Toxic scratch = |
− | + | {{#vardefine:attack5Damage| {{#expr: {{Q|{{#var:name}}|Attack 5 Damage}}*{{#var:qualityFactor}}*{{#var:sharpFactor}} }} }} | |
− | + | {{#vardefine:attack5AP | {{#expr: {{Q|{{#var:name}}|Attack 5 AP}} *{{#var:qualityFactor}}*{{#var:sharpFactor}} }} }} | |
+ | | Blunt | Crush | Demolish | Poke = | ||
+ | {{#vardefine:attack5Damage| {{#expr: {{Q|{{#var:name}}|Attack 5 Damage}}*{{#var:qualityFactor}}*{{#var:bluntFactor}} }} }} | ||
+ | {{#vardefine:attack5AP | {{#expr: {{Q|{{#var:name}}|Attack 5 AP}} *{{#var:qualityFactor}}*{{#var:bluntFactor}} }} }} | ||
+ | | #default = {{Error|Unrecognised Damage Type: {{#var:attack5Type}} }} | ||
+ | }} | ||
+ | {{#vardefine: attack5InitialSelectionWeight | {{#expr: {{#var:attack5Damage}} * (1 + ({{#var:attack5AP}}/100)) * {{Q|{{#var:name}}|Attack 5 Chance Factor|1}} / {{#vardefineecho:attack5Cooldown | ({{Q|{{#var:name}}|Attack 5 Cooldown}}*{{#var:cooldownFactor}}) }} round 1}} }} | ||
}}<!-- | }}<!-- | ||
− | 2.1. | + | 2.1.6 Sixth attack |
-->{{#if: {{#var:attack6Type}} | | -->{{#if: {{#var:attack6Type}} | | ||
− | + | {{#switch: {{#var:attack6Type}} | |
− | | {{#vardefine: | + | | Arrow | ArrowHighVelocity | Bite | Bomb | BombSuper | Bullet | Cut | RangedStab | Scratch | Stab | Thump | Toxic bite | Toxic scratch = |
− | + | {{#vardefine:attack6Damage| {{#expr: {{Q|{{#var:name}}|Attack 6 Damage}}*{{#var:qualityFactor}}*{{#var:sharpFactor}} }} }} | |
− | + | {{#vardefine:attack6AP | {{#expr: {{Q|{{#var:name}}|Attack 6 AP}} *{{#var:qualityFactor}}*{{#var:sharpFactor}} }} }} | |
+ | | Blunt | Crush | Demolish | Poke = | ||
+ | {{#vardefine:attack6Damage| {{#expr: {{Q|{{#var:name}}|Attack 6 Damage}}*{{#var:qualityFactor}}*{{#var:bluntFactor}} }} }} | ||
+ | {{#vardefine:attack6AP | {{#expr: {{Q|{{#var:name}}|Attack 6 AP}} *{{#var:qualityFactor}}*{{#var:bluntFactor}} }} }} | ||
+ | | #default = {{Error|Unrecognised Damage Type: {{#var:attack6Type}} }} | ||
+ | }} | ||
+ | {{#vardefine: attack6InitialSelectionWeight | {{#expr: {{#var:attack6Damage}} * (1 + ({{#var:attack6AP}}/100)) * {{Q|{{#var:name}}|Attack 6 Chance Factor|1}} / {{#vardefineecho:attack6Cooldown | ({{Q|{{#var:name}}|Attack 6 Cooldown}}*{{#var:cooldownFactor}}) }} round 1}} }} | ||
}}<!-- | }}<!-- | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
2.2 Determine which attack has the highest weight to use as point of comparison for categorisation | 2.2 Determine which attack has the highest weight to use as point of comparison for categorisation | ||
− | -->{{#vardefine:maxSelectionWeight | {{#ifexpr: {{#var:attack1InitialSelectionWeight | + | -->{{#vardefine: maxSelectionWeight | {{#ifexpr: {{#var:attack1InitialSelectionWeight}} > {{#var:attack2InitialSelectionWeight|0}} | {{#var:attack1InitialSelectionWeight}} | {{#var:attack2InitialSelectionWeight}} }} }}<!-- |
− | --> | + | -->{{#ifexpr: {{#var:maxSelectionWeight}} < {{#var:attack3InitialSelectionWeight|0}} | {{#vardefine: maxSelectionWeight| {{#var:attack3InitialSelectionWeight}} }} }}<!-- |
− | --> | + | -->{{#ifexpr: {{#var:maxSelectionWeight}} < {{#var:attack4InitialSelectionWeight|0}} | {{#vardefine: maxSelectionWeight| {{#var:attack4InitialSelectionWeight}} }} }}<!-- |
− | --> | + | -->{{#ifexpr: {{#var:maxSelectionWeight}} < {{#var:attack5InitialSelectionWeight|0}} | {{#vardefine: maxSelectionWeight| {{#var:attack5InitialSelectionWeight}} }} }}<!-- |
− | --> | + | -->{{#ifexpr: {{#var:maxSelectionWeight}} < {{#var:attack6InitialSelectionWeight|0}} | {{#vardefine: maxSelectionWeight| {{#var:attack6InitialSelectionWeight}} }} }}<!-- |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
2.3 Categorize attacks relative to highest initial selection weight into best/mid/worst | 2.3 Categorize attacks relative to highest initial selection weight into best/mid/worst | ||
− | 2.3.1 | + | 2.3.1 First attack |
− | --> | + | -->{{#vardefine: attack1SelectionCategory | {{#ifexpr: {{#var:attack1InitialSelectionWeight}} >= 0.95*{{#var:maxSelectionWeight}} | best {{#vardefine: numBestAttacks | {{#expr: {{#var:numBestAttacks}}+1}} }} | {{#ifexpr: {{#var:attack1InitialSelectionWeight}} < 0.25*{{#var:maxSelectionWeight}} | worst | mid {{#vardefine: numMidAttacks | {{#expr: {{#var:numMidAttacks}}+1}} }} }} }} }}<!-- |
− | {{#vardefine:attack1SelectionCategory | + | 2.3.2 Second attack |
− | -->{{#if: {{#var:attack2Type }} | | + | -->{{#if: {{#var:attack2Type}} | |
− | {{#vardefine:attack2SelectionCategory | + | {{#vardefine: attack2SelectionCategory | {{#ifexpr: {{#var:attack2InitialSelectionWeight}} >= 0.95*{{#var:maxSelectionWeight}} | best {{#vardefine: numBestAttacks | {{#expr: {{#var:numBestAttacks}}+1}} }} | {{#ifexpr: {{#var:attack2InitialSelectionWeight}} < 0.25*{{#var:maxSelectionWeight}} | worst | mid {{#vardefine: numMidAttacks | {{#expr: {{#var:numMidAttacks}}+1}} }} }} }} }} }}<!-- |
− | -->{{#if: {{#var:attack3Type }} | | + | 2.3.3 Third attack |
− | {{#vardefine:attack3SelectionCategory | + | -->{{#if: {{#var:attack3Type}} | |
− | -->{{#if: {{#var:attack4Type }} | | + | {{#vardefine: attack3SelectionCategory | {{#ifexpr: {{#var:attack3InitialSelectionWeight}} >= 0.95*{{#var:maxSelectionWeight}} | best {{#vardefine: numBestAttacks | {{#expr: {{#var:numBestAttacks}}+1}} }} | {{#ifexpr: {{#var:attack3InitialSelectionWeight}} < 0.25*{{#var:maxSelectionWeight}} | worst | mid {{#vardefine: numMidAttacks | {{#expr: {{#var:numMidAttacks}}+1}} }} }} }} }} }}<!-- |
− | {{#vardefine:attack4SelectionCategory | + | 2.3.4 Fourth attack |
− | 2.3. | + | -->{{#if: {{#var:attack4Type}} | |
− | -->{{#if: {{#var:attack5Type | + | {{#vardefine: attack4SelectionCategory | {{#ifexpr: {{#var:attack4InitialSelectionWeight}} >= 0.95*{{#var:maxSelectionWeight}} | best {{#vardefine: numBestAttacks | {{#expr: {{#var:numBestAttacks}}+1}} }} | {{#ifexpr: {{#var:attack4InitialSelectionWeight}} < 0.25*{{#var:maxSelectionWeight}} | worst | mid {{#vardefine: numMidAttacks | {{#expr: {{#var:numMidAttacks}}+1}} }} }} }} }} }}<!-- |
− | {{#vardefine:attack5SelectionCategory | + | 2.3.5 Fifth attack |
− | + | -->{{#if: {{#var:attack5Type}} | | |
− | + | {{#vardefine: attack5SelectionCategory | {{#ifexpr: {{#var:attack5InitialSelectionWeight}} >= 0.95*{{#var:maxSelectionWeight}} | best {{#vardefine: numBestAttacks | {{#expr: {{#var:numBestAttacks}}+1}} }} | {{#ifexpr: {{#var:attack5InitialSelectionWeight}} < 0.25*{{#var:maxSelectionWeight}} | worst | mid {{#vardefine: numMidAttacks | {{#expr: {{#var:numMidAttacks}}+1}} }} }} }} }} }}<!-- | |
− | + | 2.3.6 Sixth attack | |
− | + | -->{{#if: {{#var:attack6Type}} | | |
− | -->{{#if: {{#var: | + | {{#vardefine: attack6SelectionCategory | {{#ifexpr: {{#var:attack6InitialSelectionWeight}} >= 0.95*{{#var:maxSelectionWeight}} | best {{#vardefine: numBestAttacks | {{#expr: {{#var:numBestAttacks}}+1}} }} | {{#ifexpr: {{#var:attack6InitialSelectionWeight}} < 0.25*{{#var:maxSelectionWeight}} | worst | mid {{#vardefine: numMidAttacks | {{#expr: {{#var:numMidAttacks}}+1}} }} }} }} }} }}<!-- |
− | {{#vardefine: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
2.4 Calculate selection chances | 2.4 Calculate selection chances | ||
Line 235: | Line 150: | ||
-->{{#vardefine:bestCategoryPercentage| {{#ifeq: {{#var:numMidAttacks}} | 0 | 1 | 0.75 }} }}<!-- | -->{{#vardefine:bestCategoryPercentage| {{#ifeq: {{#var:numMidAttacks}} | 0 | 1 | 0.75 }} }}<!-- | ||
Define selection chances from category and number of attacks in category so we don't have to calc them twice and so they can be called. | Define selection chances from category and number of attacks in category so we don't have to calc them twice and so they can be called. | ||
− | --> | + | -->{{#vardefine:attack1SelectionChance|{{#expr: {{#switch: {{#var:attack1SelectionCategory}} | best = {{#var:bestCategoryPercentage}}/{{#var:numBestAttacks}} | mid = 0.25/{{#var:numMidAttacks}} | 0 }} }} }}<!-- |
− | + | -->{{#if: {{#var:attack2Type}} | {{#vardefine:attack2SelectionChance|{{#expr: {{#switch: {{#var:attack2SelectionCategory}} | best = {{#var:bestCategoryPercentage}}/{{#var:numBestAttacks}} | mid = 0.25/{{#var:numMidAttacks}} | 0 }} }} }} }}<!-- | |
− | -->{{#if: {{#var: | + | -->{{#if: {{#var:attack3Type}} | {{#vardefine:attack3SelectionChance|{{#expr: {{#switch: {{#var:attack3SelectionCategory}} | best = {{#var:bestCategoryPercentage}}/{{#var:numBestAttacks}} | mid = 0.25/{{#var:numMidAttacks}} | 0 }} }} }} }}<!-- |
− | + | -->{{#if: {{#var:attack4Type}} | {{#vardefine:attack4SelectionChance|{{#expr: {{#switch: {{#var:attack4SelectionCategory}} | best = {{#var:bestCategoryPercentage}}/{{#var:numBestAttacks}} | mid = 0.25/{{#var:numMidAttacks}} | 0 }} }} }} }}<!-- | |
− | -->{{#if: {{#var: | + | -->{{#if: {{#var:attack5Type}} | {{#vardefine:attack5SelectionChance|{{#expr: {{#switch: {{#var:attack5SelectionCategory}} | best = {{#var:bestCategoryPercentage}}/{{#var:numBestAttacks}} | mid = 0.25/{{#var:numMidAttacks}} | 0 }} }} }} }}<!-- |
− | + | -->{{#if: {{#var:attack6Type}} | {{#vardefine:attack6SelectionChance|{{#expr: {{#switch: {{#var:attack6SelectionCategory}} | best = {{#var:bestCategoryPercentage}}/{{#var:numBestAttacks}} | mid = 0.25/{{#var:numMidAttacks}} | 0 }} }} }} }}<!-- | |
− | -->{{#if: {{#var: | ||
− | |||
− | -->{{#if: {{#var: | ||
− | |||
− | -->{{#if: {{#var: | ||
− | |||
2.5 Calculate actual DPS | 2.5 Calculate actual DPS | ||
(bestDamage*bestSelectionWeight + midDamage*midSelectionWeight) / (bestCooldownTime*bestSelectionWeight + midCoolDownTime*midSelectionWeight) = DPS | (bestDamage*bestSelectionWeight + midDamage*midSelectionWeight) / (bestCooldownTime*bestSelectionWeight + midCoolDownTime*midSelectionWeight) = DPS | ||
− | -->{{#vardefine:weightedDamageTotal | + | -->{{#vardefine:weightedDamageTotal | {{#expr: {{#var:attack1Damage}}*{{#var:attack1SelectionChance}} |
− | + | {{#if: {{#var:attack2Type}} | +{{#var:attack2Damage}}*{{#var:attack2SelectionChance}} }} | |
− | {{#if: {{#var:attack2Type | + | {{#if: {{#var:attack3Type}} | +{{#var:attack3Damage}}*{{#var:attack3SelectionChance}} }} |
− | {{#if: {{#var:attack3Type | + | {{#if: {{#var:attack4Type}} | +{{#var:attack4Damage}}*{{#var:attack4SelectionChance}} }} |
− | {{#if: {{#var:attack4Type | + | {{#if: {{#var:attack5Type}} | +{{#var:attack5Damage}}*{{#var:attack5SelectionChance}} }} |
− | {{#if: {{#var:attack5Type | + | {{#if: {{#var:attack6Type}} | +{{#var:attack6Damage}}*{{#var:attack6SelectionChance}} }} }} |
− | {{#if: {{#var:attack6Type | + | }}<!-- |
− | + | -->{{#vardefine:weightedTimeTotal | {{#expr: {{#var:attack1Cooldown}}*{{#var:attack1SelectionChance}} | |
− | + | {{#if: {{#var:attack2Type}} | +{{#var:attack2Cooldown}}*{{#var:attack2SelectionChance}} }} | |
− | + | {{#if: {{#var:attack3Type}} | +{{#var:attack3Cooldown}}*{{#var:attack3SelectionChance}} }} | |
− | + | {{#if: {{#var:attack4Type}} | +{{#var:attack4Cooldown}}*{{#var:attack4SelectionChance}} }} | |
− | + | {{#if: {{#var:attack5Type}} | +{{#var:attack5Cooldown}}*{{#var:attack5SelectionChance}} }} | |
− | + | {{#if: {{#var:attack6Type}} | +{{#var:attack6Cooldown}}*{{#var:attack6SelectionChance}} }} }} | |
− | + | }}<!-- | |
− | -->{{#vardefine:weightedTimeTotal | + | -->{{#vardefine:trueDPS| {{#expr:{{#var:weightedDamageTotal}}/{{#var:weightedTimeTotal}} round 2}} }}<!-- |
− | |||
− | {{#if: {{#var:attack2Type | ||
− | {{#if: {{#var:attack3Type | ||
− | {{#if: {{#var:attack4Type | ||
− | {{#if: {{#var:attack5Type | ||
− | {{#if: {{#var:attack6Type | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | -->{{#vardefine:trueDPS | {{#expr:{{#var:weightedDamageTotal}}/{{#var:weightedTimeTotal}} round 2}} }}<!-- | ||
− | 2.6 Calculate actual average AP | + | 2.6 Calculate actual average AP |
− | -->{{#vardefine:trueAP | {{#expr: | + | -->{{#vardefine:trueAP | {{#expr: {{#var:attack1AP}}*{{#var:attack1SelectionChance}} |
− | + | {{#if: {{#var:attack2Type}} | +{{#var:attack2AP}}*{{#var:attack2SelectionChance}} }} | |
− | {{#if: {{#var:attack2Type | + | {{#if: {{#var:attack3Type}} | +{{#var:attack3AP}}*{{#var:attack3SelectionChance}} }} |
− | {{#if: {{#var:attack3Type | + | {{#if: {{#var:attack4Type}} | +{{#var:attack4AP}}*{{#var:attack4SelectionChance}} }} |
− | {{#if: {{#var:attack4Type | + | {{#if: {{#var:attack5Type}} | +{{#var:attack5AP}}*{{#var:attack5SelectionChance}} }} |
− | {{#if: {{#var:attack5Type | + | {{#if: {{#var:attack6Type}} | +{{#var:attack6AP}}*{{#var:attack6SelectionChance}} }} round 2}} |
− | {{#if: {{#var:attack6Type | + | }}<!-- |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | round 2}} }}<!-- | ||
3. RETURNED VALUE | 3. RETURNED VALUE | ||
-->{{#var:trueDPS}}</includeonly><noinclude> | -->{{#var:trueDPS}}</includeonly><noinclude> | ||
+ | {{Recode|reason = Update to allow for adding weapon verb sets to pawn verb sets}} | ||
{{Documentation}} | {{Documentation}} | ||
− | |||
</noinclude> | </noinclude> |