FANDOM


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.

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
Crowd Fall
PurpleBasex64
300% Impact b
PurpleBasex64
400% Lifted b
PurpleBasex64
500% Impact b
Broken Bull
BlueBasex64
2x 100% Impact b
BlueBasex64
2x 100% Impact b
BlueBasex64
100% Impact b
200% Impact b
BlueBasex64
2x 200% Impact b
BlueBasex64
2x 300% Impact bKnockdown b
BlackUpx64 +
Sundered Tusk
BlackBasex64
500%
RedBasex64
300%
200%
400% Lifted b
(BlackUpx64 + BlackBlockx64) +
Drifting Stampede
PurpleBasex64
400% Impact b
PurpleBasex64
500% Impact bKnockdown b
BlackBlockx64 +
Crowd Fall
PurpleChargex64
600% Impact bLifted b
PurpleChargex64
600% Impact bKnockdown b
Hell's Wave
BlueBasex64
200% Impact b
(While Sliding)
Mountain's Chisel
PurpleBasex64
200% Impact b
PurpleBasex64
200% Impact b
PurpleBasex64
200% Impact b
(While In Air)
Flaying Home
PurpleBasex64
200% Impact b
(While Wall Dashing)
Tunneling Spike
PurpleBasex64
1200% Slash b
(On Knocked

Down
 Enemy)
BlueBasex64 360° Attack   RedBasex64 Slam Attack   PurpleBasex64 Proc
 Melee Attacks
BlackBasex64 Melee 
BlackBlockx64 Block 
BlackUpx64 Forward 
BlackChargex64 Heavy Attack 
 Multipliers and Hits
BlackBasex64
200%
 Attack does double damage 
BlackBasex64
2x 100%
 Attack hits twice 
 Exclusive Procs
Impact b Impact or Stagger 
Knockdown b Knockdown 
Lifted b Lifted 
Ragdoll b Ragdoll 
Finisher b Front/Back or Ground Finisher 
Impaired b Impair (PvP only) 

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
Wings and Beak PurpleBasex64ImpSla b300%BlackBasex64200%BlackBasex64Knockdown b200%
Double Slash* BlackUpx64( BlackBasex64BlackBasex64200%)
Taking Flight* (BlackUpx64+  BlackBlockx64)( PurpleBasex641x 200% Impact b1x 100%RedBasex64Lifted b400%)
Perfect Cut  PurpleChargex64Lifted b500%BlackChargex64Knockdown b500%

Spiral Cut Slide + BlueBasex64Impact b

Weightless Steel In Air + BlackBasex64200%BlackBasex64200%BlackBasex64Knockdown b300%

Weightless Steel Wall Dash + BlackBasex64Knockdown b300%

Death's Mark Knocked Down Enemy + PurpleBasex64Slash b1000%
BlueBasex64 360° Attack  RedBasex64 Slam Attack  PurpleBasex64 Proc

 Melee Attacks

BlackBasex64   Melee  
BlackBlockx64   Block  
BlackUpx64   Forward  
BlackChargex64 Heavy Attack  
BlackPausex64   Pause  

 Multipliers and Hits

BlackBasex64200%   Attack does double damage  
BlackBasex642x   Attack hits twice  

 Exclusive Procs

Knockdown b   Knockdown  
Ragdoll b   Ragdoll  
Lifted b   Lifted  
Finisher b   Ground Finisher  
Combo Name Button Combination
Wings and Beak
PurpleBasex64
300% Impact bSlash b
BlackBasex64
200%
BlackBasex64
300%
Double Slash
BlackBasex64
100%
BlackBasex64
200%
BlackUpx64 +
Taking Flight
PurpleBasex64
100%
200% Impact b
RedBasex64
400% Lifted b
(BlackUpx64 + BlackBlockx64) +
Perfect Cut
PurpleChargex64
500% Lifted b
PurpleChargex64
500% Knockdown b
Spiral Cut
BlueBasex64
100% Impact b
(While Sliding)
Weightless Steel
BlackBasex64
200%
BlackBasex64
200%
PurpleBasex64
300% Knockdown b
(While In Air)
Weightless Steel
PurpleBasex64
300% Knockdown b
(While Wall Dashing)
Death's Mark
PurpleBasex64
1000% Slash b
(On Knocked

Down
 Enemy)
BlueBasex64 360° Attack   RedBasex64 Slam Attack   PurpleBasex64 Proc
 Melee Attacks
BlackBasex64 Melee 
BlackBlockx64 Block 
BlackUpx64 Forward 
BlackChargex64 Heavy Attack 
 Multipliers and Hits
BlackBasex64
200%
 Attack does double damage 
BlackBasex64
2x 100%
 Attack hits twice 
 Exclusive Procs
Impact b Impact or Stagger 
Knockdown b Knockdown 
Lifted b Lifted 
Ragdoll b Ragdoll 
Finisher b Front/Back or Ground Finisher 
Impaired b Impair (PvP only) 

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

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.
Last Updated: 1/12/2020
Community content is available under CC-BY-SA unless otherwise noted.