Template talk:Quest Rep

From Lotro-Wiki.com
Jump to navigation Jump to search

Decreased reputation

Maybe we should also add the option for decreased rep to this template -Tiberivs 07:31, 21 October 2010 (EDT)

It's now possible to use this template also for decreasing reputation -Tiberivs 11:41, 7 November 2010 (EST)
{{Quest Rep 
  |The Ale Association <!-- Fraction name-->
  |700                 <!-- Amount of reputation-->
  |-                   <!-- Only use if you want decreasing reputation -->
}}
{{Quest Rep|The Inn League|1.200}} looks like:

Increased Reputation with The Inn League ( 1.2 )

{{Quest Rep|The Ale Association|700|-}} looks like:

Increased Reputation with The Ale Association ( 700 )

Possible error

I tried the following and it seems the Quest Rep cannot be in the left column:

Item to Receive Items to Trade
Increased Reputation with Men of Bree ( 700 )  Cardolan-trinket

But but it works when in right column

Item to Receive Items to Trade
 Cardolan-trinket Increased Reputation with Men of Bree ( 700 )

I have verified that it is not about the Reward template, thus it must be the Quest Rep template or any of its dependencies.

On a side-note, it seems backwards to have Receive before Trade so I have updated the boilerplate, now Trade | Receive, we go from left to right ;) -- Zimoon 03:28, 31 October 2011 (EDT)

Seems to be fixed now. A combination of changes appeared to work in the end.
I think we have receive first as people are more likely to be interested in what you can get from the trader than what they need to trade. Maybe its just me, but I generally look at what the vendor has to offer, and then check what I need to give them. Having receive first is also what Turbine does as far as I remember. Amphoras (talkTalk to me!) 07:47, 31 October 2011 (EDT)
Yeah, you are prolly right and I will repent. -- Zimoon 12:56, 31 October 2011 (EDT)

Infamy/Renown

Would someone add the quest rep for Infamy and Renown? So I can use {{Quest Rep|Infamy|40}} or {{Quest Rep|Renown|100}} like this: - Starbursty (talk) 09:14, 29 November 2011 (EST)

Reputation Names

Food for thought:

Increased Reputation with Thorin's Hall ( 300 ) points to the location, not the reputation faction. Next time anyone plays with this template, it might be something to look into. [[Elves of Rivendell]] has a redirect already, but I seem to recall other faction names that collide with geography, too. Sethladan 18:02, 29 March 2012 (EDT)

Increased Reputation with Elves of Rivendell ( 300 ) points to [[Elves of Rivendell|a redirect]], and thus to the reputation faction. For other factions Increased Reputation with Men of Bree ( 300 ) point directly to the faction page.
I have updated the Template:Quest Rep to handle the exception cases. Also, added "doc=Yes" to suppress faction categorization for this and the template pages. RingTailCat (talk) 19:07, 29 March 2012 (EDT)
Cheers! Thanks. :) Sethladan 13:14, 30 March 2012 (EDT)

Simplifying

Would anyone be opposed to a slight reworking of this template so that it displays its gain or loss form based on the amount of reputation (e.g., {{Quest Rep|The Ale Association|-900nocat=y|}} ) instead of the extra "-" parameter? Sethladan 13:21, 29 June 2012 (EDT)

