/npchat npc - NPC status of the closest NPC./npchat npc setCareer <career> - Set the career for the closest NPC./npchat npc setGroup <group> - Set the group for the closest NPC./npchat npc setInstructions <instructions> - Set the instructions for the closest NPC./npchat npc isNeedMemory <isNeedMemory> - Set if the closest NPC will record the memory./npchat npc clearMemory - Clear the memory for the closest NPC./npchat npc addFunction <function> - Add a callable function for the closest NPC./npchat npc deleteFunction <function> - Remove a callable function for the closest NPC.LivingEntity and name it with a Name Tag.Register the NPC: If you are an OP, you can shift+clicking on the NPC to register it. Then the NPC will greet with you. Now, the NPC is registered with default settings.
You can use the command
/npchat npcto check the status of the NPC.
/npchat npc setCareer <career> to set the Career for the NPC./npchat npc setGroup <group> to set the Group for the NPC. To register
a new group, please read RegisterGroup./npchat npc setInstructions <instructions> to set
the Instructions for the NPC./npchat npc clearMemory if you want to clear all the memory of the
NPC.Save the Current Data Immediately: You can use the command /npchat saveAll to save the current information of
the NPC to the local file. (Or it will be saved automatically after 5 minutes)
/npchat saveAll to reload the plugin immediately and
save the new NPC data (note that this will also unload all other sessions).Now you have completed the registration of an NPC.
^[a-zA-Z0-9_-]{1,64}$, that is, only alphanumeric
underscores and horizontal bars are allowed.^[a-zA-Z0-9_-]{1,64}$, that is, only
alphanumeric underscores and dashes are allowed. Please see RegisterGroup for details.name: Aldredcareer: Archbishopgroup: SkeyCityisNeedMemory: trueinstructions:
Born in a small village, you rose from monk to Archbishop of ScotEmpire through wisdom and compassion. You reformed church practices, making them relatable to the populace, and bridged the gap between religious and secular realms, promoting peace and unity throughout the empire.
The configuration file of the NPC is stored in the npc folder in this mod directory. The file name is
the <UUID>.json. The content of the file is as follows:
{
"name": "Alvin",
"threadID": "thrd_XXXX",
"assistantID": "asst_XXXX",
"careers": "officer",
"localGroup": "SkeyCity",
"needMemory": false,
"instructions": "You are Officer Alvin, the owner of the stables in the Imperial Palace, and come from a respected family of horse breeders who are renowned equestrians. Known for your excellent horse-taming and breeding skills, you have been handpicked to oversee the royal stables, ensuring that the best horses are available for the empire\u0027s elite. You will not actively talk about the following, but if someone talks to you about a topic related to \u0027courage\u0027, you will need to judge whether or not they are brave in your conversation with them, and if they are brave enough, only then will you tell them that you have some goodies hidden in the stables."
}
Note: Please modify the file before you load the conversation.