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:
- Own Captain of Industry on Steam and have the game installed.
- Have .NET Framework 4.8 installed.
- (optional) Have Unity 6000.0.66f1 installed (needed only for asset creation).
Steps
- Locate the COI game files via right-click on the game title in the Steam client ->
Properties...->Local Files->Browse. - Copy the game root path to your clipboard (e.g.
C:/Steam/steamapps/common/Captain of Industry). - Create a new environment variable called
COI_ROOTand set its value to the game root path copied above. On Windows, use the handyEdit environment variablestool, just open the Start menu and typeEdit envand you should see it. - Download the example project and unzip it, for example to
C:\CoiExampleMod. - Compile the
ExampleModin theReleaseconfiguration located atsrc/ExampleMod/ExampleMod.slnx(orExampleMod.sln); everysrc/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 thedotnet buildconsole command. Note thatdotnet buildmay not work with the build automation tasks - Visual Studio is recommended. If you are seeing a lot of errors, check yourCOI_ROOTenvironment variable, try restarting. - The build automatically deploys to the mods folder (see Automatic deployment). The resulting
ExampleMod.dllcan also be found inbin/Release/net48. - Launch the game, create a new game, and observe that the
ExampleModis 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 usingGkey). In case of any errors, examine logs in the%APPDATA%/Captain of Industry/Logsdirectory. - Congratulations, you are now running your mod in Captain of Industry!