Forum:Java calculators

From the RuneScape Wiki, the wiki for all things RuneScape
Jump to: navigation, search
Forums: Yew Grove > Java calculators
Archive
This page or section is an archive.
Please do not edit the contents of this page.
This thread was archived on 9 January 2010 by Chicken7.

could we have these? its a bit of a bother with the formula ones... Sal's realm, tip.it and most other fansites do, so can we? --Joe Click Here for Awesomeness12:31, 18 March 2009 (UTC)


No support, Please dont do it. The game uses java, so anyone playing the game HAS java. However, you sometimes access wikia from a pda or another computer which doesn't have java installed. Furthermore, if you implement java in something here, you will soon see java everywhere else in the forum, and some old computers (and PDAs) wouldn't stand it. Furthermore, even a good computer might have trouble handling too many java instances at once (game + 3 in forum, etc) -- BURNTICEJ http://img8.imageshack.us/img8/4443/silverv.jpg 13:41, September 29, 2009 (UTC)

You should check out further down the page for the proposed JavaScript-based solution, which looks likely to pass. Quest.png Gaz Lloyd 7:^]Events!99s 14:17, September 29, 2009 (UTC)
Using Extension:Java Applet would allow this, although we would need Wikia to approve of it and install it. But this is a security risk to use such a feature. - TehKittyCatTalk Wikian-Book 20:39, 18 March 2009 (UTC)

What?

What exactly is it? What does it do? Milestone cape (50).pngAmeobea10Talk Contribs #Virtus mask.png 02:54, 7 April 2009 (UTC)

look here. All we have is this.Joe Click Here for Awesomeness09:28, 7 April 2009 (UTC)

