About this mod
Uses OpenAI (Chatgpt) to provide more dialogue as the npcs.
- Requirements
- Permissions and credits
- Donations
Note: Tested on version 1.6. Feel free to reach out with any issues.
A known bug: Sometimes after exhausting vanilla npc dialogue you may not be able to interact with the npc anymore. I have tried to implement a fix. Best you can do is to avoid clicking through the dialogue quickly enough that the AI can't process a response.
Overview: Uses openai to give NPCs dynamic, AI-generated dialogue. This mod creates unique and engaging conversations with every character, adding a new layer of depth and immersion to your interactions. The mod will allow you to exhaust the vanilla dialogue first, and after that you can talk to the npc again for AI generated response. (No you cannot spam talk with npc to raise friendship level)
Features:
- AI-Generated Dialogue: NPCs respond with dynamically generated dialogue using OpenAI's powerful language models.
- Memory System: NPCs remember past interactions and adjust their dialogue accordingly, making each conversation feel more personalized.
- Customizable Settings: Tailor the AI behavior, dialogue memory, response length, and other parameters to suit your preferences.
- Language: You can also change the language the AI will be asked to speak in. As such this is entirely dependent on how well the AI knows such language. Also certain languages such as japanese, or chinese might not work if your game language is different.
How It Works:
- Setup: Provide your OpenAI API key and select the AI model you wish to use. Configure additional settings such as dialogue memory, token limits, and language preferences.
- Interaction: After you exhaust the default dialogue of the npc, interact with the npc again, and the AI will provide new dialogue for the npc to talk about.
- Customization: Use the in-game menu to fine-tune the AI's behavior, including temperature, frequency penalty, presence penalty, and top P settings to control the randomness and creativity of the responses. You can also add your own prompt to each npc in the game. The mod will dynamically add each npc in your save game, so you can even give prompts to modded npcs!
Which Model to Use?
- GPT-4o-mini: newest cheap model. Cheaper, and more capable than GPT-3.5-Turbo.
- GPT-3.5-Turbo: Older cheap model. Efficient and cheap for most dialogues.
- GPT-4o: The newest chatgpt model. Pricey, but quality is much better. Half as cheap as the other GPT-4 based models. Recommended over GPT-4-1106-Preview
- GPT-4-1106-Preview: Older GPT-4 model. Added as it might like nuanced prompts a bit better. GPT-4o is preferred over this in most cases.
Pricing:
pricing is shown as USD per million tokens (~700k words)
- output:
- GPT-4o-mini: $0.60 per 1M tokens.
- GPT-3.5-Turbo: $1.50 per 1M tokens.
- GPT-4o: $15.00 per 1M tokens.
- GPT-4-1106-Preview: $30.00 per 1M tokens
- Input: Input is all of the instructions sent to the AI. On it's own it's not much, but depending on your memory setting costs can increase (Memory is basically sending the AI's previous responses to it again.)
- GPT-4o-mini: $0.150 per 1M tokens
- GPT-3.5-Turbo is $3.00 per 1M input tokens
- GPT-4o: $5.00 / 1M tokens
- GPT-4-1106-Preview: $10.00 per 1M tokens.
- For more info you can check pricing.
Service Setup:
- OpenAI API: First, create an OpenAI account or sign in. Next, navigate to the API key page and "Create new secret key", optionally naming the key. Make sure to save this somewhere safe. Don't forget to add credits in the billing page.
- Model Selection: Choose your preferred AI model from the available options in the configuration menu.
Installation:
- Download the Mod: Obtain the latest version of AIValley from Nexus Mods.
- Extract Files: Extract the contents to your Stardew Valley mods folder.
- Configure Settings: Launch the game and navigate to the mod configuration menu to input your API key and configure your preferred settings.
- Stardew Valley: Ensure you have the latest version of Stardew Valley installed.
- SMAPI: Install the latest version of SMAPI.
- Generic Mod Config Menu (GMCM): Strongly advised for easy in-game configuration of the mod settings.
For those wondering the portrait mod used for the images is Nyapu's Portraits inspired by Dong
Psst
Check out my other mod Speaking valley that adds TTS.