A downloadable mod

Changes v.0.7.1: (experimental)

This is entirely an experimental update that adds experimental features that may not work very stably.

Added:

-New "Narrator" mode (Experimental)    
*A major innovation of this update. Thanks to this mode, the game world can feel more alive than it was before. The narrator will analyze the current situation next to the player, generating certain events for you to participate in. From simple NPC help in finding an item, to full-fledged ambushes of bandits on the player who want to rob him. At the moment, the Narrator has prepared 7 events for the player.
Since there is no familiar interface for interacting with NPCs in this "mode", your main interface in this mode is the game chat and your actions. It is recommended to use a strong neural network in the "Narrator" mode so that the NPCs understand your intentions and do not get stupid out of the blue. If desired, the "Narrator" can be disabled in the "Experimental settings".

-New village system.     
 *Now, each village has its own name, has its own borders. NPCs will know which village they were born in, or they will know that they are in someone else's village. Or the NPCs will know that they are not in the village at all at the moment. 

- The rumor system    *The system is closely related to the Storyteller mode. After your participation in the events, there may be rumors about you among the villages. For example, if you helped an NPC during an event, they will find out about it in his native village and this will be taken into account in a conversation with them. Moreover, each village has its own "rumors". If you helped the NPCs from Village A, the NPCs from Village B will not know about this help..

-New NPC class - "Bandit"       *Technical NPCs that will appear during ambushes on the player.

Changes:

-After the death of NPCs, they will lose all items from the inventory. Now the NPC doesn't take all the things "to the grave."

-Fixed bugs in the NPC combat system when attacking a player.

-The format of the chat appearance has been slightly changed while communicating with NPCs.

-Fixed a bug where, during the first communication with the NPC, he could freeze (the cloud of the dialog was highlighted, but not animated) and communication did not begin until he spoke with the NPC a second time.

-The mechanics of choosing an NPC interlocutor have been updated. Previously, when a player wrote to a chat, either the NPC whose name was mentioned was chosen as the interlocutor. Or the nearest NPC. Now, first of all, the NPC to whom the player's aim will be indicated will be selected for communication.

 

Changes v.0.6.5.:

Added:

-Added support for the Player2 API platform for MetaNPC_Mod.

-New NPC class - "Awakened"    *This NPC allows you to create your own NPCs through the "Services" menu. It also gives you a "Summoning Stone" to add NPCs to your world (For cheaters or map makers, you can use the /metanpc_create and /metanpc_spawnprofile <NPC Profile Name> commands). When you create your NPCs, you save them in the format.MetaProfile. This means that the NPC will always be preserved in its original state and it becomes possible to share your created NPCs by transferring its file.MetaProfile.

-New NPC class - "Guardian"       *Independent NPCs that will protect residents from external threats. Namely, vanilla hostile mobs and from hostile players. Also, the Guards don't randomly walk around the village like the rest of the residents. Guards - patrol the trails of the village, plotting routes along the trails. You can influence these routes yourself by creating/connecting trails or removing an unnecessary path that you don't want the guards to waste their time on. The guards do not need to sleep, do not go far from the village, and cannot be hired as a companion.

-A new type of reactions - "Dynamic reactions"    * A radically new type of NPC reaction to the player. Previously, NPCs could not dynamically react to the player's actions. Now, there is a chance that the NPC will be able to react to any player action (Diamond mining, ore smelting, killing mobs, item selection, item crafting, etc.). At the moment, there are about 150 triggers in fashion, which can provoke the NPC to comment. Any of your actions in the game are not 100% triggered, so as not to overload the system with comments and not bother the player. For example, an NPC can respond to a player's "Use the workbench" action with only a 15% chance. Comments work both through a neural network and on pre-prepared replicas.

-Event logger (Experimental)    *A new type of input data for GPT, for a better understanding of the context of what is happening. The event logger records absolutely all the player's actions (Breaking blocks, installing blocks, using items, killing mobs, etc.), this can give the NPC the context of what is happening. For example, an NPC will always know what you have done on the workbench a minute ago. Or they will know what you put in the chest or took out of it.

-Lorny archive (Experimental)    *A new type of input data for GPT, for a better understanding of terms, events, ent. In order not to overload the standard NPC prompt with cumbersome details from a large number of characters, the Lore Archive was invented. It contains various information about the world of the game. For example, if there is information about the Enderman in the archive and the player asks the NPC, "What do you know about Endermen?" - The system will start searching the player's message for keywords that may be contained in the Archive. In this case, the keyword will be "Endermen" and the system will load the information from this card for context.

-Work area system    *A system designed for the active work of NPCs. At the moment, these zones can be used by: Farmer, Shepherd, Forester. To create a work area, you must use the "Work Area Book" item.

