TibiaWiki
Advertisement

Hey, i am wondering what your exact goal is and if you would like any help. I have already gotten prices for some NPCs as of this update. --DM ><((°> Contribs <°))>< talk to me 19:04, December 23, 2010 (UTC)


I'm just going through the npcs checking the prices and seeing if they have any new items to buy or sell for TibiaWiki:NPC Trade Project. There's a bit of a discussion about it here as well incase you haven't seen it and of course, any help is welcome! :) Beejay 19:16, December 23, 2010 (UTC)


I am going through Ab NPCs and i think npcprice and npcvalue are mixed up on pages. I believe value is what the NPCs buys items for (what players sell for), and price is what they sell for (what players buy for). It is rather confusing. --DM ><((°> Contribs <°))>< talk to me 20:58, December 23, 2010 (UTC)


I know I made a few mistakes so I may have put the numbers in the value which was meant to be the price by accident. You are right about the npcvalue and npcprice, I know it's a bit confusing but I didn't do it deliberately, sorry about that. I figured that the mistakes I had made would soon show themselves in the new template, I'm not feeling too great so checking through the pages feels better for me than going down a long list. Beejay 01:07, December 24, 2010 (UTC)


This is funny, our brazilian friends are doing kinda the same and keeping the progress here. We can copy&paste info from them maybe.. -- Bennie (talk ~ fellows) 22:16, January 3, 2011 (UTC)


Dorbin[]

Somebody has striked out Dorbin as being done. I don't have the time right now to check him because his inventory is huge, but his article does not use the trades template. Could somebody else run to Yalahar and check if his list is accurate? Then Yalahar can be striked out, as I have completed them all on this list.

I am going to unstrike his name until someone can confirm his sell list is updated. -- Sixorish 00:47, January 4, 2011 (UTC)


Following what Sixorish has said, are all the ones which are striked out up-to-date with the NPC's wares? Beejay 00:25, January 31, 2011 (UTC)


I can personally account for all the cities i have added: Ab'Dendriel, Darashia, Venore, Dorbin (Yalahar), Edron, Carlin, and H.L. While i could have made mistakes, i did search line-by-line for each NPC, and in some cases found errors made by the code designers, such as an armor/legs/shield-only seller also selling some weapon. --DM ><((°> Contribs <°))>< talk to me 03:54, January 31, 2011 (UTC)



Footballs[]

I have a suggestion for example in Gorn, we should use something like this because football doesn't appear on npc trade window.

| sells = {{Trades/Sells |Basket ...|Worm }} <br /> Other items: {{Trades/Sells |Football }}

--Daniel Letalis 03:38, February 10, 2011 (UTC)


Good suggestion. I support this, although I do worry that there may be problems in the future, especially when the items->NPC price template is created. -- Sixorish 09:44, February 27, 2011 (UTC)


I've collected some NPC data but I'm not sure what to do with i.e Grizzly Adams and other npcs with conditions and "text" trades? I was thinking something like this for them:

'''Huntsman rank:'''<br />
{{Trades/Sells|Slingshot}}
'''Trophy Hunter rank:'''<br />
{{Trades/Sells|Demon Backpack}}

or for Telas:

'''Doing his quest:'''<br />
{{Trades/Buys|Ancient Stone|Battle Stone|Broken Gladiator Shield|Crystal of Balance|Crystal of Focus|Crystal of Power|Gear Crystal|Gear Wheel|Huge Chunk of Crude Iron|Metal Spike|Piece of Draconian Steel|Piece of Hell Steel|Piece of Hellfire Armor|Piece of Royal Steel|Shiny Stone|Sulphurous Stone|War Crystal}}
Saying sell '''item name''' to him:<br />
{{Trades/Buys|Crystal Pedestal}}

What you think? --Daniel Letalis 04:42, March 2, 2011 (UTC)

NPCs left[]

These NPCs have no trades template on them. Hopefully it can be used to determine which are updated and which are not.

A friend has done those marked with an asterisk, and they'll be uploaded shortly.

Also: this list includes only NPCs that Beejay listed on the table. There are apparently some NPCs who aren't on the list Beejay created. The creature product NPC in Tyrsung is not on, for example. I can't find a list at the moment, but it might be possible to generate a list since there exists Category:NPCs with Wares. -- Sixorish 09:44, February 27, 2011 (UTC)

A (more) comprehensive list of NPCs[]

Here's a more complete list of NPCs which need attention. NPCs marked with an asterisk require some vocation, quest or level.

Further, some furniture NPCs may require separation of Christmas items. See this list + their locations here: User:Sixorish/NPCs.

I will try to finish Rookgaard NPCs today, but I don't know how we will handle these, since at least historically they had unique prices.

So, what should we do for Rookgaard? Should we use the npcvaluerook, and how would we do this? -- Sixorish 04:33, March 7, 2011 (UTC)


Nilsor doesn't have trade window for his item. I will edit/check npcs now and compare the lists when finished, about rook npcs I think it should be the same but we need a parameter on the template so npcvaluerook/npcpricerook is taken instead. And about items that Raffael sell, I don't think they should have npcprice parameter but should they have npcpricerook or none? --Daniel Letalis 05:04, March 7, 2011 (UTC)


