Forum:Bonus infobox for beta equipment

From the RuneScape Wiki, the wiki for all things RuneScape
Jump to: navigation, search
Forums: Yew Grove > Bonus infobox for beta equipment
Archive
This page or section is an archive.
Please do not edit the contents of this page.
This thread was archived on 10 August 2012 by Thebrains222.

Bonus infoboxes in the Beta namespace are right now rather dispersed: there's [[Template:Infobox BonusesBeta]] (unused),Template:Infobox Bonuses Beta, [[Template:Armour Bonuses]] and [[Template:Main weapon bonuses]]. I worked on Infobox Bonuses Beta and it [[User:10finland01/Sandbox 2|seems to work]] pretty fluently. I know, I'm not being too bold here, but there's multiple template moves and/or replacements involved, some of the templates are already in heavy use and MediaWiki:Common.js/compareBeta.js needs editing (comparing only works with one template). Hopefully this'll help to avoid unnecessary hassle, reverts, etc.

So, the suggestion's to keep Template:Infobox Bonuses Beta (perhaps under a different name), scrap the other templates, change existing pages to use that template, edit the compare script accordingly.

Anybody object to deleting the other templates? dictature 23:24, June 28, 2012 (UTC)

Discussion

Comment - The first two seem to do the same thing. Whether leaving unused one in existence was an oversight by Ryan when he created it, I don't know, but there's no need to keep an unused template. As for the other two, I'm not familiar with under what circumstances they're used, not having done much work on the beta pages, so I'm unsure whether having them both is a either a good or bad thing. cqm 00:12,29/6/2012 (UTC) (UTC)

I was working on them and was trying to mess with a slight adaptation of Quarenon's compare script before I started to pull hair out. Mind you it was around 2-5am CDT that I was working on them trying to figure out a nice looking template (because I have never worked on one before) for the beta NS. Ryan PM 04:37, June 29, 2012 (UTC)

Being bold - and deleting the unused on and the used ones (main hand and the other one) since you made the Bonuses Beta template easy to deal with. The only thing I need to change now is how the compare script works with strings rather than double/decimal/int. Ryan PM 04:45, June 29, 2012 (UTC)

Comment - Right now it seems to work, just the format function needs a bit of tweaking:

function format(str) {
				if (str == null || /no/i.test(str)) {
						return $('<td />').attr('class', 'cioEmpty').text('--');
				} else {
						// Prepend + sign to numbers without any sign
						if (/\d/.test(str.substring(0, 1))) {
								str = '+' + str;
						}
 
						if(/\w/.test(str.substring(0, 1))) return $('<td />').text(str);
						else return $('<td />').attr('class', (str.substring(0, 1) == '-') ? 'cioNeg' : 'cioPos').text(str);
				}
		}

^should work; it leaves strings unparsed. dictature 11:05, June 29, 2012 (UTC)

And this should be the last paragraph in calcTotals(). It prevents adding speeds and styles together.
$('#cioTotals').empty().append($('<th />').text('Total'));
for (var i in totals) {
	// Don't total weapon speeds
	$('#cioTotals').append(format((/(1?2|5)/.test(i)) ? null : (addCommas(totals[i]) + '')));
	}
}

There's still a whole lot of pages using Armour Bonuses. dictature 12:07, June 29, 2012 (UTC)

Comment - Why can't we use the non-beta template? Perhaps remove things that are gone now, such as damage absorption. User_talk:Fswe1 Fswe1 Brassica Prime symbol.png 12:42, June 29, 2012 (UTC)

Thinking forward to EoC live launch, it's not a bad idea. However, I don't think we could reasonably merge beta stats into Template:Infobox Bonuses. It's doable but wouldn't any such implementation roughly double the page size? Obviously we can't touch the original template yet. dictature 14:01, June 29, 2012 (UTC)
Someone could make a duplicate of the template in their sandbox, adjust it where necessary and conduct the testing there, right? User_talk:Fswe1 Fswe1 Brassica Prime symbol.png 15:54, June 29, 2012 (UTC)
Separate templates makes the most sense in this situation. Whether the two templates should look similar is a different matter. --Henneyj 18:54, June 29, 2012 (UTC)
Tried to put them in the same template. Seems to work. It's a bit bizarre to have two different templates merged into one, but this would definitely ease post-EoC-launch work. dictature 18:29, June 30, 2012 (UTC)
Nice! What's with the DII in there though? Oh, and the entire bonuses system was revamped or something? User_talk:Fswe1 Fswe1 Brassica Prime symbol.png 10:25, July 1, 2012 (UTC)
DII's just a placeholder to test |image2=, seemed more appropriate than the spec (removed in beta). I guess it should now be decided whether the two templates be merged. dictature 13:42, July 1, 2012 (UTC)

