Happy New Year Warframe Wikia users and contributors!

The advent of Update 26 with its Melee 2.9999 changes have brought me and many other editors attention towards the need to update how stance tables are displayed. So began the porting of the wiki templates over to Lua (no not the moon) in the form of modules.

Before I begin, I want to shoutout to User:ArbitraryMary for doing the majority of the work of updating most (if not all) the PvE stance info and User:Nocturnus1 for updating PvP stances too! Thank you for your research! If there is anyone I missed, please leave a message below.

If you are curious about programming or want to know the behind-the-scenes look for this wiki, this blog post may be the place to learn more. Feel free to ask questions in the comments.

Last updated: Sun, 06 Jun 2021 19:47:12 +0000 (UTC) by User:Cephalon Scientia

TL;DR

Stance tables are now automated and have a new look that is more spacious for readability. Formatting changes also allows better visibility of combos on mobile. All stance data are now stored in one place: Module:Stances/data; see #How Can You Help? Contribute to Module:Stances/data! for details.

Rationale and Purpose

Over the past weeks I've been working on a prototype of Module:Stances called Module:ScientiaStances that is direct Lua port of the templates used to display stance tables. However, User:FINNER has also worked on Luafying Module:Stances (with more elegant code than mine) and his base code is currently being used in the official module while borrowing some of my implementation ideas.

The module replaces the following templates:

The module also obsoleted CSS classes specific for displaying combo icons (or unused at the very least) in MediaWiki:Wikia.css:

  • CI, CI-top-proc, CI-top-proc1, CI-top-proc2, CI-multi, CI-multi1, and CI-multi2
  • CI2, CI2-top-proc, CI2-top-proc1, CI2-top-proc2, CI2-multi, CI2-multi1, CI2-multi2, CI2-multi3, and CI2-multi4

The reason for the port is the ease of editbility and expandability of new and existing stance combos that comes with using modules instead of templates for formatting tables. With this port, all future changes will be in two locations (one for table formatting and another for stance data) instead of scattered across four templates and individual stance pages (over 53 stances at the time of writing this!).

Over on the Wikia Discord, editors have agreed on a new combo format which is already implemented in Module:Stances.

Current Implementation

Here is a snippet of Template:StanceCombosV2, showcasing the header and the first two table rows:

