Module talk:Inventory slot/Aliases

Add "Any Wool Dye"
Can "Any Dye" also support bone meal, and "Any Wool Dye" be added to suppress the usage of bone meal? Basically like what was done with wool. --KnightMiner  (t 01:53, 6 July 2014 (UTC)


 * What about "Any Colored Dye"? –Matt ᐸ Talk Contribs ⎜ 06:08, 6 July 2014 (UTC)


 * That sounds good. The main thing I was asking for is since the definition of "Any Dye" would change, requiring many articles to update. --KnightMiner  (t 14:31, 6 July 2014 (UTC)

Fences/Fence Gates
With 1.8 it is possible to make more types of Fences and Fence Gates. Would be nice to have the following aliases :)


 * ['Any Wood Fence'] = 'Oak Fence; Spruce Fence; Birch Fence; Jungle Wood Fence; Acacia Fence; Dark Oak Fence',


 * ['Any Wood Fence Gate'] = 'Oak Fence Gate;Spruce Fence Gate;Birch Fence Gate;Jungle Fence Gate;Acacia Fence Gate;Dark Oak Fence Gate',

Oozebull (talk) 19:50, 7 August 2014 (UTC)


 * . I removed the "Wood" from the names, since that was the style mostly. Basically they are all called "wood type Fence" rather than "wood type wood Fence" --KnightMiner  (t 22:24, 7 August 2014 (UTC)


 * Surely you'd expect "Any Fence" to include Nether Brick Fence? If it's just going to have the wood ones, it should be called "Any Wood Fence". (Or maybe "Any wood Fence" since it isn't part of the name?) –Majr ᐸ Talk Contribs ⎜ 03:26, 8 August 2014 (UTC)


 * Maybe. Then again, for awhile both "Any Wool" and "Any Dye" both missed one. Then again, the goal was to switch away from that. I could switch it to that rather quick, since it is only used once so far.
 * I changed fences to now state wood, just in case we ever need "any Fence" for any fence. Are there plans to do the same to the article Fence, since the in game name now varies? (might bring it up over on fence) --KnightMiner  (t 13:32, 8 August 2014 (UTC)

Doors
Now multiple types of Wood Doors exist. I guess this alias is needed =)


 * ['Any Wood Door'] = 'Wooden Door;Spruce Door;Birch Door;Jungle Door;Acacia Door;Dark Oak Door'

Oozebull (talk) 15:47, 8 August 2014 (UTC)


 * Added as "Any wood Door" --KnightMiner  (t 17:07, 8 August 2014 (UTC)

Weird bug
There was a really weird bug in this that was causing "Script error" to display wherever   was used on this wiki. It had the following debug info: Lua error in Module:Grid/Aliases at line 224: bad argument #1 to 'insert' (table expected, got nil). Backtrace: (tail call): ? [C]: in function "insert" Module:Grid/Aliases:224: in function "init" package.lua:103: ? (tail call): ? (tail call): ? mw.lua:803: in function "loadData" Module:Grid:13: in function "cell" Module:Grid:344: in function "chunk" mw.lua:567: ? (tail call): ? [C]: in function "xpcall" MWServer.lua:87: in function "handleCall" MWServer.lua:301: in function "dispatch" MWServer.lua:40: in function "execute" mw_main.lua:7: in main chunk [C]: ? I managed to fix it by adding  after all the #1 arguments for all   calls (I couldn't find out where line 224 was because of the lack of a thing to show me line numbers that I could find)...can someone track down exactly where that particular table.insert call is and fix it? I tried my hardest and couldn't. You're welcome and thank you, AwesomeMan31415926 (profile|contribs) 04:56, 14 August 2015 (UTC)


 * It wasn't broken. You were seeing a cached version of a page from where it was broken while was making edits to it. –Majr ᐸ Talk Contribs 05:05, 14 August 2015 (UTC)

Colors abstraction
There are currently 8 objects listed here (Banners, Carpets, Shields, Stained Clay, Stained Glass, Stained Glass Panes, Wool, Firework Stars) which have "Any" modes in which they can be any of the 16 colors provided for via dyes (White, Orange, Magenta, Light Blue, Yellow, Lime, Pink, Gray, Light Gray, Cyan, Purple, Blue, Brown, Green, Red, Black). Of these, Firework Stars use a function to abstract this so that it's not necessary to physically list out all sixteen color varieties; it seems to me like this function should be generalized so it can also be applied to the other seven objects, as well as any new colored objects that may be added in the future. Similar handling could potentially be provided for wood objects (Fence Gates, Wood, Doors, Fences, Wood Planks, Wood Slabs, Wood Stairs) and types (Oak, Spruce, Birch, Jungle, Acacia, Dark Oak). I would give this a crack myself, but I'm nowhere near confident enough in Lua to risk monkeying around with something like this. 「 ディノ 奴 千？！ 」? · ☎ Dinoguy1000 12:53, 15 August 2015 (UTC)


 * . I had to use a separate loop from the firework star though, as in order to dynamically add the objects without excessively adding their name as a table, I add to loop through the items. I also added the wood stuff. – KnightMiner  t/c 15:00, 15 August 2015 (UTC)


 * Awesome, looks good. Thanks! =) 「 ディノ 奴 千？！ 」? · ☎ Dinoguy1000 07:01, 16 August 2015 (UTC)

Banners
Apparently there is no code for automatically generating aliases for each banner pattern (encompassing all colors), yet it is simple to code (I’m doing it for Russian wiki right now) and there is a mysterious “Any Banner” (with two spaces) alias in the beginning. Why is it not coded and what is that “Any Banner” thing? — NickTheRed37 (talk) 17:06, 15 April 2016 (UTC)


 * I can answer the second one; "Any Banner" is used as the ingredient in most (or all) banner recipes. Any Banner + Any Dye = Pale Sinister Banner, for instance. – Sealbudsman talk/contr 17:43, 15 April 2016 (UTC)


 * Ah, thanks. — NickTheRed37 (talk)</i> 17:56, 15 April 2016 (UTC)


 * The reason there are no color aliases for each of the banner patterns is since originally they were only used once (thus not really worth the additional length code to add them). When looping was added making the code easier to add, it technically could be added, but no one has bothered to since the alias would not be used that often to be noticed. – KnightMiner  t/c 20:35, 15 April 2016 (UTC)


 * The code would be as follows:

for _, pattern in ipairs(patterns) do local name = "Any " .. pattern .. " Banner" aliases[name] = {} for _, color in ipairs(colors) do table.insert(aliases[name], color .. " " .. pattern .. " Banner") end aliases[name] = table.concat(aliases[name], ";") end
 * — <b style="font-variant: small-caps; letter-spacing: 1px">NickTheRed37</b> (talk)</i> 17:38, 16 April 2016 (UTC)

Potions
In the game, potions include a time indicator. For example, potion of decay is displayed as. This should be implemented in the aliases. The BlobsPaper.png 20:57, 9 December 2016 (UTC)


 * . It would allow readers of the Wiki to quickly differentiate between potion lengths. I move for it to be added. Maethoredhel (t • c • Book.png) 21:01, 9 December 2016 (UTC)


 * too.    We'll need:
 * Proper aliases for each of the vanilla variants (there are 3 Strengths and it should be possible to specify them, right?),
 * A reasonable definition of what goes in the All Potions list.
 * Do all that also for Arrows, Splash Potions and Lingering Potions
 * Fix that weird purple shadow
 * It would be *so* nice to get glint on there ... but that's not within the scope of this – Sealbudsman <span style="transform: rotate(-16deg); display: inline-block; top: -1px; position: relative;">talk/contr 21:42, 9 December 2016 (UTC)
 * Applying the glow cannot be achieved here, but it can be achieved by reuploading the images. It should also be applied to enchanted books and enchanted golden apples.
 * I also agree that we should do this with tipped arrows, splash potions and lingering potions. The BlobsPaper.png 22:35, 9 December 2016 (UTC)


 * . As for the glint, the technology exists now (CSS masks are supported in FF/Chrome/Opera), but it hardly seems worth the effort. Maybe we could just apply a simple purple tint. –Majr ᐸ <small style=display:inline-block;line-height:9px;vertical-align:-3px>Talk Contribs 05:43, 11 December 2016 (UTC)
 * We don't want to mislead people into the idea that enchanted golden apples look like regular ones. The CSS does need to be applied. The BlobsPaper.png 05:51, 11 December 2016 (UTC)
 * What are the difficulties? Is it the two moving layers, or the fact that it's not wholly supported everywhere yet, or something? –  Sealbudsman <span style="transform: rotate(-16deg); display: inline-block; top: -1px; position: relative;">talk/contr 07:40, 11 December 2016 (UTC)
 * We should also implement the glint for Module:Sprite, particularly for ItemSprite., is this possible? The BlobsPaper.png 05:08, 12 December 2016 (UTC)
 * The difficulty is primarily capturing a transparent looping image of the glint effect, since it's a randomly generated effect from a source image that could possibly take a long time before it loops. Then we'd need to have a script to animate it, since it needs to be partially transparent (so a GIF is out of the question), and that's assuming that CSS masks will even work properly with a spritesheet. It's a lot of work for very minimal benefit (and it won't work on old browsers + edge and some mobile browsers maybe), hence why we haven't done it all these years, and why I'm suggesting a simple purple tint to represent it instead. –Majr ᐸ <small style=display:inline-block;line-height:9px;vertical-align:-3px>Talk Contribs 09:43, 12 December 2016 (UTC)
 * I see. I just played around with it, and I'm not too sure even overlaying a static mask over an arbitrary sprite, having it respect the transparency of the sprite, is a possible thing. Would you accomplish it rather by just uploading new sprites? –  Sealbudsman <span style="transform: rotate(-16deg); display: inline-block; top: -1px; position: relative;">talk/contr 17:33, 12 December 2016 (UTC)
 * We'll want extended variants as well, right? versus  –  Sealbudsman <span style="transform: rotate(-16deg); display: inline-block; top: -1px; position: relative;">talk/contr 07:40, 11 December 2016 (UTC)
 * Yes we do. The BlobsPaper.png 14:45, 11 December 2016 (UTC)