That is a brilliant idea and I'd say it is veeeeeeery intuitive for the editors.
I assume you keep the - for backwards compatibility, even if undocumented, and a comment in the code about it?
Zimoon 04:43, 30 June 2012 (EDT)
If it were up to me, I'd just spend the extra effort to hunt down and replace all the extra '-'s instead of keeping unnecessary code. There can't be that many negative quest rep events floating around... Thanks for the support! Sethladan 12:52, 30 June 2012 (EDT)
This link [1] finds all the pages which reference the Reputation decrease icon. A few are monster play quests which increase infamy. Most are the Inn League and the Ale Association daily quests which increase rep with one faction while decreasing it with the other.
Also, I have a test version of the template: User:RingTailCat/Sandbox-template1 here. As usual with test code on the template test page, you must save the test page to see results of your changes. Previewing changes will use the previous (saved) version of the template. As a result, that page will go through a few more saves than usual doing my edit and test cycle.
- RingTailCat (talk) 19:07, 30 June 2012 (EDT)
Please have a look at my revised template: User:RingTailCat/Sandbox-template1. In order to use the #expr:abs parser function, I had to convert any numbers with a thousands separator into a number without the thousands separator. I would like to be able to format that number to put back the thousands separator. It looks like the best way to do that is with an extension such as Extension:NumberFormat or Extension:FormatNum. I did not see an existing feature or extension to do locale based number formatting (did I miss it?).
Please comment. And if this looks ok, I will move it to Template:Quest Rep. (It is not a straight copy/paste.)
- RingTailCat (talk) 19:54, 30 June 2012 (EDT)
I didn't realize we had a variables extension! Learn something every day. Regarding the numbers, I remembered {{formatnum}} and {{formatnum|R}} after some thought. This should take care of the thousands separator and the display.
To be honest, your code seems needlessly complicated - I would just dispense of the variables, use a simple if statement, and call it a day. See my User:Sethladan/Sandbox|version and let me know if it looks any more straightforward. I realize you asked for commentary, but it felt easier to just start from scratch on my own and then compare notes. You'll notice I stripped out the compatibility code along with the extraneous if:float (although I had to add "middle" for default functioning), and moved part of the display outside the if statement. I did steal your expr: abs bit, though - much more elegant than my thought of multiplying by -1, heh. Sethladan 23:31, 30 June 2012 (EDT)
Also: Great idea about using the WhatLinksHere for that image - again, simpler than my thought of adding things to categories and tracking them from there. Fortunately there are only a handful! Sethladan 23:34, 30 June 2012 (EDT)
I had in mind to extend the template to also handle Infamy and Renown. I added those to User:RingTailCat/Sandbox-template1. I missing seeing formatnum on the Special:Version page. I guess I must have looked at extensions and not at the Parser Funtion Hooks at the bottom. RingTailCat (talk) 02:41, 1 July 2012 (EDT)
I can't fault you for missing formatnum - it's actually part of the core MediaWiki "magic words" set and not an extension at all. I probably never would have found it if I were looking for it through Google last night; I had to go digging through my user page history because I knew I remembered using something to that effect waybackwhen.
Regarding Infamy and Renown, despite Starbursty's request above, I wonder at the merits of complicating this template versus using a separate one for Infamy/Renown. Not that it can't or necessarily shouldn't be done, it just seems like something that functions differently enough to warrant its own page rather than cramming everything into here. That said, I also don't play PvMP, so I'm not aware of how often such an Infamy/Renown template would be used (i.e., is it often enough to warrant its own?).
As an aside, when dealing with parser functions, a lot of the whitespace gets stripped, so I find it a lot cleaner and easier to read to toss out all those commented linebreaks used by all the older templates and use spaces to indent everything in a visually appealing way. Just food for thought as you continue testing.
Still no objections to the axing of the '-' parameter, though, so I guess we'll update (to whoever's version we decide) in a few days if no one else comments. Sethladan 11:19, 1 July 2012 (EDT)
I think every creep quest uses Infamy, and every freep quest (in the moors) use Renown. I should try stripping those comment from around the newlines. There was some reason for doing that - some kind of odd situation where the newline leaked through into an outer scope and messed that up, IIRC. RingTailCat (talk) 12:36, 1 July 2012 (EDT)
Updated my version to take Infamy and Renown, as well. I basically just added a switch at the beginning and fed Infamy, Renown, and all other reputations through different lines code that do almost exactly the same thing. It's not elegant, and if we were using a real programming language, I'd probably end up doing exactly what you did with variables and the like. I'll have to wait and see how yours looks without the comments, but what do you think about Category:Infamy Quests versus Category:Infamy Reputation Quests? I went ahead and coded the former in, thinking it's a better/more intuitive name, but it is a little extra work to do.
(Okay, next comment goes back to flush-left, heh. We need a rule of thumb for these indents) Sethladan 13:53, 1 July 2012 (EDT)

No further comments here, so I went ahead and updated all the quests using the old |-}} format that I could find and then added in these discussed changes. If stuff breaks, the "Blame" button is set to "Seth." Enjoy. :) Sethladan 18:13, 28 July 2012 (EDT)

There's an issue with this template, and I'm guessing it came from these changes. See the reputation reward at Quest: Passage into Dunland. Anything non-numeric typed in the reputation amount parameter returns a very frightening red warning to the page, for the display of both the icon and the rep amount. Leaving it with a pipe and nothing in the parameter breaks the inequality test. Removing the pipe completely so there's no parameter makes it display a rep gain of 0. I wasn't quite following this discussion, but the template needs to handle this error better. -- Elinnea (talk) 15:16, 12 November 2012 (EST)
I fixed Template:Quest Rep to handle question marks. It will not handle a missing or blank quantity. If you don't know the value, you have to put in the question mark. Unlike IXP and SXP, you can always determine the rep reward by looking at the completed quest log. I often use a partially filled in version of the quest boilerplate where I put question marks as place holders. Sometimes I forgot to fill in the rep reward amount, and saw that messy result - but never got around to fixing it in the template. The problem arises from using formatnum parser extension to make pretty numbers. It croaked on the question mark. RingTailCat (talk) 17:24, 12 November 2012 (EST)
Thanks for fixing it. It's all too easy to fill in a placeholder and forget to come back to it, so it's much nicer to leave it as a question mark, a polite invitation to the next passing editor to come and fill it in. - Elinnea (talk) 18:04, 12 November 2012 (EST)

Sort key

Would people mind if I removed the explicit {{PAGENAME}} from the categorisation to allow {{DEFAULTSORT}} to take effect? —NotACat (talk) 10:23, 14 August 2015 (UTC)

The two are unrelated. (At least as far as I know.)
DEFAULTSORT can (theoretically) be inserted anywhere on a page. However, I seem to remember a discussion about this some time ago. . . either it doesn't work; doesn't work as people expected or something weird.
I'll ask User_Talk:lotroadmin#Is DEFAULTSORT valid on this Media Wiki? if he recalls.
Other than that, what goal are you trying to accomplish?
This template - Quest Rep - would require a LOT of additional coding to define a "sortkey" for use with {{DEFAULTSORT:sortkey}}", which is the full syntax.
Wm Magill - Valamar - OTG/OTC - talk 23:55, 15 August 2015 (UTC)
{{DEFAULTSORT}} works just fine when no explicit sort key is given. Take a look at Category:Book 1 Quests, where the chapters are shown in proper order because I set up the {{DEFAULTSORT}} on those with single digits (like this) but the same pages in Category:Men of Bree Reputation Quests are not, because this template sets an explicit sort key (which is {{PAGENAME}}).
Far from requiring any additional coding, all that would be required is to remove {{PAGENAME}} from a couple of places where it appears as the explicit sort key in a category link.
HTH —NotACat (talk) 07:25, 17 August 2015 (UTC)