Inworld Studio
The Inworld mod for Stardew Valley allows characters to interact with the player using AI generated responses. These characters can be customized using your own created characters from Inworld Studio. For this example, we will allow our horse 'Murat' to converse with the player when talked to.
Character
Simply register for Inworld Studio if you haven't already, and create a new character. In this example, the 'Auto-generate' tool will be used after providing a simple description, though feel free to spend extra time customizing your character.
API Key
Ensure that you have an API key and secret, these can be generated from the 'Integrations' tab in Inworld Studio.
Note: Keep your API Key and Secret private. You may suspend the key at any time from the 'Integrations' tab.
Mod Configuration
Navigate to your Inworld Mod install folder inside 'Stardew Valley\Mods' and open the Config.json file.
Add an entry for your character by adding an entry in the 'brains' section.
Fill out the 'workspace' field with your Inworld Studio Workspace name.
Fill out the 'character' field with your Inworld Studio Character's name.
Fill out the 'api' 'key' and 'secret' fields with the generated API key and secret.
For example, 'Murat' at our Inworld Studio page 'https://studio.inworld.ai/workspaces/default-9oelu25_n3s9pjwrg0b_1g/characters/murat/edit' will look like the following json."Murat": {
"character": "murat",
"workspace": "default-9oelu25_n3s9pjwrg0b_1g",
"api": {
"key": "fxrejzyudyPLRsUrudAp7W072Q9Fj3wX",
"secret": "JRGlKQOgPakka0myJbhLd2fnuyvEYZUbVVY28dNyaWpeQWQ0vD9JaGLVqs23M7EK"
}
}
Note: The above key and secret are for this example only. At the time of publishing this article these have been suspended and will not work.
Result
Open Stardew Valley, and simply use 't' to open the chat box while near the NPC powered by the Inworld brain to talk with them.
10 comments
How could you say this? Noone should ignore the poor grammas.
I have followed all of the guides from head to toe, yet i keep getting the same error at the same exact spot, so i decided to take notes.
It seems that everytime i replace "null" in either key or secret in the API fields i get an error sayin it is not a valid JSON. ere's an example:
[Inworld] Mod crashed on entry and might not work correctly. Technical details:
Newtonsoft.Json.JsonReaderException: Can't parse JSON file at c:\program files (x86)\steam\steamapps\common\Stardew Valley\Mods\Inworld\config.json. This doesn't seem to be valid JSON.
Technical details: Unexpected character encountered while parsing value: K. Path 'brains.Blanky.api.key', line 7, position 16.
at StardewModdingAPI.Toolkit.Serialization.JsonHelper.ReadJsonFileIfExists[TModel](String fullPath, TModel& result) in SMAPI.Toolkit\Serialization\JsonHelper.cs:line 86
at StardewModdingAPI.Framework.ModHelpers.DataHelper.ReadJsonFile[TModel](String path) in SMAPI\Framework\ModHelpers\DataHelper.cs:line 50
at StardewModdingAPI.Framework.ModHelpers.ModHelper.ReadConfig[TConfig]() in SMAPI\Framework\ModHelpers\ModHelper.cs:line 101
at ModEntry.Entry(IModHelper helper) in C:\dev\matt-carey\Inworld\inworld-stardew-valley\Inworld\ModEntry.cs:line 9
at StardewModdingAPI.Framework.SCore.LoadMods(IModMetadata[] mods, JsonHelper jsonHelper, ContentCoordinator contentCore, ModDatabase modDatabase) in SMAPI\Framework\SCore.cs:line 1766
Now, i don't know the next thing about programming, so i figured i'd come over and ask for help, because i don't want to miss out on the fun of a customized AI npc.
P.S.: i tried replacing te AI brains, but that results in te same error.
Could the fact that i use Notepad++ to configure the file be the issue?
Thanks in advance.
You can make more than one brain at a time.
If you modify an existing character, please ensure that you update the character name, workspace id, api key, and api secret all to match the custom version of the character in your inworld studio.
For example, Elliott is like this by default:
"Elliott": {
"character": "elliott",
"workspace": "stardew-valley",
"api": {
"key": null,
"secret": null
}
}
For example, if your URL for your custom Elliott is https://studio.inworld.ai/workspaces/default-9oelu25_n3s9pjwrg0b_1g/characters/elliott/edit
With api key of fxrejzyudyPLRsUrudAp7W072Q9Fj3wX and api secret of JRGlKQOgPakka0myJbhLd2fnuyvEYZUbVVY28dNyaWpeQWQ0vD9JaGLVqs23M7EK
You must update the above json in-place to be:
"Elliott": {
"character": "elliott",
"workspace": "default-9oelu25_n3s9pjwrg0b_1g",
"api": {
"key": "fxrejzyudyPLRsUrudAp7W072Q9Fj3wX",
"secret": "JRGlKQOgPakka0myJbhLd2fnuyvEYZUbVVY28dNyaWpeQWQ0vD9JaGLVqs23M7EK"
}
}