Merging the templates

I'm proposing to extend [[Template:Infobox Bonuses]] to cover beta equipment bonuses.

Code Should(?)
produce
Actually
produces
{|class="wikitable"
!1
|rowspan="2"|a
|-
!rowspan="2"|2
|-
|b
|}
1 a
2
b
1 a
2
b
  • The template is a combination of Infobox Bonuses and Template:Infobox Bonuses Beta.
  • When the combat update is released, beta articles will already use the correct template, and less post-update work is required.
  • This will increase Infobox Bonuses pagesize roughly from 7,088 to 13,087 7,000 to 14,700 bytes. The template is used on 3k+ pages; twice as much with the beta pages. I don't know if this actually matters; just bringing it up.
  • Pages currently using Infobox Bonuses Beta or Armour Bonuses should be edited to transclude Infobox Bonuses|beta=yes instead. (I presume AWB is needed.)

Discussion

Support - As nominator. dictature 09:27, July 3, 2012 (UTC)

Question Why is there mainhand and offhand in the same box? Will we be able to choose just one when putting it on articles? Sorry I suck. <.< sssSp7p.pngIjLCqFF.png 16:41, July 3, 2012 (UTC)

If none of the main/offhand parameters are given, that row will be hidden. dictature 18:15, July 3, 2012 (UTC)
Oh okay ^-^ sssSp7p.pngIjLCqFF.png 20:07, July 3, 2012 (UTC)

In the mean time

Thought -The Category found here might be of some use as clearly some manual entering of data has to be done regardless of the outcome. --Skull detail.pngSkullbtsCrate of hammers.png 04:13, July 4, 2012 (UTC)

The problem with categories added by the template is that we might not desire to show all bonus stats (offhand bonuses for main hand weapons typically). I think it's pretty obvious that the unused attack bonuses are hidden. However, we should determine whether to always show the armour/LP/prayer row. I think yes, as many weapons will probably get prayer bonuses. On a related note, should we have a beta equivalent for e.g. Category:Needs image? dictature 14:11, July 4, 2012 (UTC)
And in addition, should the critical bonuses be shown always or when parameters are filled? dictature 14:16, July 4, 2012 (UTC)

Updated the template&example above to support pretty much everything I've encountered in the beta, namely hit bonuses applied only when autocasting. The Critical Bonuses and Defence Info rows are now always shown. Categories are added where parameters are omitted (see /doc), non-beta categories are used where applicable. Feedback would be appreciated before editing the high-use {{Infobox Bonuses}} and messing around with AWB.

Note: Compare script will probably need tweaking because of the autocast bonuses. dictature 01:08, July 6, 2012 (UTC)
compareBeta.js modified accordingly. dictature 18:03, July 6, 2012 (UTC)

Comment - No discussion for a while. Unless someone objects to the use of the template like here, this should be closed. User_talk:Fswe1 Fswe1 Brassica Prime symbol.png 07:26, July 14, 2012 (UTC)

Support - Well, I see nothing wrong with it. It gives all the info we have. --Cycloneblaze (user - talk) 10:02, July 14, 2012 (UTC)


This request for closure is complete A user has requested closure for Bonus infobox for beta equipment. Request complete. The reason given was: Templates appear to be mostly all transformed into Template:Infobox Bonuses Beta as of 2 August 2012, so it became the de facto template to use while the thread was being finalised.  a proofreader ▸  03:17, August 3, 2012 (UTC)

Closed - According to proof, something has implemented itself. 222 talk 11:32, August 10, 2012 (UTC)