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, Save this as, How it installs, 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:

  • Levels - each level you've changed. A level you made with Create Level always goes in whole. So does a level that mods you've installed change too: it's listed as your own version of it, whole. Under any other level are the scripts (composites), models, textures and materials you've edited in it, each by name, any change to its characters' appearance (in the Character Editor) or its galaxy (in the Galaxy Editor), and its text files. Only the changes you made to a script go in, not OpenCAGE's own tidying, such as the defaults it fills in when you select an entity. Models, textures and materials a ticked script has added come with it automatically, so they aren't listed. A material mapping, collision or physics change can only go in with the whole level, and says so. Last comes The whole level: tick it to include every change in the level, listed or not - including any made before OpenCAGE kept this history. A level changed only before then can only go in whole. Which text databases a level loads, set in the Level Text DBs editor, goes in with the level. Hover over The whole level to see the level's files. A level's box is part-filled when only some of it is ticked; click it to tick the whole level.
  • 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. What a config editor writes when it saves a file isn't listed unless the value is different: a number written another way (3 as 3.000), or a value a character only inherits from its template, written into its own file. The graphics and sound options (ENGINE_SETTINGS.XML, which the Graphics Settings editor changes) and the controls (INPUT.XML) are listed value by value too: a graphics option by its setting and quality level, for example Graphics › Streaming Texture Heap Size › Default: 300 → 512. Your mod then changes only the values you ticked, so it can be installed alongside other mods that change other options in the same file, and taking it off puts back just those values.

    Create a Mod listing Settings, The graphics and sound options (ENGINE_SETTINGS.XML) - 2 changes: Graphics › Streaming Texture Heap Size › Default: 300 → 512, and the same for Ultra. Below them, an unticked, folded-away item: Copies of the game's own files - not changes, so left out unless you tick them.

  • 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. The user interface (UI.PAK) and the animations (ANIMATION.PAK) list what you changed inside them, so you can leave some of it out: each UI file you changed or added, and each animation tree, animation you imported or replaced, blend set and tree layout you changed. An animation brings its animation data and its entry in the game's list of animations with it, and a changed animation tree brings the layout you gave it in the Animation Tree Editor. With everything inside ticked, the file goes in as it is; with some of it unticked, your mod holds the original file with only the ticked changes in it. A change to the text databases every level loads, or to those of a level that isn't otherwise listed, is an item of its own here.
  • Copies of the game's own files - files that are byte for byte ones the game ships, under the same names, somewhere the game doesn't use them: what's left when one of the game's folders is renamed and then put back, or backed up inside the game folder. They aren't changes, so they start unticked and folded away. Tick one only if your mod really does need it as a new file. (A level you duplicated is your own level, not a copy, and is listed under Levels.)

What you've changed starts ticked, apart from The whole level of a level whose changes are listed one by one - unless one of them can only go in with the whole level. If you changed a level before OpenCAGE kept this history, tick The whole level so those changes go in too. 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. If you rebuilt the level with Save and Build and what you ticked changes something a build makes - a model, a light, collision or navigation, say - the copy is rebuilt as well, which takes longer again; a change to a level's logic alone only needs the copy saved.

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, 2 animation trees.

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. No picture takes it off again.

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

How It Installs

Under Save this as, How it installs chooses which kind of mod you're making:

  • Replaces what it changes - a replacement mod. It installs exactly as you made it: each level and file it changes goes in whole, as you have it - lighting and navigation you've rebuilt included - so nothing is put together or rebuilt when you save it or when players install it, and it installs as quickly as a mod can. The trade-off is that no other mod can change the same levels or files while it's on: a player's Mod Manager won't apply the two together, and asks them to choose. Their own changes to those levels and files are set aside while it's on, and come back when it's turned off.
  • Combines with other mods - a combinable mod. Only what you tick goes in, down to a single script or setting. When players install it alongside other mods that change the same levels and files, every mod's changes are kept (see How Mods Are Combined). The trade-off is time: a level other mods change too is put back together with all of their changes when they're installed together, which takes a while if the level needs its lighting and navigation rebuilt.

Combines with other mods is chosen to start with. Either way, which text databases a level loads goes in with the level, and is kept alongside every other mod's levels whichever way they install. With Replaces what it changes chosen, ticking anything in a level, a settings file or a packed file ticks all of it. A new version of a mod installs the same way as the one before it, unless you change it.

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 Save this as 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). Choosing A new mod again puts back what you had typed before, apart from anything you've changed since.

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 Steam, Epic Games Store or GOG version install on any of those three, but not on other versions of the game, such as the Microsoft Store or Nintendo Switch version.

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. (This is for combinable mods: a replacement mod is never combined - see How It Installs.)

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, graphics and sound options, controls and the other config files)Setting by setting, including entries added to or removed from lists - for the graphics and sound options, quality level by quality level. An XML file keeps its own layout, so it differs from the original only where the mods change it
Behaviour treesNode by node, including whole new trees
Animation trees (ANIMATION.PAK)Tree by tree, so two mods changing different trees of the same character both keep their changes
Animations imported or replaced, and blend sets (ANIMATION.PAK)Animation by animation and blend set by blend set: each mod's animations go into the character's list and the game's list of all animations, as importing them again would put them, so two mods adding animations to the same character both keep theirs
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.