-New services from the NPC:    *Farmer - By hiring a farmer, he can be assigned to a work area. Depending on the size of the work area, the farmer himself can make a field for sowing crops. However, it is recommended to create a ready-made field for the farmer's work in advance. A farmer can plant and harvest basic crops - wheat, carrots, potatoes. In order for the farmer to start working, provide him with plant seeds. Having bone meal, it will accelerate plant growth.    *Forester - By hiring a forester, you can assign him to the work area. The forester must be provided with seedlings so that he can start seeding the work area with tree seedlings. When the trees grow up, he will start cutting them down and planting the seedlings anew.    *Shepherd - By hiring a shepherd, he can be assigned to the work area. It is recommended to build a pen in this area, where the cattle should ALREADY be. Having the necessary feed for livestock, the shepherd will multiply them up to the specified limit. If the limit is exceeded, the Shepherd can start slaughtering livestock to obtain meat, leather, and feathers. If the Shepherd has scissors or a bucket in his inventory, the Shepherd can shear sheep and milk cows.    *Adventurer - By hiring an Adventurer, you can take him as a companion without having 200 reputation points.

-New items:     * "Summoning Stone" - allows you to spawn an NPC in front of you from a file.MetaProfile. Such an NPC will have a guaranteed reputation of 200 points, allowing you to take such an NPC as a companion. This item can be obtained from an NPC of the "Awakened" class for every 10 levels of the player.   * "Configuration Book" - appears when logging into the game. Allows you to customize the mod using this item.   * "Work Area Book" - appears when you log in to the game. Allows you to create work zones for NPCs. Follow the instructions in the book to create it.

Changes:

-The models of male and female NPCs have been slightly changed. Male NPCs use the Steve model, Female NPCs use the Alex model.


Description:

This mod adds NPCs that replace vanilla villagers and integrate ChatGPT, oLlama, and OpenRouter. This means you can talk to NPCs directly through the in-game chat. NPCs also remember past conversations with the player. Communication with NPCs is powered by GPT, using a large context array for better role-play. The context includes:

The NPC’s first and last name; profession; personality type; mood; reputation level; biome; whether the NPC is in a cave or on the surface; various commands and orders (you can ask the NPC to follow you if your reputation allows it); trading and services (you can ask the NPC to trade, open their inventory, or perform a service related to their profession); saving and loading past dialogues through the Summary or Fragment Memory systems.

GPT-Mod

At the moment, there is only one GPT mode available in the mod: "Easy GPT Mode".

"Easy GPT Mode" is a new mode that can be enabled in the mod settings. With it, you can talk to NPCs through the chat without pressing any button in the GUI. The NPC will “hear” the player within a radius of about 6 blocks. You can also tell this by the small cloud that appears next to the NPC.

NPCs can also start conversations on their own or generate short lines (unless all types of generation are disabled in the mod settings). The player can respond to these lines or ignore them. After 15 seconds of silence, the NPC’s dialogue will automatically close, or it will close if the player walks more than 6 blocks away. While the player is typing in the chat, the timer resets.
Dialogues started by the NPC, as well as their auto-generated lines, are not saved in NPC memory to reduce token usage.

In the future, GPT-based communication is planned to trigger various functions and behaviors in NPCs.

Core-Mod

However, if you don't have the opportunity to use the GPT function of the mod, it's okay. Because the mod provides other functions as well:

-Communicate with NPCs through dialog boxes, by clicking your actions.
  Right-clicking on the NPC will open a dialog box. The "Speak" and "Actions" buttons are responsible for the social part, where there will be appropriate options for actions to the NPCs, whether they are friendly or not. Some replicas in dialogues will appear only for NPCs with a certain class and archetype (At the moment, mainly for the class "Farmer", "Blacksmith" and the archetypes "Cynic", ""). There are three outcomes to the end of the dialogue:
  Positive - You will receive a friendly NPC response, which will raise your reputation with the NPC.
  Neutral - You will receive a neutral replica of the NPC, which will not affect your reputation with the NPC in any way.
  Negative - You will receive a negative response from the NPC, which will reduce your reputation with the NPC.

-A reputation system with each NPC.
  Each NPC will have its own attitude towards you, according to the reputation scale. You can remain a stranger to them, which they will note during the greeting. Or establish a relationship with them, this will also be noted in the player's greeting. Your reputation level determines whether you can take an NPC as a companion or open his inventory. In the future, I plan to expand the role of reputation in gameplay with NPCs.

-A system of archetypes and moods.
  Archetype - Each NPC is assigned its own Archetype (Personality), which will constantly influence the outcome of the dialogue, to one degree or another. It will be easier to communicate with some archetype and, accordingly, the outcome of the dialogue can often be positive. However, what can you say about less pleasant and friendly archetypes. Communication with such people can be more difficult and most often the outcome of the dialogue will be negative.
  Mood - If the NPC Archetype is constant, then the mood of the NPC is changeable. The mood of the NPC, as well as the Archetype, affects the outcome of the dialogue by manipulating the percentages of each outcome of the dialogue (Positive, neutral, negative). Therefore, a certain "debuff" in communication, for example with the "Grumbler" archetype, if he has the right mood, you can catch the moment and achieve a positive outcome of the dialogue with a great chance.

-Companion mode.
  Having a sufficient reputation (200), the player can take NPCs with him on adventures as a companion. The companion may not make the player bored, because he will comment in every possible way on the places where they are located, warn about the presence of hostile mobs, comment on selected items, blocks.

