Wiki 9Minecraft Custom NPCs Mod Wiki

Custom NPCs Mod — Guide

Roles and Jobs

Roles and Jobs are the functional 'brains' of an NPC. Roles usually require player interaction, while Jobs are passive behaviors performed automatically.

NPC Roles

  • Trader: Allows the NPC to function as a shopkeeper. You can set up to 18 trade recipes.
  • Follower: Enables the NPC to be hired by players for a set price and duration.
  • Bank: Provides access to a global or local storage system (similar to an Ender Chest).
  • Transporter: Acts as a fast-travel node. Players must discover transporters to unlock them in the travel menu.
  • Mailman: Allows players to send and receive mail through the NPC.
  • Companion: A more advanced follower system with leveling, talent trees, and specific combat roles.
  • Puppet: Used for posing NPCs for dioramas or cinematics.

NPC Jobs

  • Bard: Plays background music or specific sound files when players are nearby.
  • Healer: Automatically heals nearby players or friendly NPCs.
  • Guard: Attacks specific factions or monster types within a defined range.
  • Item Giver: Hands out items to players based on timers or quest status.
  • Spawner: Spawns other entities or clones when the NPC dies or enters combat.
  • Conversation: Triggers automated chat messages between multiple NPCs.
  • Chunk Loader: Keeps the surrounding chunks loaded even when no players are present.

Advanced Systems

Factions

Factions manage the relationships between NPCs and players. By default, there are three factions: Friendly, Neutral, and Hostile. * Points: Players gain or lose points with factions by completing quests or killing NPCs. * Aggro: NPCs will automatically attack players if their faction standing is too low.

Dialog System

The mod features a branching dialog editor. Dialogs are organized into categories and can be linked together to create complex conversations. * Dialog Options: Up to 6 choices per dialog screen. Options can lead to other dialogs, close the menu, start a quest, or execute a command. * Availability: Dialogs can be restricted based on faction standing, quest completion, or player level.

Quest System

Quests are the primary way to drive progression. They are managed in the Global tab and assigned to NPCs or Dialogs. * Quest Types: * Item Quest: Requires the player to collect specific items. * Kill Quest: Requires the player to kill a certain number of specific entities or NPCs. * Dialog Quest: Completed by speaking to a specific NPC. * Location Quest: Completed by reaching a specific coordinate (marked by a Waypoint block). * Manual Quest: A custom quest type that must be completed via scripting or commands.

Mechanics and Scripting

Scripting API

For advanced users, the mod includes a powerful scripting API. Scripts can be attached to NPCs, Items, Blocks, or the Forge event bus. * Languages: JavaScript (via Nashorn/GraalVM) is the default. Other languages like Python or Lua can be added via external libraries. * Hooks: Common hooks include init (when spawned), tick (every 10 ticks), interact (when clicked), damaged, and died.

Commands

Commands are prefixed with /npc or /noppes. * /npc create [name] - Spawns a new NPC. * /npc home - Sets the NPC's home position to your current location. * /noppes config - Opens the mod configuration menu. * /noppes clone spawn [name] [tab] - Spawns a saved clone at your location. * /noppes quest finish [player] [id] - Force-completes a quest for a player.