Template talk:Lootbox

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

Hm, need to sort out namespace issues I think... --Xander 13:29, 25 March 2008 (PDT)

ok it didnt like {{PAGENAME}}-stuff... --Xander 14:30, 25 March 2008 (PDT)

Links don't work right

When you embed this template on another page and you try to click the name of an item in the Lootbox to go to it, the link doesn't work right. Instead it takes you to an editing page for the current page you're on (see General Talug for an example). Anyone know how to fix that? --Gaerlin 19:05, 6 November 2009 (UTC)

Fixed on General Talug - take a look at the change I made to Item: General Talug's Armour to see how it works. The PAGENAME bit is what causes the problem; since using an apostrophe messes things up, you need that escape character sequence. Most efficient way to do that is replace PAGENAME with subst:PAGENAME. I was very proud of myself when I figured this out a few weeks ago, hahah. Sethladan 14:29, 2 December 2010 (EST)

Broken for Some Items

I don't know if it should work or not but tried to add some items to Fugitive Bruiser and could not have Item:Talisman of the Raven Recipe inside the lootbox :( this is the result:
--Zimoon 17:02, 15 November 2011 (EST)

Looks like Amphoras fixed it - it may be that BoD went haywire on recipes, heh. Are you sure you want to add recipes to mob drops, though? Sethladan 18:53, 15 November 2011 (EST)
Why not? Those mobs indeed dropped some recipes, I guess some crafters (me included) want to know possible ways to obtain them. Or do you mean that all or some recipes are spread out all over all or some mobs(/creatures?) for the level the recipes pertain (or other levels?) to so the information will be overwhelming and redundant? If so it would be good to have a generic article that explains these conditions, right? And then your objection is definitely relevant and I concur :) -- Zimoon 07:42, 16 November 2011 (EST)
I do mean the latter case, and you're right that we do need some sort of general drop info table about that... It's the same as the dropped uncommon items, I guess - dropped from humanoid mobs in a certain level range. I will leave that work to the more creature-inclined folk, heheh. Sethladan 14:31, 16 November 2011 (EST)

New version of template using Has Drop property

I investigated converting Lootbox template calls using my bot. While workable, it causes irreversible (or at least not easily reversed) changes in a very large number of pages.

The Lootbox template is a old and familiar mechanism for recording and organizing mob drops. Therefore, I experimented with rewriting this template to generate the new style dropped item listing and to generate the Has Drop property references. This effort has been successful, and I offer an example, and two new templates for your review.

  • User:RingTailCat/Sandbox-15 - a candidate repacement for this template.
  • User:RingTailCat/Sandbox-16Template:Lootitem]] - a helper template used by the lootbox replacement template.
  • User:RingTailCat/Sandbox-17Template:Lootitems - the test bed, a copy of Southern Raider#Drops.

Note that the specific format of the drop item is controlled by the mode parameter to the item used as a template which is only used in the helper template. Switching the display format requires editing one word in one template. Should be decide to use icon+name instead of the current icon-only display, this change is very easy to implement.

I encourage all our active editors to try out the new template. On a mob or raid page, replace every reference to the Lootbox template with User:RingTailCat/Sandbox-15, and preview the page. If the page displays an error, or does not look the way it should, please post here. If it looks ok, you may also post here. It's up to you if you save the modified page, bearing in mind that you will need to change it back, if we adopt this replacement template.

When a consensus is reached, and all bugs ironed out of the new template, I propose to save the existing Lootbox as LootboxOld and rename or copy my template to this page.

- RingTailCat (talk) 16:02, 4 June 2013 (EDT)

