Forum:Calculator guidelines

From the RuneScape Wiki, the wiki for all things RuneScape
Jump to: navigation, search
Forums: Yew Grove > Calculator guidelines
This page or section is an archive.
Please do not edit the contents of this page.
This thread was archived on 1 June 2015 by Liquidhelium.

So, the calculator namespace is a mess. And given our upcoming new skill calcuguides, we should probably sort out the rest of them.

This thread is going to be three main things: my complaints, a proposal for guidelines, and a call for others to help fix/implement them.


First, the complaints. For reference, here's a list of all the pages in the namespace. And here's my laundry list of problems:

Maintenance - or rather, the lack of. Calculators are severely unmaintained. They frequently have incorrect/outdated things (e.g. sacred clay stuff - they're just standard BXP pool now; some things still aren't EoC'd). It's telling that Category:Calculators that need to be checked still has a lot of pages in it.

Organisation - templates for the calculators are inconsistently located in a number of places:

  • Subpages of the calculator: Calculator:[calculator]/Template or similar
  • Subpages of Calculator:Template: Calculator:Template/[calculator]
  • Inversely, a few are subpages of Template:Calculator: Template:Calculator/[calculator]
  • Or just normal templates: Template:[calculator]

They really should be in one place. Similarly, should the calculators be a subpage of their related skill (if any)?

Quality - be that code quality or result quality, they often aren't great.

  • Poor constructs like {{Coins|Amount={{#expr:({{GEPrice|Bones|n}}*5)}}}} should be cleaned up (i.e. {{Coins|{{GEP|Bones|5}}}}). Some calculators have to be split into multiple pages because of either hitting the template expand limit or hitting the script timeout - both of which can often be avoided by cleaning code and properly utilising our Lua modules. Stuff like {{GETotalqty}} is more efficient than using many {{GEP}}s and such. A lot of code can be cleaned up by using things like {{plink}}/{{plinkp}} and other convenience templates.
  • Some calculators might need to be completely reworked, either to make them make more sense or to translate into lua for efficiency.
  • Coinciding with some other points, the calculator results aren't always formatted well, or the form is badly worded, or so on.

Categories - many (even most) calculators have no categories (aside from Category:Calculators). Calculators should have more categories than this, and should be properly sorted within those categories.

Documentation - Both the calculators and their templates are poorly documented.

  • Calculator templates are basically not documented. If nothing else they need basic template documentation, like any normal template. State what the parameters are and what they do.
  • The calculators themselves lack basic information, like a description of what the calculator is about, its assumptions and limits, etc. I'm not asking for a wall of text like Calculator:Revolution, but having nothing is bad, especially if it is more than a standard skillcalc like Calculator:Construction.

Delete? - As a result of the lack of documentation, some calculators seem nonsensical - especially when compounded with being out of date and such. We need to decide if we're keeping these, and if so we need to work out what they're actually doing and update them. If not, are we going to archive them or delete them? This also applies to skillcalcs like the mentioned Construction one with respect to the new skill calcuguides (though this might be a discussion for that thread).

Redirects - There's a lot of redirects in the namespace. I don't know if they should really be there.

Guidelines proposal

In the interest of not having this be an even larger wall of text, the guidelines are over at User:Gaz Lloyd/calcg. Please feel free to edit it. In summary I've stated (with reasons as sub-bullets):

  • Calculators are a subpage of their relevant skill/concept, if needed
    • To include all related calculators under one area
  • Calculator templates are a subpage of the calculator
    • Consistency and ease of finding the templates
  • Calculators should all use {{StaticCalculator}}, {{JSCalculator}} and {{Calc use}} as required
    • To establish a standard header
    • To make templates easier to find and to establish a two-way link between calculators and their templates
  • Calculator templates should all use {{Calculator template}}, and module wrappers should also use {{invokes}}
    • The other half of the two-way link
    • To provide a link to the module
  • Calculators should be in the Calculators category (sorted by the default, PAGENAME), and in categories relating to their subject, generally sorted by ** This could be added to the header templates
    • So the calculators jump forward in their relevant category and aren't lost in the category
  • Calculator templates should have documentation on a subpage (Calculator:[calculator]/template/doc) and be in the Calculator templates category (sorted by the default, PAGENAME)
  • Calculators should be linked from Calculators and from their relevant article(s)
    • So that they'll be findable and used
    • Maybe DPL it? Use the header template/other as a place to put a description to be transcluded?

All of these points I am open to change on.

Call for action

So, the call for action. We just need people to start doing stuff. Basically, fixing up the above complaints per the guidelines and so on.

Some of it requires some level of wikiscript knowledge, such as these new thingies:

  • Features - With the additions to the script, the new features need to be more widely utilised (notably the check and hs types). Any simple yes/no fields should be changed to checkboxes rather than selects (as long as its still clear what they mean), and any calcs that take user levels/experience as input should use a hiscorelookup.
  • Accessibility - Calculators that use coloured backgrounds to show what you can/can 't do (green for can, red for can't, yellow for maybe/etc) should use classes instead of styles. Specifically sg-green link, sg-yellow link, and sg-red link (see discussion about exact colours at Forum:Interactive skill training guides -- feedback wanted).

Though there are things that don't:

  • Many guidelines don't need extensive knowledge, like adding categories or templates, moving (sometimes - though I'm waiting for the end of the thread to start moving), checking/discussing if calculators are even worth fixing up
  • Visibility/Linking - I feel like a lost of calculators have poor visibility. They just aren't linked from their relevant pages as much as they should be. You can utilise {{HasCalculator}}, or link in a relevant section, or create an entire section about calculators (e.g. skill articles)
  • Discussion on other points:
    • Bonus experience/etc - Calculators inconsistently cater for bonus experience. Should we account for bonus experience in calculators that can (generally form calculators)? BXP pool, avatars, outfits? Bonus effects (e.g. factory outfit, juju potions/perfect juju potions, auras, etc)?
    • New skillcalcuguides - I haven't really included those in these guidelines
    • Old skillcalcs - Do we still want them given the new calcuguides?
    • Base pages - Do we want the base pages to be calculators or directories for all related calculators? e.g. Calculator:Construction is the skillcalc, should that be Calculator:Construction/Level-up or some such, with Calculator:Construction being a directory of all subpages? (If so, do the same for all skills and transclude onto Calculators?)


k as nom Quest.png Gaz Lloyd 7:^]Events!99s 19:19, May 3, 2015 (UTC)

sure - I'm not sure if Template:GETotal and her sister are that much more efficient. But either way, they're much more convenient.

Definitely delete junk calculators. If they need to be reworked completely, we should get rid of them in the mean time. (Sadly) very few people are going to work on calculators, so I don't want a bad one festering for years because it's going to be updated Soon™.

Redirects need to be kept until we figure out what is used by what. If a page is moved (and I know I've moved plenty), there is pretty much no way of telling what calculator it is actually used by. This is definitely a point of discussion to have/tackle after we tackle your later point about linking.

Namespaces are removed from the category sort unless you add them in yourself; i.e. they are already sorted by {{PAGENAME}}. See Category:Agility for example; however, I agree they should be sorted ahead of other things, and "*" is probably a good choice. "*" is particularly good because it keeps calculators at the front, but it keeps them together, instead of with everything that's front sorted (" "). oman i love this part. Why can't people get as excited about category sorting as I do?!??! MolMan 12:59, May 4, 2015 (UTC)

I don't really know the inner workings of MediaWiki (or Wikia's modifications of it), but I was making the assumption that expanding one template (Template:GETotal) and invoking one module (Module:GETotal) once would be more efficient than expanding one template (Template:GEP) 10 times (before hitting Module:Exchange and in turn the item's prices). One might not make a difference on load times but a whole page of them might. And yeah, convenience and code readability is good.
RE:Sorting, wasn't aware, since apparently its different on Wikipedia (or maybe not, the section is inconsistent, whatever). Quest.png Gaz Lloyd 7:^]Events!99s 21:51, May 6, 2015 (UTC)
For huge amounts (so huge that we'd reach limits), the expansion issue would show an impact on performance. The big load issue comes from having to load multiple exchange data pages. This happens either way. That said, I don't mind if the GETotal templates are used, I just don't think it's vital from an efficiency point of view. I made the template mainly because it made parsing values into Module:Infobox recipe 100x simpler. If it finds another use in making calculators easier to write, that's fine. MolMan 21:57, May 6, 2015 (UTC)

Absolutely - BXP is a pain in general, especially with things like wasteless herblore, factory outfit, etc. which really mess with the calculations. I feel the base pages would be better suited to being directories, probably best updated through (cached?) DPL. cqm 11:40, 4 May 2015 (UTC) (UTC)

Generally I'd say that static calcs don't need anything in way of bonus experience support (BXP pool, outfits, avatars, etc). Bonus effects currently aren't well supported and for most cases I can see why - not only do they often have luck/a grind attached to getting them, their interactions with each other are often undocumented (that is even if the basic effects are documented). It'd be nice to support some of these but it gets messy quickly. The only one I see decently supported is the scroll of cleansing, and that's complex enough on its own, especially with overloads and combopots.
JS calcs should probably try to account for both types of bonuses (with checkboxes or whatever), but the above point still stands about interaction with each other.
I like DPL thing. We could use the header templates (or some helper template) to pass descriptions to the DPL. Quest.png Gaz Lloyd 7:^]Events!99s 21:51, May 6, 2015 (UTC)

ye User talk:ThePsionic.png: RS3 Inventory image of User talk:ThePsionic ThePsionic Special:Contributions/ThePsionic.png: RS3 Inventory image of Special:Contributions/ThePsionic 11:43, May 4, 2015 (UTC)

Support - So have we agreed that base pages (Calculator:Construction) will be a disambiguation page for the other related calculators? What about handling drop-downs for choosing a category to work with. EG. with Construction, specifically the pet menagerie or the costume room. Likewise, with Fletching, allowing users to choose from only Bows or only Arrows. Any ideas on best handling those situations instead of a wall of data? - LDemonl (talk) 23:43, May 9, 2015 (UTC)

Having a calculator being split into multiple tables for relevant categories is probably a decent idea - sometimes it needs to be done because of technical restrictions anyway. I feel like splitting can be done if the split categories are clear and there's enough data on each subtable to justify it. What do you think? Quest.png Gaz Lloyd 7:^]Events!99s 17:02, May 16, 2015 (UTC)
sounds good. Most things have a well defined category. Perhaps if we used a separate subpage of the template to hold the different categories and their data so a drop down list could select the source for the data. That should be a simple matter for coding. -- LDemonl (talk) 17:11, May 16, 2015 (UTC)

Support --Iiii I I I 02:28, May 18, 2015 (UTC)

Closed - RuneScape:Calculators has been created. People have the green light to implement changes. --LiquidTalk 08:02, June 1, 2015 (UTC)

Addendum: If anyone wants to further discuss how to handle various things, head over to RuneScape talk:Calculators. Quest.png Gaz Lloyd 7:^]Events!99s 14:52, June 4, 2015 (UTC)