![]() |
VOOZH | about |
i tried to sue this module for my server wiki and i don't have a background / text police , why i can forget --Thesweetiger (talk) 21:34, 2 February 2014 (UTC)
First, this Module needs to change from anyone can edit to registered users can edit, since any vandalism would affect almost every article. Second, is there a way to add Armor and tool damage bars currently or in the future? --KnightMiner (talk|contribs) 15:39, 11 February 2014 (UTC)
Banners got multiples of different ways they can be displayed in the inventory depending on what patterns are applied to it. Is there any reasonable ways to support this without having to upload loads of grid images for possible pattern/color combos? :P Oozebull (talk) 18:37, 11 August 2014 (UTC)
Would it be a good idea to modify the brewing layout from the vanilla layout slightly to allow an input and output slot? Issues would include possible confusion from readers as to its look in game, but it would solve the confusion caused by a lack of an input image. –KnightMiner (t·c) 04:46, 6 January 2015 (UTC)
{{Brewing Stand
|Input=;;Magma Cream;
|Output 2=;Akward Potion;Akward Potion;Potion of Fire Resistance
}}71.212.10.80 02:21, 25 April 2015 (UTC)
{{Brewing Stand
|Input=;;;;;;;;;;Redstone;;Redstone;Redstone;Redstone;Redstone;Redstone;Redstone;Redstone;Redstone;Redstone;Redstone;;;;;;;;;;;
|Output 2=;Any Potion;Any Potion;Any Potion
}}
Certain aliases, such as the music discs or the damaged tools simply repeat a pattern over and over again, causing redundancies in the alias module. That also prevents adding aliases for proper display of the banner pattern titles, as hundreds of them would be a pain to add and update.
A simple solution would be adding "special aliases", which would basically be aliases with a bit of logic rather than simple text return.
To enable this using the module [[Module:Grid/SpecialAliases]], I need the code
-- Comment this next line out if you're not using special aliases local specialAliases = require( 'Module:Grid/SpecialAliases' )
added after the original alias declaration on line 24, the code
if aliases or modAliases then
from line 33 changed to
if aliases or specialAliases or modAliases then
and the code
elseif specialAliases and specialAliases( id ) then alias = specialAliases( id )
added after line 47.
Because of the way it is coded, aliases take precedent over special aliases, causing alias to also act as a sort of "blacklist" for names that should not match the special aliases.
–KnightMiner (t·c) 19:31, 4 February 2015 (UTC)
/tp Majr ~ ~ ~ –KnightMiner (t·c) 17:29, 10 February 2015 (UTC)local aliases = [the normal table definition]
for _ in ipairs{ [list of banners] } do
table.insert( aliases, [banner stuff] )
end
[etc.]
return aliases
for _, colour in ipairs{ [colours] } do
for _, banner in ipairs{ [banner types] } do
table.insert( aliases, [colour .. banner] )
end
end
I think there should be a parameter {{{Inactive}}}, used for wether the process icon should be in its inactive state. This would allow you to show whether the process is at the beginning or the end. For the burning, you can use |fuelusage=fire (in-active), but this wouldn't work for the process because the image name puts inactive after the word process. There needs to be a way to put an inactive process.71.212.10.80 14:31, 28 April 2015 (UTC)
{{{changefuelstate}}} and {{{changeprocessState}}}. These parameters would change whether the process/fuelusage is active.67.160.25.176 22:39, 28 April 2015 (UTC)I think the background should be optional, meaning that the class "grid" would be removed. This would be useful if you want to customize the tooltip for some but not all of the images in an animation or want to change the different frames in different ways or if you just don't need the background. Note that using {{SimpleGrid}} does not count because it has a lot less features (some of the missing features include animation and aliases). There are 3 ways to achieve this:
return '<span class="grid">..'p.icon'...args[hidebackground]none.Please state your opinion.67.160.25.176 21:08, 20 May 2015 (UTC)
class=plain: 👁 Invicon Grass Block.png: Inventory sprite for Grass Block in Minecraft as shown in-game linking to Grass Block with description: Grass Blockargs[title], it activates all the frames.
<span class="grid animated">{{Inventory slot|Dirt|title=One of the main blocks|class=plain}}{{Inventory slot|Grass Block|class=plain}}</span>
{{Inventory slot|[A rock]Stone;[Grassy]Grass}} produces 👁 Invicon Stone.png: Inventory sprite for Stone in Minecraft as shown in-game linking to Stone with description: A rockWhere the prefix “Matching” is used? — Agent NickTheRed37 (talk) 16:26, 30 March 2016 (UTC)
There should be a function for customizing anvils. This way, an anvil screen can be displayed without uploading a file, and readers can hover over the item to see what it is. What do other users think? The Blobs👁 Image
02:43, 22 April 2016 (UTC)
Testcases:
{{Slot|[Dirt,3 s]Sand,2[Melon,4 s]}} → 👁 Invicon Sand.png: Inventory sprite for Sand in Minecraft as shown in-game linking to Sand with description: Dirt,3 s Melon,4 s{{Slot|Diamond[Chance to obtain is 0,02% (decimal comma)]}} → 👁 Invicon Diamond.png: Inventory sprite for Diamond in Minecraft as shown in-game linking to Diamond with description: Diamond Chance to obtain is 0,02% (decimal comma)Actual displayed amount should be 2 in the first case and 1 (not displayed) in the second case. Currently, 3 is displayed in the first case and 2 is displayed in the second case.
frame.num = math.floor( frameText:match( ',(%d+)' ) or 0 )
match looks for the first match, and a matching character sequence may be present in the tooltip title (or in the tooltip text, so we can't just iterate and pick the last match). Doesn't look to me like a really simple fix exists. --AttemptToCallNil (report bug, view backtrace) 10:35, 18 February 2018 (UTC)
Is there any way to add a custom image/item to a crafting recipe? For example.
{{Crafting Table
|A1= Sweet Berries |B1= Milk Bucket |C1= Sweet Berries
|A2= Egg |B2= Sugar |C2= Egg
|A3= Wheat |B3= Wheat |C3= Wheat
|Output= [[File:PancakeInvSprite.png]] (Pancake Stack)
}}
would output
with 👁 Image
in the output slot with the mouseover tag of "Pancake Stack".
I've tried to put only the image in, but it glitches out and states there's a problem with the module.
DarthKeidran (talk) 23:51, 15 April 2019 (UTC)
output=Pancake Stack. – Nixinova 👁 Image[[:File:Grid Pancake Stack.png]] into a redirect to your file, and now that crafting recipe works. – Nixinova 👁 ImageCurrently (as I pointed out on a discussion on Talk:Block), this template/module is not accessible to users using screen readers. While I'm pretty sure this is not the only accessibility problem with the wiki (e.g. abuse of definition lists, which seems to be a thing on most wikis), it's probably one that's easy to solve since it just requires fixing this module. And this isn't actually an issue exclusive to screen readers -- it also affects everyone's favorite[nb 1] terminal browser Lynx (only a few blocks actually show up - those with animations that are stored in separate files it seems).
Unfortunately, I'm not quite sure how to fix this. It seems like the key part of the issue is a lack of alt text on slots, but alt text is only available for regular images. That's presumably why it worked for fire and such, but nothing else. The spritesheets use a span tag, and that can't have alt text as best as I can tell; instead it's supposed to have text in the body. But that text is rendered over the image, which we don't want... I'm not sure how to go about fixing it. (It's worth noting that there is already a title element which does show up if JS is disabled (it's replaced by the minetip if JS is enabled, but the current behavior is progressive enhancement, so that's good), but screen readers don't use that.)
The other thing is the animation, which just doesn't provide useful results if JS is disabled; only the first item shows up. That's probably mostly OK for some things, but e.g. the block list requires seeing all of the blocks for things to be useful, and the same goes for recipes. For recipes, a valid (perhaps more useful) replacement would be the text "Any Planks" or such, though blocks don't need that. A relevant example is the info for command blocks, 👁 Invicon Command Block.png: Inventory sprite for Command Block in Minecraft as shown in-game linking to Command Block with description:
👁 Invicon Repeating Command Block.png: Inventory sprite for Repeating Command Block in Minecraft as shown in-game linking to Command Block with description:
👁 Invicon Chain Command Block.png: Inventory sprite for Chain Command Block in Minecraft as shown in-game linking to Command Block with description:
, which only shows up as "command block" if JS is disabled (though interestingly, lynx shows all 3, probably since it doesn't understand CSS either). The ideal way for these animated ones to be read in general is just to list all of them, possibly (particularly for recipes, but not for the blocks page) as "Slot containing Command Block[link] or Repeating Command Block[link] or Chain Command Block[link]".
With MC itself focusing on improving accessibility in the past few updates, we probably should to. I know that what I've written here is a bit of a mess, but hopefully it at least is a starting point. --Pokechu22 (talk) 18:48, 27 April 2019 (UTC)
There are quite a few areas where Inventory slot could see improvement.
First of all, when looping over aliasFrames, p.getAlias does some unnecessary duplication of alias data that is ultimately fetched from Module:Inventory slot/Aliases using mw.loadData, which is only meant to load it into Lua memory once. The cloning is done so that the expanded frames' title, text, mod and stack size parameters could be overridden with those of parentFrame; i. e. [Log]Any Log ({name = "Any Log", title = "Log"}) would give all the logs with "Log" instead of whatever titles the individual logs use. However, such use cases are definitely not common; most of the time aliases are used without additional parameters, so the function should just use the aliasFrame directly if none of parentFrame's extra fields are set.
More explanations are coming later because I don't have enough time to write them all right now; I'll leave a link at this page where I describe how the module works and some issues.
— BabylonAS 04:57, 25 September 2023 (UTC)
p.parseFrameText and p.makeFrame functions have many problems with special character processing. Some of them were mentioned above, but that's only a tip of the iceberg as things get funky when using colons or semicolons inside titles or subtext. Colons would confuse makeFrame as it doesn't check if the colon is inside square brackets, which means it could pull the mod's name out of the item's tooltip title, with the item's name starting after that colon and thus including part of the tooltip title as well. Moreover, spaces around commas and colons are trimmed away (it doesn't happen to aliases with colons because they are already in table form, meaning that makeFrame is not used in the first place). As for semicolons, p.parseFrameText likewise doesn't check for square brackets. I'm addressing some of these issues in my fork of Inventory slot (sandbox), which borrows some code written by AttemptToCallNil to deal with semicolons (used in the Russian version of Inventory slot that desperately needs a rebase).parseFrameText, there is a bug where this line attempts to compare the number of subframes with i which is not defined anywhere. That specific clause appears to only fire when the whole frame text consists of a subframe container and nothing else; i. e. surrounded by braces. In that case, i should mean the current frame index, and thus defined in line 285 in the for loop's header.makeFrame, it would be nice to have frame.num nillified if it equals 1, as a stack size of 1 would not be shown anyway. This would synergize with the getAlias optimization requested above.makeItem (line 92), the patterns for matching file extensions are incorrect as Lua patterns use percent signs instead of backslashes to escape special characters, in this case dots.makeFrame. But we need to make sure there are no remaining mod uses for Inventory slot.In particular, does this module except [square brackets] at all? --Simanelix (T|C) 19:31, 17 April 2024 (UTC)
Currently the module supports overriding title and lore for an icon in the frame string using square brackets, such as [&b&oSteamed Bun Invasion]v:Netherite Sword[&7Sharpness V/Looting III/Unbreaking III/Mending//When in Main Hand:/&2 11 Attack Damage/ 1.6 Attack Speed] for 👁 Invicon Netherite Sword.png: Inventory sprite for Netherite Sword in Minecraft as shown in-game linking to Netherite Sword with description: Steamed Bun Invasion Sharpness V Looting III Unbreaking III Mending When in Main Hand: 11 Attack Damage 1.6 Attack Speed
. The parser works with quite some issues as I’ve had to prepend v: (vanilla override) due to the presence of a colon in the lore, while whitespace before the attack numbers is gone due to overly aggressive trimming. RuMCW uses a more robust parser which is however more computationally expensive.
It’s been argued that the ability to use complex formatting in-line (instead of using aliases) is not really needed. I’m willing to debate that: title override could be useful in, for instance, version articles (example) to display names correct for those versions (do we really need to add aliases for every single historical name?). But I do agree that such cases are rare.
A possible solution is to implement a separate JSON mode which would have full support for frame settings (and translate seamlessly into the module’s internal table format) while removing support for square bracket syntax from the standard (or “easy mode”) string parser. However, how would the module understand it’s being fed JSON? Adding a separate parameter would require adding support for it in Module:UI, Module:Infobox etc. A possible alternative is implementing a special marker (like %JSON%:) that would precede the actual JSON string, but that’s a bit kludgy. BabylonAS 10:56, 17 January 2025 (UTC)
The alt text should simply be the item's name/description – e.g. the alt text of a Potion of Oozing slot:
👁 Invicon Potion of Oozing.png: Inventory sprite for Potion of Oozing in Minecraft as shown in-game linking to Potion of Oozing with description: Potion of Oozing Oozing (03:00)
should simply be "Potion of Oozing (3:00)", or something like that. Currently, though, the alt text of that slot is "Invicon Potion of Oozing.png: Inventory sprite for Potion of Oozing in Minecraft as shown in-game linking to Potion of Oozing with description: Potion of Oozing Oozing (03:00)" – which is way, way, too long! Alt text needs to be short and sweet so that screen readers don't spend too much time reading them out (see wikipedia:MOS:ALT). {{Lemondoge|Talk|Contributions}} 16:35, 3 December 2025 (UTC)