Getting started

Download the example project: the example mod and its Unity project, which this guide builds on. Unzip it, for example to C:\CoiExampleMod.

In order to start modding COI, you will need to:

  1. Own Captain of Industry on Steam and have the game installed.
  2. Have .NET Framework 4.8 installed.
  3. (optional) Have Unity 6000.0.66f1 installed (needed only for asset creation).

Steps

  1. Locate the COI game files via right-click on the game title in the Steam client -> Properties... -> Local Files -> Browse.
  2. Copy the game root path to your clipboard (e.g. C:/Steam/steamapps/common/Captain of Industry).
  3. Create a new environment variable called COI_ROOT and set its value to the game root path copied above. On Windows, use the handy Edit environment variables tool, just open the Start menu and type Edit env and you should see it.
  4. Download the example project and unzip it, for example to C:\CoiExampleMod.
  5. Compile the ExampleMod in the Release configuration located at src/ExampleMod/ExampleMod.slnx (or ExampleMod.sln); every src/ path in this guide is a path in the example project. We recommend to use Visual Studio but feel free to use any other tools, such as the dotnet build console command. Note that dotnet build may not work with the build automation tasks - Visual Studio is recommended. If you are seeing a lot of errors, check your COI_ROOT environment variable, try restarting.
  6. The build automatically deploys to the mods folder (see Automatic deployment). The resulting ExampleMod.dll can also be found in bin/Release/net48.
  7. Launch the game, create a new game, and observe that the ExampleMod is in the list of available mods. Select it and create the new game. You can ensure that the mod was loaded by locating a new node in the research tree (open using G key). In case of any errors, examine logs in the %APPDATA%/Captain of Industry/Logs directory.
  8. Congratulations, you are now running your mod in Captain of Industry!