Stardew Valley

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.

Article information

Added on

Edited on

Written by

PogDerson

10 comments

  1. Bethany0804
    Bethany0804
    • member
    • 0 kudos
    please ignore my poor gramma ...I found the biggest flaw of this mod is that the NPC didn't know he's already my husband...especialy Shane, in the plot  of Stardew Valley, Shane became more and more positive after married. But if I pressed T to talk to him, he was just so indifferent. So the idea of changing the "brains" of Shane  occurred to me. I've seen the vedio and the article of how to create the new NPC(the horse), then I logged in the Inworld AI web and created a new Shane just like the vedio did. However,  after I exchanging the'null' placed in the 'key' and the "secret" for the code it gave me, Shane can't talk with me anymore. I can talk to other NPC normally ,but Shane just didn't give a s#*! about me.So sad , did I mistake somthing?
    1. Smolvoidcatto
      Smolvoidcatto
      • member
      • 0 kudos
      Please ignore my poor gramma...

      How could you say this? Noone should ignore the poor grammas. 
  2. Ratonerd
    Ratonerd
    • member
    • 0 kudos
    Okay so, i am having issues regarding the creation of a new AI brain and placing it on a NPC (the farm cat for context).
    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.
  3. kristaok
    kristaok
    • member
    • 0 kudos
    This mod is awesome, but it would be even better if it was compatible with SVE.
  4. WilliamIsRexy22wdee
    WilliamIsRexy22wdee
    • member
    • 0 kudos
    how to I find my workplace name
  5. Uyulut
    Uyulut
    • member
    • 0 kudos
    Hello, i added a brain to the game sucessfully (Sophia from SVE), but when i tried to add my custom brain for Elliott(changed the api) he doesn't respond. can you only make one brain at a time?
    1. PogDerson
      PogDerson
      • member
      • 10 kudos
      Hello,
      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"
            }
          }
  6. ragmak
    ragmak
    • member
    • 0 kudos
    so i have been playing around with the ai on the web,  and it seems like they dont have any knowledge about the stardew valley expanded npc, but they have the perfect knowledge on anything else.
    1. Fippsie
      Fippsie
      • premium
      • 91 kudos
      because stardew valley expanded is not part of the base game. you would have to manually create brains for all stardew valley extended characters.
    2. Cobaltcoywolf
      Cobaltcoywolf
      • member
      • 0 kudos
      Also, something to note, the developer of SVE has said they do not want their content being used with this mod.