Minecraft Blogs / Tutorial

How to Create NPC's for your Minecraft Server

  • 14,858 views, 23 today
  • 15
  • 11
cirrus-mc avatar cirrus-mc
Level 48 : Master Architect
131
How to Create NPC's for your Minecraft Server




NPC’s, or non-playable characters, can be a very useful concept in any online Minecraft server, but especially in ones that specialize in any sort of fantasy or role-play. You can have Testificate villagers set up to help tell your map’s story, or have them function as shopkeepers. NPC’s are very versatile, and are a great resource that all role-playing servers should look into. There are ways to create them in Vanilla Minecraft using only command blocks, and they can be programmed to do all sorts of things.

https://mcstacker.bimbimma.com/

This website is such a great tool to help you generate the exact command to spawn an NPC to do exactly what you need it to do. In this short tutorial, I will explain how to best utilize an NPC on your roleplaying server, and the exact parameters to input into the command.




Command-Generator Website

I will now walk you through how to use this wonderful tool.


The Basics



How to Create NPC's for your Minecraft Server

  • Set your command to summon
  • Set the entity to Villager
  • For merchants, I recommend giving them “No Gravity”. It means they will float in place
  • Check the box for “Persistence Required”
  • For merchants, I recommend giving them “No AI”
  • If you do not want them making villager grunts, you can check the box for “Silent”
  • Sometimes even with No AI checked, they can still move a little bit or be pushed by players. You can disable this by surrounding them with barrier blocks, but leaving an opening for interaction
  • To have them spawn facing an exact direction, you can enter a Yaw and Pitch value. You can find these values by standing the way you want them to face and hitting F3 in-game
  • To prevent players from killing your NPC’s, check the box for “Invulnerable”. They can still be killed in creative mode
  • If you want to give them a spectral effect, you can make them “Glowing”. If you play around with making teams in Scoreboard, you can change the color that they glow. Be sure to enter a scoreboard team in the right spot
  • If you would like your NPC to have a name, you can enter one in the Name box. You can also choose to not have the name displayed overhead by checking the box for “Hide Name”
  • I like to give my NPC’s funny hats. You can give them a customized head item to give them a hat. Good items include anvils, wooden slabs or stairs, glass, glass panes, and others. Experiment to see what you like best. You can enter a name in the Head box and it will search for an item like the name you entered
  • If you do not want the NPC to be able to drop their hat upon death, you can select the Drop Chance as 0%. This should not matter if they are invulnerable
  • If you want the NPC to be a baby villager, set the Age box to -1. If you want it to be an adult, leave it blank
  • You can change the appearance of your NPC by changing the villager’s profession
  • The Career box should be set to “Farmer”. I have had issues with server bugs and crashes when it has been set to anything else
  • The Career Level box should be set to “6”
  • Under recipes, this is where you can set up all of the trades you could possibly want. You can also customize books there as well. On Cirrus, we invented our currency “Timber”, and invented all sorts of trades for Timber
  • If you add a custom name and a lore to your trade items, they become impossible to counterfeit
  • When you have finished fully customizing your NPC, you will want to copy the generated command and paste it into a command block. After that, you will just place a button and turn on your command block to summon your NPC






Types of NPC's



Think of your NPC’s as other characters in another video game, such as Pokemon, or Legend of Zelda. They sell you things. They talk to you. They help to frame the larger story. They add value to the overall story that you are telling. Used right, NPC’s can improve your server dramatically.


Shopkeepers
Shopkeepers are important in a role-playing map, but especially if there is any sort of economy. As an example, in Cirrus’s brand new SkyTowns map, we have merchant NPC’s that players can trade their farmed wood for our in-game currency called Timber. In reality, it’s just prismarine crystals. However, since they have a nickname and a lore, they cannot be duplicated or forged. The merchants have all sorts of trades for important items that improve the life for each faction. All of these trades and item settings can be customized using the website.
Major Characters
Story or plot-related NPC’s are essential in a role-playing map. They can allow players to piece together bits of the plot at whatever rate you decide. They work very well in addition to cutscenes where parts of the plot are told as a story to all players who are online. Story NPC’s can trade books with pre-programmed messages. You can choose to have them tell lengthy backstories, or have them give players vague and cryptic clues as to what is happening. It depends on how you prefer to tell your story. Storybook messages can also be customized through the website.
Nomads
You can even have NPC’s that just exist to add some world-building to your map. They can say small things about their lives, or the place they live in. They can just wander around in towns that you built to make it look busier. In a role-playing map, a town will look infinitely better when inhabited than it would while empty.







Keep NPC’s in mind when you are working on new maps or stories. I know that our SkyTowns map would not be possible without them. Plugins are nice, but doing things in Vanilla Minecraft can make things much simpler. You have a story to tell on your server. Make sure it is being told well.

How to Create NPC's for your Minecraft Server
How to Create NPC's for your Minecraft Server



If you enjoyed what you read, please diamond, favorite, and subscribe to us to show your support!
Tags

Create an account or sign in to comment.

Planet Minecraft

Website

© 2010 - 2021
www.planetminecraft.com

Welcome