Forum rules: This forum is for writing guides only. Do not post topics here to ask questions; post these questions in General Discussion or the Support Tracker.

Do not post bugs here! Report bugs to our Issue Tracker
By Vikerus
#9341 So you have created a beautiful map and want a custom shop to go along with it but don't want to add another Mod to your Server? Well here I will be showing you step by step how to do this. Before we get started you will want to download the application NBTExplorer. Just Google the name if don't already have it.

Now onto the fun part. Click the spoilers under their descriptions to see a screen caption of what to do.


UPDATE: Now that you understand what you are doing, try using this : http://www.minecraftforum.net/topic/155 ... s-in-game/
This mod is called NBTedit-Ingame. And it will save you loads of time.

Adjusted In-Game values (outdated):
Spoiler:
Leppaberry - 12261
Oranberry - 12259
Rawstberry - 12260
Anvil Item - 10271
PC Item - 10269
Fossil Cleaner - 10284
Lucky Egg - 12257
Ever Stone - 12256
Trade Machine - 10272
Alum. Ingot - 10376
Alum. Plate - 10377
Wood Hammer - 10363
Stone Hammer - 10364
Iron Hammer - 10365
Gold Hammer - 10366
Diamond Hammer - 10367
Alum. Hammer - 10378
EXP Share - 12258
Rare Candy - 10261
Poke' ball - 8256
Great ball - 8257
Ultra ball - 8258
Dive ball - 8271
Dusk ball - 8274
Fast ball - 8266
Friend ball - 8262
Heal ball - 8273
Heavy ball - 8265
Level ball - 8260
Love ball - 8263
Luxury ball - 8272
Moon ball - 8261
Nest ball - 8269
Repeat ball - 8267
Safari ball - 8264
Timer ball - 8268
Premier ball - 8275
Iron base - 8326
Iron disk - 8327
Potion - 10262
Super potion - 10306
Hyper potion - 10307
Max potion - 10308
Antidote - 10314
Awakening - 10316
Burn Heal 10317
Ice Heal - 10318
Parlyz Heal - 10315
Elixir - 10311
Ether - 10309
Full Heal - 10319
Full Restore - 10313
Max Elixir - 10312
Max Ether - 10310
Fire Stone - 10264
Leaf Stone - 10268
Moon Stone - 10266
Thunder Stone - 10267
Water Stone - 10265
Armor fossil uncovered - 21362
Claw fossil uncovered - 21360
Cover fossil uncovered - 21364
Helix fossil uncovered - 21356
Old Amber uncovered - 21358
Plume fossil uncovered - 21363
Root fossil uncovered - 21359
Skull fossil uncovered - 21361


EDIT: Reworded and better explained.

1. Assuming you have your shop built and a fresh Villager spawned, he should offer you something like this:
Spoiler:
Image

2. To change the trades a Villager has we must edit the values using a program called NBTExplorer. Using this tool you will Select the map file that you wish to edit, expand it and highlight the regions Tab. Now navigate to the find option. Check the Value box and search for Villager:
Spoiler:
Image

3. Now that you have located the Villagers settings you should see something similar to this:
Spoiler:
Image

4. From here the process is pretty straight forward, expand the Offers tab and locate the entries under Recipes. To change the amount of something bought or sold by the Villager, Highlight the "Count" setting and hit the edit button. In this case we edit the amount of an item the Villager will be buying:
Spoiler:
Image

5. Now to edit What he will buy from a player simply highlight the id setting under buy, hit the edit button and find the appropriate id for the item you wish him to buy from players. Remember the buy Tab is what he buys, the sell is what he buys said item for. :
Spoiler:
Image


6. If you happen to spawn a villager who does not sell items you will have to make create the Offers by hand. This is easy. But does take a little longer. First highlight the entries tab of the villager you're editing, next find the add Compound Tag button. Click it and create an "Offers" tag:
Spoiler:
Image

7. Once you have created the Offers tag, highlight it by clicking and then locate the add List Tag button to the left of the add Compound Tag. Click it and create a List named "Recipes":
Spoiler:
Image

8. You can now create entries for your villager! From here, highlight the Recipes list you have just made and Click the add Compound Tag button. You wont get a dialog box this time. A new "entries" tab should be created under Recipes. You need to create a new entry tab for each buy/sell combination. Again the "buy" is the price for "sell" product. So buy= price, sell= product.
Spoiler:
Image

9. Highlight the new entries tab and once again hit the add Compound Tag button. Name the Tag/Tab "buy":
Spoiler:
Image

