Skip to content

Modding Cleared Hot

This is a basic intro to the modding support.

For the initial release the idea is to provide the basics for making new missions.

We have:

  • Level Editor — you can select one of our levels, and add your own stuff to it.
  • Missions in LUA — you can make your own code to script your missions.
  • Templates — we provide some templates so you can make a few kinds of missions just by using the level editor without needing to script lua.
  • Custom Configurations — basic support for making variants of units for use in your own missions.

In the main menu you can now open the Mods window:

  • Here you can create your new mod
  • We recommend the format Who.ModName
    • Example: NotKnowing.SampleMod, SuperCoolModder.AwesomeMod
    • This helps prevent conflicts with other modders if you want to share it.
  • After creating your mod, you can edit some of its metadata in modconfig.json:
    • Title
    • Description
    • Author
    • Version
  • You can create missions inside your mod and edit them in the level editor.
  • When you create a mission, you can choose a template or use custom lua.

In the Homebase, in the Arcade section, you can now see the mods you have installed, and play the missions.

In the steam game installation folder we have available a basic Workspace for using Visual Studio Code and provide autocomplete for the custom lua files - inside the installation folder in ClearedHot_Data\StreamingAssets\Modding\Workspace

Where mods live on your computer

The game keeps mods in your user folder (not in the game installation folder):

  • Mods you created (the ones you edit in the level editor):
    • C:\Users\<your user name>\AppData\LocalLow\Not Knowing Corporation\Cleared Hot\Workspace\Mods
  • Mods you installed (made by other people):
    • C:\Users\<your user name>\AppData\LocalLow\Not Knowing Corporation\Cleared Hot\Mods

Structure of a mod

A mod is just a folder full of plain text files — you can open everything with a normal text editor. The folder name is the mod's id (the Who.ModName you chose when creating it), and each mission is a subfolder inside it:

SuperCoolModder.AwesomeMod\
├── modconfig.json               <- info about the mod itself
└── MyMission\                   <- one folder per mission
    ├── missionconfig.json       <- mission settings (which level it uses, etc.)
    ├── MyMission.lua            <- the mission script (optional when using a template)
    ├── MyMission-leveldata.json <- everything you placed in the level editor
    └── MyMission-config.json    <- your custom unit configurations (optional)

Important: the files inside a mission folder must be named after the mission folder itself (MyMission.lua, MyMission-leveldata.json, …) — that's how the game knows which files belong to the mission.

modconfig.json

Describes the mod as a whole. This is what shows up in the Mods window and the Arcade section.

{
    "title": "Awesome Mod",
    "description": "Three missions of pure helicopter mayhem.",
    "author": "Who are you",
    "version": "0.0.1"
}
  • title — the display name of the mod.
  • description — a short text shown along with the title.
  • author — a short text telling who you are.
  • version — version number (Major.Minor.Patch) of your mod, so you can coordinate with players, and we can grow in features.

missionconfig.json

Describes a single mission.

{
    "title": "My Mission",
    "description": "Destroy the enemy base before time runs out.",
    "level": "ArcadeMission - BoxedChallenge - Level",
    "template": "NotKnowing.Templates|KillEmAll"
}
  • title — the display name of the mission.
  • description — a short text shown along with the title.
  • level — the name of the game level (map) the mission is played on. This is set for you when you pick a level while creating the mission.
  • template — optional, the template this mission is based on, written as ModId|MissionId. When set, the template provides the mission logic, so the mission doesn't need its own lua file.

The other files, briefly

  • MyMission.lua — the mission script, where you write your custom mission logic in lua. Not needed if the mission is based on a template. See the Workspace mentioned above for autocomplete support.
  • MyMission-leveldata.json — everything you placed and configured in the level editor. The level editor writes this file for you; you normally don't edit it by hand.
  • MyMission-config.json — your custom unit configurations: each entry takes an existing unit (baseSpawnableId) and tweaks it with a list of configurators, so you can create variants (tougher turrets, more accurate weapons, …) for use in your missions.
  • MyMission-dialogs.json — the dialog lines shown during the mission, referenced from the mission script.