Forum:Revolution calculator addition

From the RuneScape Wiki, the wiki for all things RuneScape
Jump to: navigation, search
Forums: Yew Grove > Revolution calculator addition
Archive
This page or section is an archive.
Please do not edit the contents of this page.
This thread was archived on 10 April 2015 by Cqm.

If you've been following a few things I've been talking about recently - or watching my contribs - you'll probably know I've been working on a revolution calculator, to calculate average ability damage per tick values (the same way the ones on Revolution are calculated). Well, now its done (for the time being). I'm not going to go into detail about it, since I've already written some documentation which does that. You can find the script at User:Gaz Lloyd/rev.js and the calculator and documentation at User:Gaz Lloyd/Sandbox 3.

I'm here for a few things:

  • Rubber stamping the addition of the script to [[MediaWiki:Common.js]]
    • Including the creation/move of the script from my userspace to MediaWiki:Common.js/rev.js and MediaWiki:Common.css/rev.css
    • Including the creation/move of the calculator from my userspace to somewhere in the calculator namespace, with links from various places
  • Feedback on a bunch of things:
    • Bugs! The most important part. Mess around with it and see if you can get it to break or do something unexpected and report it so it can be fixed.
    • Look and usage. Does it look okay and is it intuitive to use?
    • Documentation. Is the documentation (to be included with the calculator) easy enough to understand? Should it/parts be simplified or further expanded on?
    • More technical feedback:
      • Algorithms used. Any more efficient/better? I know the cycle-finding algorithm could maybe be better, but its not exactly easy to find anything about this sort of problem - there's things that are similar, but just different enough to be unusable, and there's clashes with the mathematical definition of cycle, which is completely different from this. (The algorithms used are currently documented with the calculator, but will probably be a subpage upon move.)
      • Javascript implementation. Is the structure and flow of the javascript good? Is the resulting output (in terms of HTML structure) good? (I have had a few others look at the JS already, but the more the merrier.)

To use the script, there's two options:

if ($('#ponies2').length > 0) {
    importArticles({type: 'script', articles: ['User:Gaz Lloyd/rev.js']});
}

(if you already use an importArticles statement, you can use a solution like I have to make sure it only loads on the relevant page - its a hefty script, you don't want it on every page load)

  • If you have Greasmonkey or Tampermonkey, you can copy the entirety of User:Gaz Lloyd/rev.js into a new script, change the very bottom line from }(this.jQuery, this.mw)); to }(jQuery, mw)); (remove both this.) and save. It should work fine with both (though I haven't tested greasemonkey).
Imported on specific page via [[MediaWiki:Common.js]]. cqm 00:18, 25 Mar 2015 (UTC) (UTC)

Once installed, head to User:Gaz Lloyd/Sandbox 3 and it should be there (you may need to force refresh). The documentation is also there to explain how to use it, and what the settings do.

Cheers! Quest.png Gaz Lloyd 7:^]Events!99s 23:02, March 24, 2015 (UTC)

Addendum - SPECIAL THANKS TO COOK FOR HIS JAVA CODE THAT STARTED THE PROCESS. Quest.png Gaz Lloyd 7:^]Events!99s 00:55, March 25, 2015 (UTC)

Discussion

Support - You did indeed do a thing. MolMan 23:03, March 24, 2015 (UTC)

Support and Comment - It looked good when I tested it the other day. I also imported it via the Common.js on the test page to save the everyone the effort :). cqm 00:18, 25 Mar 2015 (UTC) (UTC)

thx bbe Quest.png Gaz Lloyd 7:^]Events!99s 00:27, March 25, 2015 (UTC)

Support and Comment - Bug? Otherwise, you have my full support. Heaven Sent (talk) 03:34, March 25, 2015 (UTC)

Fixed it. (It was failing to account for stunbuffed abilities in the preamble, which caused 2 issues. You may need to force refresh again.) Thanks! Quest.png Gaz Lloyd 7:^]Events!99s 04:11, March 25, 2015 (UTC)
Having another look at the cycle I noticed something I had overlooked previously; I had assumed the abilities were numbered 1-10(0), but it seems they are actually 0-9. That's a little counterintuitive without somehow numbering the abilities on the bar itself (or noted somewhere else). Just a minor nitpicking, though. Heaven Sent (talk) 03:14, March 26, 2015 (UTC)
The cycle numbers are given using 0-based indexing (like arrays in many languages). That's noted in the documentation - but it could probably be changed if needed. Quest.png Gaz Lloyd 7:^]Events!99s 20:11, March 27, 2015 (UTC)
I think it would be best to have it mimic the 1-9 then 0 behaviour of the action bar in game personally. cqm 13:14, 28 Mar 2015 (UTC) (UTC)
The cycle is now 1-based indexing. It also no-longer ignores empty, unusable and repeated abilities. Quest.png Gaz Lloyd 7:^]Events!99s 15:53, March 29, 2015 (UTC)

Oppose - user is clearly only hear to disrupt the community and should not be trusted Andrew talk Support - good stuff, m8 Andrew talk 04:14, March 25, 2015 (UTC)

Support - butt:

  • Could you widen the Settings box to match the width of the ability bar? And since there's room, could you turn "Combat class" and "Handedness" into dropdowns and put them side by side to make it more compact?
  • Could you move "clear bar" out next to the "advanced settings" button, and also remove the box around the advanced settings?
  • Teleblock to clear an ability slot looks weird to me (and also means that there are two X's on the popup which might not be intuitive) – how about having just text like "Clear ability"?
  • Shouldn't the ability bar be unlocked? --Iiii I I I 16:20, March 25, 2015 (UTC)
It now looks like this: intial; advanced open; hover. Y/N?
The bar is the same used by {{actionbar}} - if you wanna get an image for this, feel free. Quest.png Gaz Lloyd 7:^]Events!99s 00:30, March 26, 2015 (UTC)
I implemented it. Quest.png Gaz Lloyd 7:^]Events!99s 15:53, March 29, 2015 (UTC)

Comment - Would it be possible to convert the images to base64? We've had a few cases with images going missing due to wikia's servers having issues or 3rd-party hosts removing them that converting the images would avoid. There's a tool here for it :) cqm 13:14, 28 Mar 2015 (UTC) (UTC)

Done. Quest.png Gaz Lloyd 7:^]Events!99s 15:53, March 29, 2015 (UTC)

Support - Gaz Lloyd gone too far. Korasi's sword.png Archmage Elune  TalkHS Void knight deflector.png fetus is my son and I love him. 06:43, March 29, 2015 (UTC)

Support - Gaz Lloyd should be a roll-back. --LiquidTalk 18:14, March 29, 2015 (UTC) I wonder if anyone here still remembers this.

Question - Discussion has been dead for over a week. How ready is the script? Has everything suggested here been added? Has it been properly tested? Is this thread ready for closure and implementation? MolMan 13:20, April 8, 2015 (UTC)

Yes. The only things left to do are moving the CSS to a proper stylesheet, move the script to a mediawiki subpage (doesn't need to be done, really) and move the calculator to the calculator namespace - all of which were things I was going to do upon closure. Quest.png Gaz Lloyd 7:^]Events!99s 15:14, April 8, 2015 (UTC)

Closed - The calculator can be added to the calculator namespace. cqm 08:20, 10 Apr 2015 (UTC) (UTC)