The Calculator WikiGuild is a project to help develop and maintain the wiki's calculators, used to derive a variety of things such as training profits, experience points gained during various activities, combat levels, and more. The recently-installed JS Calculator script also enables these calculators to run dynamically on a page. See Forum:Java calculators for the discussions which brought about this WikiGuild. We need help making these calculators useful and putting them in useful locations on the wiki!
- 1 Members
- 2 Tasks
- 3 Links
- 4 Proposed Calculators
- 4.1 Alchemy Value (Stelercus)
- 4.2 Efficiency (Cook Me Plox)
- 4.3 Calculators/Magic maximum hit|Magic max hit (Newbie856 and Gaz Lloyd who created the template)
- 4.4 Calculators/Comparing farming herb prices (Newbie856)
- 4.5 User:Dd4235/Calcs/RC/UI (DD4235)
- 4.6 house design and cost calculator (scaper12123)
- 5 The re-up
- 6 Skill calculators
- 7 Ideas for extending the calculators
- 8 Hiscore implementation
- 9 Client side calculators proposal
Sign here if you are helping us!
- --Quarenon Talk 07:53, January 8, 2010 (UTC)
- 11:10, January 8, 2010 (UTC)
21:44, January 8, 2010 (UTC)
- If you have any questions concerning calculators, don't hesitate to leave them on my talk page.
- TehKittyCatTalk Wikian-Book 18:14, January 9, 2010 (UTC)
- 17:49, January 27, 2010 (UTC)
- Rich Farmbrough, 18:14 7 March 2010 (GMT).
- Just use ~~~~ instead of filling in your date + time + name manually... 'tis much easier.
- HGOPrwojy 08:06, April 4, 2010 (UTC)
- TyiloTalk 20:09, May 2, 2010 (UTC)
- 19:54, May 21, 2010 (UTC)
- ʞooɔ 00:00, July 17, 2010 (UTC)
- 04:13, September 14, 2010 (UTC)
- Zorak plorak - Talk
- Orninion132 04:58, November 11, 2010 (UTC)
- Cakemix 10:52, April 5, 2011 (UTC)
- Stewbasic 00:15, April 7, 2011 (UTC)
- 19:49, November 9, 2011 (UTC)
- Help develop and debug various RuneScape calculators.
- Determine the best place to put the calculators.
- JS Calculator - The developer's manual for using the JS calculator script.
- RSHiscores - An extension for retrieving a player's hiscores data.
- Template:Hiscore - A template that simplifies use of the extension.
- RuneScape talk:WikiGuilds/Calculators - Make generic queries about calculators or the calculator script on this WikiGuild's talk page.
Proposed calculators should be added as a subsection here for discussion. Once you feel the discussion has run its course, then leave a note stating so and an administrator will add it to the archive.
This calculator can be used to determine how many of an item is required to get to a certain Magic level or XP number and how much money this will cost. It will then determine how much you will get in return and your final profit.22:03, May 27, 2010 (UTC)
This calculator shows at what point a certain training method is more efficient than another, based on Experience per hour and Profit/Loss per hour or GP/XP. Thanks Gaz ʞooɔ 00:00, July 17, 2010 (UTC)
I simply used the existing template and made it into a dynamic calc, was quite easy since the template was really well explained.
Note to all those who want to edit it: could someone please change the template so that words are not case-sensitive, that way I can change the way they are written in the form. I would have done it myself but I got lost in the code o_O. Also, a few other things are to change (ex: only mature wmb is accepted instead of mature wizard's mind bomb). It isn't a biggy but it seems kinda weird when you look at it.
18:05, July 27, 2010 (UTC)
- All text inputs to the template are already case-insensitive. I expanded mature wmb (though that is the actual in-game name, I agree that a non-abbreviated version would be better).
- As an extra note there is a version here, we should decide whether to remove the calc from there (with a link to this page), or whatever. 18:42, July 27, 2010 (UTC)
- Hmm... of course, something never works when you want it too, but when you show it to someone it does! Anyway, thanks for changing the mature wmb and pointing out to me that it actually was case-insensitive. As soon as Quarenon's submitunfocused function comes out, I'll change the forms so that spells are less complicated to input by having different categories activated by a selection menu. Until then, a text field is fine (I think). 19:41, July 27, 2010 (UTC)
- More or less a dynamic calc. It pretty much compares planting herbs depending on the number you harvest. It's basicly a dynamic version of Calculators/Farming herbs#Second Calculator. It's pretty neat if you want to find which herb is more profitable and starting how many herbs are farmed. Test it by comparing snapdragon and ranarr and you will soon understand. 18:31, July 28, 2010 (UTC)
This is a dynamic calc that finds profit/loss RCing. It's still a work in progress (no mem. runes or multi-rune support), but it works. I modeled it after the Mining calc, and it works pretty much the same way. 04:13, September 14, 2010 (UTC)
- I finally got the RC calculator working. It has support for all runes and has multirune support. If anyone sees any bugs, please post them on this page. Otherwise, I will put the calc on the Calculators page Thurs. Sept 16, 2010 22:31, September 15, 2010 (UTC)
- Woot, another member of RS:Calc ! In all seriousness though, nice work! Just wondering, why is it not on the calculators page? It is pretty epic! Is it incomplete or something, 'cause we really need a RCing calc. 21:37, October 9, 2010 (UTC)
- Method of Leveling Comparison Calculator
- A calculator that calculates the total cost of skilling using different methods. This calculator takes the methods shown from the skill training pages and adds a calculator that shows exactly how much they cost and how long it would take to achieve the desired level.
A person would only need to indicate which levels they wanted to start and stop each method and show how much they feel they can earn per hour. Since these items change for each player the calculator would show customized information for that player.
All Fields but Item 1, A and B would be automatically filled in:
1. Coins the player feel comfortable earning per hour (Fill in Manually)
A. Starting Level Using This Method (Fill in Manually)
B. Finishing Level Using This Method (Fill in Manually)
C. Method of Leveling
D. Experience Needed to Level between Levels Shown
E. XP per Hour Using this Method
F. Items Required to Level between levels shown
G. Grand Exchange Price of Items Required to be invested (F x G.E. Price)
H. Grand Exchange Price of Items to Be Sold after Using Method (F x G.E. Price of Converted Item)
I. Profit or Loss Created after Selling Converted Items (G - H)
J. Profit or Loss per Experience Point (I / B)
K. Number of Hours would it take to level between levels shown using this method (D / E)
L. Time Value in Coins (Item 1 x K)
M. Total Cost in Time and Coins (I + L)
N. Total Cost in Time and Coins Per Experience Point (M / E)
This is a quick example of how this calculator could work for firemaking. This person filled in that they planned to level on only normal, maple, and magic logs. They could have changed it up in any way to compare their results using this calculator. See below.
|$ Player Earns Per Hour:||$500,000|
|A. Start Lvl||B. Finish Lvl||C. Method||D. XP Needed||E. XP / Hr||F. Items||G. $ Invested||H. $ Returned||I. Profit/Loss||J. Profit/Loss per XP||K. Hours||L. Time Value in $||M. Total Cost||N. Cost / XP|
When the primary skill leveling methods are on the list, this calculator could be tied to the high scores table so a person could type in their screen name to show approximately how long and how many coins it would cost (or earn) to level each skill from their current level to 99 in time, coins, and oportunity cost figuring the amount that they make per hour.
I Will try to help out as much as I can. I have used a spreadsheet like this on excel and it has consistantly been a great resource. Look forward to hearing your ideas and recommendations.Orninion132 05:24, November 11, 2010 (UTC)
house design and cost calculator (scaper12123)
Ok, here's my idea. What if there was a calculator that you could use to plan out the layout of your house, with all the different furnature you could put in it, and after everything is put together, the calculator would tell you how much your house would cost when doing certain things like buying flatpacks, gathering resouces from scratch, or buying items like planks off of the ge. It would be complex, no doubt, but it's an idea to throw out there. Scaper12123 19:08, December 26, 2011 (UTC)
According to the most recent Poll, people want more calculators. For now, before we go to work in earnest on this, we should make a list of the calculators that we want.
Agility Construction Cooking
Summoning Thieving Woodcutting
Ideas for extending the calculators
- Less strain on the wikia server
- (probably) less wait for the answer
- (possibly) avoiding the clunky syntax of wikia templates
The main disadvantage is that the existing calculators are in wikia template format. Also it would mean more overhead in [[MediaWiki:Common.js]] (though maybe we could check if the page has calculators before loading the calculator stuff).
Label arbitrary elements as input/output. That is, rather than give a bunch of parameters which the calculator code uses to create an input form, let the calculator writer flag a <div> or <td> element as a holder for an input element. This would give more control over the layout of the calculator; eg the Calculators/Max_hit_melee|max hit calculator would look much better in 2 columns IMO.
Toggle inputs. It's already been suggested that we add radio buttons and checkboxes. I also propose (conditional on the last suggestion) marking entire elements to toggle their background colour when clicked, as on the penguin list.
Save variables to a cookie. I also noticed that the penguin list uses a cookie to remember what the user has entered. It'd be cool if a calculator could mark certain variables (eg "strength_level") to be saved to a cookie and restored next time the user came to that page. Moreover if we were consistent about variable names, they could enter it on one calculator and have it appear on some other calculator which used the same field. (Also it'd be nice to replace the penguin list with a calculator instead of having code in [[MediaWiki:Common.js]] just for that).
Stewbasic 17:40, February 28, 2011 (UTC)
- This is a great list of suggestions. I've also seen some problems with the current calculator setup. I made User:Quarenon/Scripts/DynamicForms as a working draft quite a while back trying to come up with a new system that would be more flexible; I've also just posted the code that went with it here, but it will need to be rewritten. There are also some good suggestions posted to my talk page courtesy of Gaz. Now that there is widespread discussion about improving calculators, I'm highly interested in trying to put out a much improved script to bring the wiki on par with the other sites with calculators.
- The page above introduces some concepts that align with your suggestions, such as flexible form layouts by using HTML tags instead of a <pre> section. I also want to integrate other things like being able to show/hide form fields, or at least be able to disable them, based on the values of other fields.
- You only input a string to the function ("4*sqrt(5+4)^3"), which it then calculates and output a number or an error (108). TyiloTalk 09:48, March 5, 2011 (UTC)
Thanks Tyilo, if you don't mind I'll take your code and modify a little to replace my expression parser, so that it handles infix notation. Regarding hiding elements and calling wiki templates, what do you think of adding two more statements to the expression parser (ie in addition to "if" and "let"):
which shows or hides any elements tied to variablename, depending on the value of expr, and
which sends variable1, variable2 etc to templatename, and puts the result in variablename? Stewbasic 15:22, March 6, 2011 (UTC)
- You're free to use the code.
- About the other two functions:
- *show: I like the idea, but would it update automatically or should you call show every time "expr" changes?
- *get: Would it be halt the code until it have got the result back from the template?
- I was thinking the showing/hiding would happen when the function was called. Currently it's possible to call some code whenever an input is updated. So, for example, when a user selects a radio button this might trigger some elements to be shown or hidden depending on their choice.
- Good point about get. I guess it would have to halt, since presumably the reset of the code might depend on the result. Stewbasic 01:37, March 7, 2011 (UTC)
- Wouldn't that take longer time than the "script executing limit"-thingy?
- If you don't know what i'm talking about, try using the JS Calc extension to embed another JS Calc depending on the result. (Choices: "Ancient", "Lunar", "Normal". If user chooses "Ancient", the result will show another choice-box: "Ice", "Blood", "Smoke"...). Example: User:Tyilo/Calculators/Max_magic TyiloTalk 18:12, March 14, 2011 (UTC)
- I couldn't get that to work, I know the default script won't display any forms that are loaded within the template of another form, unless I'm missing something. Also, the loading of templates asynchronously should not trigger the execution time limit of the browser, there could be a time-out but that is configurable.
- Also, is there any game plan/schedule for getting this worked on? I could try to work on the expression parsing if need be and get things ready so we can transition to this new calculator script ASAP. --Quarenon Talk 04:15, March 31, 2011 (UTC)
- I'll try to implement the expression parser and show and get this weekend. Stewbasic 00:57, April 1, 2011 (UTC)
- Infix notation and show function added (also I took the recursion out of the statement parser). Stewbasic 00:15, April 7, 2011 (UTC)
- OK, I guess "this weekend" was a bit optimistic... Anyway get is now done also. The parsing and statement evaluation are pretty complete now, but the input elements aren't nearly as fancy as those in [[MediaWiki:Common.js/calc.js]] or Quarenon's new version. I'm not sure the best way to put it all together. Stewbasic 17:02, May 16, 2011 (UTC)
I have implemented the hiscore function here using the ParseHiscoreData function: Calculators/Combat_level
Client side calculators proposal
- Could the syntax be made more convenient?
- In particular, are named arguments preferred or a fixed argument order?
- Could it deal better with garbage input from the calculator writer or user? More importantly, is there any way to abuse it?
Once this feedback is addressed, I propose that it be added to [[MediaWiki:Common.js]] so that new calculators can use it, and old calculators can be converted to it where appropriate. There are more features that could be added, but this will surely always be true, and I think there's enough there now to start using it.
I'd also appreciate feedback on future features, in particular on the following points.
- I haven't added the autocomplete feature of the "article" field type in the current calculators. Although I imagine autocomplete would be very useful sometimes, I'm not convinced that the options to choose from should always be the names of articles. Are there any calculators that use this feature? Maybe a custom list could be made for a particular input?
- Some sort of looping/iteration/calling subroutines would make some calculators a lot less clunky (eg having an array of the xp of each rune/bar/log and iterating over it). However it should not be powerful enough to allow abuse. Maybe something as simple as an absolute limit on the number of commands that can run in response to a single user input?
- Any suggestions in addition to those I've listed?
Stewbasic 02:55, October 16, 2011 (UTC)
- Best idea ever! I would like to be able to use switch, for (while?) and arrays. I personally prefer named arguments.
- Hiscore look-up via ajax would also be extremely useful. With this a shortcut to a dropdown of a list of skills would also be nice, instead of including
<div class="jcInput">name=skill|type=select|range=Agility,Attack,...,Woodcutting</div>everytime. TyiloTalk 13:07, October 16, 2011 (UTC)
- Unfortunately I don't think ajax can get the high scores from Jagex because of this, so we'll have to fix User:Catcrewser/RSHighscores first. We could certainly make a template for that skill select field :). Assuming for loops and some sort of array initialisation were added, would the array-like behaviour demonstrated in this example be sufficient? Stewbasic 16:31, October 16, 2011 (UTC)
- That's true. What would you want from arrays? Length, push, pop and foreach? Stewbasic 17:46, October 16, 2011 (UTC)
- And wouldn't it be nice to be able to disable an element (radio, check, select, option inside select, button, ...) instead of hiding it? TyiloTalk 12:42, October 21, 2011 (UTC)
- Good point about disabling as well. btw I see you had a go at getting ajax to query runescape.com; did you have any success? In any case I'd prefer to get some use out of the current features before adding new ones, since there are plenty of calculators that could be written with what's there now. Stewbasic 16:54, October 21, 2011 (UTC)
- I could it get to work with some hack, which basically includes a site in a script tag, which calls a function. Test it here User:Tyilo/Hiscore_test. It is also currently using my server, but whatever. TyiloTalk 20:26, October 23, 2011 (UTC)
- I have now updated the "hack" so it should be faster and give more error message. TyiloTalk 21:30, November 2, 2011 (UTC)
Another new feature would be to implement functions. So you can reuse code, so it should both have (between 0 and Infinite) inputs and (none or one) output. The functions should both accept arrays and strings etc. as inputs and output. This would be just pure awesomeness. TyiloTalk 21:30, November 2, 2011 (UTC)