Template talk:Item

From Wurmpedia
Revision as of 21:07, 8 December 2020 by NeeNee (talk | contribs) (Cleaning up red links, no other changes)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Are there any objections to adding a "Stats" section to the template with information like weight, volume, damage type (for items that can be used as weapons), and any other important stats people can think of? - Telarin

I would rather see a second template for such info - KaiH (talk) 11:57, 22 November 2012 (CST)

Anyone objecting to renaming this template to "Crafted" or "Craftable", since crafted items is what it really is about. My brain keeps demanding that I do it... Arvid 16:29, 15 May 2010 (UTC)

Also I'd really like to rename the categories of "Blacksmithing items" and "Carpentry items" etc. to "Blacksmithing products" and "Carpentry products" etc. Arvid 16:29, 15 May 2010 (UTC)

Bump

If I do not see any objections I will make a mess of this wiki Arvid 03:16, 17 May 2010 (UTC)

No objections --Manny 08:19, 17 May 2010 (UTC)

Image file format

Why did you make the image file format default to JPG? There are next to none jpeg format image files, if any, at least I can't find any File entries in the history for the past 30 days / 500 entries. Resulting in disabling any item template on the wiki showing an image.

The portable network graphics format has been used throughout the wiki, they're of good image quality and moderate file size if the images are saved correctly. I can't see a lot of jpeg format files being uploaded any time soon. A consistent transition would be if the existing png image files were converted and uploaded in advance instead. But then again, for what reason? --Ulviirala 21:42, 24 May 2010 (UTC)

I changed it based on the following correspondence with MrBloodworth:

Quote from: Arvid on 11 May 2010, 06:54:47 How about I make the preferred image format = jpg? Isn't that usually better with regard to the size of the images/screenshots we normally need?

MrBloodworth: Yes, its is the preferred image type for web images and photographs. PNG limits the colors.

I think MrBloodworth has also mentioned something about providing rendered (outside the game) images like he did with the new streetlamps. I was sort of waiting for that (taking in mind that he's busy with other jobs too).

Also I feel many of the images allready on the wiki are too dark and that the items in them doesn't really stand out too well from the background. I many cases I find myself having to strain my eyes a bit much to see what's actually in them (especially regarding the thumbnails). I'd appreciate if contributors would make an effort to provide screenshots taken in bright daylight and where appropriate with sand or similar as background.

If people really feel like, of course we could change the image format back. Arvid 12:42, 25 May 2010 (UTC)

There is zero reason to use PNG over jpg in this situation, all PNG is doing (and has done) on many images is skew and limit the colors. When i got here, for some reasion most players and users think PNG is best, this is a falsehood that seems to have been ingrained into the player base. The only reason to use PNG at this point, is because we have the images already in that format, moving forward JPEG should be used. If i had upload rights, I would have already converted them, all renders from me in the future will be Jpeg, except in the rare occasion we need a transparency.Mrbloodworth


I've talked to MrB and although I don't think that any of the formats could be prefered over the other, I'm okay with uploading future screenshots in the jpeg image format. File size and quality heavily depend on the compression level and type though, you can create a perfect, lossless, large jpeg image or a shabby, compressedtohellandback, tiny jpeg image. While perfect, a png is somewhat larger. Small screenshots don't really suffer from an optimized palette which brings it up to par in file size anyway. So I don't buy the file size or "prefered for web images and photographs" reason just "because everyone is using it". As if a photographer would know about the data compression techniques of image file formats. While this might sound a bit bold, I feel confident about it.

He also said that it was unintended that no more images could be displayed by changing the template because the jpg doesn't exist. After some research I think it might be possible to add a conditional statement that displays an existing JPG or fallback to the PNG version of the image if one exists. I will try to make it happen but can't promise it'll work :) --Ulviirala 06:25, 27 May 2010 (UTC)


Oh that went faster than I expected, I managed to make it happen. I would still choose the Image:Small padlock.png (256 colours optimized octree palette @ 40kb) over the the Image:Small padlock.jpg (compression level 10 (closer to "best quality") at 12kb) though. When comparing both images thoroughful, you will notice the jpeg "smudging" around all edges caused by the compression which only at compression level 1 (37kb image) disappears in this picture. This is why I personally prefer PNG anytime which also has been developed for a web standard. Please consider the course of action for images. --Ulviirala 07:01, 27 May 2010 (UTC)


Aight, this might be the final edit. Unfortunately I couldn't come up with something cleaner and more efficient but it will do the job of helping in the change. Feel free to optimize this if you're more familiar with the wiki markups :)

