WARFRAME Wiki
Advertisement
WARFRAME Wiki

Happy New Year Warframe Wikia users and contributors!

The advent of Update 26 with its Melee 2.9999 changes have brought my 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: Tue, 07 Sep 2021 05:46:10 +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 Attack Multipliers
and Forced Procs
Avg Dmg Multi/s Length Animation
Crowd Fall
(While Not Moving)
Default Melee Attack
300%
Default Melee Attack
400%
Slam
500% Knockdown b.png
533.3%/s 2.2s CleavingWhirlwindCombo0.gif
Broken Bull
(While Moving)
360° Attack
2x 100%
360° Attack
2x 100%
360° Attack
100%
200%
360° Attack
2x 200%
360° Attack
200%
200% DmgImpactSmall64.png
Default Melee Attack
0%
263.2%/s 5.7s CleavingWhirlwindCombo1.gif
Sundered Tusk
(While Blocking & Moving)
Slam
500% DmgImpactSmall64.png
Slam
300%
100%
200%
400% Lifted b.png
555.6%/s 2.7s CleavingWhirlwindCombo2.gif
Drifting Stampede
(While Blocking)
Slam
400%
Default Melee Attack
500% Ragdoll b.png
473.7%/s 1.9s CleavingWhirlwindCombo3.gif
Crowd Fall
(Heavy Attack)
Heavy Attack
600% Lifted b.png
Heavy Attack
600% Knockdown b.png
0.0%/s N/A HeavyBladeComboHeavy.gif
Hell's Wave
(While Sliding)
360° Attack
200% DmgImpactSmall64.png
204.1%/s 1.0s HeavyBladeComboSlide.gif
Mountain's Chisel
(While In Air)
Default Melee Attack
200% DmgImpactSmall64.png
Default Melee Attack
200% DmgImpactSmall64.png
Default Melee Attack
200% DmgImpactSmall64.png
0.0%/s N/A HeavyBladeComboAir.gif
Flaying Home
(While Wall Latching)
Default Melee Attack
200% DmgImpactSmall64.png
0.0%/s N/A HeavyBladeComboWall.gif
Tunneling Spike
(On Knocked Down Enemy)
Default Melee Attack
1200% DmgSlashSmall64.png
0.0%/s N/A HeavyBladeComboFinisherGround.gif
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; XBX, PSN, and NSW default right button)
Heavy Attack Heavy Attack  (PC default MMB; XBX, PSN, and NSW default left trigger)
Block Block  (PC default RMB; XBX, PSN, and NSW default right trigger)
Up Forward Movement  (PC default W; XBX, PSN, and NSW default tilt up right thumbstick)
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 
Finisher b.png Front, Back, or Ground Finisher 
DmgImpairSmall64.png Impair (PvP only) 
*Combos that are 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 Attack Multipliers
and Forced Procs
Avg Dmg Multi/s Length Animation
Wings and Beak
(While Not Moving)
Default Melee Attack
300% DmgImpactSmall64.pngDmgSlashSmall64.png
Default Melee Attack
200%
Default Melee Attack
200% Knockdown b.png
518.5%/s 1.4s IronPhoenixCombo0.gif
Double Slash
(While Moving)
Default Melee Attack
100%
Default Melee Attack
200%
461.5%/s 0.7s IronPhoenixCombo1.gif
Taking Flight
(While Blocking & Moving)
Default Melee Attack
100%
300% DmgImpactSmall64.png
Slam*
400% Lifted b.png
444.4%/s 1.8s IronPhoenixCombo2.gif
Wings and Beak
(While Blocking)
Default Melee Attack
300% DmgImpactSmall64.pngDmgSlashSmall64.png
Default Melee Attack
200%
Default Melee Attack
200% Knockdown b.png
518.5%/s 1.4s IronPhoenixCombo0.gif
Perfect Cut
(Heavy Attack)
Heavy Attack
500% Lifted b.png
Heavy Attack
500% Knockdown b.png
0.0%/s N/A SwordComboHeavy.gif
Spiral Cut
(While Sliding)
360° Attack
100%
144.9%/s 0.7s SwordComboSlide.gif
Weightless Steel
(While In Air)
Default Melee Attack
200%
Default Melee Attack
200%
Default Melee Attack
300%
0.0%/s N/A SwordComboAir.gif
Weightless Steel
(While Wall Latching)
Default Melee Attack
300% Knockdown b.png
0.0%/s N/A SwordComboWall.gif
Death's Mark
(On Knocked Down Enemy)
Default Melee Attack
1000% DmgSlashSmall64.png
0.0%/s N/A SwordComboFinisherGround.gif
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; XBX, PSN, and NSW default right button)
Heavy Attack Heavy Attack  (PC default MMB; XBX, PSN, and NSW default left trigger)
Block Block  (PC default RMB; XBX, PSN, and NSW default right trigger)
Up Forward Movement  (PC default W; XBX, PSN, and NSW default tilt up right thumbstick)
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 
Finisher b.png Front, Back, or Ground Finisher 
DmgImpairSmall64.png Impair (PvP only) 
*Combos that are 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

9/6/2021

  • Column support for embedding gif files into table.

6/5/2021

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

2/14/2021

  • Column support for combo animation lengths (duration) and average damage multiplier per second.

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.
Advertisement