Neutral see below Java calculators could be useful; however most, if not all, things they can do can also be done with our calculation templates (using the likes of {{#expr: }} (which actually isn't a template at all), Template:XP, Template:ParseHiscoreData and so on). Also, the templates enable more accurate cost comparison, since we can feed live data (that is updated automatically once a day) from the Grand Exchange Market Watch (though I do not know if these java calculators could use this data too). Basically, the bonus of using java calculators is that our users don't have to mess around with (what can be quite complex) wikicode. What is the security risk, Catcrewser? Quest.png Gaz Lloyd 7:^]Events!99s 18:16, 10 April 2009 (UTC)

Comment - Can this be done? If so, I support having it implemented. I think it would be helpful to many, I know it will be helpful to me. The calculators we have at present are not bad but cannot calculate things like the number of bones a person would need to their next prayer level for example. Zaros tally.PNGBladeQuick chat button.png# 19:39, 10 April 2009 (UTC)

Comment Using ParseHiscoreData, you could get your prayer exp and level (unfortunatly you'd need to input the data manually on a subpage, but with enough demand there might be scope for a bot to do this automatically). Using this: {{formatnum:{{#expr:ceil(({{XP|{{#expr:{{ParseHiscoreData|<subpagename>|prayer|1}}+1}}}}-{{ParseHiscoreData|<subpagename>|prayer|2}})/<experienceperbone>)}}}} will give the minimum (integer) number of bones needed to advance a prayer level (the {{formatnum: bit just gives commas after every third digit). The format is basically the same for everything, just replacing subpage names, skill names and the experience per item. If a specific level is wanted (rather than the next level), this bit {{XP|{{#expr:{{ParseHiscoreData|<subpagename>|prayer|1}}+1}} changes to the simpler {{XP|<level>}}. It can be done currently, just a bit long winded.
Java calculators would simplyfy this, however the ability to use live GEMW data is more of a pressing issuse for me - I'm pretty sure we are unique among fansites in that we offer exact prices/profits for leveling up, which change as the items change in price. If these calculators do not support this, they will be the same as lot of other fansites calculators, just superficial differences. (Sorry if I went a bit off-topic there. I just have to highlight that it is currently possible to do the things these calculators will do.) Quest.png Gaz Lloyd 7:^]Events!99s 20:18, 10 April 2009 (UTC)
I see nothing wrong with keeping that type of calculator in place still. The java calculators shouldn't be a replacement for our current ones, but for certain things they can go places our current calculators cannot. Zaros tally.PNGBladeQuick chat button.png# 20:40, 11 April 2009 (UTC)

Comment/Mild Opposition - I am strongly urging caution to requesting this feature, and suggesting this is indeed something that could get way out of hand if we are not very careful with it. The primary security issues involved here is trying to decide what sort of access to the Java applets we would give to members of the community, where the code for those applets might be located (so others can update/modify the applet), and what to do with mis-behaving applets. In theory, nearly any data that can be sent via TCP/IP socket can be transmitted via Java applet, and a mis-behaving applet could be used for phishing of Runescape accounts/passwords or worse and mimicking the Runescape user client interface. This is something we really don't want to have happen here.

One of the things I would love to see with MediaWiki interfaces is the ability to insert Javascript into a page by page basis. For a whole bunch of very good reasons, Brion Vibber from the Wikimedia Foundation (and lead software architect for MediaWiki software we use on this site) has deliberately stripped out any Javascript from being processed from any HTML markup on the wiki pages. Again, some of this is phishing concerns, and the fact that a malicious vandal could use Javascript (not a Java applet) to really cause some serious damage like automatically blocking users or deleting pages. This BTW is also possible with Java applets as well (more security concerns). We do have the ability to add some Javascript to the site, but it must be done on a global basis that loads with all of the pages of the site. For something like a GEMW tool to assist with updating prices, it is a possibility, but it is not something you would want to add just for a single calculator page.

IMHO, Javascript that might be protected with administrator-only editing provisions would at least allow for "anybody can edit", fits in better with Media Wiki, and is something much safer from a security standpoint. It can also do all of the calculators that are being addressed here, even if a Java applet looks a little more classy. Any flexible programming language is going to give some problems regardless of how it is implemented and merged with a wiki interface. --Robert Horning 06:23, 11 April 2009 (UTC)

Well, Roberts idea is good. They are easier to use than our ones, so if we could get over the security probs and have them the popularity of the site would go up, and a link on the main page would be really useful.Joe Click Here for Awesomeness15:20, 12 April 2009 (UTC)


To be honest, I go to Zybez for skill calculators. I am all for the wiki but our calculators are just not cutting it for me. Whether a java calculator is the answer or not, i am not sure, but we do need to update our skill calculatorsRune crossbow.png Hess36talk Ancient staff.png 17:11, 23 April 2009 (UTC)

I go to RuneHQ all the time for their calcs. That is just about the only thing we're missing as far as I see. If we could get them that would be great, so lets do try hard to do that. - http://runehq.com/RHQCalculators.php - Prayer.png Jedi Talk HS Log Tracker Summoning.png 17:49, 23 April 2009 (UTC)

I also use tip.it for their co-ordinates locater for the clue scroll things. I think it's more like an applet and I'm not sure our programmers can run this in the wiki, but perhaps even if we could design it's on application that can run and not so much an applet we could external link it to run with Java.

Bonziiznob Talk

18:38, 23 April 2009 (UTC)

Lol, I just read above. :S 18:39, 23 April 2009 (UTC)

This topic needs more activity, it could be big. Are we going to or not? Joe Click Here for Awesomeness18:38, 5 May 2009 (UTC)

Per user stuff is not what the wiki was intended for: but it could be good - however some kind of third party server would be needed to recover the data from Jagex for auto skil calcs. where the user is prepared to enter their own data it is al doable anyway. Rich Farmbrough, 08:04 12 May 2009 (GMT).

Support It would be awesome to have some calcs on here, just because it would mean that we actually do have everything. I have no programming expertise and so don't know how hard this would all be, but using our ge price check bots, could we even include features such as cost/profit if all items bought/sold on g.e.? --Serenity1137 08:17, 12 May 2009 (UTC)

Support But how do we 'do' it? FredeTalk 20:16, 13 May 2009 (UTC)

Support If someone can figure it out. Nightgunner5 is pretty good with coding like PHP and stuff, not sure if he knows Java though... --— Enigma 22:16, 13 May 2009 (UTC)

Support-per above Rune crossbow.png Hess36talk Ancient staff.png 17:13, 15 May 2009 (UTC)

Reading through above comments, especially Robert's explanation of the risks, I'll support if and only if the pages where the java (or javascript, whatever it is) is actually coded is indefinatly fully protected to prevent abuse. Quest.png Gaz Lloyd 7:^]Events!99s 17:39, 15 May 2009 (UTC)

Site notice - Can we put one on for this? It certainly is important.Joe Click Here for Awesomeness11:22, 16 May 2009 (UTC)

I think these would be really useful in lots of areas, especially if users could submit calcs to be approved. But I also see that they would need to be protected. If we can come up with a system which safely involves them whilst still allowing for them to be developed by at least some of the community I would fully support that. --Serenity1137 09:48, 19 May 2009 (UTC)

Consensus

Lets have one!

  • Support - For supposition of Java/JavaScript calculators.
  • Oppose - For opposition of Java/JavaScript calculators.

Joe Click Here for Awesomeness13:41, 14 June 2009 (UTC)

Strong Oppose - Java based calculators are tremendously overkill. JavaScript based ones will work just as fine; the tip.it resource mentioned above works with JavaScript. However, has anyone investigated the actual technical feasibility for doing this? As far as I know, JavaScript tags are disallowed in default MediaWiki implementations and enabling it (if possible at Wikia) would be a potential security nightmare. The only way I know of getting this to work is by implementing it as a custom user JavaScript which requires log-in. --Quarenon  Talk 17:30, 14 June 2009 (UTC)

Support/Comment - They would be very useful and user friendly, and much more flexible than the current calculators. We should still have the calculators we have in place but use the Java calculators where they would work better and be more useful. I propose that before any Java code or anything is put into use it is checked out and approved by at least one admin and then protected to ensure it is safe. Zaros tally.PNGBladeQuick chat button.png# 18:02, 14 June 2009 (UTC)

Conditional support - Per my reason above. Quest.png Gaz Lloyd 7:^]Events!99s 18:08, 14 June 2009 (UTC)

Support - I see no reasons for not having it. bad_fetustalk 18:29, 14 June 2009 (UTC)

Conditional support - Per Gaz Lloyd's reason above. Zig 06:18, 19 June 2009 (UTC)

Conditional support - Per Gaz, though I really think we need to think how to do it through... --Serenity1137 14:14, 20 June 2009 (UTC)

Comment Do any of the supporters have any problem with javascript instead? I know that for me they are both just computery words associated with programs like games or calculators. If no-one minds, then I want to request closure with the conclusion being Javascript calculators will be built for the purpose of use in the wiki, under the condition that they are indefinitely fully protected --Serenity1137 10:25, 27 June 2009 (UTC)

Javascript is disabled over the whole wiki (except MediaWiki: namespace). We can enable it, but then it can be used on all pages; not reccomended per Robert's notes on the security risks (above).
Methinks some more research into the Java applet is needed. If we can't provide it without any security risks, then we shouldn't provide it at all.
Link to mediawiki's page on it. (I like the way no wikis have it enabled, Lol) Quest.png Gaz Lloyd 7:^]Events!99s 18:46, 27 June 2009 (UTC)
We can import the necessary javascript via [[MediaWiki:common.js]]. That Java extension doesn't mention the ability to restrict the <java_applet>, which is just a big a security risk as enabling JavaScript everywhere. --Quarenon  Talk 19:30, 27 June 2009 (UTC)

Comment - 6 people is hardly enough to determine a consensus I believe. C.ChiamTalk 10:31, 27 June 2009 (UTC)

Though Silence doesnt mean support, if noone else posts (as they didnt for a whole week) they can't complain if consensus is made before they comment... --Serenity1137 10:44, 27 June 2009 (UTC)
We need more people to vote, sooner. Can we get a Notice of Intent please, so the people that are waiting to comment will know to do so now before consensus is reached? --— Enigma 17:04, 27 June 2009 (UTC)

Conditional Support - per gaz --— Enigma 17:04, 27 June 2009 (UTC)

Comment - Putting it up on Sitenotice would be a good idea too. Zaros tally.PNGBladeQuick chat button.png# 17:10, 27 June 2009 (UTC)

Conditional Support - Per Gaz Lloyd. Ancient talisman.png Oil4 Talk 18:37, 27 June 2009 (UTC)

I have an idea, hows about we create a new wiki known as rsjava wikia or summat, set up by admins on this wiki with the same admins. Would it be possible to make the entire wiki fully protected then link to it from this wiki? --Serenity1137 19:13, 27 June 2009 (UTC)
Then it would be better to just link to other websites, like Zybez. Ancient talisman.png Oil4 Talk 19:55, 27 June 2009 (UTC)

Comment - I asked Uberfuzzy on irc how feasible doing this would be and he said it would not be very feasible to do this. As suggested above maybe we could link to another site's calculators. If we do the link exchange with Zybez maybe we can use theirs.

[03:13:35] <CatCrewser> Uberfuzzy|afk, on the RSWiki at http://runescape.wikia.com/index.php?title=Forum:Java_calculators&t=20090627195639 we have a discussion about JavaScript/Java calculators, how feasible is doing something like this?
[04:11:02] <uberfuzzy|afk> CatCrewser: not very
[04:11:11] <CatCrewser> ok

- TehKittyCatTalk Wikian-Book 08:21, 28 June 2009 (UTC)


Comment - This seems to have quite a bit of support, though may not be feasible, so a counter suggestion is this: though I'm not entirely sure, I think it'd be possible to make our own calcs using the parser functions. If this was possible to do well, would people be ok with it instead? --Serenity1137 08:44, 28 June 2009 (UTC)
Comment - I have already said this before, we can write or import the necessary scripts via [[MediaWiki:common.js]], so that we don't have to install a Java extension or enable JS site-wide. --Quarenon  Talk 11:58, 28 June 2009 (UTC)
I was under the impression that that approach involved just as much of a security risk, if not, then it sounds like a plan, if it does, then I'll clarify that I meant using normal parser functions, like #ifexpr: and similar things as we know these are risk free --Serenity1137 12:33, 28 June 2009 (UTC)
It's not, because the common.js scripts can only be changed by the admins. JS on any page would be a risk since anyone could insert their scripts. Anyways, I've begun thinking about some ways to approach this using a method that will allow us to continue to use parserfunctions. --Quarenon  Talk 11:42, 2 August 2009 (UTC)

Idea

Here's an idea I've been toying with. Check out this screenshot, from my Sandbox page (you won't see this because a certain script is needed):

http://img6.imageshack.us/img6/1893/jscalc1.th.png

Type in two numbers and you get:

http://img195.imageshack.us/img195/3393/jscalc2.th.png

Standard wiki syntax is used to calculate it. Code:

<!-- Make a form to add a and b -->
<div class="jsCalc" style="display: none" title="Add numbers"><nowiki>
'''Result:''' {{#expr:{{{a|0}}}+{{{b|0}}}}}
</nowiki></div>

The script tries to find the template parameters and create a form out of it. When you fill out the form, the parameters are replaced with the values specified and the code is parsed to get the result. It works for more complicated things that have embedded HTML and template transclusions. Example:

http://img18.imageshack.us/img18/8033/jscalc3.th.png

The code for that is almost an exact copy of the existing {{Combat}} template. --Quarenon  Talk 16:45, 2 August 2009 (UTC)

Sounds great, can't wait to be able to try it out. This would be a good solution I think. - TehKittyCatTalk Wikian-Book 17:53, 2 August 2009 (UTC)
Hooray, now we can semi-protect Calculators/Combat level! ShinyUnown T | C | E 18:01, 2 August 2009 (UTC)
I recently finished this code completely, it may be useful to you. ShinyUnown T | C | E 18:22, 2 August 2009 (UTC)

I fixed the example code, the nowiki tag is actually supposed to be part of the code in the calculator page. --Quarenon  Talk 21:19, 2 August 2009 (UTC)

Comment - This script is now ready for testing. Insert importScript('User:Quarenon/calc.js'); into Special:MyPage/monaco.js or Special:MyPage/monobook.js and then visit the example at User:Quarenon/Sandbox#Example_2. I've changed the way it is set up significantly to try and make the forms more flexible. See User:Quarenon/Sandbox#Configuration for details on that. I'm still open to any suggestions or comments on the best way to do the configuration. --Quarenon  Talk 15:23, 3 August 2009 (UTC)

Sa(fari)Failure. ShinyUnown T | C | E 15:36, 3 August 2009 (UTC)
Working for me in Mac Safari 4.0.2. - TehKittyCatTalk Wikian-Book 15:52, 3 August 2009 (UTC)
It tested fine for me in Windows Safari 4.0.2. --Quarenon  Talk 19:38, 3 August 2009 (UTC)
Then it isn't compatible with 3.1, is it? (and if you ask me why I didn't download the new one, it's because it doesn't automatically replace the other one) ShinyUnown T | C | E 20:36, 3 August 2009 (UTC)
All OK on Safari 3.1.2 for Windows. --Quarenon  Talk 00:01, 4 August 2009 (UTC)
It works for me. I've noticed you've placed a catch for decimal values but what about for integers that are in access of 99 to where they apply. It calculates a magic level of 545... 00:11, 4 August 2009 (UTC)
The script itself does some basic type checking but the template that does the calculations can also make more powerful checks using [[mw:Help:Extension:ParserFunctions|parser functions]] like {{#iferror}} and {{#ifexpr}}. The [[User:Quarenon/Test]] test template and the {{Combat}} template used in the Combat calculator do not currently validate any of the parameters but they can be changed to do so. --Quarenon  Talk 00:37, 4 August 2009 (UTC)
On second thought, it wouldn't be too hard to specify number ranges in the config, so I'll work on adding this. --Quarenon  Talk 03:24, 4 August 2009 (UTC)

I am not sure if it is working for me (Chrome)--Joe Click Here for Awesomeness 07:41, 4 August 2009 (UTC)

Works great. A very neat solution, good work Smile Quest.png Gaz Lloyd 7:^]Events!99s 09:56, 4 August 2009 (UTC)

Not working for me in (Chrome). Not sure if it is a cache issue or not? Did force refresh but with no luck. Strength-icon.png Hammer2092 Time |KOTA Bandos godsword.png 16:35, 4 August 2009 (UTC)

It should definitely be working in Chrome, I'm using Chrome 2.0.172.39 right now. It may not be reloading your monaco.js file even after a force-refresh; I've noticed that Chrome sometimes still uses cached files even after doing Shift/Ctrl-F5. One way to verify whether you are using the newest monaco.js file is to visit the page directly at http://runescape.wikia.com/index.php?title=User:Hammer2092/monaco.js&action=raw&ctype=text/javascript and refreshing there if necessary. --Quarenon  Talk 16:55, 4 August 2009 (UTC)
Works for me too(at least in the latest Mac Chromium nightly). - TehKittyCatTalk Wikian-Book 17:37, 4 August 2009 (UTC)

Added support for range-checking as suggested by Bonziiznob as well as the ability to specify a dropdown box. The Sandbox example shows the various combinations of variables and ranges possible. --Quarenon  Talk 21:27, 4 August 2009 (UTC)

A very interesting solution to the problem. I'm impressed. However, I'm also a little confused about how you're supposed to use it. From looking at the code, I get the impression that you use:

<div class="jcConfig" style="display:none;" title="Add numbers">
param = a || 0 | int | 0-100
param = b || 0 | int | 0-100
</div>

to configure the calculator, which looks absolutely nothing like the example provided above. Could you possibly explain a little bit more about how the code works, and provide a new example now that you've changed the way it works Oops, I didn't notice the links above, and just spent the past hour deciphering your code to figure out how to use it. I do have one question, though. It looks to me (although I'm not familiar with this aspect of JQuery) as if you're using the self-extracting JQuery library, and storing it on the wiki servers. Why don't you simply reference the library on Google's servers (http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js)? wait a minute, does the wiki already include JQuery? Your code is using JQuery before referencing it... I'm a regular user and I approve this message.  TLUL Talk - Contribs 23:39, August 22, 2009 (UTC), edited 23:58, 22 August 2009 (UTC) 

The extra code being included is a jQuery plugin for doing autocomplete, originally from here and slightly modified to work with MediaWiki's autocomplete mechanism. The base jQuery library is already loaded on wiki pages by default. --Quarenon  Talk 00:07, 23 August 2009 (UTC)
Aw, I wish I had known about JQuery being loaded on wiki pages before I wrote a long script for my global js on the main wiki. Anyways, I can't seem to get the script to work, even though I am certain the cache is being cleared. I have had issues with my js files before, but since the aforementioned global js seems to work, I tried referencing your script from there too. That didn't work either, so I'm stumped. I'm a regular user and I approve this message.  TLUL Talk - Contribs 00:20, August 23, 2009 (UTC) 
I took a look at the edit you made on your global.js file. I'm not sure if the <tt>w:c:runescape</tt> redirecting syntax will work for scripts. Adding this instead might work:
importScriptURI('http://runescape.wikia.com/index.php?title=User:Quarenon/calc.js&action=raw&ctype=text/javascript');

--Quarenon  Talk 15:43, 24 August 2009 (UTC)

I did manage to get it working from my monaco.js file, I simply had to delete the other non-working stuff in it. I figured that the <tt>w:c:</tt> redirect wouldn't work with importScript, but it was worth a try. You will also note that now I am actually referencing a copy of your script at [[User:The last username left/calc.js]] instead. This copy has a line added in the AJAX error handler to re-enable the form submit button when there is an HTTP error or timeout. I'm a regular user and I approve this message.  TLUL Talk - Contribs :( 05:01, 26 August 2009 (UTC) 
I merged the change into the calc.js file, thanks! --Quarenon  Talk 14:58, 26 August 2009 (UTC)

Idea(2)

Q, can you close and bring this into action now. We have a consensus? And you have figured out a code so please?--Joe Click Here for Awesomeness 16:22, September 23, 2009 (UTC)

I was just about to post the same thing. The JS calc feature seems feature complete and ready, although I'd like to see it able to get high-scores data and use that. - TehKittyCatTalk Wikian-Book 20:11, September 23, 2009 (UTC)
I was going to 'present' the calculators I made using this framework today, but it seems [[mw:Extension:VariablesExtension|the vardefine extension]] is broken. Which is a slight problem as all my calculators use it (well, all worthwhile ones). You can still check them out here, but the outputs have huge expression errors. Concerned Quest.png Gaz Lloyd 7:^]Events!99s 20:28, September 23, 2009 (UTC)
I'm doing some further tweaks to get it ready for deployment, but it should be ready to run soon. Also getting high scores data would be great, but I'm not sure how feasible that would be since the scripts can't grab highscore data directly. It would have to be done through an external site which is probably a non-starter for a site-wide script. All that assumes that you mean typing in a player name and having that player's ranked stats available as parameters to the calculator template. --Quarenon  Talk 01:03, September 24, 2009 (UTC)
How about using Cross Site XMLHttpRequest where available, and fall back to only manual entering otherwise? Another solution would be creating a simple MediaWiki API extension that queried the highscores api.php?action=highscores&hsname=Catcrewser Special:Highscores. I might look into writing that this weekend. - TehKittyCatTalk Wikian-Book 02:11, September 24, 2009 (UTC)
As far as I know, cross-site XHR only works if the data server (Jagex) responds with an appropriate Access-Control-Allow-Origin header, and it currently does not do this. In Forum:Comparison, Dantman brought up [[mw:Extension:External Data]] which does seem like a good way to handle the hiscores issue, and it seems to support access to it in an API fashion. --Quarenon  Talk 03:12, September 24, 2009 (UTC)
I've created a very simple MediaWiki extension, RSHighScores. {{#highscores:catcrewser}} returns 246870,1580,16599181 572776,75,1269808 451894,75,1226454 932700,74,1128950 758616,75,1273040 1219453,61,318919 474245,55,179009 775344,67,579360 394795,75,1217264 526730,77,1601513 861640,61,315091 216020,79,1870097 648935,61,311236 191560,67,557561 158200,69,693080 513973,66,531799 115427,65,449505 142617,65,471855 140662,65,452102 308749,60,295891 174476,56,190221 323014,51,121477 66987,75,1267924 218141,54,152684 219988,52,124341 -1,-1 -1,-1 -1,-1 -1,-1 -1,-1 which can be processed by JavaScript or StringFunctions to get the highscores data. - TehKittyCatTalk Wikian-Book 22:43, September 25, 2009 (UTC)
The only problem I see with that is that every single time that someone views a page, this extension reloads the hiscores_lite page. This could cause a great deal of strain on Jagex' servers, and we have been specifically told by a Jmod that we should not access the page more than once a day. I'm a regular user and I approve this message.  TLUL Talk - Contribs 23:56, September 25, 2009 (UTC) 
Mmhmm, just like every other fansite calculator. Quest.png Gaz Lloyd 7:^]Events!99s 00:10, September 26, 2009 (UTC)
And in the case if it was used on a page it would only recall hiscores_lite when the page cache expired, not every load. - TehKittyCatTalk Wikian-Book 00:12, September 26, 2009 (UTC)
The page caches are always in effect unless an extension disables it explicitly, which Wikia probably would frown on due to the performance impact. So in this case the stats are only refetched if the page has to be reparsed, not on every page view. The way I see it, someone would put a line like {{#hiscores}} in a subpage and then update it by purging the page. And it should be available to scripts by using the [[mw:Manual:Parameters_to_index.php#Raw|action=raw parameter]]. --Quarenon  Talk 15:42, September 27, 2009 (UTC)
RSHighscores now supports limiting the number of calls, so this function can not be abused. By default the limit is 1, but may be changed, 0 allows unlimited calls. - TehKittyCatTalk Wikian-Book 21:07, September 27, 2009 (UTC)
The discussion of RSHighscores has been moved to Forum:RSHighscores, please post about that there, the new JavaScript calcs should be approved separatel and wait implementation until the RSHighscores proposal has passed or not due to the impact of this on the new calcs. - TehKittyCatTalk Wikian-Book 20:25, September 29, 2009 (UTC)

JavaScript Calculators

We have has various proposals for calculators and we have come up with JavaScript based calculators as a solution. Lets finally reach a consensus on whether to implement this proposal or not.

  • Support - Per above and the previous discussions. - TehKittyCatTalk Wikian-Book 20:25, September 29, 2009 (UTC)
  • Support - Per myself above, and the epicness of Q's solution. Quest.png Gaz Lloyd 7:^]Events!99s 20:34, September 29, 2009 (UTC)
  • Support - Per above. - Slayer helmet.png Hmanballer talk | edit count | sign | HS Fire cape.png 20:30, October 4, 2009 (UTC)
  • Support - Javascript is clean and fast for users, not mentioning broadly compatible-- BURNTICEJ http://img8.imageshack.us/img8/4443/silverv.jpg 20:53, October 4, 2009 (UTC)
  • Support - Great. Ancient talisman.png Oil4 Talk 13:37, October 5, 2009 (UTC)
  • Support - Sounds good! Smile Unicorn horn dust.png Evil Yanks talk 07:20, October 25, 2009 (UTC)
  • Support - Awesome idea! Quest point cape.pngTalk Newbie856 edit count Nomad guideMusic icon.png 00:00, October 29, 2009 (UTC)
  • Support - Huzzah...--Joe Click Here for Awesomeness 13:48, December 12, 2009 (UTC)
  • Request closure - It has been over a month since this started and in that time all seven people have supported with no opposition. I think it is highly, highly unlikely that this will fail. Unicorn horn dust.png Evil Yanks talk 01:37, November 1, 2009 (UTC)
    (Temporarily) oppose closure - Per Cat here: The new calcs should await the approval/denial of RSHighscores by Wikia, due to the huge impact this will have on the JScalcs. Quest.png Gaz Lloyd 7:^]Events!99s 18:12, November 1, 2009 (UTC)
    I'll send in a request for a status update on the extension. - TehKittyCatTalk Wikian-Book 19:10, November 1, 2009 (UTC)
    Why do we have to wait for Wikia to approve the calculators before we reach consensus whether we want to implement Java Calculators or not?? Just because we have achieved consensus doesn't mean that we will put them on mainspace straight away. I am sorry if this is a blatantly obvious answer, I feel completely out of my depth. Unicorn horn dust.png Evil Yanks talk 06:16, November 2, 2009 (UTC)
    We are waiting for the highscores extension to be approved and installed before we write the calculators, as this will have a significant effect on them. I've received a status update on the extension; it should be taken care of in the coming week. - TehKittyCatTalk Wikian-Book 21:05, November 2, 2009 (UTC)
    Awesomeness. Quest.png Gaz Lloyd 7:^]Events!99s 21:20, November 2, 2009 (UTC)
  • Comment Since we have reached consensus, is it ok to use JavaScript calculators on the mainframe? Quest point cape.pngTalk Newbie856 edit count Nomad guideMusic icon.png 23:21, November 1, 2009 (UTC)
    Only once they're implemented. Only a few users (and no IPs) can view them (until then), and since we're waiting on Wikia's approval, it may be awhile until they can. So I would keep them in your userspace for now. Quest.png Gaz Lloyd 7:^]Events!99s 23:30, November 1, 2009 (UTC)
    How could we make it so that every user can see them ? Edit the main Media Wiki thing (BTW: What is that thing, I hear so much about it but don't understand it) ? So we need to wait authorization... Well... back to the sandbox... Quest point cape.pngTalk Newbie856 edit count Nomad guideMusic icon.png 23:38, November 1, 2009 (UTC)
Comment - MediaWiki is a namespace. It is used to change the look and functionality of the wiki. We can change the skin using MediaWiki, the colours of admin names, the title of the wiki, the catchline, etc. Only admins can edit it, for obvious reasons Wink Chicken7 >talk 23:54, November 1, 2009 (UTC)
Ah, thank you very much ! Quest point cape.pngTalk Newbie856 edit count Nomad guideMusic icon.png 11:45, November 2, 2009 (UTC)
  • Support - Looks great and I really like it! Chicken7 >talk 23:54, November 1, 2009 (UTC)

Update - RSHighscores will be live on the 11th. - TehKittyCatTalk Wikian-Book 21:14, November 3, 2009 (UTC)

Huzzah! I think... Unicorn horn dust.png Evil Yanks talk 05:15, November 4, 2009 (UTC)
Excellent! People who use hiscore pages will want to transition to this extension as it will be far more hands-free than it is currently. Also, I will do my best to get the calculators ready to work with it by the time it goes live. --Quarenon  Talk 05:26, November 4, 2009 (UTC)

Comment - The RSHighscores extension is finally installed. There's an example located at User:Quarenon/Scripts/Calc#Player_Hiscores with template code located at User:Quarenon/Scripts/Calc/Hiscores. There's a couple of small issues that have work arounds in the template. Those are:

  1. The {{ParseHiscoreData}} does not accept the newline delimiters returned by the extension. I think it (the template) should be modified to accept both newlines and spaces (to keep compatibility with existing pages). Unfortunately it's difficult to use [[mw:Extension:StringFunctions|#explode]] directly on newlines, and my workaround uses #urlencode which is a bit messy. - I've built this workaround directly into {{ParseHiscoreData}}, which now accepts the original space delimiter and the newline delimiter.
  2. The call limit in the extension originally applied even if you tried to fetch the same player multiple times. To go around this I used [[mw:Extension:VariablesExtension|#vardefine]]. I've notified TehKittyCat about this so hopefully it will be fixed soon.

After some further testing I should be able to get the calculators live on the wiki soon! --Quarenon  Talk 21:56, December 9, 2009 (UTC)

Awesome. I hope these issues get sorted. I'll work on updating my calcs. Quest.png Gaz Lloyd 7:^]Events!99s 23:18, December 9, 2009 (UTC)
I've fixed the first problem (see above). The second issue still requires using #vardefine if you intend to use the stats in more than one spot. --Quarenon  Talk 02:17, December 12, 2009 (UTC)

Comment - The script is now installed on the wiki. If you have the script manually installed, please remove it since it is no longer necessary. A notice may still appear for awhile after you remove the script due to client/server caches, just wait awhile and it should go away eventually. Again, User:Quarenon/Scripts/Calc is the guide for creating a calculator. You'll need both a configuration section to set up the form as well as a template that uses standard wiki syntax to perform the actual calculations. --Quarenon  Talk 00:37, December 12, 2009 (UTC)

Quests

With the new Adventurer's Log it is possible to view the quests that a user has completed relativity easily (example). Would it be possible to collect/analyse/use this new quest info in any way so that it could be incorporated into the new calculators?? Is this even possible to collect the information without causing massive drain on the RuneScape Servers?? Would it require too much work for too little reward to be viable?? Are there other questions that should be asked that I have not thought of?? Unicorn horn dust.png Evil Yanks talk 08:29, November 6, 2009 (UTC)

Comment - A 39.03 KB size verses the 0.42 KB for Hiscores Lite and likely much more intensive. TehKittyCatTalk Wikian-Book 12:28, November 6, 2009 (UTC)

Comment - Agreed. The only Adventurer Log feed I know of ([1]) lists only recent events, and using the entire HTML page would be bandwidth wasteful and possibly slower. Maybe we should push for Jagex to create a "Hiscores Lite" equivalent for the quests log. --Quarenon  Talk 22:02, December 9, 2009 (UTC)
I agree. We need a lite page to access it. I think it is more likely that Jagex will create a GE lite before an Adventurer's Log lite though. I'm a regular user and I approve this message.  TLUL Talk - Contribs 22:23, December 9, 2009 (UTC) 
How bad is the Advent log in relation to the GEMW pages?? For every 1 time someone retrieves something from the adventurer's log there would probably be multiple GEMW retrievals due to the mass amount of items. Unicorn horn dust.png Evil Yanks talk 05:16, December 10, 2009 (UTC)

Support - I support your question. --Fruit.Smoothie 05:37, December 10, 2009 (UTC)

Testing and Feedback

I say we have reached the testing and feedback stage of development for the JavaScript calculators. Below, add your JavaScript calculators for testing and feedback. - TehKittyCatTalk Wikian-Book 03:12, December 12, 2009 (UTC)

Discussions about the various calculators has been moved to RuneScape:WikiGuilds/Calculators#Proposed_Calculators so that this proposal can be wrapped up soon. --Quarenon  Talk 07:58, January 8, 2010 (UTC)

Discussion

Why not?? All other fan sites have it but us.. i love this website a whole lot.. thing that sucks is that i have to go to other fan sites just to look at the skill calculaters and others

Support - 100% through --Thieving.png Empty Spoon Thieving cape (t).png 15:42, December 13, 2009 (UTC)

The javascript calculators have already been enabled. It'd be nice if you could give feedback on the calculators made above. Thanks, Quest.png Gaz Lloyd 7:^]Events!99s 19:55, December 13, 2009 (UTC)

Support - Works great, neat, easy-to-use, simple, convenient, what can I say, LLGW. --Fruit.Smoothie 04:33, December 15, 2009 (UTC)

Support - Sounds an awesome thing, too bad I don't understand a *bleep* about these stuff Lol, but I can understand it sounds awesome. Quest point cape detail.png Brux Talk 17:14, December 15, 2009 (UTC)

Support - This should be better instead of going to out-dated fansites. Fishing.png NnK Oliver (600613) talk 18:35, January 1, 2010 (UTC)

just some clarification issues

would these "calcs" be permitted on mainspace articles, or, more specifically, would the templates be used in mainspace articles, or is this just a userpage type of thing only? --Fruit.Smoothie 04:31, December 15, 2009 (UTC)

They will be used on mainspace, making a few of the calculators at Calculators redundant. This message was more of a bump since conversation has died and I feel that these calculators are one of the main things that this wiki needs to compete with the other fansites. Unicorn horn dust.png Evil Yanks talk 01:32, December 30, 2009 (UTC)
Lol, true. Quest point cape.pngTalk Newbie856 edit count Nomad guideMusic icon.png 01:44, December 30, 2009 (UTC)
Indeed. I still think we should keep the standard 'calculators', they're useful if you don't have Javascript enabled, and also, for example, if you don't really have a goal cooking level, just want to profit via cooking. Quest.png Gaz Lloyd 7:^]Events!99s 17:20, December 30, 2009 (UTC)
They should be an addition, not a replacement. scoot4.pngscooties 17:26, December 30, 2009 (UTC)

Comment/Support - We need to put another bar up saying "Calculators" Or advertise them somewhere. --Summoning Supawilko 19:49, December 30, 2009 (UTC)

I thought there was a link in the [[MediaWiki:Monaco-sidebar|(Monaco) sidebar]], but there doesn't seem to be. We could add a link to Calculators there.
I could also add a note to the sitenotice for this discussion for more input, if wanted? Quest.png Gaz Lloyd 7:^]Events!99s 21:36, December 30, 2009 (UTC)
Since the initial proposal is done perhaps the testing bits of this discussion would be better placed in a WikiGuild of some sort? I could also move the guide page there. --Quarenon  Talk 01:29, December 31, 2009 (UTC)
A wiki guild would be a better place (IMO) for the testing to take place, a bit like the music tracks wiki guild, where the calculators would be listed on the page and discussion on the... discussion page. --Quest point cape.pngTalk Newbie856 edit count Nomad guideMusic icon.png 01:38, December 31, 2009 (UTC)
I was actually thinking something similar. This thread is just huge and old and has been zombified multiple times, needs closure... Quest.png Gaz Lloyd 7:^]Events!99s 13:38, December 31, 2009 (UTC)

Comment - "Calculators:" namespace might be a good idea. Whadda' think? Fishing.png NnK Oliver (600613) talk 18:35, January 1, 2010 (UTC)

I would support that, it could be pretty helpful. scoot4.pngscooties 18:53, January 1, 2010 (UTC)
I do support a namespace, would be quite easier to find calculators, and they are indirectly linked to the game, so finding them in a random page would be wrong.
Also, if we create a wikiguild about this (infact, even if we don't!), I volounteer to do the fishing and the woodcutting calculator (because they are both quite similar to the mining calc I have already done). Quest point cape.pngTalk Newbie856 edit count Nomad guideMusic icon.png 19:33, January 1, 2010 (UTC)
Comment - Wikia imposes a limit of [[wikia:Help:Custom_namespaces|three custom namespaces]] per wiki, and we already use two (Update: and Exchange:) so our ability to create new namespaces is rather limited. However, I do agree that our current convention of putting calculators as subpages of Calculators in the main namespace is rather unusual. Of course, the same thing could be said about the GEMW. --Quarenon  Talk 13:15, January 2, 2010 (UTC)
I think they should just go in the RuneScape: namespace. Why not? They're Wiki-things, and isn't that what that namespace is for? Ancient talisman.png Oil4 Talk 13:21, January 2, 2010 (UTC)

Comment yea putting a site notice up would help, as not many know we have them --Summoning Supawilko 10:25, December 31, 2009 (UTC)

Support - Sounds rather epic. Swiz Talk Review Me 13:06, January 3, 2010 (UTC)

Support - I really think that this is exactly what is needed on Calculators/Combat level so that the page doesn't keep getting edited. Farming cape (t).png Lil cloud 9 Talk 10:47, January 4, 2010 (UTC)

Closure

Support closure - A solution to the original proposal has been implemented and I have set up a WikiGuild for further discussion about this. Also, I moved the bulk of the testing section to RuneScape:WikiGuilds/Calculators#Proposed_Calculators to be discussed further. I think it's time now for closure. --Quarenon  Talk 08:01, January 8, 2010 (UTC)

Support - Per my comment about zombification above. Quest.png Gaz Lloyd 7:^]Events!99s 11:17, January 8, 2010 (UTC)

Support - Lets get it done. - TehKittyCatTalk Wikian-Book 12:23, January 8, 2010 (UTC)

Support - Looks epic. Ancient talisman.png Oil4 Talk 17:47, January 8, 2010 (UTC)


Closed - The java calculators were added due to consensus, and discussion will now take place on the respective WikiGuild. Cheers, Chicken7 >talk 06:39, January 9, 2010 (UTC)