promotional bannermobile promotional banner

MetaNPC

Replacing Villagers with NPCs with integrated ChatGPT



---------------------------- ENG ---------------------------

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. 

If you are upgrading from a previous version of the mod, you need to update the prompt to 0.7.1. Go to Mods - MetaNPC Mod - NPC Setting - Prompt Setting. Click the "Reset Promp" button to update it. 

- 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.

 

 

Changes v.0.5.2.:

Added:
-"OpenRouter support for the mod. OpenRouter provides many different role-play-friendly models."

-"Flexible configuration of GPT reactions for NPCs. You can set cooldown limits for different types of generation or completely disable specific GPT reactions."

-"Miner services – NPCs with the 'miner' profession can now be hired. When needed, the miner can follow you, mine visible ore, and point out ore behind blocks within a small radius."

-"Summary System – After each conversation with an NPC, a short summary of the interaction is generated. The system stores 10 summaries, which are given to the NPC during context loading. New summaries are saved and old ones are deleted."

-"Fragment Memory – In addition to summaries, NPCs can remember important information (if the AI considers it important or unusual). These memories are saved separately and loaded when needed. If an NPC has forgotten something, you can try reminding them. If your message contains enough key words, the system will find the memory and load it."

-"New prompt system – The prompt is now divided into 'Main Prompt', 'Player Name', and 'Player Info'. NPCs are no longer tied to a single global prompt. This means that different NPCs can have different prompts if you manually edit their files. If you change the Main Prompt, new NPCs will use it, while old NPCs will continue using their previous version."

-"Biography – Each NPC now generates their own biography (from pre-written fragments), improving NPC self-awareness and role-play quality."

-"Unique NPCs – In addition to regular generated NPCs, the world now contains pre-made NPCs with their own story and personality. Currently, Alex, Steve, and Quilla can be found. They spawn in their houses in the Plains biome."

 

Changed:
-""Button Mode" – completely removed from the mod. Instead, only the "Easy GPT Mode" is available. If you don’t want NPCs to generate anything automatically, simply disable all GPT generations in the mod settings."

-"Improved home system. NPCs will now sleep in their own houses if they have a bed. Yes, you must provide NPCs with a sleeping place."

-"Improved NPC combat system. Companion NPCs now attack hostile mobs with an iron sword and with attack animations. Equipping NPCs manually is not yet possible."

-"Changed the gift-giving and NPC inventory system. To give an item to an NPC, you must press SHIFT + Q to gift an item from the hotbar. If you simply drop any item near the NPC, they will pick it up into their inventory."

-"Fixed a localization bug where, if the game language was not RU or EN, the mod displayed localization keys instead of text. Now, if the game language is not supported by the mod, English is applied automatically."

-"Fixed a bug where curing a zombie villager created two NPCs: one normal and one broken duplicate."

-"Fixed a bug where NPCs could have only four last names."

 

There are also some other fixes and additions, but they will not be noticeable to most players.

 

Changes v.0.3.2:

Added:

-"Choosing a model that the mod can work with via OpenAI (GPT-3.5-Turbo, 4, 4-Turbo, 4-32k, 4o)"

-"Easy GPT-Mode" - by enabling this function in the menu, you can communicate with NPCs without interacting in the interface. It is enough to write something in the chat, or specify the name of the NPC in the message. NPCs can generate replicas themselves when a player is nearby. (Idle replicas, companion Idle replicas, rumors, etc.) NPCs "hear" the player in 6 blocks, this can be determined by the cloud that appears on the side of the NPC.

-"OpenAI can be used through a proxy."

-"Context Editing" - Added the ability to edit the sent context for the NPC, changing his perception of your world. The standard context has been optimized 3 times.

-"The mod has become completely multilingual"

-"Support for the first local neural network - oLlama"

