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: Sun, 23 Oct 2022 00:53:04 +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:
- Template:StanceCombosV2
- Template:ComboIcon
- Template:ComboIcon2
- Template:SharedCombos
- Template:StanceCombosV3 (unused)
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
, andCI-multi2
CI2
,CI2-top-proc
,CI2-top-proc1
,CI2-top-proc2
,CI2-multi
,CI2-multi1
,CI2-multi2
,CI2-multi3
, andCI2-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:
-- 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 | ||||||||||||||||||||
Broken Bull | ||||||||||||||||||||
+ | ||||||||||||||||||||
Sundered Tusk | ||||||||||||||||||||
( + ) + | ||||||||||||||||||||
Drifting Stampede | ||||||||||||||||||||
+ | ||||||||||||||||||||
Crowd Fall | ||||||||||||||||||||
(Heavy Attack) | ||||||||||||||||||||
Hell's Wave | ||||||||||||||||||||
(While Sliding) | ||||||||||||||||||||
Mountain's Chisel | ||||||||||||||||||||
(While In Air) | ||||||||||||||||||||
Flaying Home | ||||||||||||||||||||
(While Wall Latching) | ||||||||||||||||||||
Tunneling Spike | ||||||||||||||||||||
(On Knocked Down Enemy) | ||||||||||||||||||||
360° Attack Slam Attack Ranged Attack | ||||||||||||||||||||
|
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.
Current Render[]
Combo/Attack | Name | Attack Multipliers and Forced Procs | Avg Dmg Multi/s | Length @ 1.0 Attack Speed |
Animation | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Neutral (While Not Moving) |
Crowd Fall | 533.3%/s | 2.2s | ||||||||||||||||||||||||
Forward (While Moving) |
Broken Bull | 263.2%/s | 5.7s | ||||||||||||||||||||||||
Forward Block (While Blocking & Moving) |
Sundered Tusk | 555.6%/s | 2.7s | ||||||||||||||||||||||||
Block (While Blocking) |
Drifting Stampede | 473.7%/s | 1.9s | ||||||||||||||||||||||||
Heavy (Heavy Attack) |
Crowd Fall* | N / A | N / A | ||||||||||||||||||||||||
Slide (While Sliding) |
Hell's Wave* | 204.1%/s | 1.0s | ||||||||||||||||||||||||
Aerial (While In Air) |
Mountain's Chisel* | N / A | N / A | ||||||||||||||||||||||||
Wall (While Wall Latching) |
Flaying Home* | N / A | N / A | ||||||||||||||||||||||||
Finisher (On Knocked Down Enemy) |
Tunneling Spike* | N / A | N / A | ||||||||||||||||||||||||
Slam (Looking At Ground While In Air) |
Slam Attack* | N / A | N / A | ||||||||||||||||||||||||
Default "Sweep" Attack • 360°/Spin Attack • Direct and Radial Slam Attack • Ranged Attack • "Thrust" Attack
|
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) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
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
andCI2
CSS classes.
- Doesn't use
- Doesn't use the following CSS classes for displaying multiple unique hits:
CI2-multi
,CI2-multi2
,CI2-multi3
, andCI2-multi4
.
- Doesn't use any CSS classes for displaying combo icons.
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[]
Stances | ||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
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.