10. Repeat step 9. But name the next Tag sell.
Spoiler:
Image

11. Highlight either Tab; buy or sell. To create the "Count" entry that will tell the Villager how much of something to buy or sell, find and Click the add Byte Tag. Name this tag "Count" and edit as needed:
Spoiler:
Image

12. Though this step might not be needed, I do suggest it. While the buy or sell tag is still highlighted, click the add Short Tag button that is to the right of the add Byte Tag button. Name this new short tag "Damage" and leave it at 0. :
Spoiler:
Image

13. You will now have two entries under the buy or sell Tags. The last step is to create the entry telling the Villager What he buys or sells. To do this Click the add Short Tag button again and this time name it "id" from here edit as needed. :
Spoiler:
Image

Well done! With any luck you have now customized a Villagers trading system to fit your specific needs! Now keep in mind that when you want to have them buy or sell an item from the Pixelmon mod ( Find the ID's in your pixelmon.cfg ) You must add 256 to the ID value. So for example; if you want the villager to sell pokeballs you will edit the "id" entry under the sell Tab as follows, since we know the ID for Poke'balls is 8000 simply add 256 to get 8256 as the real in game value. You will also have to set the maxUses to 999999 so you won't run out trades.


Thanks for listening, and I wish you success in your future Poke'Mart creation!

User avatar
By ryik
#9775 That was quite helpful.

Question though: does maxUses and uses mean anything? I assumed them to be the limit on how much times an item could be sold (villagers can only sell an item a certain amount of times, it is then locked out and a different item must be bought in order for the first item to become available again) and thus deleted them, and everything seems fine.

You may also want to include that this can be used for item trading, rather than strictly item selling.

and finally, is there any way to have them give out 2 types of items for the cost, and with different quantities? (10 pokeballs+1 premier ball) And conversely, 2 costs for 1 item? (x blocks of emerald+x emeralds) It probably could be figured out from the setup of the emeralds+gravel=flints villager.
By Vikerus
#9867
ryik wrote:That was quite helpful.

Question though: does maxUses and uses mean anything? I assumed them to be the limit on how much times an item could be sold (villagers can only sell an item a certain amount of times, it is then locked out and a different item must be bought in order for the first item to become available again) and thus deleted them, and everything seems fine.

You may also want to include that this can be used for item trading, rather than strictly item selling.

and finally, is there any way to have them give out 2 types of items for the cost, and with different quantities? (10 pokeballs+1 premier ball) And conversely, 2 costs for 1 item? (x blocks of emerald+x emeralds) It probably could be figured out from the setup of the emeralds+gravel=flints villager.

maxUses isn't something I'm familiar with, but I have never had an issue with the default 7.

As far as the compound payment idea, Yes that can be set up, but I haven't had the need to yet and so don't quite know how. Basically you're going to have to experiment.
User avatar
By ryik
#9955 Wasn't as hard as I though it would be to find out.

simply adding another buy and naming it "buyB" will change the cost to the two (sets of) items specified. However, adding "sellB" will not give you another item in exchange for the cost, and "sellB" will delete itself after being loaded. Similarly, maxUses and uses will recreate themselves if deleted once the world is loaded.

I assume the same goes for a "buyC", since there isn't even any slot to add the item to.

This allows for a cost greater than 64 "emeralds". (or whatever currency used~ up to 1152, assuming it can be made into a block, otherwise, 128)

For adventure map purposes, it could be used to imply that the villager fused the 2 items together to make the third. Really, whatever your imagination comes up with~
By Vikerus
#9986
ryik wrote:Wasn't as hard as I though it would be to find out.

simply adding another buy and naming it "buyB" will change the cost to the two (sets of) items specified. However, adding "sellB" will not give you another item in exchange for the cost, and "sellB" will delete itself after being loaded. Similarly, maxUses and uses will recreate themselves if deleted once the world is loaded.

I assume the same goes for a "buyC", since there isn't even any slot to add the item to.

This allows for a cost greater than 64 "emeralds". (or whatever currency used~ up to 1152, assuming it can be made into a block, otherwise, 128)

For adventure map purposes, it could be used to imply that the villager fused the 2 items together to make the third. Really, whatever your imagination comes up with~

Thanks for elaborating the process. This will help those who would like to know.
By TTC
#49524 I'm trying to set this up for my 7 year-old son.

I click on Regions in his saved world, search for "Villagers" in the bottom box with both boxes checked, and eventually get an "End of Results" error with no villagers.
JOIN THE TEAM