{{{!}} class="foundrytable" style="font-family:Roboto; text-align:left; max-width:100%; margin:-6px 0px 0px 0px;"
{{!}}- 
{{#if:{{{move1|}}}{{{move1combo|}}}{{{move2|}}}{{{move2combo|}}}{{{move3|}}}{{{move3combo|}}}{{{move4|}}}{{{move4combo|}}}
|
{{!!!}} style="text-align:center; padding: 0em 0.5em;"{{!}}[[Melee 2.0{{!}}Combo]] Name
{{!!!}} style="text-align:center; padding: 0em 0.5em;"{{!}}[[Stance#Melee Combos{{!}}Button Combination]]
|
{{!!!}} style="text-align:center; padding: 0em 0.5em; width:226px;" colspan="2" {{!}}N/A
}}{{#if:{{{move1|}}}{{{move1combo|}}}|{{Crlf2}}
{{!}}- id="{{{move1|}}}"
{{!}} style="padding: 0em 0.5em; line-height:100% ;" {{!}} <b>{{{move1|}}}</b> {{!}}{{!}} style="padding: {{#if:{{{move1em|}}}|0.95|0.3}}em 0.25em {{#if:{{{move1em|}}}|{{#expr: 0.65*({{{move1em}}} - 1) + 0.6}}|0.2}}em 0.25em;" {{!}} {{{move1combo|}}}
}}{{#if:{{{move2|}}}{{{move2combo|}}}|{{Crlf2}}
{{!}}- id="{{{move2|}}}"
{{!}} style="padding: 0em 0.5em; line-height:100%;" {{!}} <b>{{{move2|}}}</b>[[Stance{{!}}{{text||*|hover={{{move2|}}} unlocks at Rank 1|cursor=help}}]] {{!}}{{!}} style="padding: {{#if:{{{move2em|}}}|0.95|0.3}}em 0.25em {{#if:{{{move2em|}}}|{{#expr: 0.65*({{{move2em}}} - 1) + 0.6}}|0.2}}em 0.25em;" {{!}} {{CI|Up}}( {{{move2combo|}}})
}}

If you go to the page and view the source code, you will see that it is very convoluted and difficult to edit for two main reasons:

  • Limited amount of characters that can be displayed on a line.
  • The use of Template:! ({{!}}) and Template:!!! ({{!!!}}) that are needed to display certain symbols and characters in wikitables contained in Parser functions.

Module Implementation

The template implementation is Luafied as such:

View Lua Code List
-- returns a wikitable that displays all combo information for a stance
-- pre : name is a string that represents stance name
-- post: returns a string representation of a wikitable
local function buildStanceTable(name)
    local stanceData = getStanceData(name);
    local maxCols = getMaxCols(stanceData);
    
    local tHeader =
        '\n{|class="foundrytable" style="font-family:Roboto; text-align:left; max-width:100%;"'..
        '\n|-'..
        '\n! style="text-align:center; padding: 0 0.5em;" | [[Melee 2.0|Combo]] Name'..
        '\n! style="text-align:center; padding: 0 0.5em;" colspan="'..maxCols..'"| [[Stance#Melee Combos|Button Combination]]';
    
    local tRows = '';
    for i, comboType in ipairs(Combos) do
        -- if combo type exists in stance table add a row for it
        if stanceData[comboType] ~= nil then
            tRows = tRows..buildComboRow(Name, comboType);
        end
    end
    
    local tLegend = buildStanceLegend(maxCols + 1);
    
    return tHeader..tRows..tLegend..'\n|}';
end

For more implementation details on particular functions used see Module:Stances.

What It Looks Like

{{#invoke:Stances|buildStanceTable|Cleaving Whirlwind}} or {{StanceTable|Cleaving Whirlwind}}
Combo Name Button Combination Length Avg Dmg Multi/s
Crowd Fall
Default Melee Attack
300%
Default Melee Attack
400%
Slam
500% Knockdown b.png
2.25s 533%/s
Broken Bull
360° Attack
2x 100%
360° Attack
2x 100%
360° Attack
100%
200%
360° Attack
200%
200% DmgImpactSmall64.png
5.7s 193%/s
Up +
Sundered Tusk
Slam
500% DmgImpactSmall64.png
Slam
300%
100%
200%
400% Lifted b.png
2.7s 556%/s
(Up + Block) +
Drifting Stampede
Slam
400%
Default Melee Attack
500% Ragdoll b.png
1.9s 474%/s
Block +
Crowd Fall
Heavy Attack
600% Lifted b.png
Heavy Attack
600% Knockdown b.png
N/A N/A%/s
(Heavy Attack)
Hell's Wave
360° Attack
200% DmgImpactSmall64.png
0.98s 204%/s
(While Sliding)
Mountain's Chisel
Default Melee Attack
200% DmgImpactSmall64.png
Default Melee Attack
200% DmgImpactSmall64.png
Default Melee Attack
200% DmgImpactSmall64.png
N/A N/A%/s
(While In Air)
Flaying Home
Default Melee Attack
200% DmgImpactSmall64.png
N/A N/A%/s
(While Wall Latching)
Tunneling Spike
Default Melee Attack
1200% DmgSlashSmall64.png
N/A N/A%/s
(On Knocked

Down
 Enemy)
360° Attack 360° Attack   Slam Slam Attack   Ranged Ranged Attack
View Full Legend
Key Inputs
Default Melee Attack Basic Melee  (PC default LMB or E)
Heavy Attack Heavy Attack  (PC default MMB)
Block Block  (PC default RMB)
Up Forward Movement  (PC default W)
Multipliers and Hits
Default Melee Attack
200%
 Attack does double damage 
Default Melee Attack
2x 100%
 Attack hits twice 
Exclusive Procs
DmgImpactSmall64.png Impact or Stagger 
Knockdown b.png Knockdown 
Lifted b.png Lifted 
Ragdoll b.png Ragdoll 
 Front, Back, or Ground Finisher 
DmgImpairSmall64.png Impair (PvP only) 
Shaded rows are combos shared across all stances of the weapon type.


Benefits

Luafying Template:StanceCombosV2 and the like has its benefits:

  • All stance data are in one location instead of scattered about templates and individual stance pages.
  • Can support additional combos or procs in the case when the devs add new ones.
  • Automated styling of tables and its rows.
  • Cuts down the need of multiple templates to display tables; if tables need to be updated anyone logged in can just update the module.
  • Opens up the possibility of using stance data for other purposes than just displaying info on a table.
  • Abstraction of key functionality so you don't have to worry about the nitty-gritty details about how the table is being built. This is mainly for people who want to update the module.
  • Easily expandable for new combos, add them to Combos table in module.

Downsides

  • Requires Lua knowledge to edit and maintain.

Comparison

Source code:

{| class="wikitable"
|-
| [[:Template:StanceCombosV2]] || [[:Template:StanceTable]]<br/>(calls [[Module:Stances]])
|-
|
{{StanceCombosV2
|no-header    = y
|type         = Sword
|move1        = Wings and Beak
|move1combo   = {{CI||Proc|300||ImpSla}}{{CI|||200}}{{CI|||200||Knockdown}}
|move1em      = 2
|move2        = Double Slash
|move2combo   = {{CI}}{{CI|||200}}
|move2em      = 2
|move3        = Taking Flight
|move3combo   = {{CI2||Proc|||1|100||1|1|200|Impact}}{{CI||Slam|400||Lifted}}
|move3em      = 3
|heavy        = Perfect Cut
|slide        = Spiral Cut
|air          = Weightless Steel
|wall         = Weightless Steel
|finisher     = Death's Mark
}}
|{{StanceTable|Name=Iron Phoenix|Header=false}}
|}

Heavy, slide, air, wall, and ground finisher combos from Template:SharedCombos:

|SwordHeavyName    = Perfect Cut
|SwordHeavy        = {{CI|Heavy|Proc|500||Lifted}}{{CI|Heavy||500||Knockdown}}
|SwordHeavyem      = 1
|SwordSlideName    = Spiral Cut
|SwordSlide        = {{CI||360|||Impact}}
|SwordSlideem      = 1
|SwordAirName      = Weightless Steel 
|SwordAir          = {{CI|||200}}{{CI|||200}}{{CI|||300||Knockdown}}
|SwordAirem        = 1
|SwordWallName     = Weightless Steel
|SwordWall         = {{CI|||300||Knockdown}}
|SwordWallem       = 1
|SwordFinisherName = Death's Mark
|SwordFinisher     = {{CI||Proc|250||Slash}}
|SwordFinisherem   = 1

See Formatting section for a human-viewable format of combo info that is used in Module:Stances/data.

Template:StanceCombosV2 Template:StanceTable
(calls Module:Stances)


Combo Name Button Combination&#xD;
Wings and Beak
Default Melee Attack
300%
Default Melee Attack200%Default Melee AttackKnockdown b.png200%&#xD;
Double Slash* Up( Default Melee AttackDefault Melee Attack200%)&#xD;
Taking Flight* (Up+  Block)(
Default Melee Attack
1x 200% DmgImpactSmall64.png1x 100%
SlamLifted b.png400%)&#xD;
Perfect Cut  
Default Melee Attack
Lifted b.png500%
Heavy AttackKnockdown b.png500%

&#xD;

Spiral Cut Slide + 360° AttackDmgImpactSmall64.png

&#xD;

Weightless Steel In Air + Default Melee Attack200%Default Melee Attack200%Default Melee AttackKnockdown b.png300%

&#xD;

Weightless Steel Wall Dash + Default Melee AttackKnockdown b.png300%

&#xD;

Death's Mark Knocked Down Enemy +
Default Melee Attack
DmgSlashSmall64.png1000%
360° Attack 360° Attack  Slam Slam Attack 
Default Melee Attack
Proc

 Melee Attacks

Default Melee Attack   Melee  
Block   Block  
Up   Forward  
Heavy Attack Heavy Attack  
Pause   Pause  

 Multipliers and Hits

Default Melee Attack200%   Attack does double damage  
Default Melee Attack2x   Attack hits twice  

 Exclusive Procs

Knockdown b.png   Knockdown  
Ragdoll b.png   Ragdoll  
Lifted b.png   Lifted  
  Ground Finisher  
Combo Name Button Combination Length Avg Dmg Multi/s
Wings and Beak
Default Melee Attack
300% DmgImpactSmall64.pngDmgSlashSmall64.png
Default Melee Attack
200%
Default Melee Attack
200% Knockdown b.png
1.35s 519%/s
Double Slash
Default Melee Attack
100%
Default Melee Attack
200%
0.65s 462%/s
Up +
Taking Flight
Default Melee Attack
100%
300% DmgImpactSmall64.png
Slam*
400% Lifted b.png
1.8s 444%/s
(Up + Block) +
Perfect Cut
Heavy Attack
500% Lifted b.png
Heavy Attack
500% Knockdown b.png
N/A N/A%/s
(Heavy Attack)
Spiral Cut
360° Attack
100% DmgImpactSmall64.png
0.69s 145%/s
(While Sliding)
Weightless Steel
Default Melee Attack
200%
Default Melee Attack
200%
Default Melee Attack
300% Knockdown b.png
N/A N/A%/s
(While In Air)
Weightless Steel
Default Melee Attack
300% Knockdown b.png
N/A N/A%/s
(While Wall Latching)
Death's Mark
Default Melee Attack
1000% DmgSlashSmall64.png
N/A N/A%/s
(On Knocked

Down
 Enemy)
360° Attack 360° Attack   Slam Slam Attack   Ranged Ranged Attack
View Full Legend
Key Inputs
Default Melee Attack Basic Melee  (PC default LMB or E)
Heavy Attack Heavy Attack  (PC default MMB)
Block Block  (PC default RMB)
Up Forward Movement  (PC default W)
Multipliers and Hits
Default Melee Attack
200%
 Attack does double damage 
Default Melee Attack
2x 100%
 Attack hits twice 
Exclusive Procs
DmgImpactSmall64.png Impact or Stagger 
Knockdown b.png Knockdown 
Lifted b.png Lifted 
Ragdoll b.png Ragdoll 
 Front, Back, or Ground Finisher 
DmgImpairSmall64.png Impair (PvP only) 
Shaded rows are combos shared across all stances of the weapon type.


Differences

Styling
  • Updated legend.
  • More spacing between damage multipliers and combo icons.
  • Adjustments on proc icon placement.
  • Combo styling is consistent for readability (notice how icons are lined up vertically).
    • This also means on mobile browsers, these tables will be formatted in a more readable way.
  • For attacks with more than one unique hit, proc icons will not appear on top of that combo icon. The reasoning for this is that it is redundant since proc info is already shown next to each unique hit.
  • Required inputs for certain combos are moved to combo name column.
  • Automatic formatting based on the amount of attack info needed to be displayed.
  • Human-readable combo format for editing in Module:Stances/data (compared to using Template:ComboIcon2).
Technical
  • Combo info are all in one location Module:Stances/data rather than being on a particular stance page and in Template:SharedCombos.
  • Relatively easy to navigate and modify module code compared to going through parser functions in Template:StanceCombosV2.
  • Styling for combo icons is streamlined; all CSS styling can be edited in the module:
    • Doesn't use any CSS classes for displaying combo icons.
      • Doesn't use CI and CI2 CSS classes.
    • Doesn't use the following CSS classes for displaying multiple unique hits:
      • CI2-multi, CI2-multi2, CI2-multi3, and CI2-multi4.

How Can You Help? Contribute to Module:Stances/data!

Main article: Template:StanceTable/doc

If you have any knowledge in Lua, you can help contribute to this project by updating stance tables in Module:Stances/data. For styling and formatting help, please see the documentation below:

Possible Values

Default values for keys if the following are omitted (the rest of keys requires an input):

Shape = nil
Type = "Default"
Procs = nil

Value type restrictions for keys:

WeaponType = string
Name = string
Shape = string ("", "Heavy") or nil
Type = string ("Default", "360", "Spin", "Slam") or nil
Hits = number or number table
Dmg = number or number table
Procs = string, string table, or nil
    For no icons: nil or ""
    For single icons: "Impact", "Puncture", "Slash", "Blast", "Lifted", "Knockdown", "Ragdoll", "Finisher", or "Impair"
    For double icons, in place of a string value, insert a table containing two proc names (e.g. { "Impact", "Slash" })

Table value restrictions:

If one of the following keys contains a table value:
    Hits, Dmg, and Procs
The rest must be either nil or contain table values that match the 
same length as the largest table value.

Formatting

Copy paste the following and replace values as needed:

Stance Combos:
["Stance Name"] = {
    WeaponType = "Weapon Type",
    ["Neutral"] = {
        Name = "Combo Name",
        {   Hits = 1, Dmg = 100, Procs = {""} },
        {   Hits = 1, Dmg = 100, Procs = {""} },
        {   Hits = 1, Dmg = 100, Procs = {""} },
    },
    ["Forward"] = {
        Name = "Combo Name",
        {   Hits = 1, Dmg = 100, Procs = {""} },
        {   Hits = 1, Dmg = 100, Procs = {""} },
        {   Hits = 1, Dmg = 100, Procs = {""} },
    },
    ["Forward Block"] = {
        Name = "Combo Name",
        {   Hits = 1, Dmg = 100, Procs = {""} },
        {   Hits = 1, Dmg = 100, Procs = {""} },
        {   Hits = 1, Dmg = 100, Procs = {""} },
    },
    ["Block"] = {
        Name = "Combo Name",
        {   Hits = 1, Dmg = 100, Procs = {""} },
        {   Hits = 1, Dmg = 100, Procs = {""} },
        {   Hits = 1, Dmg = 100, Procs = {""} },
    },
},

Shared Combos:
["Weapon Type"] = {
    ["Heavy"] = {
        Name = "Combo Name",
        {   Shape = "Heavy", Hits = 1, Dmg = 100, Procs = {""} },
        {   Shape = "Heavy", Hits = 1, Dmg = 100, Procs = {""} },
    },
    ["Slide"] = {
        Name = "Combo Name",
        {   Type = "Spin", Hits = 1, Dmg = 100, Procs = {""} },
    },
    ["Aerial"] = {
        Name = "Combo Name",
        {   Hits = 1, Dmg = 100, Procs = {""} },
        {   Hits = 1, Dmg = 100, Procs = {""} },
        {   Hits = 1, Dmg = 100, Procs = {""} },
    },
    ["Wall"] = {
        Name = "Combo Name",
        {   Hits = 1, Dmg = 100, Procs = {""} },
    },
    ["Finisher"] = {
        Name = "Combo Name",
        {   Hits = 1, Dmg = 100, Procs = {""} },
    },
},

Checklist

Future Improvements?

If there is a demand for the following, we can make it a priority to add them:

  • Add support of displaying which moves/attacks have momentum.

If you have any more ideas, please comment down below. The more discussion to be had on this topic, the more useful this wiki can become to fellow Tenno. We All Lift Together.

Patch History

6/5/2021

  • Added comments of expanded templates in case template or module changes in the future.

2/6/2020

  • All PvP stances moved to new template.

2/4/2020

  • All PvE stances moved to new template.

1/12/2020

  • Added TL;DR section.

1/11/2020

  • Updated source code to reflect on changes to how tables are accessed (now uses keys instead of indices). This also meant refactoring of code so now the buildStanceTable() function is much smaller.
  • Added checklist.

1/9/2020

  • Published.

1/3/2020

  • Begun drafting.
Community content is available under CC-BY-SA unless otherwise noted.