Just gave it a quick test on a random mob page and everything seemed cosher -- said mob showed up exactly as it should on the ask query as well. Something I am wondering though...is this lootbox ONLY used on mob pages for drops, or for other things as well? Will try to shuffle through pages using it currently and see if I can answer my own question ... otherwise this an easy thump of approval from me.
--Savi (talk) 16:25, 4 June 2013 (EDT)
I do indeed see several other uses...talk pages, item pages, even a quest page...because of that...would it possibly be better/less confusing to use your template under a new name, LootboxIcon or something, rather than changing the current to LootboxOld? Basically I'm just iffy on the template name changes...the template itself is great! and I heartily support it :)
--Savi (talk) 16:34, 4 June 2013 (EDT)
The one quest: Quest:Cease and Desist was using lootbox in error. It should have used the reward template. I fixed it.
Lootbox is used by some multi-output recipe items: Item Pages that link to "Template:Lootbox".
Talk pages are just that. I'm not worried about changing them.
It is hard to distinguish the mob pages from the raid pages, unless you recognize the names. Raid pages basically use the lootbox template in the same way as the mob pages, but to display the contents of the raid reward chests rather than a mobs drop-on-defeat items.
- RingTailCat (talk) 16:53, 4 June 2013 (EDT)
Looks like several different armour sets use it as well, but not sure that would necessarily be an issue either...if all locations are changed though...that means the property is applied to those other places where it shouldn't be...which means some Item page queries may be rather odd looking...but those could be changed manually afterward I suppose...
--Savi (talk) 17:05, 4 June 2013 (EDT)
I have renamed my test template pages to Template:Lootitems and Template:Lootitem, and modified the test page User:RingTailCat/Sandbox-15 to use these new templates.
I have created and tested, but not run, a bot to convert all references to the Template:Lootbox on pages in the Category:Creatures category tree. I'm welcome to feedback and suggestions as to how long I should wait before running it.
I also added code to Template:Lootitems and Template:Lootbox to display an error message and put the page into Category:Pages With Too Many Template Parameters when too many items are provided to the template. Note that this category page does not need to exist in order to use Special:WhatLinksHere/Category:Pages_With_Too_Many_Template_Parameters to find pages that link to it. At present, both allow a maximum of 30 items. Previously, items in excess of 30 were silently ignored.
- RingTailCat (talk) 08:32, 5 June 2013 (EDT)
Been applying your new template and things are working well so far -- one thing I did notice, if you name the first lootitems set it pushes it down from the section heading. For example, a named one listed at Dark-wing Spy vs an unnamed one at Dark-wing Scout. Is that possible to adjust? I'm afraid I'm rather clueless on template building myself.
--Savi (talk) 11:05, 5 June 2013 (EDT)
I've tried to get rid of that blank line several ways. So far, without success. I need to be able to detect that I am at the start of a line, i.e., at the right margin of the page, so I can suppress an unnecessary HTML break command.
- RingTailCat (talk) 12:54, 5 June 2013 (EDT)
Sorry... this past week or so has been busy with RL "issues." I have to catch-up... Wm Magill - Valamar - OTG/OTC - talk 15:01, 9 June 2013 (EDT)

Updated visual

Working through things at Template:Creature (See Template_talk:Creature#A_New_Look), and will update the visual here as well. It will basically be exactly what was set up on Template:Lootitems but without the use of property tags. (As they are currently disabled, perhaps added in future if they are stabalized). See discussion just above this for additional information. The changes will be applied here and on the Template:Lootbox/Row. I have tested the changes on my sandbox. If you care to preview them, go to a random mob page (Southern Raider for example) and put "User:Savitara/Sandbox8" in place of "Lootbox" inside the template tags. I will plan on saving those changes over later tonight unless there are any objections, or if someone sees some issue I missed. --Savi (talk) 18:28, 13 January 2014 (UTC)

Wanted: Do Nothing if no Arguments Given

It would be neat if this template added absolutely nothing, not even a new-line, if no arguments are given.

If that would be the case, boilerplate code such as Help:Creatures#Additional Information, second half of that section, would work out of the box. Today one has to either remove currently unused entries of this template, or leaving them as a comment. Neither is perfect.

Unused sections may very well come into use, when the next player happens to loot something not previously recorded. I run into that quite often, now having to copy&paste another entry of this template. Any convenience editors can get is warmly welcomed, right?

However, I recently "fixed" the Creature boilerplate to have one blank line between template entries, according to the intention that becomes visible if using "caption" but otherwise is ignored, likely not on purpose. Those blank lines should instead be inserted by this template above the items, if any arguments are given. (A bot can then easily remove any manually added blank lines above this template.)

Or are there any other thoughts or objection about these suggestions? — Zimoon 22:57, 5 June 2022 (UTC)

No objections raised in a week's time so I will see what I can do to fix this nuisance. — Zimoon 21:42, 14 June 2022 (UTC)