Introduction

Anything you change in the game with OpenCAGE - a level's scripts, its models and textures, the alien's settings, behaviour trees, in-game text and more - can be turned into a mod that other players install with the Mod Manager.

There's nothing special to do while you work: make your changes in OpenCAGE as you normally would. OpenCAGE keeps a copy of each game file's original version the first time it changes it, so it always knows exactly what you changed. When you're happy, Create a Mod packs those changes into a single .omp file.

Mods made this way hold only what you changed, so they're small, and the Mod Manager can combine them with other players' mods - even ones that change the same level or the same settings.

Creating a Mod

Open the Mod Manager from the toolbar and click Create a Mod... at the bottom of it. Save any level you have open first, so your latest changes are included.

The Create a Mod window. On the left, everything that's been changed in the game, ticked to go in the mod: the level SOLACE as one item, two settings each showing its old and new value, a changed and a new behaviour tree, and a text file. On the right, the mod's name, author, version, description, what it changes and its picture, and a Save Mod button at the bottom.

Choosing What Goes In

The left of the window lists everything that's different from the original game, in plain words. OpenCAGE remembers when you changed each composite, model, texture and material, and saves that with the level, so what you've worked on is listed by name with when you last changed it, newest first:

  • Scripts you've changed - each composite you've edited, with the level it's in. A composite you've changed in several levels is one item, which ticks it in all of them (expand it to choose levels). Only the changes you made to it go in, not OpenCAGE's own tidying, such as the defaults it fills in when you select an entity.
  • Models, textures and materials you've changed - each one by name. Models, textures and materials a ticked composite has added come with it automatically, so they aren't listed. A material mapping, collision or physics change can only go in with the rest of its level, and says so.
  • Levels - each level you've changed. A level you made with Create Level always goes in whole. For any other level, Everything else you've changed in it is the whole level as it is now: tick it to include every change in the level, listed or not. A level changed before OpenCAGE kept this history can only go in whole. A level's text files are listed separately. Hover over a level to see its files.
  • Settings - grouped by what they're for, such as The alien (DEFAULT.BML). Each change shows the value it had and the value you gave it, for example AreaSweep › menace cool down time: 30 → 45, so you can untick any you only changed while testing.
  • Behaviour trees - each tree you changed or added, as a single item.
  • Other files - everything else, such as in-game text or the user interface, with when you last changed it in OpenCAGE. Changed animation trees (ANIMATION.PAK) take the layouts you gave them in the Animation Tree Editor with them.

What you've changed starts ticked, apart from the rest of each level. Untick anything that shouldn't be in this mod. If you have mods installed, what they changed isn't listed - only your own work goes into your mod.

If a composite you've ticked needs another change you made - a pin you added to a composite it uses, or something an alias in it points at that you added - that change goes in too, and you're told when the mod is saved. When only part of a level goes in, OpenCAGE builds that part onto a copy of the original level before saving the mod, so saving takes longer, and longer again if you rebuilt the level's lighting and navigation, because the copy is rebuilt as well.

The line at the bottom of the window counts what's ticked, for example In your mod: 3 composites, 1 other level change, 2 settings, 1 behaviour tree.

Name, Description and Picture

On the right, fill in what players see in their Mod Manager:

  • Mod name, Author and Version.
  • Description - what the mod does and anything players should know.
  • What it changes - filled in for you from what you've ticked (for example Changes the level SOLACE; changes 2 settings for the alien, items; changes 1 behaviour tree and adds 1 new one). A mod that only changes how animation trees are laid out in the Animation Tree Editor says so, and that nothing in the game changes. Edit it if you'd like to say it differently.
  • Picture... - an optional screenshot or image, shown beside your mod in the Mod Manager. Large pictures are made smaller automatically.

Click Save Mod..., choose where to save it, and you're done.

A New Version of Your Mod

To release an update, make your changes, open Create a Mod... again, and choose A new version of 'your mod' from the This is list at the top right. Your mod's details are filled in again and its version number goes up by one (change it if you like).

Players who add the new version get it in place of the old one, in the same spot in their list, rather than as a second copy. A mod is only offered here once it's in your own Mod Manager's list - add your earlier version to it if it isn't.

Sharing Your Mod

Your mod is the one .omp file you saved. Share it however you like. Anyone with OpenCAGE can install it by adding it to their Mod Manager, dragging it onto the Mod Manager, or double-clicking it - see Installing Mods.

A mod works on the version of the game it was made with: mods made with the PC version (Steam, Epic Games Store or GOG) install on any PC copy, but not on other versions of the game.

