WurstModders / WurstMod

Deli mod for H3VR to load custom scenes into the game!
MIT License
24 stars 2 forks source link

Custom scripts don't exist in the game #35

Closed Nergal20 closed 3 years ago

Nergal20 commented 3 years ago

Hello, I've tried to create my own script for a custom map. It works inside the editor as the dll, but dissapears when trying to play the map in the game.

According to the wiki:

to use your scripts in-game you can add your compiled DLL file to your level's Deli mod folder and add an entry in the mod manifest for it.

My folder structure looks like this:

TestMap.deli:

and my manifest looks like this:

{
  "name": "Debug Sandbox 2",
  "authors": [
    "Nergal20"
  ],
  "guid": "debug.test.sandbox.test",
  "source_url": "",
  "version": "0.0.0",
  "require": "0.3.1",
  "dependencies": {
        "wurstmodders.wurstmod": "2.0.3",
  },
  "assets": {
    "CustomScript.dll" : "1.0.0",
    "setup": {
    "Debug Sandbox/": "wurstmodders.wurstmod:level",
    }
  }
}

It may not make any sense, because I never created a manifest file before. I was able to copy and customize one that worked.

I was lucky this manifest at least works, because 99% of the manifests I got from r2modman just doesn't work when I try to copy them and import as a local mod.

TL;DR: How to properly add a dll to the manifest?

Nergal20 commented 3 years ago

Of course I found the answer shortly after asking the question. For anybody with the same problem, this manifest will work for custom scripts:

{
  "name": "Debug 2 Sandbox",
  "authors": [
    "Nergal20"
  ],
  "guid": "debug.test.sandbox.test",
  "source_url": "",
  "version": "0.0.0",
  "require": "0.3.1",
  "dependencies": {
        "wurstmodders.wurstmod": "2.0.3",

  },
  "assets": {
    "setup": {
    "Debug Sandbox/": "wurstmodders.wurstmod:level",
    "Debug Sandbox/CustomScript.dll": "deli:assembly",
    }
  }
}