TibiaWiki
Advertisement

Template:Trades[]

I haven't yet applied this anywhere, but would like to suggest that we change the template call from {{Trades/X}} to {{Trades|mode=X}}. As it stands, Template:Trades does nothing, although viewers might be inclined to think it functions as a backbone for the other templates, which it does not. Further, users (or at least I) would think Trades/Buy meant that the player is buying -- but it means the NPC is. The new template helps eliminate any confusion and does in a way act as a backbone for the other templates. I have made all necessary changes except implementing it. I would like your opinions on this before the whole database is changed to accommodate for the system in place. -- Sixorish 19:45, December 27, 2010 (UTC)


Go ahead, we don't want anyone to be confused with the buy/sell thing. -- Bennie (talk ~ fellows) 20:10, December 27, 2010 (UTC)


We should leave the buy and sell templates as they are as the template is from the perspective of the npc anyway. Plus currently the infobox says | = sells {{Trades/Sell=

Surely it makes it easier for the user to put sell in the sell and buy in the buy?
Craggles ಠ_ಠ TalkContribs 21:19, December 27, 2010 (UTC)


I considered that after I posted this, but then my arguments were in favor of changing it from buy -> buys as the third-person indicates we're not talking from the player's perspective (1st person), as the word buy does. What are your opinions on buy/buys then? -- Sixorish 21:37, December 27, 2010 (UTC)

Good idea.
Craggles ಠ_ಠ TalkContribs 23:14, December 27, 2010 (UTC)

I made some changes to the sell template, it now allows to show a different text for the item link and the target, everything seems to be backwards compatible. I will implement this for buy template when I have time. --Daniel Letalis 04:59, February 17, 2011 (UTC)

Item template communication[]

So, trying to accelerate this project a little further, I noticed that we are mostly trying to workaround a single problem: our templates do not offer much in terms of template communication. The template offers the ability to accept a single List variable - and that's all we have to work with. I think adding a little more would easily circumvent the issues we are faced in this project from a technical perspective. Sadly, such a change would involve a mass-edit of every single item page because the change I am proposing is changing the first line of all item pages from

{{Infobox_Item|List={{{1|}}}|GetValue={{{GetValue|}}}

to

{{Infobox_Item|List={{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}

...and a minor adjustment to Template:Infobox Item to support these extra variables.

This would allow us to pass variables as well as specify a list template. For example, if an NPC page transcludes an item page, there is no way for it to signal that the NPC's name is Sam, something that must be done using {{PAGENAME}}.

Regarding GetValue - we would replace this using ...|List=GetValue|name|... to achieve the same effect.

I'm not sure if any pages would be broken with this change, but we will at least need to check if any pages are using the GetValue parameter. -- Sixorish 05:01, May 19, 2011 (UTC)

Liquids[]

With the new template I'd like to know your opinions on this: -.->{{ GetClass|template=GetTable

Mug has an NPC price of 4 so this template lists a value of 4. However Beer can be bought for less than 4gp so it isn't the best value if you were to buy it for the liquid.

So the question is: should we use Beer "in a mug" or Mug "with beer" in the template?

I'm not sure exactly of the price variations across NPCs but two examples I can think of:

  • Satsu sells Cocktail Glasses, all 52gp, with different liquids, so it would seem we should use cocktail glass NPC price here.
  • all general equipment NPCs sell oil for 20gp, but Sandra sells Water (Liquid) in a vial for 8gp, so the general equipment NPCs will never have their oil shaded green even though it's the cheapest oil you will find. Here it seems like Oil should be used for npc price...

Thoughts? -- Sixorish 15:34, January 6, 2012 (UTC)


Does the green background mean it is the cheapest price for this particular item? Is it automatically added? -- Bennie (talk ~ fellows) 18:39, January 6, 2012 (UTC)


Yes it's automatically added, it uses green background if and only if there are no exceptions (as defined by : [val], as, Mug: 50). We assume here that the best deal == npcvalue / npcprice. It does not load data from item pages, there's a constant list of values on Template:Price to Sell. (this is because loading 50+ pages will take a huge amount of time to render, which we are desperately trying to avoid). -- Sixorish 18:57, January 6, 2012 (UTC)

Advertisement