> For the complete documentation index, see [llms.txt](https://devchunk.gitbook.io/inpc-wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://devchunk.gitbook.io/inpc-wiki/npc-training.md).

# NPC Training

To train your NPC, you can use the `knowledge` attribute in the config file. This attribute allows you to give your NPC specific information and knowledge that it can use to interact with players.

To train your NPC using the `knowledge` attribute, follow these steps:

1. Open the corresponding NPC's config file located under `plugins/iNPC/npc`. You can discard the default npc's if you wish, or use them as a template and replace their information with yours.
2. Locate the `knowledge` attribute and add a new line for each piece of knowledge you want your NPC to have. You can add as many lines as you wish. Here is an example:

<pre><code><strong>   knowledge:
</strong>      - "Treasure can be found in the abandoned mine 500 blocks to the right, and 100 blocks to the south."
      - "You can buy crates from the shop, which can contain rare items."
</code></pre>

3. Locate the theme attribute and set the theme of your NPC. Example:![](/files/zuYcHfeUTJnWSZZGG8Jt)
4. Locate the language attribute and add any language you want your NPC to understand and speak, followed by a comma to separate. ![](/files/ZkfoYten6OSKTj6z7MPm)
5. Save the `config` file.
6. Restart your Minecraft server to apply the changes.
7. Place yourself in game and try it out by approaching your currently set up NPC, and run the command /npctalk \[name]

Once you've trained your NPC using the `knowledge` attribute, it will be able to use the information you've given it to interact with players. For example, if you've given your NPC the knowledge that treasure can be found in a specific location, it may be able to give players directions to that location.

By training your NPC with specific knowledge, you can create a more immersive and interactive Minecraft experience for your players! Enjoy!


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://devchunk.gitbook.io/inpc-wiki/npc-training.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
