-
Notifications
You must be signed in to change notification settings - Fork 2
Creating NPCS
A NPC (Non-Playable-Character), in Bane Of Wargs, is an entity that is encountered on multiple specifics map points. When encountering a NPC, a dialog phrases will appear on the game's UI, the same way a dialog appears; the principal goal of NPCs is to buy and sell items and drinks to the player. Note that NPCs can be re-used in different map points, and that a map point can have multiple NPCs at once.
NPCs definitions are located in the npcs.yaml
yaml file.
In order to make the NPC display correctly on the player's diary, you'll need to create a <npc_id>.txt
file where <npc_id> is the id of the NPC; in the imgs/
directory of the plugin. In this file, you'll put the ascii art of that NPC with, if you want, yaml data color codes.
An example of a NPC definition:
Jerry The Junk Seller:
name: "Jerry The Junk Seller"
cost value: 1.7
speech:
- "Hey my guy! Searchin' for good odd antiques?"
- "By the way, I just recently found an old rusted key. Maybe it's for a secret chest?"
sells:
drinks:
- Suspicious Stew
items:
- Old Rusted Key
- Knife
- Tissue Bag
- Bone
- Bow String
- Raw Wood
buys:
items:
- None
description: "This guys sells really bad stuff but sometimes it's really rare"
When encountering this NPC, the defined dialog phrases will be displayed in a speech text effect, and after the player will be able to buy some drinks and items but not able to sell items.
Here is the full syntax:
<npc id>:
name: <displayed name(str)>
cost value: <cost value(float)>
speech: <strings to display(list)>
sells:
drinks: <drinks id(list)> # put "- None" for none
items: <items id(list)> # put "- None" for none
buys
items: <items id(list)> # put "- None" for none
descriptions: <a clear and concise description(str)>
-
name
// here you'll enter the name of the NPC you want to be displayed. -
cost value
// this is the price in gold of the item. Note that this price vary following the cost value from where you buy/sell it. -
speech
// here you'll list every phrases the NPC will output when encountered. - sells
- buys
-
items
// here you'll list every items you want this NPC to buy from the player. Put "- None" for none.
-
-
description
// here you'll put the description of the NPC that will display on the player's diary.
- Running The Game
- Gameplay Guide
- GitHub Discussions
- Building Source Code
- Game Preferences
- The Game Folder
- The World Of Bane Of Wargs
- Game Timeline Plot
- Yaml Syntax
- Creating Mods
- Creating Starts
- Creating Map Points
- Creating Enemies
- Creating Enemies Categories
- Creating Map Zones
- Creating Items
- Creating Drinks
- Writing Dialogs
- Creating Missions
- Creating Events
- Creating NPCS
- Creating Mounts
Additional Knowledge