Beginners guide to adding NPCs
Learn everything about what NPCs have to offer
What are NPCs
NPCs (or Non-Playable Characters) are a part of many game experiences and are used to deliver story content, provide quests, and give players instructions. Since Minecraft is an open-world creative sandbox game, NPCs are not part of the base Vanilla gameplay experience.
Before the release of NPCs, creators had to be resourceful, using a bunch of work-arounds to create their own Overworld inhabitants, but they could never quite get exactly what they wanted. You could deliver story content with books and signs, but having a conversation with a mob was hard. Chat messages disappear after a short while and there was often no easy way to interact with them. But that was so yesterday! Today, NPCs solve these problems!
NPCs in Minecraft
Originating in Minecraft: Education Edition, NPCs were added to Minecraft Bedrock in 1.16.0. There are many advantages to using them over creating your own workaround. Obtained in Creative mode using commands, creators can choose from several default skins, give their NPC a name, add dialogue, and fire commands all from the edit UI screen. NPCs also are invulnerable in Survival and Adventure mode by default, ensuring that gameplay isn’t broken by a rogue Creeper.
NPCs allow players to display dialogue on a UI screen, and the UI screen remains up until the player manually exits. This gives players the time they need to read all the dialogue. Creators can make the dialogue as long as they want, because NPCs automatically add a scroll bar if the dialogue is too long to appear on screen. NPCs can send commands when interacted with, either when a dialogue screen opens or when players press one of the dialogue buttons.
Different commands can be fired depending on what button is pressed so that the NPC or the world can react to your choices! For example, these buttons can be used to set up branching dialogue. We’ve also made the minecraft:npc component that can be added to any entity to turn them into an NPC.
- Written By
- Rob Poerschke