- Gift giving.
 It is not always possible to find a common language with a person, as with an NPC. And to significantly increase your reputation, you can give gifts. Often, there are gifts that will suit absolutely any NPC. And there are those gifts that are suitable only for certain classes of NPCs. As they say: for one - garbage, for another - treasure. However, you cannot give the NPC a stack of diamonds, because the NPC will feel awkward taking many gifts from the player at a time. To give a gift, it is enough to throw an object under the feet of an NPC. To give a gift, it is enough to throw an object under the feet of the NPC by pressing the combination (SHIFT+Q)!!!.

- The class system.
When spawning, the NPC is assigned a random class. His skin and trading offers with services that he can give to the player will depend on this. Due to technical issues, services on this version are not yet available.

-NPC resurrection system.
Now you can not be afraid of the death of your beloved NPC, because now it can be resurrected with the help of a Phoenix feather, which you can buy from a priest.

-The purpose of the house.
Each NPC must have their own home. The NPC’s home point is set at the location where they spawn. Because of this, villagers will teleport to their homes at night so they won’t be killed by monsters. If possible, NPCs will sleep in a bed, as long as there is a bed near their home point. Otherwise, the NPC will quietly wander around inside their house.

-NPC replica system
 NPCs are able to talk and comment on something, if there are certain conditions for this:
 Idle replicas are Replicas that are randomly uttered by all NPCs if the player is nearby.
 Idle Companion Replicas are Replicas that are randomly uttered by NPCs that are your companion.
 Greetings - NPCs greet the player every game morning, taking into account his reputation with each NPC.
 Companion NPC biomes react to the biomes they are in with the player.
 Structures- NPC Companions react to some structures (Villages, Underground Fortress, etc.).
 Rumors - Through rumors, the NPCs will know what you were doing in the game and will comment on it. For example, if you picked up a hellstone, the NPCs will comment on it. Or, if you find diamonds, the NPCs will congratulate you on this. There are many things that NPCs can tell you something interesting about.
NPC Companion mobs can warn you about approaching hostile mobs.
 Mob Sounds - NPC Companions can hear the sounds of mobs and warn the player about their proximity.
 Dynamic - NPC Companions can react to the player's actions in dynamics. At the moment, there are not many such actions, these are: A player's sprint, killing a zombie, killing a cow, killing a rabbit.

-NPC inventory.
With enough reputation with an NPC (200), you gain the ability to give items to them. Not enough hands in the mine? No problem! Your companion will gladly help you carry all the loot from the depths of the earth. You can open the NPC’s inventory through the interface, or give items without opening it by simply dropping items at the NPC’s feet. Be careful! Any NPC can pick up your items. And you can retrieve them only through the NPC’s inventory interface.

-Trade
 Each class can have its own trading offers. The player can buy and sell certain items an infinite number of times. However, if very rare and expensive items appear in the trade, they can often be purchased in limited quantities. 

-Services
Depending on their class, NPCs can provide different useful services to the player. (Currently available only for the blacksmith and the miner.)

 

(Don't forget, after changing the settings:
(selecting a neural network, selecting a model, installing an API, etc.), you always need to restart the game)

Installing the OpenAI API:
1. Go to the main menu → Mods → MetaNPC Mod → API-key;
2. Select the model you want to use, insert your key and click "Save API Key";
3. The key will be installed and verified, after which you can restart the game.
(If the key has not been verified, then something is wrong with it and it will not work. It's not my wish list, it's a fact. Solve problems with your key before writing to me (The key is not entered correctly; typo; lack of VPN; key without balance.) If you did not buy a private key, but took it from the left-hand site, the "key generator", etc. do not write to me, because it is a waste of time.)
MARKING: If OpenAI services are not available in your country, a VPN is required.

Installing oLlama in the mod:
1. Download oLlama: https://ollama.com;
2. Find a suitable model for yourself: https://ollama.com/search;
3. Open the PowerShell console by inserting the download line for the selected model (For example, "ollama run llama3.2:3b");
4. Enter the "oLlama list" in the console and copy the model name;
5. Go to the main menu → Mods → MetaNPC Mod → Config → oLlama setting.
Enter the address "http://localhost:11434 " also, paste the model name into the appropriate field and click "save". After choosing to use oLlama, restart the game.

How to change the context file for a neural network:
1. Go to the game menu: "Mods → MetaNPC Mod → Config → NPC Settings → Prompt Setting.


(To make everything work as it should, you will have to make every attempt, experimenting with the text of the context. In some cases, reformulating the context will help, in others, using more powerful models will help so that everything works better and the NPCs respond exactly according to the context. You need to experiment here.)

Credits:
Timur Shayanov - for translating fashion into English.

My Discord is yukiop.
In case there are problems with localization of both Russian and English, so that I make edits. Or, you personally want to inform me about some bug, flaw, tell me about your suggestions or advice.

Download

Download
MetaNPC_Mod-0.7.1.jar 3.7 MB

Leave a comment

Log in with itch.io to leave a comment.