Creating a new modding project - naelstrof/ChurnVectorSDK GitHub Wiki

This wiki contains information on setting up a new modding project to a state that will allow you to start any of the other modding guides defined here.

Important troubleshooting note

Because of the way Churn Vector loads mods, if you are subscribed to mods on the steam workshop and open up the SDK in Unity, it will attempt to load those mods in your editor which can cause a bunch of problems. If you are seeing errors you can't explain and nothing contained in this Wiki solves your problem, remove all mods from your machine to ensure its not just because the editor doesn't like you having someone elses mod loaded up!

Downloading the SDK

To start, install Github Desktop, and use it to clone the example modding project: https://github.com/naelstrof/ChurnVectorModdingExample.git

Anytime you need to update the SDK, simply use github desktop to pull the changes.

If you are alergic to GUI's then check the bottom of this page for how to do this via the CLI.

Opening the modding project

Before trying to open the project, you'll first need to install a git executable. You can do so from commandline by inserting winget install Git.Git into a CMD.

image

You also will need Blender, as it is used to import many of the models within Churn Vector. We use the Blender 3.6 LTS for its ability to use the Vertex Color Master addon.

You can install it via winget install 9PF6NVNS3F0P, or from the Blender website. The Steam install won't work, as its not added to they system's PATH.

Finally, install Unity Hub, and use it to open the project folder. It should automatically install the correct version of unity for you.

Making sure you can build mods properly.

Finally, install the Mono build versions for all platforms using the gear on the Unity project.

image

Once completed, open the unity project and you should find yourself in the default scene with two character loaders. If unity loaded an empty scene you can find this scene in the root of your project named "ExampleScene"

Its likely you will be met with everything being pink, don't worry, just close unity and re-launch it (this happens due to some locally stored files needing to be re-generated).

Launch the project again and everything should appear textured and right then you're ready to start modding!

Getting this package via a terminal or git CLI

In the event you don't want to use a GUI then you will need to manually set up the submodules doing this:

  1. git clone https://github.com/naelstrof/ChurnVectorModdingExample.git
  2. cd ChurnVectorModdingExample
  3. git submodule init
  4. git submodule update

Updating the SDK version in an existing project

If the SDK updates and you have an existing project you have a couple of ways to handle this. The first is to wait until the demo project is updated to use the new version of the SDK and then simply move your content to a new project (or just merge it into your project but that might break stuff)

Alternatively you can manually update the SDK version (though you won't get any example map changes if you do) by navigating to Packages/ChurnVectorSDK and doing a git pull to get the latest files but this means you will potentially be getting a newer version of the SDK than the base game is running on steam so be sure to test your mods if you do this, prior to uploading them.

FAQ

When I open the example scene the prefabs in the hierachy show as missing

This most commonly happens when the SDK has not imported correctly into unity. To fix this, look for the ChurnVectorSDK in your Packages folder under the Project tab. Right click on it and hit "Re-import".

If the folder does not exist at all you may need to click "Re-Import all" on the packages folder, this will take a bit of time.

When I open the example scene only a grey box displays/some things look invisible when I hit play

This can happen when Unity fails to convert assets to .fbx via blender, sometimes this can happen and Unity won't inform you that this is the problem and even if you have Blender installed to the correct version, theres a chance Unity is not aware of it.

To confirm this, in the project window go to Packages/Churn Vector SDK/BuiltIn/Characters/Spawner and take a look at the assets there.

Locate the Spawner asset and click on it. In the Inspector panel if something has gone wrong here there will be an error banner with "Print to Console" next to it that you can use to get Unity to tell you why this failed to import in the console.