Jump to content

Mod Dev: Unable to Make Save to Test


SirR3AL

Recommended Posts

Hello,

I am new to modding in Vintage Story, but I am playing with the modding environment to try and develop a simple mod to test how it all works. I am encountering an issue though. After setting up my Dev environment with Visual Studio and launching the game through the IDE, I can launch the game to no errors but when attempting to create a test world to see my changes the world loading will fail. When canceling the creation and returning to the Singleplayer tab, a red error message is displayed on the world saying: "Unable to load savegame and no write access, likely opened elesewhere." I do not have to game running in any other instance and I am unsure if there is some permission I need to setup to give the IDE access to create or load saved games. I have added some images to better show this. I have not added any code. I have only created a default Mod Template via the wiki tutorial and tried to boot it to make sure every loads correctly. Any help on the topic would be appreciated as I would love to learn how to create in the game. Thank you

Capture.PNG

Capture 1.PNG

Link to comment
Share on other sites

  • 5 months later...

Hey, how did you manage to get the game to run? I'm trying to get this working but when I run examplemod:client I get this error, here tested directly on Vintagestory.dll:

dotnet ~/Downloads/vintagestory.app/Vintagestory.dll
Unhandled exception. System.IO.FileLoadException: Could not load file or assembly 'Vintagestory, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.

Which I think comes from here in launchSettings.json:

      "commandName": "Executable",
      "executablePath": "dotnet",
      "commandLineArgs": "\"$(VINTAGE_STORY)/Vintagestory.dll\" --tracelog --addModPath \"$(ProjectDir)/bin/$(Configuration)/Mods\"",
      "workingDirectory": "$(VINTAGE_STORY)"

I've been struggling at this for an hour but couldn't figure out how to fix this. I even removed the .dll to try and launch with the actual Unix executable but while the game launches the mod contents are missing, and I'm doubting if the executable even sees the arguments (--tracelog --addModPath \"$(ProjectDir)/bin/$(Configuration)/Mods\")

Of course the actual file exists, and I also tried changing its permissions, so I don't understand why .NET cannot load it. I have .NET 7.0.410 which should be compatible with 1.19.8 as far as I could find.

Update:
Nevermind I found a workaround by having a separate vintagestory.app installation only for mod testing and modifying my launchSettings.json:

{
  "profiles": {
    "Client": {
      "commandName": "Executable",
      "executablePath": "bash",
      "commandLineArgs": "-c \"cp -R $(ProjectDir)/bin/$(Configuration)/Mods/* $(VINTAGE_STORY)/Mods && $(VINTAGE_STORY)/Vintagestory --tracelog\"",
      "workingDirectory": "$(VINTAGE_STORY)"
    },
    "Server": {
      "commandName": "Executable",
      "executablePath": "bash",
      "commandLineArgs": "-c \"cp -R $(ProjectDir)/bin/$(Configuration)/Mods/* $(VINTAGE_STORY)/Mods && $(VINTAGE_STORY)/VintagestoryServer --tracelog\"",
      "workingDirectory": "$(VINTAGE_STORY)"
    }
  }
}

This way the mod is copied in the Mods folder and then the game is launched.

Edited by jayu
Fixed
Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.