WARFRAME Wiki
Advertisement
WARFRAME Wiki

tl;dr: I want to edit Module:Weapons to change the behavior of the tables on the Weapon_Comparison page. Is there some way to responsibly do this?  Should I do this?

Way tl, but feel free to r:

I sorted the primary weapons on the Weapon Comparison page (Weapon_Comparison/Primary) by descending "Reload Time", and noticed that the Fulmin was at the top with "2.0 s" listed - above the Strun Wraith, which has a 5.0s reload time, which is listed on its own page as "0.5 sec per round (5.0s total)". In the arsenal in-game, the Fulmin's reload time is listed as 1s, and on the Fulmin's Wiki page, "Reload Time" is listed as "30.0 rounds per sec (2.0s total)".

Curious as to why 2s was being sorted higher than 5s (assuming default-size magazines being reloaded from an empty state for both), as well as why the Fulmin had three different values for Reload Time that didn't seem to align, I thought I was looking at an opportunity to edit some wiki pages.

I noticed a note within the editing view on the Weapon Comparison page which reads "Now using all the data in Module:Weapons/data". So I navigated to Module:Weapons/data and found that the Strun Wraith's data includes the lines "Reload = 5," and "ReloadStyle = "ByRound",", whereas the Fulmin's data reads "Reload = 30," and "ReloadStyle = "Regenerate",". This explains why the Fulmin was listed above the Strun Wraith in the table, when sorted by Reload Time. Their "Reload" values on the page this data is pulled from are 30 and 5, respectively, and the Fulmin's table entry has just been cosmetically altered to read as "2.0 s" - not affecting the placement of the weapon when using table's sort function.

Confused about the discrepancy, I tried the weapon out in game and it appears to have a recharging battery, reloading automatically, without the option to manually reload. It seems to take 1 second without firing to begin to recharge, at which point it begins recharging at a rate of 30 rounds/second, with a default magazine size of 60 rounds naturally taking 2 seconds to recharge to full, once recharging has begun. This explains all three of the values (30, 2, and 1) seen in various different places.

Clearly though, the intended function when someone sorts all weapons by Reload Time just doesn't work if it's sorting different weapons by different criteria. I could see recharge rate being useful if comparing only energy weapons, but without them all having the same discharge rate, magazine size, or time without firing until beginning to recharge, a linear comparison of any of those stats alone still wouldn't make as much sense as a "time to full from empty" value, which is what all other weapons display - so that would be more useful when comparing them. The table's displayed "2.0 s" value may not include the time until recharge starts, but oh well, it's still a whole lot better of a sorting mechanism than comparing a recharge rate of "30" to the value which all other guns display - that being the number of seconds for a full reload.

So I set about editing the table, seeing if I might be able to make it sort the weapons' reload times by the same value that it displays - so weapons like the Fulmin would be sorted into the "2.0 s" section, where they probably should be, rather than sorting by some hidden value that's largely irrelevant in a Reload Time comparison.

I found that the Weapon Comparison page pulls its Primary Weapons section from the Weapon_Comparison/Primary page, which pulls its raw data from the Module:Weapons/data page, which then appears to be formatted into a table by the scripts on the Module:Weapons page. Nowhere in the raw data page (Module:Weapons/data) does it have the table's displayed value of "2.0 s" for the Fulmin, so I figure it must be manually entered or calculated in the scripts that generate the table's data.

I see that the function to generate the table on the Weapon_Comparison/Primary page is the "getCompTableGuns" function from the Module:Weapons page, so I dig down into that section of the page to start my journey into the script, only to discover after 20m of digging in that I have no way of testing this without making the script edit directly, I have no test suite, this is all intricately connected and referred to by many different places, and I am terrified by this entire prospect.

So I guess my question is this - is there some way I might test these scripts? I'm not even sure if they're run every time a page is loaded, or only once each time there's an update to the raw weapon data. Is there a unit test suite somewhere? Should I even make this change to the table, if I knew exactly where in the script to do so? I'd like to help out, and I do know how to code, but the fear is a little paralyzing here, and I'm not used to working with this part of the wiki at all.

Might someone more knowledgeable be able to help me out?

Thank you in advance, my dudes.

Unau (talk) 23:16, September 25, 2019 (UTC)

COMPARISON TABLES PULLING WRONG DATA FOR AOE WEAPONS

The weapon comparison tables don't properly show the AoE blast damages for AoE weapons like both Ogris, both Tonkor, the Kuva Bramma, the Acceltra, they just show the projectile hits and are therefore broken. I'm guessing this table is where the fix would have to be, to put a check to look for blast damage. Does anyone know how to safely do this, or will I need to experiment? Kiljaedenas (talk) 20:54, 8 February 2021 (UTC)

Advertisement