# 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:![](https://698605149-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfUzUme0ZIql9HRqhNQXw%2Fuploads%2F1krImsWvXtfy1i8acYtt%2Fimage.png?alt=media\&token=8cba9d8e-ffe7-45ec-9174-c763762efa35)
4. Locate the language attribute and add any language you want your NPC to understand and speak, followed by a comma to separate. ![](https://698605149-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfUzUme0ZIql9HRqhNQXw%2Fuploads%2FuszbsNqD2N7ij4KoxtSY%2Fimage.png?alt=media\&token=8b35600f-8a5e-44ef-8c01-69e9306fe91c)
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!
