CitizensDev/Citizens — Issue #364: Suggestion: NPC Text based on permission group
Author: temp6532
Created: 2011-11-02 09:24:36+00:00
State: open

Hello. I use Citizens for my private server and I think it's brilliant. I've set up an extensive series of quest chains already and I'm really enjoying it. However, I was wondering if it would maybe be possible to have the NPCs speak differently to players that belong to different permission groups?

Perhaps it could work like so:

The npc-profiles yml text node could have a default sub-node and then other sub-nodes named after permissions groups.

```
'7':
basic:
inventory: 340/1/0,47/1/0,AIR*25,340/1/23,AIR*8,
look-when-close: 'true'
name: Guy
talk: 'true'
text:
banished: "Begone, scum!;Guards!;Etc."
default: "Hello. Haven't seen you around; Etc. etc."
vip: "Hello, player! It's always so good to see you.;What can I do for you?;etc.."
talk-when-close: 'true'
items: 0:0,0:0,0:0,0:0,0:0,
owner: Osteo
color: '15'
location: Oriartha,-26.410700387588122,70.0,-104.30000001192093,-88.51381,0.0
balance: '4616.0'
```
If the player falls into a specific permission group, the NPC would then speak those lines to him. If the player does not fall into any category, or if he falls into default, the npc would then read from the 'default' node. If the player falls into several groups, the NPC could perhaps read all of the lines from every group involved, or fall to the first or last node. (Whichever method is easier.)

Commands could stay the same with an optional parameter for the group to keep things simple.
```
/npc set [group='default']

/npc add [group='default']

```
The potential in such a system would allow the player to sort of establish a bit of a story line with their characters.

Speaking of story line and immersion, is there a tag we can use in text that refers to the player's name? I've tried in quest texts. It only seems to work for command rewards, however.

Thanks for your time.