Ability to trade items with NPCs
In quest based learning we often need to give specific items/blocks depending on the items/blocks a player has. For example we might want to have a player collect a book from a library before we give them a pick axe to clear a pathway. With NPCs we can trigger a /give command but not a /take type command. A merging of the villager trading system (with options to customize the trades) into the NPC interface would be very useful. A successful trade could them trigger a command as an additional. An attempt to trade an incorrect item could also trigger a different command. Success/failure depending on the outcome of the trade could be used as an assessment tool.
-
Yes, completely agree, Simon. I would love to have this in the game.
I want my students to create small quest based games in MEE that would have conditional statements coded in for trading items. We would also need dynamic questing with NPCs so different options would come up after "turning in a quest."
I would also add that I would LOVE to be able to teleport NPCs via command blocks.
1 -
This would be useful on so many levels and could be included as a step into developing a working economy function within M:EE.
For example, the simulation I run requires students to buy and sell items from stores, other players etc.
So if a student needed to buy something, say a stack of blaze rods. They could go to the NPC, give the NPC the required payment, say 10 diamonds. Once the NPC has the required amount, a /give command is generated which gives the player the item or instead of the give command, just throws out the required item.
It would be good if you could do this without having to put in commands, as learning heaps of commands is something teachers don't want to do.2 -
I agree this would be a VERY useful feature.
I just (basically) finished building a marketplace for an activity on bartering that required this. I eventually used redstone to create an vending machine type of system that would only dispense items if the correct item is inputted.
I based my design off of this: https://www.youtube.com/watch?v=hE_xSe2z_KU
3 -
I'm really disappointed they don't have the ability to install custom mods. We have used Minecraft Edu for years (still running old version) and was excited about the functionality with iPads. However, we had whole units based around custom NPC mods and buying/selling items as well as Pam's Harvestcraft mod. Now it appears we can't use it. I guess we'll hold off buying this until those features come through.
2 -
Some functionality is included in the last update. Commands can be given to NPC's, such as check player inventory for "item" if present, give player "item". This is a step in the right direction but because it is command based, only experienced teachers who use Minecraft a lot will use this or more importantly, know how to use this. Given updates are partially based off the vote system on these threads, lets get this one to the top for action!
2 -
Lachlan,
Do you have a link to any documentation on those changes?
1 -
Hello, I would like to introduce basics of economy/trading into my lessons. I've read that you can create customizable villagers and have them use emeralds as a currency to trade for items. I cannot find a tutorial on how to do that. If it's not possible, can I use a regular NPC and chain commands like /testfor > /remove > /give to imitate a trading experience? Or can you suggest a better way?
3 -
You'll have to use regular NPC and chain commands as you say. Haven't found a better way yet
1 -
@Lachlan McGuire thanks for a prompt response! Can you walk me through the chain of commands I will need to use?
I spent 4 hours yesterday tinkering with /give, /clear/, /testfor, /scoreboard. However, I'm still not able to have an NPC check a player's inventory for a specific item and its quantity (e.g. 5 emeralds) and if this quantity is there remove it (/clear @p emeralds 0 5) and give another item instead (/give @p apple). If the quantity if not there (e.g. a player has less than 5 emeralds), the command does not proceed.
To sum up, I am stuck with /testfor command and making the chain of commands conditional.
I would appreciate any help.
Thanks!
2 -
Just another voice for allowing NPC's to trade much easier. I'm surprised this isn't already a feature.
Also, would anyone be willing to share an example of how the /testfor and chain commands work?
Thanks!
0 -
Totally agree this would be very helpful. Especially for economy based designs where Instead of building a redstone machine to achieve this having custom villager/npc trades would be amazin!
0 -
I would like to remove 15 apples from a player’s inventory only if there are 15 or more apples in this person’s inventory. Command /clear @p apple 0 15 will remove 15 apples if a player has 15 or more. However it will also remove 8, if a player only has 8. Is there a way to solve it?
I am trying to check if a player has 15 apples in the inventory? From my research I found that Java edition of Minecraft allow a command /testfor @p {Inventory:[{id:minecraft:apple,Count:3b}]}. However MEE seems to have a different syntax for /testfor command. Does anyone now how to test the quantity of items in the inventory?
2 -
I just wish that the same functionality for commands that are in Java would carry across to Education edition. There are some many things that I would love to get working in the game that I could do in a Java world that I can't do in an Education edition world. My biggest thing is the capabilities of the testfor command as well as thefuncitonality of the scoreboard. Neither of these commands are as robust as in the Java edition making it very frustrating when trying to do anything with these commands.
0 -
I've left a comment in another thread, but it seems as if this thread is more populated, so I'll copy my comment here as well.
@Matthew
After a serious of unsuccessful attempts, I finally have been able to create a sophisticated trading mechanics within Minecraft Education. Not without a long strings of command blocks though :(
This is a short list of transactions that are available in the world:
1) Students can interact with NPC traders to buy items on condition that they (students) have enough dollars (emeralds) in their inventory.
2) Students can interact with NPC traders to sell items in exchange for dollars (emeralds).
3) Students can interact with NPC to pay dollars (emeralds) get access to restricted areas (crafting / anvil stations) that are not otherwise available.
My plan is to record a YT walkthrough to showcase the mechanics of the world as well as to share the world file itself.
2 -
Yeah I wish that there was an easier way to complete what can be done with long strings of command blocks. Ends up taking so much time away to research and construct these systems. I would be very interested in seeing either the world or the Youtube walk through to see how you achieved this. How did you avoid the system taking away emeralds even if they didn't have the right amount?
0 -
Yes. This would be brilliant! It would be almost as brilliant as having world edit capabilities... which we've been asking for forever. There's now Bedrock edition world edit, but it won't work in education edition. I digress.
Could we please have the ability to trade with the NPC??
0 -
I have been trying to figure out an easy way to add a trading mechanic for almost 2 years now. I found this article:
Villager Trading
While not using command blocks, this is still a great way of arranging trades. The files to support your exploration in this space are available at http://bit.ly/EduelfieVanillaTradePack, http://bit.ly/EduelfieFlecherTrade and http://bit.ly/EduelfieArmorerTrade
The first is a ‘vanilla’ behaviour pack (not in .mcpack format, but in .zip) If you want to put this into Minecraft you may need to get new UUIDs for the manifest.json file. This video can show you the basics of that: https://youtu.be/tqFw0pf3Tkw?t=278 The zip file includes all standard villager trade files and all the ‘other’ files you need to effectively create a behaviour pack that modifies villager trades.
The second two are the specific .json files used in the trading world to create the trades that the Fletcher and Armorer have. These have been provided so that you can see the differences, and ‘how’ these changes make things different in the trading screen of the villager. As mentioned in the stream, beware commas, brackets, and quotation marks, they are all super important, and one missing, or wrong character, and Minecraft: Education Edition crashes without a sound :DIt is a lot of work but once you get used to doing it, it gets faster.
0 -
The other way I have used in the past is from the same place as above.
Setting up the ‘scoreboard’
/scoreboard objectives add money dummy Money
This command adds a scoreboard that can track ‘data’ for students, this scoreboard is called “money”, and displays as “Money”.
“First Bank of Elfie”
This particular setup removes emeralds one at a time, and adds 1 to the scoreboard ‘money’ for the player. Once that score gets to 2, it then gives them a rabbit flesh, and removes 2 from the money scoreboard. This is also set to only trigger at a student standing at a particular location (the x, y and z coordinates) so you will need to alter these. The purpose of this is to try and prevent students getting ‘credit’ in money for other students emeralds.
Command 1:
/clear @p[r=1,x=351,y=70,z=-88] emerald 0 1
Command Block Settings:
Type – Repeat
Condition – Unconditional
Redstone – Needs Redstone
Command 2:
/scoreboard players add @p[r=1,x=351,y=70,z=-88] money 1
Command Block Settings:
Type – Chain
Condition – Conditional
Redstone – Always Active
Command 3:
/give @p[scores = {money = 2},r=1,x=351,y=70,z=-88] rabbit
Command Block Settings:
Type – Chain
Condition – Conditional
Redstone – Always Active
This is not a standalone guide; it is supposed to be used in association with this world:
bit.ly/EduelfieTradeWorld and this video: bit.ly/EduelfieTradeVideo
Need a hand? drop by our discord http://discord.gg/7fSQBdx or tweet @EduElfie or @BenSpieldenner
Command 4:
/scoreboard players remove @p[scores={money=2},r=1,x=351,y=70,z=-88] money 2
Command Block Settings:
Type – Chain
Condition – Conditional
Redstone – Always Active
Command Block 1 needs to ‘point into’ command block 2, 2 into 3 and 3 into 4. I chose to activate block 1 with a redstone block only when a student stands on the pressure plate at the x,y,z coordinate.
Check Your Balance;
While in the sample world, we have the scoreboard shown on the right of the screen, this would not be ‘normal’ behaviour in a world with multiple students, as it ‘ranks’ them based on score. This would mean that those without much ‘money’ would never know how much they had, as they may be off the bottom of the list. This command allows students to check their balance at any time. Again, this is tied to a particular location, and would need to be changed to suit your purposes.
Command:
/scoreboard players list @p[r=1,x=348,y=70,z=-88] Command Block Settings:
Type – Impulse
Condition – Unconditional
Redstone – Needs Redstone
Activate with a button to list the tracked scoreboards (all of them) for the player at the location.\I took the basic principles from this and adapted it to my own class village. If you are familiar with command blocks this makes it really easy to do. If you are not familiar with command blocks there are several youtube videos that can help. I hope that they will one day just give us the ability to use the villager trading mechanic in some easy way but for now this way really works well for me.
0 -
I've been working on Minecraft Entrepreneurship world for a year now, and I think I soon will be able to share it with the community. It will have many solutions to the questions people ask e.g. how to check for specific number of items in the inventory, how to set up a trading/banking system, etc.
This week I had a chance to test it out with students. This is a little preview:
https://twitter.com/edtechii/status/1189597823161044992?s=20
My plan is to make sure the world is bugs-free (as it involves a lot of transactions) and then share it with the MEE community. Meanwhile, please let me know what features/operations related to MEE economy / entrepreneurship you would like to have, and I will try my best to incorporate them into the final build. Thanks!
2 -
Hello Christian,
Thanks for sharing - your project / world looks like an engaging way to deliver the content related to the topics you've mentioned.
Speaking of money, currencies, exchange rates, and banking. Like I stated in my previous post, I've been able to set up a working trading economy using NPC and command blocks. It's functional and relatively easy to customize. It's currently version 1.2
I am now working on version 1.3. of the map, which will include
- banking system (deposits and loans)
- option for students to purchase / rent property / i.e. make an investment which will grand long-term benefits e.g. protection from hostile mobs, easier commute to the trading area AKA village, and so on.
- hacked behavior of the hostile mobs (zombies, skeletons, creepers, etc.) which target not only players but also players' structures and farm animals thus posing a threat to the business.
I wonder if we could collaborate and help each other enhance our current builds?
Let me know what you think.
2 -
I would love to get in and help you guys Evgenii I would need a copy of the world with the command blocks you have set up. Contact me or reply here and we can discuss what you would like me to work on.
0 -
Evgenii, I would love to collaborate. Are your systems (banking, investment, etc) able to be reproduced on any world? My primary issue is the use of and item as a sophisticated and related "money". Are you using emeralds as your currency? This is a much more macroeconomic issue, would it be possible to integrate separate currencies between locations?
Dennis, I saw your earlier post and loved the idea of a savings "scoreboard" to have the students compete with over time. I would be interested in how that worked. Does it depend on emeralds?
I look forward to further correspondence.
Christian
0 -
The scoreboard can be used to with any item. It is dependent on what commands you put in the command blocks.
0 -
Hello,
Dennis Houfek Thank you for being open for collaboration. I am finalizing the current build, and before I share it out, I want to make sure it is bugs-free (as it involves a lot of transactions and commands. According to my estimate, the work should be completed in the next month.
Christian Pirlet Thank you for being open for collaboration. Yes, the systems can be reproduced in any world. My first build was based on scoreboards i.e. all transactions were "wireless". In my current build, I'm using emeralds which makes the experience more "tangible" i.e. students have "physical" objects in their inventories as opposed to having just a number in a score board. Can you clarify a bit more about you sentence "My primary issue is the use of and item as a sophisticated and related "money". When you said "This is a much more macroeconomic issue, would it be possible to integrate separate currencies between locations?" what are you trying to achieve?
I wonder if you guys would be interested in setting up Skype / Zoom call at some point to see how we can collaborate on the ideas discuss previously.
2 -
I would be open to a skype or zoom let me know and I can get you all some times that work for me. Maybe we can do one over the holiday season since I will not have any classes for those 2 weeks.
0 -
Dennis Houfek can we carry this conversation over to email? I already have Christian's email, if I can have yours, I can start an email thread.
2 -
I would like to add my voice to this thread. Like many others, I used Minecraft EDU. I didn't use a bunch of mods, but I did use custom NPCs extensively to create traders in my worlds. I am going to look at some of the ideas I have seen in this thread, but it would be REALLY nice to have a simple solution, like custom npcs. I used some amazing worlds on the Minecraft EDU site that were created using specific mods. I would love to have at least some limited support for mods in MEE
0 -
Looks like there's been some great work done to make economics enjoyable for students to learn in MEE. If you're willing to share your worlds, I'm sure there's many teachers like myself who would be very happy to use them with students.
0 -
This is really amazing, especially given the lack of mods in EE. Yes, I'd like to be a beta tester!
0 -
I would like to test this also.
0
Please sign in to leave a comment.
Comments
37 comments