Mods That Work Together

Players often install lots of mods at once. The Mod Manager is built for that: it combines every installed mod's changes, and only has to choose between two mods when they change exactly the same thing.

How Mods Are Combined

When more than one installed mod changes the same file, the Mod Manager looks at what each mod changed inside it compared to the original game, and keeps all of it:

What the mods changeCombined
Settings (alien, characters, weapons, difficulty, items and the other config files)Setting by setting, including entries added to or removed from lists
Behaviour treesNode by node, including whole new trees
Animation tree layouts (how the Animation Tree Editor draws each tree, kept inside ANIMATION.PAK with the trees)Tree by tree, each from the latest mod (or the player's own layouts) made for the version of that tree that's installed. A layout made for another version is left out, and that tree is laid out automatically. A later version that set a tree back to automatic layout takes away an earlier one's layout of it
In-game textString by string
The user interface and other packed filesFile by file inside the pack
Other text and XML filesLine by line, or element by element
A levelComposite by composite and entity by entity - every parameter, link, alias, proxy, trigger sequence and keyframe - plus textures and models replaced by name, and new composites with everything they use. The level is then rebuilt with all of it (navigation, collision and lighting included), along with its flowgraph pages.
A level that isn't in the original gameCan't be combined: if two mods add a level with the same name, the one lower in the list is used
Any other kind of fileCan't be combined: the version from the mod lower in the list is used

Where two mods change the very same thing - the same setting, the same parameter on the same entity - the mod lower in the player's list wins, and the Mod Manager tells them which mod's version was used.

An example. Two mods both edit the same composite - say the room composite a cutscene plays in. Mod A adds a light and links it to the cutscene's start. Mod B changes how long the cutscene's camera takes to blend in, and adds some debug text. With both installed, the composite has A's light and its link, B's new timing and B's text: each mod's changes are carried over entity by entity, and parameter by parameter within an entity. Only if both mods changed that same camera's blend time would one of them win - the lower one - and the player would be told. The composite's flowgraph pages are combined too, so it still opens with every change drawn.

Deleting things. If one mod deletes an entity that another mod changes, the mod lower in the list wins again: a deletion lower down removes it, a change lower down brings it back as that mod has it - and either way the player is told. Links to something that's gone are dropped. A composite that one mod deletes but another mod still uses is kept, so the level is never left using a composite that isn't there.

Tips

  • Only change what your mod needs. Every change in your mod can clash with another mod that changes the same thing. If you changed something just to test, change it back (or untick it) before you create the mod.
  • One idea per mod. Players can mix and match small mods, and turn off the one they don't like.
  • Add new things rather than repurposing existing ones. A new entity or composite can't clash with anyone; changing an existing one can.
  • Start from the original game. Make your mod with no other mods installed, so it holds only your own work. (If you do have mods installed, OpenCAGE still only puts your own changes in - but testing is easier from a clean start.)
  • Write a good description. Say what the mod does, and which other mods it's known to clash with.

Testing With Other Mods

To see how your mod gets on with others, add it and the mods you want to try it with to your Mod Manager, tick them all, and click Apply. Before anything changes, the Mod Manager lists every clash between them, so you can see straight away whether your mod and another change the same thing.

Your own copy of the game already holds your changes, so for a true test, untick every mod and click Apply to get back to the original game first - see Your Own Changes for how your own work is kept alongside mods.

Technical Details

For the curious, and for tool makers:

  • A mod holds each file it changes as it was when you created the mod - stored as a small patch against the original game file wherever that's smaller. When installing, the Mod Manager rebuilds every affected file from its original and the versions in each installed mod, so mods never depend on each other or on the order they were added.
  • Some files are never part of a mod because the Mod Manager works them out again after every install: each level's behaviour tree list (WORLD/BEHAVIOR_TREE.DB, from the character configs), the game's list of extra levels (DATA/PACKAGES/MAIN.PKG), and COMMANDS.BIN (which only the game's development builds read).
  • Every install is done as a single step: the files it's about to change are kept safe first, and anything that goes wrong puts all of them back.
  • A level several mods change is combined and saved the way its authors saved it: plainly when none of them rebuilt the level, or with a full rebuild (lighting, navigation, cover) when one did. So mods that only change scripts are combined quickly, and keep the level's original lighting.
  • Applying only remakes what's changed: a file or level made from exactly the same mods as last time, and still as it was left, is left alone. Turning one mod on or off only touches what that mod changes.
  • The Mod Manager's own files live in the game folder under DATA/MODTOOLS/MODS.