Compatibility
Minecraft: Java Edition
Platforms
Supported environments
75% of ad revenue goes to creators
Support creators and Modrinth ad-free with Modrinth+Creators
Details
ENG
Changes v.0.3.2:
Spoiler
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:
Spoiler
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, with the integration of ChatGPT and oLlama. That is, you can communicate with NPCs directly through the game's chat. NPCs will also remember past conversations with the player. Communication with NPCs is implemented via GPT, with an array of context for better wagering with NPCs. The context includes:
First and last name of the NPC; His profession; His personality type; His gaming mood; Your reputation level is with him; The biome in which it is located; The height at which it is located (Caves or surface) Various orders and commands (You can ask the NPCs to follow you if their reputation allows); Trade and services (You can ask the NPC to trade and open his inventory, or ask him to provide a service to his profession); The impact of conversations on reputation with NPCs. (Ordinary conversations will raise your reputation a little, insults will lower your reputation, and comments and dialogues in general that NPCs will like will significantly increase your reputation) Saving and loading past dialogs.
GPT-Mod
At the moment, there are two types of GPT operation in the mode: "Push-button mode", "Easy GPT-Mode".
"Button mode" is the standard mode when you need to approach the NPC, right-click on it, and click on the "Speak via GPT" button in the GUI. To complete the dialogue, you need to move away from the NPC by 3 blocks. All the commands for NPCs are working properly in it. It is left as an alternative for those who want to spend less tokens, avoiding generation by NPCs.
"Easy GPT-Mode" is a new mode that is enabled in the mod settings. With it, you can communicate with NPCs via chat without clicking on the button in the GUI. The NPC will "hear" the player in the area of 6 blocks. It can also be determined by the cloud that appears on the side of the NPC. NPCs will also be able to start a dialogue with the player themselves or simply generate replicas. The player can respond to these remarks or ignore them. After 15 seconds, the NPC dialogue will be automatically closed or if you leave the NPC for 6 blocks. When you are in a chat, the timer is reset. Dialogues initiated by the NPC, as well as his remarks, are not stored in the memory of the NPC to save tokens. At the moment, not all text commands are working properly in this mode.
In the future, communication via GPT is planned to trigger various functions for 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.
-
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. Everyone should have their own home. At the spawn site of the NPC, its home point is set. Therefore, residents will teleport to their homes at night so that they are not killed by monsters. You can set up the points of the house of certain residents yourself. But conditions must be met, such as: The house must be indoors and not in an open field; A door must be installed; A bed must be installed.
-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. Having a sufficient reputation with the NPCs (200), it may be possible to transfer items to the NPCs. Are there not enough hands in the mine? It doesn't matter! A companion will be happy to help you take out all the good from the bowels of the earth!
-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 NPCs, depending on their class, can provide different, useful services to the player. (At the moment, only the blacksmith)
(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:
- Go to the main menu → Mods → MetaNPC Mod → API-key;
- Select the model you want to use, insert your key and click "Save API Key";
- 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:
- Download oLlama: https://ollama.com;
- Find a suitable model for yourself: https://ollama.com/search;
- Open the PowerShell console by inserting the download line for the selected model (For example, "ollama run llama3.2:3b");
- Enter the "oLlama list" in the console and copy the model name;
- 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:
- Go to ".minecraft\config\MetaNPC_Mod"
- There will be two files for each language "GPT_Context_en", "GPT_Context_ru", "GPT_LoreFacts_en", "GPT_LoreFacts_ru". Change the one you need: Context: this is the file that contains the main context for the NPC, which is sent every time after each call to the NPC. LoreFacts: this is the file that contains the terms and information about them. If in the chat, the player's sentence contains this term, the NPC will receive the information and form their answer based on this information. (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
Changes v.0.3.2:
Spoiler
Добавлено:
-"Выбор модели, с которым может работать мод через OpenAI (GPT-3.5-Turbo, 4, 4-Turbo, 4-32k, 4o)"
-"Легкий GPT-Режим" - включив эту функцию в меню, с НПС можно будет общаться без взаимодействия в интерфейсе. Достаточно написать что-либо в чат, или указать имя НПС в сообщении. НПС могут сами генерировать реплики, когда рядом игрок. (Idle-реплики, Idle-реплики компаньона, слухи и т.д.) НПС "слышат" игрока за 6 блоков, это можно определить по появившемуся облачку сбоку от НПС.
-"OpenAI можно пользоваться через прокси."
-"Редактирование контекста" - Добавлена возможность редактировать отправляемый контекст для НПС, изменяя его восприятие вашего мира. Стандартный контекст был оптимизирован в 3 раза.
-"Мод стал полностью мультиязычным"
-"Поддержка первой локальной нейросети - oLlama"
-"Много багов" (не забыть удалить этот пункт)
Изменено: -"Процедура регистрации API ключа ChatGPT стал более интуитивно понятным" -"Чтобы подарить подарок НПС, достаточно бросить предмет ему под ноги и он его подберет. Больше никакой кнопки через GUI." -"НПС больше не видят на 360 градусов, если к ним подойти сзади. Генерация реплик не срабатывает, если быть за спинами НПС." -"НПС в коде перестали наследовать тэг "Villager" а стали отдельными "EntityCreature", что потенциально уменьшает количество несовместимых модов, что гарантировано сломают игру"
Changes v.0.2.7:
Spoiler
Добавлено: Реакция НПС на структуры; Реакция НПС на звуки мобов; Реакция НПС на нахождение под землей; Новый класс НПС - Монетчик; Система воскрешения НПС с помощью пера Феникса (Перо можно купить у Священника); Влияние на настроение НПС путем взаимодействия через GUI; Новые услуги для кузнеца: Ремонт - возможность починить предметы за золото; Переплавка - возможность переплавить множество разных видов руды одновременно, за золото. Диалоги через GPT могут повысить/понизить репутацию; Через GPT диалог можно открыть инвентарь НПС, окно торговли, услуг; Через GPT диалог можно попросить НПС следовать за вами, подождать, отпустить от следования; Добавлены контекстные данные для GPT: Биом в котором находится НПС, Высота нахождения НПС (Поверхность или пещеры)
Изменения: "Заглушки" в виде золотых слитков были заменены на золотые монеты; Немного изменена система получения предметов после торговли; Лимит общения с НПС через GUI Инвентарь НПС можно открыть через GUI, вместо Shift-ПКМ; Исправлено запоминание НПС прошлых диалогов через GPT; Ассортимент торговцев был изменен новыми типами предметов, добавление зелий, зачарованных предметов.
Описание: Данный мод добавляет НПС, что заменяют собой ванильных жителей, с интеграцией ChatGPT и oLlama. То есть, с NPC можно общаться напрямую, через чат игры. НПС так же будут запоминать прошлые диалоги с игроком. Общение с НПС реализовано через GPT, с массивом контекста для лучшего отыгрыша с НПС. В контекст входит:
Имя, фамилия НПС; Профессия; Тип личности; Настроение; Уровень репутации; Биом; Пещеры или поверхность; Различные приказы и команды (Можно попросить НПС следовать за вами, если позволяет репутация); Торговля и услуги (Можно попросить НПС поторговать и открыть его инвентарь или же попросить оказать услугу его профессии); Влияние разговоров на репутацию с НПС. (Обычные разговоры будут немного повышать репутацию, оскорбления понижать репутацию, а комплименты и в целом диалоги, что понравятся НПС значительно повышать репутацию); Сохранение и загрузка прошлых диалогов.
GPT-Mod
На данный момент существует два вида работы GPT в моде: "Кнопочный режим", "Легкий GPT-Режим".
"Кнопочный режим" - стандартный режим, когда нужно подойти к НПС, нажать на него правой кнопкой мыши, и нажать на кнопку в GUI "Говорить через GPT". Чтобы завершить диалог, нужно отойти от НПС на 3 блока. В нем исправно работают все команды для НПС. Оставлена как альтернатива для тех, кто хочет тратить меньше токенов, избегая генерации со стороны НПС.
"Легкий GPT-Режим" - новый режим, что включается в настройках мода. С помощью него, можно общаться с НПС через чат, не нажимая на кнопку в GUI. НПС будет "слышать" игрока в районе 6-ти блоков. Так же, это можно определить по появившемуся облаку сбоку от НПС. НПС так же сами смогут начинать диалог с игроком или просто генерировать реплики. Игрок может отвечать на эти реплики а может игнорировать, после 15 секунд - диалог НПС будет автоматически закрыт или если уйти от НПС на 6 блоков. При нахождении в чате, таймер сбрасывается. Диалоги начатые со стороны НПС, а так же, его реплики, не сохраняются в памяти НПС для экономии токенов. На данный момент, не все текстовые команды в этом режиме работают исправно.
В будущем, общение через GPT планируется вызывать различные функции у НПС.
Core-Mod
Однако, если у вас нет возможности пользоваться GPT функцией мода, не страшно. Потому что мод предоставляет и другие функции: ㅤ -Общение с НПС через диалоговые окна, путем кнопок ваших действий. Нажав правой кнопкой мыши на НПС, у вас откроется диалоговое окно. За социальную часть отвечают кнопки "Говорить", "Действия", где будут соответствующие варианты действий к НПС, как дружные или нет. Некоторые реплики в диалогах будут появляться только у НПС с определённым классом и архетипом (На данный момент преимущественно у класса "Фермер", "Кузнец" и архетипы "Циник", ""). Существует три исхода конца диалога: Позитивный - Вы получите дружелюбную реплику НПС, что поднимет вашу репутацию с НПС. Нейтральный - Вы получите нейтральную реплику НПС, что никак не отразится на вашей репутации с НПС. Негативный - Вы получите негативную реплику НПС, что снизит уровень вашей репутации с НПС.
-Система репутации с каждым НПС. У каждого НПС к вам будет свое отношение, по шкале репутации. Вы можете оставаться для них незнакомцем, что они и будут отмечать во время приветствия. Или наладить отношения с ними, это так же будет отмечаться в приветствии игрока. От уровня репутации зависит, сможете ли вы взять НПС в компаньоны или открыть его инвентарь. В будущем, планирую расширить роль репутации в геймплее с НПС.
-Система Архетипов и настроения. Архетип - Каждому НПС присваивается свой Архетип (Личность), что постоянно будет влиять на исход диалога, в той или иной степени. С каким-то архетипом общаться будет проще и соответственно, исход диалога чаще может быть позитивным. Однако, что не скажешь про менее приятные и дружелюбные архетипы. С такими общение может складываться сложнее и чаще всего исход диалога будет отрицательным. Настроение - Если Архетип НПС постоянный, то настроение у НПС переменчивое. Настроение НПС так же как и Архетип, влияет на исход диалога, манипулируя процентами каждого исхода диалога (Позитивный, нейтральный, негативный). Поэтому, определенный "дебафф" в общении, на пример с ахетипом "Ворчун", если у него будет подходящее настроение, можно подловить момент и добиться позитивного исхода диалога с большим шансом.
-Режим компаньона. Имея достаточную репутацию (200), игрок может взять с собой в приключения НПС в роли компаньона. Компаньон может не заставить скучать игрока, потому что тот будет всячески комментировать места, в которых они находятся, предупреждать о нахождении враждебных мобов, комментировать подобранные предметы, блоки.
-Дарение подарков. С человеком, как и с НПС не всегда удастся найти общий язык. И чтобы значительно повысить свою репутацию, можно дарить подарки. Зачастую, есть подарки, что подойдут абсолютно любому НПС. А есть те подарки, что подойдут только определенным классам НПС. Как говорится: для одного - мусор, для другого - сокровище. Однако, нельзя задарить НПС стак алмазов, потому что НПС станет неловко брать от игрока много подарков за раз. Чтобы подарить подарок, достаточно бросить предмет под ноги НПС.
-Система классов. При спавне, НПС присваивается рандомный ему класс. От этого будет зависеть его скин и торговые предложения с услугами, которые он может дать игроку.
-Система воскрешения НПС. Теперь можно не бояться смерти вашего любимого НПС, ибо теперь его можно воскресить с помощью пера Феникса, что можно покупать у священника.
-Назначение дома. У каждого должен быть свой дом. На месте спавна НПС устанавливается его домашняя точка. Поэтому, жители по ночам будут телепортироваться по своим домам, чтобы их не убили монстры. Настраивать точки дома определённых жителей можно самостоятельно. Но должны быть выполнены условия, такие как: Дом должен быть в помещении а не в открытом поле; Должна быть установлена дверь; Должна быть установлена кровать.
-Система реплик НПС НПС умеют разговаривать и что-то комментировать, если для этого есть определённые условия: Idle-реплики* - Реплики, которые рандомно произносят все НПС, если игрок находится рядом. Idle-реплики компаньона* - Реплики, которые рандомно произносят НПС, что являются вашим компаньоном.Приветствия - НПС каждое игровое утро приветствуют игрока с учетом его репутации у каждого НПС.Биомы - НПС-Компаньоны реагируют на те биомы, в которых они находятся с игроком. Структуры* - НПС-Компаньоны реагируют на некоторые структуры (Деревни, Подземная крепость и т.д.).Слухи - Путем слухов, НПС будут знать что вы примерно делали в игре и будут комментировать это. На пример, если вы подобрали адский камень, НПС это прокомментируют. Или же, если вы нашли алмазы, НПС вас в этом поздравят. Есть множество вещей, за которые НПС могут что-то сказать вам интересное. Мобы - НПС-Компаньоны могут предупредить вас о приближающихся враждебных мобах.Звуки мобов- НПС-Компаньоны могут слышать звуки мобов и предупреждать игрока о их близости.Динамические - НПС-Компаньоны могут реагировать на действия игрока в динамике. На данный момент, таких действий не много, это: Спринт игрока, убийство зомби, убийство коровы, убийство кролика.
-Инвентарь НПС. Имея достаточную репутацию с НПС (200), может открыться возможность передавать предметы НПС. Не хватает рук в шахте? Не беда! Компаньон с радостью поможет вынести всё добро с недр земли!
-Торговля У каждого класса могут быть свои торговые предложения. Игрок может покупать и продавать определённые предметы бесконечное количество раз. Однако, если в торговле фигурируют очень редкие и дорогие вещи, зачастую, их можно приобрести в ограниченном количестве.
-Услуги НПС в зависимости от своего класса, могу предоставлять игроку разные, полезные услуги. (На данный момент только у кузнеца)
(Не забывайте, после изменений настроек: (выбор нейросети, выбор модели, установка API и т.д.), всегда необходимо перезапускать игру)
**Установка API OpenAI: ** Зайти в главное меню → Mods → MetaNPC Mod → API-key; Выберите модель, которую хотите использовать, вставьте ваш ключ и нажмите "Сохранить API-ключ"; Ключ будет установлен и пройдет проверку, после чего можно перезагрузить игру. (Если ключ не прошел проверку, значит с ним что-то не так и он не будет работать. Это не мои хотелки, это - факт. Решайте проблемы со своим ключом, прежде чем мне писать (Не правильно введен ключ; опечатка; отсутствие VPN; ключ без баланса.) Если ты не купил личный ключ, а взял его с левого сайта, "генератора ключей" и т.д. не пиши мне, потому что это трата времени.) ПОМЕТКА: если сервисы OpenAI не доступны в вашей стране, необходимо наличие VPN.
Установка oLlama в мод: Скачать oLlama: https://ollama.com/; Найти себе подходящую модель: https://ollama.com/search; Открыть консоль PowerShell, вставив строку скачивания выбранной модели (На пример "ollama run llama3.2:3b"); Введите в консоль "oLlama list" и скопируйте название модели; Зайти в главное меню → Mods → MetaNPC Mod → Config → oLlama setting. Введите адрес "http://localhost:11434/" а так же вставьте название модели в нужное поле и нажмите "сохранить". Выбрав использовать oLlama, перезагрузите игру.
Как изменить файл контекста для нейросети: Переходите в ".minecraft\config\MetaNPC_Mod" Там будет два файла под каждый язык "GPT_Context_en", "GPT_Context_ru", "GPT_LoreFacts_en", "GPT_LoreFacts_ru". Изменяйте тот, который вам нужен: Context: это файл, где содержится основной контекст для НПС, что отправляется каждый раз после каждого обращения к НПС. LoreFacts: это файл, где содержатся термины и информация к ним. Если в чате, предложение игрока будет содержать этот термин, НПС получит информацию и сформируют свой ответ опираясь на эту информацию. (Чтобы заставить все работать как надо, придется приложить ни одну попытку, экспериментируя с текстом контекста. Где-то поможет переформулировка контекста, где-то поможет использование моделей помощнее, чтобы всё работало лучше и НПС отвечали точно по контексту. Тут нужно экспериментировать.)
Благодарность: Timur Shayanov - за перевод мода на английский.