Template talk:Value

From Terraria Wiki
Jump to navigation Jump to search

Template broken, proposing replacement

The template is arguably broken:

Broken

EDIT: The template has since been repaired, "correcting" these broken examples.

  • For starters, it breaks the line in sentences: "This is worth 1 GC, right"
  • Second, it doesn't work in bullet lists:
    • 1 GC
  • Lastly, it creates paragraphs, and bloats tables:
Fish 1 CC

I can fix it, but I would also like to propose an alternative: User:Happypal/Value. It replaces the text with smaller Coin icons:

Fixed + icon proposal

  • Inside a sentence: "This is worth 1 Gold Coin.png, right"
  • Bullet lists:
    • 1 Gold Coin.png
  • Paragraphs:
Fish 1 Copper Coin.png

Rest of Conversation

So yeah, should I just fix it, or should I also use my icon scheme? happypal (talk • contribs) 13:26, 31 May 2011 (UTC)

yes, something should get fixed now. The least disruptive fix would be to put spaces between each item of the current template and remove the line breaks. While i like the look and usage of your template, I'm not a huge fan of the template+sub-template system you have there. --JonTheMon 14:54, 31 May 2011 (UTC)
Meh, it was to allow a null value, but in the end, I'll import it only as a single template. happypal (talk • contribs) 14:58, 31 May 2011 (UTC)
There, I got it to work on a single template. I'll fix the template later tonight, and if I get more positive feedback, I'll "upgrade" it to the icon view, sometime later. happypal (talk • contribs) 15:11, 31 May 2011 (UTC)
I like what you have done, and the options you have incorporated. Good work! -- Wynthyst File:Curseicon.png talk 12:12, 3 June 2011 (UTC)
I'm still on the fence about using icons by default, but at least the great part about a template is that we can change it. happypal (talk • contribs) 12:16, 3 June 2011 (UTC)

Reverse parameter order

I think it would make more sense if the parameter order was Copper|Silver|Gold|Platinum. It shortens the text needed since most prices are in the copper-silver range. Plus, I'm not sure Platinum will get much use as I don't know of any item worth more than 99 gold. ~Markus 12:22, 3 June 2011 (UTC)

Current order seems to make more sense since it's closer to the decimal system you use in real life. If the price is less than a platinum coin, it's just omitted anyway. Can't see a problem here --The dnmr 12:35, 3 June 2011 (UTC)
I can see it either way I guess. Just keep in mind it is already in production. Changing it now would require editing pages, as well as bother users who are used to the current scheme. happypal (talk • contribs) 12:44, 3 June 2011 (UTC)
I'm sure it would be so difficult to edit the 10 pages it's on. The problem, dnmr, is one of semantics, not formatting. I don't see why I should have to type {{Value|0|0|0|50}} to get 50 CC when it would be easier to type {{Value|50}} and be done with it. Proper variables could always be added such that {{Value|0|0|0|50}} and {{Value|c=50}} are identical. This would probably increase the self-description of the template in the field and remove the need to edit existing templates. ~Markus 13:11, 3 June 2011 (UTC)
Don't be rude. It's not that difficult no, but it does require a minimal amount of effort. a minimal amount of effort here, there, then everywhere does end up being a big effort. I can propose you use explicitly numbered parameters like this:
{{Value|4=50}}
50 CC
Don't ask me to mix named parameters though (ie t= instead of 4=), as that would actually add quite some complexity the template. On the bright side though, the "Wrong order" does have the bright side of making Platinum rank 1 :) happypal (talk • contribs) 13:24, 3 June 2011 (UTC)
It actually isn't overly hard to mix names and positional variables. One other possibility to consider is having the template only accept the value in copper, so for 5 silver you'd use {{value|500}} --JonTheMon 13:35, 3 June 2011 (UTC)
It's hard if the user decides to get fancy, and writes, say {{value||g=1||1}}: That "1" in the fourth slot would actually be the third parameter... on the other hand {{value||2=1||1}} remains correct.
{{value|500}} is an idea, but I don't like the idea of thinking about how many 0's I need to add for 50 Gold.
I think explicitly numbered parameters is both simple and convenient. happypal (talk • contribs) 13:46, 3 June 2011 (UTC)


Feedback

I think this looks great! Are we going to add the sale price of all items? --GauHelldragon 10:36, 14 June 2011 (UTC)

I'm currently working on adding the "Value" of all items. You can participate if you want, you have to fill the template:item infobox fields "valX" like here. happypal (talk • contribs) 10:39, 14 June 2011 (UTC)
Should I add it to items that are not sold, and just use their sale price x5...? or just say 'Sale Price' instead of 'Value'?--GauHelldragon 10:42, 14 June 2011 (UTC)
Well, technically, Value isn't exactly the sell price x5, as the sell price is the Value/5 rounded down. The typical example is Musket ball: The Value of "Musket Ball" is 8: If you sell 1 it'll sell for 1 copper, but if you sell 2, you'll get 3 copper. This is why I pushed to display "Value", instead of an approximate sell price... AFAIK, Musket Ball is one of the only items where this applies. happypal (talk • contribs) 11:57, 14 June 2011 (UTC)