temp/Basic Guide [WiP]
Updated to: NPGuys v1.1.1 BETA
Introduction
If you ever played a modern RPG like Dragon Age or The Witcher, you should recognize the NPC dialogue system, where you have to choose from several possible options, what exactly do you want to say. Depending on the game, your choice may affect further storyline, the way other characters see you or lead to getting some secret information and begin some kind of side quest. Of course, the usage could be also more trivial - like picking the topic for small talk or asking the smith if he wouldn't mind fixing your stuff. The possibilites are countless - it's only about the dialogue writer's creativity. For sure, there are also technical limitations, but the plugin is being constanly developed and I will probably add any requested (and reasonable) features, if you ask politely. Also, it's not so hard to extend NPGuys to for your own needs - read more in API Guide (coming soon).
A little warm-up
So, you have installed NPGuys and all the dependencies, now what? You probably want to start fun straightaway and play with what the plugin has to offer. What do you need to know at first is that every NPGuy has his own file that stores something like his "identity" - basically, it contains every dialogue line that can be ever used in conversation with that NPC. So, let's create one with command:
- /npguy create Bob
You have now an NPGuy named Bob! At this point, you should learn that it doesn't matter how do you name your NPGuy - it won't really be displayed anywhere and it's only usage is to be easier to remember for you than ID or anything like that. OK, now we have to attach that data to an actual NPC (from the Citizens plugin). Let's say we have just created Citizen with ID 0. Firstly, we have to give him a special NPGuy trait:
- /trait npguy
Then we perform the attachment:
- /npguy attach 0
And voila! Now you should be able to start a conversation with the NPC by right-clicking him and see a short default dialogue. By default, you change your response by right-click and confirm it by left-click. Notice that NPC name, displayed in the dialogues is in fact the name of the Citizens' NPC. As I said before, NPGuy's name doesn't matter.
Dialogue system
Dialogues
Conversations are divided into small parts, called dialogues, which form a tree (precisely, it's just a graph because it could have cycles, but you don't nedd to know that). Each dialogue consists of 5 elements:
- Requirement list
- Player message (what the player says to the NPC)
- Action list
- NPC message (how the NPC responds to the player)
- Possible response list