Mods: Difference between revisions

From The Colonists
Jump to navigation Jump to search
→Enabling a mod and in-game reloading: clarify Active Mods available for creating Custom Map only
No edit summary
Line 1: Line 1:
Mods are in development!<br>
This section is a work in progress!
This section is a work in progress!



Revision as of 18:58, 5 January 2023

This section is a work in progress!

Setup

Creating a mod

  1. If it doesn't already exist, create a Mods folder inside %userprofile%\appdata\LocalLow\Codebyfire Ltd\The Colonists\
  2. Create a folder for your mod inside the Mods folder, e.g. MyAmazingMod
  3. Everything then goes inside MyAmazingMod. You can use subfolders to organise content or keep it all in the main directory, the mod loader in the game will just look at the name of the file to determine what it is.

Steam Workshop Integration

  1. With a new mod placed in the folder %userprofile%\appdata\LocalLow\Codebyfire Ltd\The Colonists\Mods start The Colonists
    1. Selecting Mod Manager will show 3 tabs:
      1. Workshop Subscribed and unsubscribed Mods on the Steam Workshop - Subscribe/Unsubscribe to Mods here
      2. My Mods Published and unpublished Mods in your local folder - Publish/Unpublish and change Mod Workshop visibility here
  2. There should now be 2 files within the %userprofile%\appdata\LocalLow\Codebyfire Ltd\The Colonists\Mods folder of your mods
    1. meta.json - enter the Mod Title and Description for Steam Workshop in this file
    2. thumbnail.jpg - the image file for the mod on Steam Workshop and Mod Panel (a default will be provided if omitted).
  3. When a Mod is published the file PublishedFileId.txt containing the Mod ID will be created
  4. Subscribed mods will be in the folder ``C:\Program Files (x86)\Steam\steamapps\workshop\content\677340\0123456789`` `where 0123456789` is the Mod ID
    1. The Mod ID can be found in 2 places:
      1. In the Published FileId.txt file in the local mod folder
      2. In the link to the mod on the workshop from the Mod Manager interface. e.g. "/filedetails/?id=0123456789"

Enabling a mod and in-game reloading

  1. Enable mods in either Sandbox, Random Map, or Creating a new Custom Map
    1. Sandbox - "Active Mods" will open Mod Manager with Available and Workshop tabs for activating mods.
    2. Random Map - "Active Mods" will open Mod Manager with Available and Workshop tabs for activating mods.
    3. Custom Map - "Active Mods", available when creating a new Custom Map, will open Mod Manager with Available and Workshop tabs for activating mods. Note that you cannot change active mods once the map has been created. Also note that while local mods can be selected for testing, maps containing local mods can not be published to the Steam Workshop. Published Custom Maps with mods will include the mod(s) for subscribers.
  2. When a game is started all selected mods will be activated and their content processed, i.e. json files, images etc.
  3. All activated mods for the current game are listed in the Info panel which accessed in the top left of the screen. If you're using a local mod, you can update your mod and reload the mod mid-game using the 'Reload' button.


   Some things may go wrong when reloading the codex mid-game, depending on the changes you make! For example, removing a building or resource may not go down well.

Codex

Base Codex File

(OLD) Generate default files using the Export Base Codex button in the Mod Manager window.
Note this has been superseded by the repository on GitHub:
https://github.com/codebyfire/colonists-base-codex

Codex Objects

Note many objects can be disabled in their main json file. see DisabledObjects

Scripting (C#)

Text/Localisation

Building, Structure, and LandRoute footprint rendering

The render.json file can be used to change, or define, the building, structure, and track footprint shown when they are placed. And the rendering of Tree Fields, Plantable Fields, and the color of Terrain Types and Detail Types on Terrain Types. And the use of colliders by units on building floors.


AnimalField, PlantableField, and TreeField footprint can be controlled in render.json

Summary of files recognized as valid in mods and their naming convention.

Example Mods

Custom Building

Custom Natural Resource

Custom Techs

Custom Land Route

Unity Project Example Assets

Example Assets Unity Project