I really don't like Raffael's format but I don't understand how data will be extracted from the npc pages, if it will be by text manipulation maybe multiple templates can be processed. And it looks much better, i.e.

| sells = {{Trades/Sells |Backpack, 20 |Chain Armor, 200 |Fish, 3 |Fishing Rod, 150 |Ham, 8 |Health Potion, 45 |Leather Boots, 10 |Mana Potion, 50 |Meat, 5 |Plate Shield, 125 |Rope, 50 |Shovel, 50 |Torch, 2 |Worm, 1 }}
Only to premium players:{{Trades/Sells |Egg, 2 |Orange, 7 |Scarf, 15 |Viking Shield, 260 }}
One per character and premium players only, saying ''souvenir'':{{Trades/Sells |Oracle Figurine, 100 }}
Only to [[Knight]]s:{{Trades/Sells |Brass Armor, 450 |Brass Legs, 195 |Daramanian Mace, 500 |Jagged Sword, 500 |Soldier Helmet, 200 |Steel Axe, 500 |Steel Shield, 200 }}
Only to [[Paladin]]s:{{Trades/Sells |Arrow, 3 |Bow, 350 |Ranger's Cloak, 450 |Spear, 10 }}
Only to [[Druid]]s and [[Sorcerer]]s:{{Trades/Sells |Mage Hat, 450 |Magician's Robe, 150 }}

--Daniel Letalis 06:31, March 7, 2011 (UTC)


The plan was text manipulation, yes, but I'm open to ideas if you have them. I think the alternative names will hinder us here, though. About Raffael; that's why he was mentioned. I much prefer having his page use multiple templates, because it's easier to read (at least for me). We need a standard to use in each of these cases. -- Sixorish 07:22, March 7, 2011 (UTC)


I think text manipulation with wiki won't be possible even with no alternative names, string functions are not available for strings longer than 1,000 characters, but maybe there is another way to do it that I haven't thought.

Other option would be the use of bots(if still possible on wikia). --Daniel Letalis 19:36, March 7, 2011 (UTC)


I adjusted the comments on a few NPCs above: Yes, Velvet only sells pillows; You do have to ask Nilsor "waterskin". For Raffael, i was trying out the text manipulation, and i realize it does not look that good. An alternative would be splitting the lists by premium/vocation similar to Esrik. --DM ><((°> Contribs <°))>< talk to me 05:12, March 8, 2011 (UTC)


Bots may be a feasible option if we can't find a workaround to this 1000 character limit. The idea I have is that if we separate the string to use different string functions then we may be able to effectively bypass it. The Template:Trades/Sells template does not take one huge string - it takes several strings as different arguments. If we can create this to communicate with other templates we should be able to achieve some goal. -- Sixorish 04:50, March 9, 2011 (UTC)


An update: I played around this for a while but there was one problem I ran into and couldn't find a way around (tbh, I even forgot what it was). We first need to make an array such that price information is separated from the item's name (Sam, for example, has: |Chain Armor which would be changed to |Chain Armor |70). We would search each odd argument for the item's name (Chain Armor) and if found, return the location of the array (N), and then return {{{N+1}}} (the price). I think we can accomplish this, though I don't have a lot of time at the moment... perhaps someone else could try. -- Sixorish 10:54, March 20, 2011 (UTC)


I made some tests too and I think there is no way to do this with wiki markup, javascript is not an option because important info like this should be viewable even if javascript is disabled by the user. --Daniel Letalis 14:58, March 20, 2011 (UTC)


Is it possible for DPL to generate a table of these data? I'm not sure if DPL can be used to generate templates, but I'm sure it can substitute each variable onto a template.

I'm thinking of alternatives to using bots because of the huge maintenance tasks that would involve. -- Sixorish 06:34, March 28, 2011 (UTC)


o.o I maybe found a DPL solution, I will keep testing more, but my internet is having problems --Daniel Letalis 07:45, March 28, 2011 (UTC)


Ok now I'm not sure if this was what you wanted but check User:Daniel_Letalis/Football & User:Daniel_Letalis/Leather Boots, if you wanted to generate the list of npcs for each item page with dpl, even if it would be possible, the problem would be load times, like it is on Calculators/Lootdata --Daniel Letalis 08:44, March 28, 2011 (UTC)


Based on Category:NPCs_with_Wares and npcs listed on cities, I believe that only these npcs are left, they are spell sellers for knights and the first 2 also sell spells for paladins:

I have my doubts about some spell teacher NPCs, I will check when I can. --Daniel Letalis 07:16, March 31, 2011 (UTC)


I'll check some of the knight guild NPCs. Zarak is done, doing Zarak > Ormuhn > Razan > Trisha > Asrak > Duria. I'm pretty sure I already updated Gregor's list.

It looks like we might need to utilize DPL or bots. At the very least, if there is another way around it, we can find it later once we have updated NPCs. -- Sixorish 07:31, March 31, 2011 (UTC)

About editing items[]

Because there are many pages to edit, I think it is better to define a standard before start editing, so I suggest this.

Example, on Raffael page:

...
{{Trades/Sells |note=Only to [[Druid]]s and [[Sorcerer]]s|Mage Hat, 150 |Magician's Robe, 450}}
...

will output:

Only to Druids and Sorcerers:

Item Price (gp)
Mage Hat 150
Magician's Robe 450


And on Magician's Robe page:

|buyfrom  = {{Trades/Buyfrom|Raffael|Lailene}}

would output:

NPC Price City Notes
Raffael450 gpIsland of DestinyOnly to Druids and Sorcerers
Lailene450 gpEdron

About spells and runes, I think that maybe complete lists would be possible to be generated by adding a non optional parameter "vocation" to the "Teaches" template.

What do you think?

--Daniel Letalis 04:33, April 1, 2011 (UTC)


Okay, I like those options (it might also be a good idea to have a 'notes' column on NPC trade lists, but I think it will clutter the page). Regarding the spells: I think that we need more flexibility than the idea you are suggesting provides. The NPCs in Ab'Dendriel, for example, don't teach all spells. -- Sixorish 05:28, April 1, 2011 (UTC)


It seems that there is a problem with Trades/Buyfrom, Trades/Sellto, because it uses dpl data, most of the times it loads fast as it is cached, but sometimes the cache is not available, when there is no cache available pages may take some time to load, most extreme example could be Crowbar with around 1-2 minutes delay.

You can see the bad load time purging the page: [1]

I think that even using allowcachedresults=true in dpl the cache will expire once a day, and having this templates that make page loading time slow in over 1200 items would be really bad.

So I'm starting to think this won't be an option anymore.

--Daniel Letalis 22:07, April 6, 2011 (UTC)


Is there a way to substitute the DPL list to force it to generate a static list? I think that would involve creating a page for each item... Or we can just substitute it on the item page, formatted with the template it will use. It would require us to update it once every few updates as the NPCs change, but that shouldn't be a problem. -- Sixorish 22:15, April 6, 2011 (UTC)


Substitution would work but make the pages hard to edit, specially those items that can be sold/bought from many npcs.

Another idea that comes to my mind is to have 1 or 2 static lists with switches and all the item->npcs data there, I don't know if the parser would be able to handle it and having a list like that could be hard to mantain, or maybe no because it would be only 1 page to edit.

--Daniel Letalis 22:41, April 6, 2011 (UTC)


Nvm, now I think now I know what you thought. Maybe with that method there is a way to automatic generate npc names too, will test when I can. --Daniel Letalis 22:59, April 6, 2011 (UTC)


I'm thinking to edit Template:Infobox Item replacing this

{{{buyfrom|None.}}}

to this

{{#ifexist:{{PAGENAME}}/Buyfrom|{{:{{PAGENAME}}/Buyfrom}}|{{{buyfrom|None.}}} }}

and this

{{{sellto|None.}}}

to this

{{#ifexist:{{PAGENAME}}/Sellto|{{:{{PAGENAME}}/Sellto}}|{{{sellto|None.}}} }}

the Sellto and Buyfrom subpages would be generated with "safesubst" and a list of items-> npcs, but they need to be saved twice.

What you think? --Daniel Letalis 06:44, April 25, 2011 (UTC)


Will updating it be a problem? I think being on a subpage will result in it being edited less. If there's a clear link to edit or view the list subpages I would be fine with this. I'm not sure exactly sure what you mean or how safesubst works, could you try it on a sample page (it shouldn't break anything)? -- Sixorish 10:57, April 28, 2011 (UTC)


Do you see anything wrong with the pages I just created?

  • User:Sixorish/Test/Sam - tests whole inventory display
  • User:Sixorish/Test/Axe - tests single item selection, fetches data from User:Sixorish/Test/Sam/Buys directly (would change in the future).

I think these could be integrated without much problem, though each NPC would require their own subpages. -- Sixorish 14:13, April 28, 2011 (UTC)


Example generated subpage: Crowbar/Sellto (page deleted), check Template:Trades/Sellto for where data comes from. As it is generated maybe a small link could be added near the table that says "Review" (instead of edit) and links to the subpage. --Daniel Letalis 17:19, April 28, 2011 (UTC)


That's pretty cool, but I have some worries that this will be inconvenient. We'd have to make a huge maintenance effort to keep it updated, when this whole implementation was to minimize it. I think this is feasible only in the worst-case scenario, when nothing else will. -- Sixorish 09:34, April 29, 2011 (UTC)


Wiki system has many limitations, besides that wikia limits it a bit more and dpl is not good because performance, I believe that wiki bot, userscripts or something like this alternative would be all we got besides manual editing. Userscripts consume much time so maybe a bot would better. --Daniel Letalis 10:53, April 29, 2011 (UTC)


The problem I have with bots is that it would require expertise in programming to maintain it. Most of us don't have this expertise so it becomes an unreliable long-term solution. I'm also not sure we could keep up with a bot's edits if we use it to update many things. -- Sixorish 08:19, April 30, 2011 (UTC)

Advertisement