-"A lot of bugs" (don't forget to delete this item)

Changed:
-"The procedure for registering the ChatGPT API key has become more intuitive"

- "To give a gift to an NPC, it is enough to throw an object at his feet and he will pick it up. No more buttons via GUI."

- "NPCs can no longer see 360 degrees if you approach them from behind. Replica generation does not work if you are behind the backs of NPCs."

-"NPCs in the code stopped inheriting the "Villager" tag and became separate "EntityCreature", which potentially reduces the number of incompatible mods, which is guaranteed to break the game"


Changes v.0.2.7:

Added:
The reaction of NPCs to structures;
NPCs' reaction to mob sounds;
The NPC's reaction to being underground;
A new class of NPCs is a Moneyman;
The NPC resurrection system using the Phoenix Pen (The pen can be purchased from a Priest);
Influencing the mood of NPCs by interacting through the GUI;
New services for the blacksmith: Repair - the ability to repair items for gold; Remelting - the ability to melt many different types of ore at the same time, for gold.
Dialogues via GPT can increase/decrease reputation;
Through the GPT dialog, you can open the inventory of NPCs, the window of trade, services;
Through the GPT dialog, you can ask the NPC to follow you, wait, let go of following;
Added contextual data for GPT: The biome in which the NPC is located, the height of the NPC location (Surface or caves)

Changes:
The "plugs" in the form of gold bars were replaced with gold coins;
The system of receiving items after trading has been slightly changed;
Limit of communication with NPCs via GUI
NPC inventory can be opened via the GUI, instead of Shift-PCM;
Fixed NPCs memorizing past dialogues via GPT;
The assortment of merchants has been changed with new types of items, the addition of potions, enchanted items.

 

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.

 

---------------------------- RUS ---------------------------

Изменения v.0.7.1:

 

Это целиком и полность - эксперементальное обновление, добавляющее
эксперементальные функции, что могут работать не очень стабильно.

Добавлено:

-Новый режим "Рассказчик" (Экспериментально)
   *Гланое нововведение этого обновления. Благодаря этому режиму, мир игры может ощущаться более живым чем был ранее. Рассказчик будет анализировать текущую ситуацию рядом с игроком, генерируя вам определенные ивенты в которых вы можете учавствовать. От простой помощи НПС в поиске предмета, до полноценных засад разбойников на игрока, что захотят его ограбить.
На данный момент, у Рассказчика заготовлено 7 ивентов для игрока.

Так как в этом "режиме" нет привычного интерфейса взаимодействия с НПС, ваш главный интерфейс в этом режиме - это игровой чат и ваши действия. Рекомендуется использовать сильную нейросеть в режиме "Рассказчик", чтобы НПС понимали ваши намерения и не тупили на ровном месте.
При желании, "Рассказчика" можно отключить в "Экспериментальных настройках".

-Новая система деревнь.   
   *Теперь, каждая деревня имеет свое название, имеет свои границы. НПС будут знать в какой деревни они родились или же будут знать, что они находятся в чужой деревни. Или НПС будут знать, что в данный момент, они вообще не находятся в деревне. 

Если вы обновляетесь с прошлой версии мода, вам необходимо обновить промпт под 0.7.1. Перейдите в Mods - MetaNPC Mod - Настройка НПС - Настройка промпта. Нажмите кнопку "Сбросить Промп", чтобы обновить его.

-Система слухов
   *Система тесно связанная с режимом "Рассказчик". После вашего участия в ивентах, о вас могут идти слухи среди деревень. На пример, если вы в ходе ивента помогли какому-либо НПС, в его родной деревне об этом узнают и это будет учитывать в разговоре с ними. Причем, у каждой деревне - свои "слухи". Если вы помогли НПС из "Деревни А", об этой помощи не будут знать НПС из "Деревни Б".

-Новый класс НПС - "Разбойник"   
   *Технические НПС, что будут появляться во время засад на игрока.

 

 

Изменения:

-После смерти НПС, с них будут выпадать все вещи из инвентаря. Теперь НПС не уносит все вещи "с собой в могилу".

-Исправлены баги боевой система НПС, во время атаки на игрока.

-Немного изменен формат внешнего вида чата, во время общения с НПС.

-Исправлен баг, из-за которого, во время первого общения с НПС, он мог зависнуть (облако диалого подсвечивалось, но не анимировалось) и не начиналось общение, пока не заговорить с НПС второй раз.

-Дополнена механика в выборе собеседника-НПС. Ранее, когда игрок писал в чат, в качестве собеседника выбирался либо НПС, чье имя было упомянуто. Либо самый ближайший НПС. Теперь же, в первую очередь, для общения будет выбираться тот НПС, на которого будет указан прицел игрока.

 

Изменения v.0.6.5:

 

Добавлено:

-Новый класс НПС - "Пробужденный"
   *Этот НПС позволяет создавать вам своих, собственных НПС через меню "Услуги". А так же, выдает вам "Камень призыва", чтобы добавить НПС в свой мир (Для читеров или создателей карт, можно использовать команду /metanpc_create и /metanpc_spawnprofile <Имя профиля НПС>). Создавая своих НПС, вы сохраняете их в формате .MetaProfile. А это значит, НПС всегда будет сохранен в первозданном состоянии и появляется возможность делиться своими созданными НПС, передавая его файл .MetaProfile.

-Новый класс НПС - "Страж"   
   *Самостоятельные НПС, что будут защищать жителей от внешних угроз. А именно - ванильные враждебные мобы и от враждебных игроков.
Так же, Стража не ходит рандомно по деревне, как остальные жители. Стража - патрулирует по тропам деревни, прокладывая маршруты по тропам. На эти маршруты можно влиять самому, создавая\соединяя тропы или удаляя не нужную тропу, на которую вы не хотите, чтобы стража тратила свое время. Стража не нуждается во сне, не уходит далеко от деревни, не может быть нанята как компаньон.

-Новый тип реакций - "Динамические реакции"
   *Кардинально новый тип реакции НПС на игрока. Ранее, НПС не могли динамично реагировать на действия игрока. Теперь же, есть вероятность, что НПС сможет отреагировать на какое-либо действие игрока (Добыча алмаза, переплавка руды, убийство мобов, подбор предмета, крафт предмета и т.д.). В моде на данный момент, около 150-ти триггеров, что могут спровоцировать НПС на комментарий. Какое-либо ваше действие в игре не имеет 100% срабатывания, чтобы не перегружать систему комментариями и не надоедало игроку. На пример, НПС может отреагировать на действие игрока "Использовать верстак", только с вероятностью 15% процентов. Комментарии работают как через нейросеть, так и на заранее заготовленных репликах.

-Логгер событий (Экспериментально)
   *Новый тип входных данных для GPT, для лучшего понятия контекста происходящего. Логгер событий записывает абсолютно все действия игрока (Поломка блоков, установка блоков, использование предметов, убийство мобов и т.д.), это может дать НПС контекст происходящего. На пример, НПС всегда будет знать, что вы скрафтили на верстаке минуту назад. Или будут знать, что вы положили в сундук или взяли из него.

-Лорный архив (Экспериментально)
   *Новый тип входных данных для GPT, для лучшего понятия терминов, событий, лора. Чтобы не перегружать стандартный промпт НПС громоздкими деталями из большого количества символов, был придуман Лорный архив. Он содержит в себе разную информацию о мире игры. На пример, если в архиве есть информация об "Эндермене" и игрок спросит у НПС "Что ты знаешь об Эндерменах?" - система начнет искать в сообщение игрока ключевые слова, что могут содержаться в Архиве. В данном случае, ключевым словом будет "Эндерменах" и система подгрузит информацию из этой карточки для контекста.

-Система рабочих зон
   *Система созданная для активной работы НПС. На данный момент, этими зонами могут пользоваться: Фермер, Пастух, Лесник. Чтобы создать рабочую зону, необходимо использовать предмет "Книга рабочих зон".

-Новые услуги от НПС:
   *Фермер - Наняв фермера, его можно назначить на рабочую зону. В зависимости от размера рабочей зоны, Фермер сам может сделать поле для посева урожая. Однако, рекомендуется заранее создать готовое поле для работы фермера. Фермер может сажать и собирать базовые культуры - пшеница, морковь, картошка. Чтобы фермер начал работать - снабдите его семенами растений. Имея костную муку, он будет ускорять рост растений.
   *Лесник - Наняв лесника, его можно назначить на рабочую зону. Лесника необходимо снабдить саженцами, чтобы он начал засеивать рабочую зону саженцами деревьев. Когда деревья вырастут, он начнет их срубать и садить саженца заново.
   *Пастух - Наняв пастуха, его можно назначить на рабочую зону. Рекомендуется построить в этой зоне загон, где УЖЕ должен находиться скот. Имея нужный корм для скота, пастух будет их размножать до указанного лимита. Если лимит будет превышен, Пастух может начать забой скота для получения мяса, кожи, перьев. Если Пастух будет иметь в инвентаре ножницы или ведро, Пастух может стричь овец и доить коров.
   *Искатель приключений - Наняв Искателя приключений, вы можете брать его в компаньоны, не имея 200 очков репутации.

-Новые предметы: 
   * "Камень призыва" - позволяет заспавнить перед вами НПС из файла .MetaProfile. У такого НПС будет гарантированная репутация в 200 очков, позволяющая брать такого НПС в компаньоны. Этот предмет можно получить у НПС класса "Пробужденный" за каждые 10 уровней игрока.
  * "Книга конфигурации" - появляется при входе в игру. Позволяет настраивать мод, используя этот предмет.
  * "Книга рабочих зон" - появляется при входе в игру. Позволяет создавать рабочие зоны для НПС. Следуйте инструкциям из книги, чтобы ее создать.

 

Изменения:

-Были незначительно изменены модели мужских и женских НПС. Мужские НПС используют модель - Стива, Женские НПС используют модель - Алекс.

 

Изменения v.0.5.2:

Добавлено:
-"Поддержка OpenRouter для мода. В OpenRouter много разных, подходящих ролевых моделей"

-"Гибкая настройка GPT-реакций НПС. Можно указать ограничение по таймеру для той или иной генерации. Или же полностью отключать ту или иную генерацию."

-"Услуги шахтера - теперь НПС с профессией "шахтер" можно нанять. При необходимости, шахтер может следовать за вами, копать видимую руду и в не большом радиусе подсказывать вам нахождение руды за блоками."

-"Система Саммери - Теперь после каждого окончания общения с НПС, формируется краткое содержание общения игрока и НПС. Сохраняются 10 саммери, что будут каждый раз "вскармливаться" НПС, новые будут сохраняться а старые - удаляться."

-"Фрагментная память - Помимо Саммери, НПС могут запоминать важную информацию (если нейросеть посчитает ее важной или просто необычной), сохраняя ее отдельно и подгружая тогда, когда это необходимо. Если НПС что-то "забыл", вы можете попробовать ему об этом напомнить. Если ключевых слов достаточно, система найдет это воспоминание и загрузит. Или если в целом, в вашем сообщении будет достаточно ключевых слов для нахождения существующего воспоминания в фрагментной памяти."

-"Новая система промпта - Теперь промпт может быть разделен на "Главный промпт", "Имя игрока", "Информация об игроке". Так же, НПС больше не зависят от "единого" промпта. Это значит, что у разных НПС может быть разный промпт, если его вручную изменить в файлах НПС. Или если же вы внесете изменение в главный Промпт, новые НПС будут опираться на него, а старые НПС - опираться на старый промпт.

-"Биография - У каждого НПС теперь генерируется своя биография (из заранее заготовленных кусочков), что должно улучшить восприятие НПС о себе и улучшить качество отыгрыша."

-"Уникальные НПС - Помимо обычных, генеративных НПС, в мире теперь будут появляться заранее заготовленные НПС, со своей историей, характером. На данный момент, в мире можно найти: Алекс, Стив, Квилла. На данный момент они спавнятся в своих домах в биоме "Равнина""

Изменено:

-""Кнопочный режим" - полностью удален с мода. За место него можно использовать только "Легкий GPT-режим". А если вы не хотите чтобы НПС сами что-то генерировали как в "Кнопочном режиме", просто отключите все генерации в настройках мода."

-"Доработана система дома. Теперь НПС будут спать у себя в домах, если у них будет кровать. Да, вам придется обеспечить НПС спальным местом."

-"Доработана боевая система НПС. Теперь НПС-компаньоны атакую тражеских мобов с железным мечом в руке, с анимацией атаки. Самому снаряжать НПС пока что нельзя."

-"Изменена система дарения подарков и инвентаря НПС. Теперь - чтобы подарить подарок НПС, вы должны - нажать "SHIFT + Q", чтобы из панели быстрого доступа подарить подарок. Если вы просто выбросите любой предмет в сторону НПС, он заберет его себе в инвентарь!"

-"Исправлен локализационный баг, из-за которого, если язык игры не был RU или EN - мод в место строк текста показывал локализационные ключи. Теперь, если язык игры не входит в перечень мода, автоматически ставится английский язык для мода."

-"Исправлен баг, из-за которого, при лечении зомби-жителя появлялось 2 НПС. Один - нормальный, Второй - сломанный."

-"Исправлен баг, из-за которого у НПС могло быть только 4 фамилии."

 

Есть и некоторые другие исправления и дополнения, но обычному игроку они заметны не будут.

Изменения v.0.3.2:

Добавлено:
-"Выбор модели, с которым может работать мод через OpenAI (GPT-3.5-Turbo, 4, 4-Turbo, 4-32k, 4o)"

-"Легкий GPT-Режим" - включив эту функцию в меню, с НПС можно будет общаться без взаимодействия в интерфейсе. Достаточно написать что-либо в чат, или указать имя НПС в сообщении. НПС могут сами генерировать реплики, когда рядом игрок. (Idle-реплики, Idle-реплики компаньона, слухи и т.д.) НПС "слышат" игрока за 6 блоков, это можно определить по появившемуся облачку сбоку от НПС. 

-"OpenAI можно пользоваться через прокси."

-"Редактирование контекста" - Добавлена возможность редактировать отправляемый контекст для НПС, изменяя его восприятие вашего мира. Стандартный контекст был оптимизирован в 3 раза.

-"Мод стал полностью мультиязычным"

-"Поддержка первой локальной нейросети - oLlama"

-"Много багов" (не забыть удалить этот пункт)

Изменено:
-"Процедура регистрации API ключа ChatGPT стал более интуитивно понятным"

-"Чтобы подарить подарок НПС, достаточно бросить предмет ему под ноги и он его подберет. Больше никакой кнопки через GUI."

-"НПС больше не видят на 360 градусов, если к ним подойти сзади. Генерация реплик не срабатывает, если быть за спинами НПС."

-"НПС в коде перестали наследовать тэг "Villager" а стали отдельными "EntityCreature", что потенциально уменьшает количество несовместимых модов, что гарантировано сломают игру"

Изменения v.0.2.7:

Добавлено:
Реакция НПС на структуры;
Реакция НПС на звуки мобов;
Реакция НПС на нахождение под землей;
Новый класс НПС - Монетчик;
Система воскрешения НПС с помощью пера Феникса (Перо можно купить у Священника);
Влияние на настроение НПС путем взаимодействия через GUI;
Новые услуги для кузнеца: Ремонт - возможность починить предметы за золото; Переплавка - возможность переплавить множество разных видов руды одновременно, за золото.
Диалоги через GPT могут повысить/понизить репутацию;
Через GPT диалог можно открыть инвентарь НПС, окно торговли, услуг;
Через GPT диалог можно попросить НПС следовать за вами, подождать, отпустить от следования;
Добавлены контекстные данные для GPT: Биом в котором находится НПС, Высота нахождения НПС (Поверхность или пещеры)

Изменения:
"Заглушки" в виде золотых слитков были заменены на золотые монеты;
Немного изменена система получения предметов после торговли;
Лимит общения с НПС через GUI
Инвентарь НПС можно открыть через GUI, вместо Shift-ПКМ;
Исправлено запоминание НПС прошлых диалогов через GPT;
Ассортимент торговцев был изменен новыми типами предметов, добавление зелий, зачарованных предметов.

Описание:

Данный мод добавляет НПС, что заменяют собой  ванильных жителей, с интеграцией ChatGPT, oLlama, OpenRouter. То есть, с NPC можно общаться напрямую, через чат игры. НПС так же будут запоминать прошлые диалоги с игроком. Общение с НПС реализовано через GPT, с массивом контекста для лучшего отыгрыша с НПС. В контекст входит:

Имя, фамилия НПС; Профессия; Тип личности; Настроение; Уровень репутации; Биом; Пещеры или поверхность; Различные приказы и команды (Можно попросить НПС следовать за вами, если позволяет репутация); Торговля и услуги (Можно попросить НПС поторговать и открыть его инвентарь или же попросить оказать услугу его профессии); Сохранение и загрузка прошлых диалогов через Саммари или Фрагментную память.


GPT-Mod

На данный момент существует единственный вид работы GPT в моде: "Легкий GPT-Режим".

"Легкий GPT-Режим" - новый режим, что включается в настройках мода. С помощью него, можно общаться с НПС через чат, не нажимая на кнопку в GUI. НПС будет "слышать" игрока в районе 6-ти блоков. Так же, это можно определить по появившемуся облаку сбоку от НПС.
НПС так же сами смогут начинать диалог с игроком или просто генерировать реплики (Если не отключить все типы генерации в настройках мода). Игрок может отвечать на эти реплики а может игнорировать, после 15 секунд - диалог НПС будет автоматически закрыт или если уйти от НПС на 6 блоков. При нахождении в чате, таймер сбрасывается. Диалоги начатые со стороны НПС, а так же, его реплики, не сохраняются в памяти НПС для экономии токенов. 

В будущем,  общение через GPT планируется вызывать различные функции у НПС.


Core-Mod

Однако, если у вас нет возможности пользоваться GPT функцией мода, не страшно. Потому что мод предоставляет и другие функции:

-Общение с НПС через диалоговые окна, путем кнопок ваших действий.
  Нажав правой кнопкой мыши на НПС, у вас откроется диалоговое окно. За социальную часть отвечают кнопки "Говорить", "Действия", где будут соответствующие варианты действий к НПС, как дружные или нет. Некоторые реплики в диалогах будут появляться только у НПС с опредленным классом и архетипом (На данный момент преимущественно у класса "Фермер", "Кузнец" и архетипы "Циник", ""). Существует три исхода конца диалога:
  Позитивный - Вы получите дружелюбную реплику НПС, что поднимет вашу репутацию с НПС.
  Нейтральный - Вы получите нейтральную реплику НПС, что никак не отразится на вашей репутации с НПС.
  Негативный - Вы получите негативную реплику НПС, что снизит уровень вашей репутации с НПС.

-Система репутации с каждым НПС.
  У каждого НПС к вам будет свое отношение, по шкале репутации. Вы можете оставаться для них незнакомцем, что они и будут отмечать во время приветствия. Или наладить отношения с ними, это так же будет отмечаться в приветствии игрока. От уровня репутации зависит, сможете ли вы взять НПС в компаньоны или открыть его инвентарь. В будущем, планирую расширить роль репутации в геймплее с НПС.

-Система Архетипов и настроения.
  Архетип - Каждому НПС присвается свой Архетип (Личность), что постоянно будет влиять на исход диалога, в той или иной степени. С каким-то архетипом общаться будет проще и соответственно, исход диалога чаще может быть позитивным. Однако, что не скажешь про менее приятные и дружелюбные архетипы. С такими общение может складываться сложнее и чаще всего исход диалога будет отрицательным.
  Настроение - Если Архетип НПС постоянный, то настроение у НПС переменчивое. Настроение НПС так же как и Архетип, влияет на исход диалога, манипулируя процентами каждого исхода диалога (Позитивный, нейтральный, негативный). Поэтому, определенный "дебафф" в общении, на пример с ахетипом "Ворчун", если у него будет подходящее настроение, можно подловить момент и добиться позитивного исхода диалога с большим шансом.

-Режим компаньона.
  Имея достаточную репутацию (200), игрок может взять с собой в приключения НПС в роли компаньона. Компаньон может не заставить скучать игрока, потому что тот будет всячески комментировать места, в которых они находятся, предупреждать о нахождении враждебных мобов, комментировать подобранные предметы, блоки.

-Дарение подарков.
 С человеком, как и с НПС не всегда удасться найти общий язык. И чтобы значительно повысить свою репутацию, можно дарить подарки. Зачастую, есть подарки, что подойдут абсолютно любому НПС. А есть те подарки, что подойдут только определенным классам НПС. Как говорится: для одного - мусор, для другого - сокровище. Однако, нельзя задарить НПС стак алмазов, потому что НПС станет неловко брать от игрока много подарков за раз. Чтобы подарить подарок, достаточно бросить предмет под ноги НПС, нажав комбинацию (SHIFT+Q)!!!

-Система классов.
При спавне, НПС присваивается рандомный ему класс. От этого будет зависеть его скин и торговые предложения с услугами, которые он может дать игроку.

-Система воскрешения НПС.
Теперь можно не бояться смерти вашего любимого НПС, ибо теперь его можно воскресить с помощью пера Феникса, что можно покупать у священника.

-Назначение дома.
У каждого должен быть свой дом. На месте спавна НПС устанавливается его домашняя точка. Поэтому, жители по ночам будут телепортироваться по своим домам, чтобы их не убили монстры. При возможности, НПС будут спать на кровати, если рядом с их точки дома есть кровать. В противном случае, НПС будут тихо бродить у себя дома.

-Система реплик НПС
 НПС умеют разговаривать и что-то комментировать, если для этого есть определнные условия:
 Idle-реплики - Реплики, которые рандомно произносят все НПС, если игрок находится рядом.
 Idle-реплики компаньона - Реплики, которые рандомно произносят НПС, что являются вашим компаньоном.
 Приветствия - НПС каждое игровое утро приветствуют игрока с учетом его репутации у каждого НПС.
 Биомы - НПС-Компаньоны реагируют на те биомы, в которых они находятся с игроком.
 Структуры- НПС-Компаньоны реагируют на некоторые структуры (Деревни, Подземная крепость и т.д.).
 Слухи - Путем слухов, НПС будут знать что вы примерно делали в игре и будут комментировать это. На пример, если вы подобрали адский камень, НПС это прокомментируют. Или же, если вы нашли алмазы, НПС вас в этом поздравят. Есть множество вещей, за которые НПС могут что-то сказать вам интересное. 
 Мобы - НПС-Компаньоны могут предупредить вас о приближающихся враждебных мобах.
 Звуки мобов - НПС-Компаньоны могут слышать звуки мобов и предупреждать игрока о их близости.
 Динамические - НПС-Компаньоны могут реагировать на действия игрока в динамике. На данный момент, таких действий не много, это: Спринт игрока, убийство зомби, убийство коровы, убийство кролика.

-Инвентарь НПС.
 Имея достаточную репутацию с НПС (200), может открыться возможность передавать предметы НПС. Не хватает рук в шахте? Не беда! Компаньон с радостью поможет вынести всё добро с недр земли! Инвентарь НПС можно открыть через интерфейс или же передавать предметы не открывая интерфейс, просто бросив предметы под ноги НПС. Осторожно! Любой НПС может подбирать ваши предметы! Но забрать их можно только с интерфейса инвентаря!

-Торговля
 У каждого класса могут быть свои торговые предложения. Игрок может покупать и продавать опредленные предметы бесконечное количество раз. Однако, если в торговле фигурируют очень редкие и дорогие вещи, зачастую, их можно приобрести в ограниченном количестве. 

-Услуги
НПС в зависимости от своего класса, могу предоставлять игроку разные, полезные услуги. (На данный момент только у кузнеца, шахтера)


 

(Не забывайте, после изменений настроек: (выбор нейросети, выбор модели, установка API и т.д.),
всегда необходимо перезапускать игру!!!!!!!!)

Установка API OpenAI: 
1. Зайти в главное меню → Mods → MetaNPC Mod → API-key;
2. Выберите модель, которую хотите использовать, вставьте ваш ключ и нажмите "Сохранить API-ключ";
3. Ключ будет установлен и пройдет проверку, после чего можно перезагрузить игру.
(Если ключ не прошел проверку, значит с ним что-то не так и он не будет работать. Это не мои хотелки, это - факт. Решайте проблемы со своим ключом, прежде чем мне писать (Не правильно введен ключ; опечатка; отсутствие VPN; ключ без баланса.) Если ты не купил личный ключ, а взял его с левого сайта, "генератора ключей" и т.д. не пиши мне, потому что это трата времени.)
ПОМЕТКА: если сервисы OpenAI не доступны в вашей стране, необходимо наличие VPN.

Установка oLlama в мод:
1. Скачать oLlama: https://ollama.com;
2. Найти себе подходящую модель: https://ollama.com/search;
3. Открыть консоль PowerShell, вставив строку скачивания выбранной модели (На пример "ollama run llama3.2:3b");
4. Введите в консоль "oLlama list" и скопируйте название модели;
5. Зайти в главное меню → Mods → MetaNPC Mod → Config → oLlama setting.
Введите адрес "http://localhost:11434" а так же вставьте название модели в нужное поле и нажмите "сохранить". Выбрав использовать oLlama, перезагрузите игру.

Как изменить файл контекста для нейросети:
1. Переходите в меню игры "Mods → MetaNPC Mod → Config → Настройка НПС → Prompt Setting."

(Чтобы заставить все работать как надо, придется приложить ни одну попытку, экспериментируя с текстом контекста. Где-то поможет переформулировка контекста, где-то поможет использование моделей помощнее, чтобы всё работало лучше и НПС отвечали точно по контексту. Тут нужно экспериментировать.)

Благодарность:
Timur Shayanov - за перевод мода на английский.

Мой Discord: yukiop.
На случай, если будут проблемы с локализацией как русской так и английской, чтобы я вносил правки. Или же, вы лично захотите сообщить мне о каком-нибудь баге, недочете, сообщить о своих предложениях или советы.

The MetaNPC Team

profile avatar
  • 9
    Followers
  • 1
    Projects
  • 3.2K
    Downloads