{{#ifexist: Image:{{{name|{{PAGENAME}}}}}.{{{imagetype|jpg}}}
    | [[Image: {{{image|{{{name|{{PAGENAME}}}}}.{{{imagetype|jpg}}}}}}|center|90px|A {{{name|{{PAGENAME}}}}}]]
    | {{#ifexist: Image:{{{name|{{PAGENAME}}}}}.{{{imagetype|png}}}
        | [[Image: {{{image|{{{name|{{PAGENAME}}}}}.{{{imagetype|png}}}}}}|center|90px|A {{{name|{{PAGENAME}}}}}]]
        | [[Image: {{{image|{{{name|{{PAGENAME}}}}}.{{{imagetype|jpg}}}}}}|center|90px|A {{{name|{{PAGENAME}}}}}]]
    }}
}}

The Pseudocode for this is:

IF a JPG image exists THEN
    Display the JPG
ELSE
    IF PNG image exists THEN
        Display the PNG
    ELSE
        Display redlink for JPG

It turned out to be nested to finally display a redlink for a jpeg when no images exist, so nobody uploads another png instead. I couldn't find any documentation on the imagetype keyword at all so I don't know if this could be written more tidy. :\ --Ulviirala 09:48, 28 May 2010 (UTC)

Lol, imagetype is a variable I included to make it possible to use any imageformat. I guess it's not really needed anymore and so can safely be removed. I originally attempted to do what you did, but found that my brain at that time wasn't quite sharp enough to grasp the intricasies needed. So thank you very much for your work here. It is very much appreciated. Arvid 14:19, 28 May 2010 (UTC)

Hmm.. right now I'd appreciate if you remove that variable, since atm it will take me some time to wholly grasp that code :/. Arvid 14:24, 28 May 2010 (UTC)

Oohhh now I get it >_< it's { { { variablename | default value } } } so it either takes the specified value for variablename or default value. I thought it was a parser function and it would evaluate all image format file extensions, because for example a jpg's file extenstion can be either .jpg or .jpeg. Now I can make much more sense of it! And this code wouldn't work very well either! :D Oh well, wiki markup sure likes brackets eh. I edited it so it should work better now but it still looks sorta twisted. --Ulviirala 17:11, 29 May 2010 (UTC)

I don't know what is wrong, but this template adds redlinks on Special:WantedPages for the not used *.jpg/*.png even if one of them is existing. Could someone with more knowledge in 'Wiki markup language' check the code and hopefully fix it? - KaiH 11:56, 7 August 2011 (UTC)

It looks like this cannot be fixed. It seems to add it to the wanted pages when it checks if it exists, regardless if it exists or not. --Manny 14:03, 7 August 2011 (UTC)
Switching the item template to only JPG would remove the need for this template, but that will require quite some work. Mediawiki has a bugzilla report on this but nothing has been done about it for years --Manny 14:43, 7 August 2011 (UTC)
Thank you for looking into it, Manny. Leaves us to the workaround to add |image=imagename.jpg (or *.png) to the item page whenever there is an image added, at least that removes the entry on the WantedPages. - KaiH 16:32, 7 August 2011 (UTC)

Needs Image Category

Is it possible to automaticly include the Needsimage template if the redlink for the image is shown or adding it to Category:Needs image? --Ago 01:37, 17 September 2010 (UTC)

Yes. Category:Needs image is now added to all item pages missing an image :). Arvid 09:17, 28 November 2010 (UTC)

Rare

Would anyone object to me adding a rare parameter to describe the possible bonuses experienced when using a rare? --Marni (talk) 08:52, 4 January 2013 (CST)

I'm not sure that fits in the template, which is all about creation and improvement and less about use. But the information from rare should definitely go somewhere on each item page. thorgot (talk) 11:12, 4 January 2013 (CST)
Understandable. I'll make a smaller template to describe rare-itivity. Maybe having a section for each level of rareness. (Did I just make up some new words?) --Marni (talk) 06:30, 6 January 2013 (CST)

Numbering not working

# [[Activate]] a {{{active}}}
# Right-click a {{{passive}}}
{{#if:{{{assemble|}}}|#{{{assemble}}}}}
{{#if:{{{group|}}}|# Open submenu "Create > [[{{{group}}}]]"}}

The above code is not continuing the numbering in the creation section of the template. Could someone please take a look? --Marni (talk) 09:03, 4 January 2013 (CST)

The fishing rod page seems fine. I get
1. Activate a fishing line (regular)
2. Right-click a shaft (1.00 kg)
3. Use the String action to complete the rod
--Ago (talk) 11:52, 4 January 2013 (CST)
Already fixed by thorgot --Ago (talk) 12:05, 4 January 2013 (CST)

I was in the middle of fixing it. I couldn't get assemble and group showing up on the list without the other breaking, so I gave up and switched it to an HTML list. --thorgot (talk) 12:09, 4 January 2013 (CST)

Added decoration and storage params, made switches case-insensitive, combined with Template:ItemM

I was asked to make this change, I tested it a lot and there are no pages I can find that look any different or are broken unless the new parameters are used. I also combined Template:ItemM with this one so the fences no longer need their own template. If there are any objections please say so. --NESGamepro (talk) 15:18, 18 August 2013 (CEST)